From d2c182e7310c30a38ec6ce0d8a1d2ce00d51ac8f Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 04 一月 2024 14:54:32 +0800
Subject: [PATCH] 细节调试

---
 src/views/basic/location/index.vue |   46 ++++++++++++++++++++++++++--------------------
 1 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/src/views/basic/location/index.vue b/src/views/basic/location/index.vue
index f0474fe..2212e67 100644
--- a/src/views/basic/location/index.vue
+++ b/src/views/basic/location/index.vue
@@ -11,7 +11,10 @@
         :ajaxFun="ajaxFun"
         ref="locationTable"
       >
-        <template #toolbar></template>
+        <template #toolbar>
+          <el-button type="primary" @click="addOrUpdateHandle"
+          v-if="permissions.basic_location_add">鏂板</el-button>
+        </template>
       </ttable>
       <!-- 寮圭獥, 鏂板 / 淇敼 -->
       <table-form
@@ -44,7 +47,7 @@
       mulLocation: [],
       uploadInfo: {
         // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
-        isShow: true,
+        isShow: false,
         url: '/mes/location/upload'
       },
       prelang: 'operation',
@@ -59,6 +62,7 @@
         seqNo: true,
         isShowHide: true, // 鏄惁鏄剧ず鏄惧奖鎸夐挳
         isSearch: true, // 楂樼骇鏌ヨ鎸夐挳
+        isRefresh: true, // 鏄惁鏄剧ず鍒锋柊鎸夐挳
         defaultOrderBy: { column: 'createTime', direction: 'desc' }
       },
       table: {
@@ -193,33 +197,20 @@
             optList: () => {
               return this.getWarehouseLocGroupList()
             }
-          },
+          }/* ,
           // ERP搴撲綅
           {
             minWidth: '200',
             prop: 'ifsLocation',
-            label: 'ERP搴撲綅',
+            label: 'IFS搴撲綅',
             sort: true,
             isTrue: false,
             isSearch: true,
             searchInfoType: 'text'
-          }
+          } */
         ],
-        toolbar: [
-          {
-            text: '鏂板',
-            type: 'primary',
-            fun: this.addOrUpdateHandle
-          }
-        ],
-        operator: [
-          {
-            text: '鍒犻櫎',
-            type: 'text',
-            size: 'small',
-            fun: this.deleteHandle
-          }
-        ],
+        toolbar: [],
+        operator: null,
         operatorConfig: {
           fixed: 'right',
           label: '鎿嶄綔',
@@ -245,6 +236,16 @@
     TableForm
   },
   created() {
+    if(this.permissions.basic_location_del){
+      this.table.operator = [
+          {
+            text: '鍒犻櫎',
+            type: 'text',
+            size: 'small',
+            fun: this.deleteHandle
+          }
+        ]
+    }
     this.getLocTypeCache('warehouse_type') // 鑾峰彇瀹氭椂浠诲姟杩愯鏃剁姸鎬�
     this.initWarehouseSelect()
     // this.getIFSLocationCache()
@@ -350,6 +351,10 @@
     },
     // 鏂板 / 淇敼
     addOrUpdateHandle(row) {
+      if(!this.permissions.basic_location_edit && row.id!=null){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+        return
+      }
       this.addOrUpdateVisible = true
       this.$nextTick(() => {
         this.$refs.addOrUpdate.init(row == null ? null : row.id)
@@ -357,6 +362,7 @@
     },
     // 鍒犻櫎
     deleteHandle(row) {
+
       this.$confirm('鏄惁纭鍒犻櫎搴撲綅鍙蜂负' + row.locNo, '鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',

--
Gitblit v1.9.3