From ef4e46f182aee6253805e66286dee847c573cbde Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 22 五月 2024 17:18:34 +0800
Subject: [PATCH] 完成原材料、产品检验、过程检,包装检键盘切换输入框

---
 src/views/basic/staff/index.vue |   45 ++++++++++++++++++++++++++-------------------
 1 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/src/views/basic/staff/index.vue b/src/views/basic/staff/index.vue
index b9a98fd..9442faf 100644
--- a/src/views/basic/staff/index.vue
+++ b/src/views/basic/staff/index.vue
@@ -10,7 +10,10 @@
         :ajaxFun="ajaxFun"
         ref="staffTable"
       >
-        <template #toolbar></template>
+        <template #toolbar>
+          <el-button type="primary" @click="addOrUpdateHandle"
+          v-if="permissions.basic_staff_add">鏂板</el-button>
+        </template>
       </ttable>
       <!-- 寮圭獥, 鏂板 / 淇敼 -->
       <table-form
@@ -38,8 +41,10 @@
       multipleSelection: [],
       uploadInfo: {
         // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
-        isShow: false,
-        url: ''
+        isShow: true,
+        url: '/mes/staff/upload',
+        download: true,
+        fileName: '鍛樺伐妯℃澘'
       },
       prelang: 'operation',
       options: {
@@ -205,21 +210,8 @@
             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: '鎿嶄綔',
@@ -235,7 +227,7 @@
     ttable
   },
   computed: {
-    ...mapGetters(['permissions'])
+    ...mapGetters(['permissions']),
   },
   methods: {
     // 鑾峰彇鏁版嵁鍒楄〃
@@ -244,6 +236,10 @@
     },
     // 鏂板 / 淇敼
     addOrUpdateHandle(row) {
+      if(!this.permissions.basic_staff_edit && row.id!=null){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
+        return
+      }
       this.addOrUpdateVisible = true
       this.$nextTick(() => {
         this.$refs.addOrUpdate.init(row == null ? null : row.id)
@@ -282,6 +278,17 @@
     }
   },
   created() {
+    this.uploadInfo.isShow = this.permissions.basic_staff_upload
+    if(this.permissions.basic_staff_del){
+      this.table.operator = [
+          {
+            text: '鍒犻櫎',
+            type: 'text',
+            size: 'small',
+            fun: this.deleteHandle
+          }
+        ]
+    }
     this.initPersonNatureSelect()
   }
 }

--
Gitblit v1.9.3