From 1dc18db8439ce29fee28edf6627aaadc8726c49c Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 25 十二月 2023 17:02:02 +0800
Subject: [PATCH] 	modified:   src/api/plan/productionschedul.js 	modified:   src/views/plan/productionschedul/index.vue 	modified:   src/views/quality/rawMaterial/rawMaterial-form.vue 	modified:   src/views/technology/routing/index.vue 	modified:   vue.config.js

---
 src/views/technology/routing/index.vue |   37 ++++++++++++++++++-------------------
 1 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/src/views/technology/routing/index.vue b/src/views/technology/routing/index.vue
index 113abba..8c9a5b9 100644
--- a/src/views/technology/routing/index.vue
+++ b/src/views/technology/routing/index.vue
@@ -16,13 +16,13 @@
           <el-button v-if="permissions.technology_routing_add"
           type="primary" @click="addOrUpdateHandle">鏂板</el-button>
           <el-button @click="() => {this.approveHandle('ACCEPT')}" 
-          :disabled="uniqueStateArr.includes('01draft')"
+          :disabled="!uniqueStateArr.includes('01draft')"
           v-if="permissions.technology_routing_accept">鎵瑰噯</el-button>
           <el-button @click="() => {this.approveHandle('REVOKE')}" 
-          :disabled="uniqueStateArr.includes('02accepted')"
+          :disabled="!uniqueStateArr.includes('02accepted')"
           v-if="permissions.technology_routing_revoke">鎾ゅ洖</el-button>
           <el-button @click="() => {this.approveHandle('CANCEL')}"
-          :disabled="uniqueStateArr.includes('02accepted')"
+          :disabled="!uniqueStateArr.includes('02accepted')"
           v-if="permissions.technology_routing_cancel">鎷掔粷</el-button>
           <el-button @click="copyRouting"
           v-if="permissions.technology_routing_cancel">澶嶅埗</el-button>
@@ -358,18 +358,7 @@
           }
         ],
         toolbar: [],
-        operator: [
-          {
-            text: '鍒犻櫎',
-            type: 'text',
-            size: 'small',
-            fun: this.deleteHandle
-            // show: {
-            //   val: ['01draft'],
-            //   key: 'state'
-            // }
-          }
-        ],
+        operator: null,
         operatorConfig: {
           fixed: 'right',
           label: '鎿嶄綔',
@@ -446,6 +435,20 @@
     this.getData()
   },
   created() {
+    if(this.permissions.technology_routing_del){
+      this.table.operator = [
+          {
+            text: '鍒犻櫎',
+            type: 'text',
+            size: 'small',
+            fun: this.deleteHandle
+            // show: {
+            //   val: ['01draft'],
+            //   key: 'state'
+            // }
+          }
+        ]
+    }
     this.getBomTypeDbOptions()
   },
   methods: {
@@ -474,10 +477,6 @@
     },
     // 鍒犻櫎
     deleteHandle(row) {
-      if(!this.permissions.technology_routing_del){
-        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
-        return
-      }
       this.$confirm('鏄惁纭鍒犻櫎宸ヨ壓缂栧彿锛�' + row.routingNo + '鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',

--
Gitblit v1.9.3