From 9d3f1aa7571cd532c0c27bf8376ebf4b2178a252 Mon Sep 17 00:00:00 2001
From: charles <981744753@qq.com>
Date: 星期三, 24 七月 2024 17:45:45 +0800
Subject: [PATCH] fix:解决srm之前改了域名,处理各种异常状态,跳转也会出现异常等问题。

---
 src/views/purchaseManage/returned/index.vue |   43 +++++++++++++++++++++++++++++++------------
 1 files changed, 31 insertions(+), 12 deletions(-)

diff --git a/src/views/purchaseManage/returned/index.vue b/src/views/purchaseManage/returned/index.vue
index feafffe..ce8dc79 100644
--- a/src/views/purchaseManage/returned/index.vue
+++ b/src/views/purchaseManage/returned/index.vue
@@ -21,6 +21,7 @@
              ref="tableListRef"
              :table-list="tableList"
              @selCommonClick="selCommonClick"
+             @selTableCol="selTableCol"
          >
            <template slot="tableButton">
              <el-table-column align="center" label="鐘舵��" width="120">
@@ -74,6 +75,19 @@
       },
       search: '',
       returnedStatusList:getDataByType('returnedStatus'),
+      tableColumn: [
+        { label: "閫�璐у崟缂栧彿", prop: "number", min: 190, isCommonClick: true ,default:true},
+        { label: "閲囪喘鍗曠紪鍙�", prop: "name", min: 130, isCommonClick: true},
+        { label: "鍗曟嵁绫诲瀷", prop: "contact_name", min: 130 },
+        { label: "渚涘簲鍟嗗悕绉�", prop: "contact_phone", min: 130 },
+        { label: "閫�璐т粨搴�", prop: "sales_resources", min: 130 },
+        { label: "閫�璐х悊鐢�", prop: "province", min: 180 },
+        { label: "缁忓姙浜�", prop: "city", min: 130 },
+        { label: "鍒跺崟浜�", prop: "member_name", min: 130 },
+        { label: "閫�璐ф棩鏈�", prop: "member_name", min: 150 },
+        // { label: "鐘舵��", prop: "member_name", min: 110 }
+      ],
+      showCol: ['閫�璐у崟缂栧彿', '閲囪喘鍗曠紪鍙�', '鍗曟嵁绫诲瀷', '渚涘簲鍟嗗悕绉�', '閫�璐т粨搴�', '閫�璐х悊鐢�', '閫�璐ф棩鏈�']
     }
   },
   created() {
@@ -92,23 +106,27 @@
         return "--";
       }
     },
+    setColumnVisible(showCol){
+      return  this.tableColumn.map(ele=>{
+        return {
+          ...ele,
+          isShowColumn:showCol.includes(ele.label)
+        }
+      })
+    },
     setTable() {
       this.tableList = {
         tableInfomation: [],
         selectIndex: true,
-        tableColumn: [
-          { label: "閫�璐у崟缂栧彿", prop: "number", min: 190, isCommonClick: true },
-          { label: "閲囪喘鍗曠紪鍙�", prop: "name", min: 130, isCommonClick: true},
-          { label: "鍗曟嵁绫诲瀷", prop: "contact_name", min: 130 },
-          { label: "渚涘簲鍟嗗悕绉�", prop: "contact_phone", min: 130 },
-          { label: "閫�璐т粨搴�", prop: "sales_resources", min: 130 },
-          { label: "閫�璐х悊鐢�", prop: "province", min: 180 },
-          { label: "缁忓姙浜�", prop: "city", min: 130 },
-          { label: "鍒跺崟浜�", prop: "member_name", min: 130 },
-          { label: "閫�璐ф棩鏈�", prop: "member_name", min: 150 },
-          // { label: "鐘舵��", prop: "member_name", min: 110 }
-        ]
+        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);
     },
     // 璇锋眰鏁版嵁
     async getData() {
@@ -128,6 +146,7 @@
     },
     onFilterSearch(searchText){
       this.search = searchText ?? ''
+      this.pagerOptions.currPage = 1
       this.getData()
     },
    

--
Gitblit v1.8.0