Browse Source

change:cargo船货凑期.批次记录选项有条件禁用.

peter 1 day ago
parent
commit
ce0312d99a
1 changed files with 11 additions and 1 deletions
  1. 11 1
      src/pages/cargo-consolidation-request/index.vue

+ 11 - 1
src/pages/cargo-consolidation-request/index.vue

@@ -265,6 +265,10 @@
             >
             >
               <el-option
               <el-option
                 v-for="option in computedOption as any[]"
                 v-for="option in computedOption as any[]"
+                :disabled="
+                  (!option.isSearch && scope.row.addFlag) ||
+                  (option.isSearch && !scope.row.addFlag)
+                "
                 :key="option.id"
                 :key="option.id"
                 :value="option.id"
                 :value="option.id"
                 :label="
                 :label="
@@ -773,6 +777,7 @@ let batchListOption = computed(() =>
       return {
       return {
         Name: i.Batch_Record.name || '',
         Name: i.Batch_Record.name || '',
         id: i.Batch_Record.id || '',
         id: i.Batch_Record.id || '',
+        isSearch: false, // 用来区分是搜索出来的还是原始数据
       }
       }
     })
     })
     // ai生成的去重逻辑.
     // ai生成的去重逻辑.
@@ -1090,7 +1095,12 @@ const search = (keyword: string) => {
   })
   })
     .then((res: any) => {
     .then((res: any) => {
       if (Array.isArray(res.data) && res.data.length) {
       if (Array.isArray(res.data) && res.data.length) {
-        qcList.value = res.data
+        qcList.value = res.data.map((i: any) => {
+          return {
+            ...i,
+            isSearch: true,
+          }
+        })
       } else {
       } else {
         qcList.value = []
         qcList.value = []
         ElMessage.warning('No Data Found')
         ElMessage.warning('No Data Found')