From d897e9aac7689926551ae413a22430540f765846 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期二, 21 十一月 2023 20:06:15 +0800
Subject: [PATCH] 供应商信息修改

---
 src/views/supplierManage/supplier/RaleteSupplierList.vue |   48 +++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 37 insertions(+), 11 deletions(-)

diff --git a/src/views/supplierManage/supplier/RaleteSupplierList.vue b/src/views/supplierManage/supplier/RaleteSupplierList.vue
index 6306353..9f70e62 100644
--- a/src/views/supplierManage/supplier/RaleteSupplierList.vue
+++ b/src/views/supplierManage/supplier/RaleteSupplierList.vue
@@ -44,13 +44,21 @@
   computed: {},
   data() {
     return {
-      dialogWidth: "80%",
+      dialogWidth: "60%",
       editConfig: this.commonConfig,
       tableList: {},
       commonDetail: {
         visible: false,
         infomation: {}
-      }
+      },
+      showCol: ["渚涘簲鍟嗙紪鍙�", "渚涘簲鍟嗗悕绉�", "閲囪喘浠锋牸", "渚涜揣澶╂暟", "鐗╂祦鏃堕暱(澶�)"],
+      tableColumn: [
+        { label: "渚涘簲鍟嗙紪鍙�", prop: "supplierNumber", min: 190, isCommonClick: true },
+        { label: "渚涘簲鍟嗗悕绉�", prop: "supplierName", min: 130 },
+        { label: "閲囪喘浠锋牸", prop: "purchasePrice", min: 130 },
+        { label: "渚涜揣澶╂暟", prop: "deliveryTime", min: 130 },
+        { label: "鐗╂祦鏃堕暱(澶�)", prop: "shippingDuration", min: 130 }
+      ]
     }
   },
   created() {
@@ -58,18 +66,36 @@
     this.getProductList()
   },
   methods: {
+    setColumnVisible(showCol) {
+      return this.tableColumn.map((ele) => {
+        return {
+          ...ele,
+          isShowColumn: showCol.includes(ele.label)
+        }
+      })
+    },
     setTable() {
       this.tableList = {
         tableInfomation: [],
         selectIndex: true,
-        tableColumn: [
-          { label: "渚涘簲鍟嗙紪鍙�", prop: "supplierNumber", min: 190, isCommonClick: true },
-          { label: "渚涘簲鍟嗗悕绉�", prop: "supplierName", min: 130 },
-          { label: "閲囪喘浠锋牸", prop: "purchasePrice", min: 130 },
-          { label: "渚涜揣澶╂暟", prop: "deliveryTime", min: 130 },
-          { label: "鐗╂祦鏃堕暱(澶�)", prop: "shippingDuration", min: 130 }
-        ]
+        highlight: true,
+        ref: "tableListRef",
+        showcol: this.showCol,
+        allcol: [],
+        tableColumn: this.setColumnVisible(this.showCol)
       }
+      this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
+
+      this.searchOptions = []
+      for (let i = 0; i < this.tableList.tableColumn.length; i++) {
+        const label = this.tableList.tableColumn[i].label
+        const value = this.tableList.tableColumn[i].prop
+        this.searchOptions.push({ value: value, label: label })
+      }
+    },
+    selTableCol(val) {
+      this.showcol = val
+      this.tableList.tableColumn = this.setColumnVisible(val)
     },
     // 浜у搧鍒楄〃
     async getProductList(val, content) {
@@ -89,7 +115,7 @@
           }
         })
         this.tableList.tableInfomation = list || []
-        this.tableList.totalCount = res.data.data.total
+        this.pagerOptions.totalCount = res.data.data.total
       })
     },
     handleClose() {
@@ -98,7 +124,7 @@
     selCommonClick(row) {
       console.log(row)
       this.commonDetail.visible = true
-      this.commonDetail.infomation = { ...row }
+      this.commonDetail.infomation = { ...row.supplier }
     }
   }
 }

--
Gitblit v1.8.0