فهرست منبع

feat:解决不选择air保存失败的问题

AmandaG 8 ماه پیش
والد
کامیت
78142641c1
2فایلهای تغییر یافته به همراه11 افزوده شده و 17 حذف شده
  1. 4 7
      src/components/AddRules/src/AddRules.vue
  2. 7 10
      src/components/CreateAddRules/src/CreateAddRules.vue

+ 4 - 7
src/components/AddRules/src/AddRules.vue

@@ -26,11 +26,11 @@ const props = defineProps<Props>()
 let savesubscribeobj: any = {}
 const SystemList = ref(props.SystemList)
 const RulesActive = ref(['SelectMilestone', 'NotificationFrequency', 'NotificationMethod'])
-const OceanCheckList = ref()
+const OceanCheckList = ref([])
 const OceanCheckCode = ref()
-const AirCheckList = ref()
+const AirCheckList = ref([])
 const AirCheckListCode = ref()
-const ContainerOceanList = ref()
+const ContainerOceanList = ref([])
 const ContainerOceanCode = ref()
 const IsFirstActive = ref(true)
 const IsTwoActive = ref(true)
@@ -385,15 +385,13 @@ const Savesubscribe = () => {
   if (props.TitleType == 'Milestone') {
     savesubscribeobj.rules_type = 'Milestone_Update'
     if (
-      OceanCheckList.value == undefined &&
-      AirCheckList.value == undefined ||
       OceanCheckList.value.length == 0 &&
       AirCheckList.value.length == 0 ||
       MilFrequencyList.value.length == 0 ||
       MilMethodsList.value == undefined ||
       MilMethodsList.value.length == 0
     ) {
-      if (OceanCheckList.value == undefined && AirCheckList.value == undefined || OceanCheckList.value.length == 0 && AirCheckList.value.length == 0) {
+      if (OceanCheckList.value.length == 0 && AirCheckList.value.length == 0) {
         missingmessage.value += 'Select Milstone, '
       }
       if (MilFrequencyList.value.length == 0) {
@@ -429,7 +427,6 @@ const Savesubscribe = () => {
   } else if (props.TitleType == 'Container') {
     savesubscribeobj.rules_type = 'Container_Status_Update'
     if (
-      ContainerOceanList.value == undefined ||
       ContainerOceanList.value.length == 0 ||
       ConFrequencyList.value.length == 0 ||
       ConMethodsList.value == undefined ||

+ 7 - 10
src/components/CreateAddRules/src/CreateAddRules.vue

@@ -33,11 +33,11 @@ const RulesActive = ref([
   'NotificationFrequency',
   'NotificationMethod'
 ])
-const OceanCheckList = ref()
+const OceanCheckList = ref([])
 const OceanCheckListCode = ref()
-const AirCheckList = ref()
+const AirCheckList = ref([])
 const AirCheckListCode = ref()
-const ContainerOceanList = ref()
+const ContainerOceanList = ref([])
 const ContainerOceanCode = ref()
 const IsFirstActive = ref(true)
 const IsTwoActive = ref(true)
@@ -133,8 +133,8 @@ const Initdata = () => {
                 AirCheckList.value.push(option.label)
               }
             })
-            createObj.Transportstr = res.data.Container_Status_Update.shipment_details.split(';\r\n')[0]
-            createObj.Timestr = res.data.Container_Status_Update.shipment_details.split(';\r\n')[1]
+            createObj.Transportstr = res.data.Milestone_Update.shipment_details.split(';\r\n')[0]
+            createObj.Timestr = res.data.Milestone_Update.shipment_details.split(';\r\n')[1]
             createListMilestone.value.push(createObj.Transportstr)
             createListMilestone.value.push(createObj.Timestr)
           } else if (editTablerules_type == 'Container_Status_Update') {
@@ -622,8 +622,6 @@ const Savesubscribe = () => {
   if (props.TitleType == 'Milestone') {
     savesubscribeobj.rules_type = 'Milestone_Update'
     if (
-      OceanCheckList.value == undefined &&
-      AirCheckList.value == undefined ||
       OceanCheckList.value.length == 0 &&
       AirCheckList.value.length == 0 ||
       MilFrequencyList.value.length == 0 ||
@@ -637,7 +635,7 @@ const Savesubscribe = () => {
       if (createObj.Timestr == '') {
         missingmessage.value += 'Time, '
       }
-      if (OceanCheckList.value == undefined && AirCheckList.value == undefined || OceanCheckList.value.length == 0 && AirCheckList.value.length == 0 ) {
+      if (OceanCheckList.value.length == 0 && AirCheckList.value.length == 0 ) {
         missingmessage.value += 'Select Milstone, '
       }
       if (MilFrequencyList.value.length == 0) {
@@ -673,7 +671,6 @@ const Savesubscribe = () => {
   } else if (props.TitleType == 'Container') {
     savesubscribeobj.rules_type = 'Container_Status_Update'
     if (
-      ContainerOceanList.value == undefined ||
       ContainerOceanList.value.length == 0 ||
       ConFrequencyList.value.length == 0 ||
       ConMethodsList.value.length == 0 ||
@@ -686,7 +683,7 @@ const Savesubscribe = () => {
       if (createObj.Timestr == '') {
         missingmessage.value += 'Time, '
       }
-      if (ContainerOceanList.value == undefined || ContainerOceanList.value.length == 0) {
+      if (ContainerOceanList.value.length == 0) {
         missingmessage.value += 'Ocean Shipments, '
       }
       if (ConFrequencyList.value.length == 0) {