From 0712b49e5538589dac4859ca8cebf196caa954ab Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期二, 21 十一月 2023 11:28:09 +0800
Subject: [PATCH] fix:供应商管理添加产品,产品列表展示修改及采购管理bug修改

---
 src/views/purchaseManage/purchase/DetailSupplier.vue |   38 ++++++++++++++++++++++++++++----------
 1 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/src/views/purchaseManage/purchase/DetailSupplier.vue b/src/views/purchaseManage/purchase/DetailSupplier.vue
index b13839c..9c9fa16 100644
--- a/src/views/purchaseManage/purchase/DetailSupplier.vue
+++ b/src/views/purchaseManage/purchase/DetailSupplier.vue
@@ -121,6 +121,7 @@
                 ref="tableListRef"
                 :showSummary="showSummary"
                 :table-list="tableList"
+                @selTableCol="selTableCol"
               >
               </TableCommonView>
               <div class="table-bottom">
@@ -189,7 +190,18 @@
         mergeNumber: 5,
         totalName:'灏忚'
       },
+      showCol: ['浜у搧鍚嶇О', '浜у搧缂栫爜', '璁¢噺鍗曚綅', '瑙勬牸鍨嬪彿', '鏁伴噺', '閿�鍞崟浠�','浠风◣鍚堣','鎻忚堪'],
       purchaseStatusList:getDataByType('purchaseStatus'),
+      tableColumn: [
+        { label: "浜у搧鍚嶇О", prop: "name", min: 160,  },
+        { label: "浜у搧缂栫爜", prop: "number", min: 130, },
+        { label: "璁¢噺鍗曚綅", prop: "unit", min: 130 },
+        { label: "瑙勬牸鍨嬪彿", prop: "specifications", min: 130 },
+        { label: "鏁伴噺", prop: "amount", min: 130 },
+        { label: "閿�鍞崟浠�", prop: "price", min: 130 },
+        { label: "浠风◣鍚堣", prop: "total", min: 130 },
+        { label: "鎻忚堪", prop: "remark", min: 130 },
+      ],
     };
   },
   created() {
@@ -326,17 +338,23 @@
       this.tableList = {
         tableInfomation: item.productList?item.productList:[],
         selectIndex: true,
-        tableColumn: [
-          { label: "浜у搧鍚嶇О", prop: "name", min: 160,  },
-          { label: "浜у搧缂栫爜", prop: "number", min: 130, },
-          { label: "璁¢噺鍗曚綅", prop: "unit", min: 130 },
-          { label: "瑙勬牸鍨嬪彿", prop: "specifications", min: 130 },
-          { label: "鏁伴噺", prop: "amount", min: 130 },
-          { label: "閿�鍞崟浠�", prop: "price", min: 130 },
-          { label: "浠风◣鍚堣", prop: "total", min: 130 },
-          { label: "鎻忚堪", prop: "remark", min: 130 },
-        ],
+        showcol: this.showCol,
+        allcol:[],
+        tableColumn:this.setColumnVisible(this.showCol)
       };
+      this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label);
+    },
+    selTableCol(val) {
+      this.showcol = val;
+      this.tableList.tableColumn = this.setColumnVisible(val);
+    },
+    setColumnVisible(showCol){
+      return  this.tableColumn.map(ele=>{
+        return {
+          ...ele,
+          isShowColumn:showCol.includes(ele.label)
+        }
+      })
     },
     handleClose() {
       this.detailConfig.visible = false;

--
Gitblit v1.8.0