From 7f5306d896fa0c541a83c4b62d0c533a604dd184 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期日, 28 四月 2024 18:23:23 +0800
Subject: [PATCH] 供应商管理模块 添加新产品的时候供应商对应的产品和已增加的产品都不可选的逻辑处理

---
 src/views/supplierManage/supplier/index.vue         |    2 +-
 src/views/supplierManage/supplier/AddNewProduct.vue |    7 +++++++
 src/components/makepager/CommonFormTableView.vue    |   19 ++++++++++++++++---
 3 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue
index 6eec853..cfbb18b 100644
--- a/src/components/makepager/CommonFormTableView.vue
+++ b/src/components/makepager/CommonFormTableView.vue
@@ -223,7 +223,7 @@
       v-if="editSelCommonConfig.editVisible"
       :edit-common-config="editSelCommonConfig"
       :sign="sign"
-      :selectBoxList="tableList.tableData"
+      :selectBoxList="arrDisabledList"
       :quotationNumber="quotationNumber"
       @selClient="selClient"
       @getSelectArray="getSelectArray"
@@ -304,13 +304,21 @@
           mergeNumber: 1
         }
       }
+    },
+    disabledList:{
+      type:[Array],
+      default: () => {
+        return []
+      }
     }
   },
   data() {
     return {
       total: 0,
       productList: [],
-      tableList: [],
+      tableList: {
+        tableData:[]
+      },
       editSelCommonConfig: {
         editVisible: false,
         isSelectBox: false,
@@ -320,6 +328,7 @@
       },
       productIndex: 0,
       supplierId:null,
+      arrDisabledList:[]
     }
   },
   created() {
@@ -338,7 +347,10 @@
     supplierId(n,o) {  
       this.editSelCommonConfig.supplierId=n
       console.log(n,o,"鐪嬬湅閭�") 
-    } 
+    } ,
+    'tableList.tableData':function () {
+      this.arrDisabledList=this.disabledList.concat(this.tableList.tableData)
+    }
   },
   computed: {},
   methods: {
@@ -372,6 +384,7 @@
     },
     getTableInfo() {
       this.tableList = this.productTableList
+      this.arrDisabledList=this.disabledList.concat(this.tableList.tableData)
     },
     // 浜у搧鍚嶇О
     async getProductList() {
diff --git a/src/views/supplierManage/supplier/AddNewProduct.vue b/src/views/supplierManage/supplier/AddNewProduct.vue
index d5fca8d..7e714b8 100644
--- a/src/views/supplierManage/supplier/AddNewProduct.vue
+++ b/src/views/supplierManage/supplier/AddNewProduct.vue
@@ -16,6 +16,7 @@
           <CommonFormTableView
             ref="productTable"
             :addTypeIdMultiple="true"
+            :disabledList="disabledList"
             :product-table-list="productTableList"
             :detail-enter="detailEnter"
             :isOperate="isOperate"
@@ -52,6 +53,12 @@
           infomation: {}
         }
       }
+    },
+    disabledList:{
+      type:[Array],
+      default: () => {
+        return []
+      }
     }
   },
   components: { CommonFormTableView },
diff --git a/src/views/supplierManage/supplier/index.vue b/src/views/supplierManage/supplier/index.vue
index 501c717..88e9dbe 100644
--- a/src/views/supplierManage/supplier/index.vue
+++ b/src/views/supplierManage/supplier/index.vue
@@ -110,7 +110,7 @@
     <!-- 鐩稿叧渚涘簲鍟� -->
     <RaleteSupplierList v-if="raleteSupplierConfig.visible" :common-config="raleteSupplierConfig" />
     <!-- 娣诲姞鏂颁骇鍝� -->
-    <AddNewProduct v-if="newProductConfig.visible" :add-common-config="newProductConfig" />
+    <AddNewProduct v-if="newProductConfig.visible" :disabledList="productTableList.tableInfomation" :add-common-config="newProductConfig" />
     <!-- 鏂板缓/缂栬緫 -->
     <AddPurchase v-if="editPurchaseConfig.visible" :edit-common-config="editPurchaseConfig" />
   </div>

--
Gitblit v1.8.0