From a48ded866d223f581944ea9043df1b296b3425e3 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 21 十二月 2023 13:17:46 +0800
Subject: [PATCH] 	modified:   src/views/basic/company/index.vue 	modified:   src/views/basic/customizeparamtemplatetype/index.vue 	modified:   src/views/basic/division/index.vue 	modified:   src/views/basic/factory/index.vue 	modified:   src/views/basic/location/index.vue 	modified:   src/views/basic/param/index.vue 	modified:   src/views/basic/part/index.vue 	modified:   src/views/basic/post/index.vue 	modified:   src/views/basic/shift/index.vue 	modified:   src/views/basic/staff/index.vue 	modified:   src/views/basic/template/index.vue 	modified:   src/views/basic/warehouse/index.vue 	modified:   src/views/basic/workstation/index.vue 	modified:   src/views/plan/manufacturingorder/index.vue 	modified:   src/views/plan/masterproductionschedule/index.vue 	modified:   src/views/plan/operationtask/index.vue 	modified:   src/views/plan/productionschedul/index.vue 	modified:   src/views/quality/finishedProductInspection/index.vue 	modified:   src/views/quality/rawMaterial/index.vue 	modified:   src/views/technology/completeproductstructure/index.vue 	modified:   src/views/technology/document/index.vue 	modified:   src/views/technology/operation/index.vue 	modified:   src/views/technology/routing/index.vue 	modified:   src/views/technology/structure/index.vue 	modified:   src/views/warehouse/FinishedWarehousing/index.vue 	modified:   src/views/warehouse/changestock/index.vue 	modified:   src/views/warehouse/pallettransports/index.vue

---
 src/views/plan/masterproductionschedule/index.vue |  101 ++++++++++++++------------------------------------
 1 files changed, 29 insertions(+), 72 deletions(-)

diff --git a/src/views/plan/masterproductionschedule/index.vue b/src/views/plan/masterproductionschedule/index.vue
index 927b1ff..5aca1b1 100644
--- a/src/views/plan/masterproductionschedule/index.vue
+++ b/src/views/plan/masterproductionschedule/index.vue
@@ -411,7 +411,7 @@
             isSearch: true,
             searchInfoType: 'text'
           },
-          {
+          /* {
             minWidth: '140',
             prop: 'inventoryReservedQuantity',
             label: '搴撳瓨棰勭暀鏁伴噺',
@@ -419,8 +419,8 @@
             isTrue: true,
             isSearch: false,
             searchInfoType: 'text'
-          },
-          {
+          }, */
+          /* {
             minWidth: '140',
             prop: 'outsourcingNumber',
             label: '濮斿鏁伴噺',
@@ -428,7 +428,7 @@
             isTrue: true,
             isSearch: false,
             searchInfoType: 'text'
-          },
+          }, */
           {
             minWidth: '140',
             prop: 'manufacturingQuantity',
@@ -552,7 +552,7 @@
             isTrue: true,
             isSearch: true,
             searchInfoType: 'text'
-          },
+          }/* ,
           {
             minWidth: '140',
             prop: 'outerColor',
@@ -588,45 +588,14 @@
             isTrue: true,
             isSearch: true,
             searchInfoType: 'text'
-          }
+          } */
         ],
         toolbar: [],
-        operator: [
-          // {
-          //   text: '璁㈠崟棰勭暀',
-          //   type: 'text',
-          //   size: 'small',
-          //   fun: this.customReserved
-          // },
-          // {
-          //   text: '鏌ョ湅搴撳瓨',
-          //   type: 'text',
-          //   size: 'small',
-          //   fun: this.stockHandle
-          // },
-          {
-            text: '鏉ユ簮',
-            type: 'text',
-            size: 'small',
-            fun: this.searchMasterPlanSourceHandle
-          },
-          {
-            text: '浣滃簾',
-            type: 'text',
-            size: 'small',
-            fun: this.deleteMainPlan
-          },
-          // {
-          //   text: '璁㈠崟',
-          //   type: 'text',
-          //   size: 'small',
-          //   fun: this.searchOrderHandle
-          // }
-        ],
+        operator: null,
         operatorConfig: {
           fixed: 'right',
           label: '鎿嶄綔',
-          width: 240,
+          width: 140,
           minWidth: 100
         }
       },
@@ -668,40 +637,25 @@
   },
   created() {
     this.getManufactureAttrs()
-    /*
-          {
-            text: '鏂板',
-            type: 'primary',
-            fun: this.addMasterProductionSchedule,
-            disabled: false,
-            permitArr: []
-          },
-          {
-            text: '鍒涘缓濮斿璁㈠崟',
-            fun: this.createOutsourcingOrder
-          } */
-    if (this.permissions.plan_masterproductionschedule_add) {
-      this.table.toolbar.push({
-        text: '鏂板',
-        type: 'primary',
-        fun: this.addMasterProductionSchedule,
-        disabled: false,
-        permitArr: []
-      })
+    let optionList = []
+    if(this.permissions.masterproductionschedule_view_source){
+      optionList.push({
+            text: '鏉ユ簮',
+            type: 'text',
+            size: 'small',
+            fun: this.searchMasterPlanSourceHandle
+          })
     }
-    if (this.permissions.masterproductionschedule_create_outsourcing) {
-      // this.table.toolbar.push({
-      //   text: '鍒涘缓濮斿璁㈠崟',
-      //   fun: this.createOutsourcingOrder
-      // })
+    if(this.permissions.plan_masterproductionschedule_del){
+      optionList.push({
+            text: '浣滃簾',
+            type: 'text',
+            size: 'small',
+            fun: this.deleteMainPlan
+          })
     }
-    if (this.permissions.masterproductionschedule_create_order_manual) {
-      // this.orderTypeArr.push({
-      //   label: '鎵嬪姩鏂板',
-      //   command: 'MANUAL',
-      //   disabled: false,
-      //   permitArr: ['02processed']
-      // })
+    if(optionList.length>0){
+      this.table.operator = optionList
     }
     if (this.permissions.masterproductionschedule_create_order_auto) {
       this.orderTypeArr.push({
@@ -714,7 +668,6 @@
     this.getSysParam(sysParam.IS_REPORT_OPERATION)
   },
   methods: {
-    deleteMainPlan(row){},
     getSysParam(paramKey) {
       getSysParam(paramKey).then((response) => {
         var paramVal = response.data.data
@@ -756,6 +709,10 @@
     },
     // 淇敼
     addOrUpdateHandle(row) {
+      if(!this.permissions.plan_masterproductionschedule_edit && row.id!=null){
+        this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�");
+        return
+      }
       this.addOrUpdateVisible = true
       this.$nextTick(() => {
         this.$refs.addOrUpdate.init(row ? row.id : row, row ? row.state : row)

--
Gitblit v1.9.3