Sfoglia il codice sorgente

fix: cargo consolidation request.船货凑期.处理批次记录下拉框候选项不同步的问题.

peter 1 giorno fa
parent
commit
e9227b174f
1 ha cambiato i file con 5 aggiunte e 3 eliminazioni
  1. 5 3
      src/pages/cargo-consolidation-request/index.vue

+ 5 - 3
src/pages/cargo-consolidation-request/index.vue

@@ -264,7 +264,7 @@
               @change="($e) => onBatchRecordChange($e, scope.$index)"
             >
               <el-option
-                v-for="option in batchListOption.concat(qcList) as any[]"
+                v-for="option in computedOption as any[]"
                 :key="option.id"
                 :value="option.id"
                 :label="
@@ -768,7 +768,7 @@ let batchListOption = computed(() =>
   subList.value
     .filter(
       (i) =>
-        i.Batch_Record && i.Batch_Record.name && i.Batch_Record.name.length,
+        i.Batch_Record && i.Batch_Record.name && i.Batch_Record.name.length > 0,
     )
     .map((i) => {
       return {
@@ -783,7 +783,9 @@ let batchListOption = computed(() =>
         self.findIndex((t) => t.Name === item.Name && t.id === item.id),
     ),
 )
-
+let computedOption = computed(() => {
+  return qcList.value.concat(batchListOption.value)
+})
 let getSubList = (e: any = {}) => {
   if (e.id) currentRow.value = e
   loading.value = true