Browse Source

Merge remote-tracking branch 'origin/master'

guoyujia 11 months ago
parent
commit
59b152cdea

+ 9 - 2
src/views/business/returnTurnover/DialogReturnTurnover.vue

@@ -92,12 +92,19 @@ function getNowCarriers(data) {
     if (res.code == 200) {
       form.value.carriers =
         res.data.dayworkCarrierList && res.data.dayworkCarrierList.length > 0
-          ? res.data.dayworkCarrierList.map((v) => ({
+          ? res.data.dayworkCarrierList.filter(v => v.processInspectionId == "0").map((v) => ({
             value: v.carrierId,
             label: v.carrierCode,
           }))
           : [];
-      form.value.carrierIds = res.data.carrierIds;
+
+      const carriers = res.data.dayworkCarrierList && res.data.dayworkCarrierList.length > 0
+        ? res.data.dayworkCarrierList.filter(v => v.processInspectionId == "0").map((v) => ({
+          id: v.carrierId,
+          code: v.carrierCode,
+        }))
+        : []
+      form.value.carrierIds = res.data.carrierIds.filter(v => carriers.some(e => e.id == v));
       getCarriers()
     }
   });

+ 8 - 2
src/views/business/returnTurnover/DialogReturnTurnoverBatch.vue

@@ -74,12 +74,18 @@ function getNowCarriers(data, index) {
     if (res.code == 200) {
       form.value.batches[index].carriers =
         res.data.dayworkCarrierList && res.data.dayworkCarrierList.length > 0
-          ? res.data.dayworkCarrierList.map((v) => ({
+          ? res.data.dayworkCarrierList.filter(v => v.processInspectionId == "0").map((v) => ({
             id: v.carrierId,
             code: v.carrierCode,
           }))
           : [];
-      form.value.batches[index].carrierIds = res.data.carrierIds;
+      const carriers = res.data.dayworkCarrierList && res.data.dayworkCarrierList.length > 0
+        ? res.data.dayworkCarrierList.filter(v => v.processInspectionId == "0").map((v) => ({
+          id: v.carrierId,
+          code: v.carrierCode,
+        }))
+        : []
+      form.value.batches[index].carrierIds = res.data.carrierIds.filter(v => carriers.some(e => e.id == v));
     }
   });
 }