From fb616f2a4d91dd9fb16320fb0b3d5fc3cd9e112c Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 05 一月 2024 13:30:02 +0800
Subject: [PATCH] 销售订单-下载按钮修改2

---
 src/views/plan/masterproductionschedule/index.vue |  116 ++++++++++++++--------------------------------------------
 1 files changed, 28 insertions(+), 88 deletions(-)

diff --git a/src/views/plan/masterproductionschedule/index.vue b/src/views/plan/masterproductionschedule/index.vue
index b88c6f4..dcfb387 100644
--- a/src/views/plan/masterproductionschedule/index.vue
+++ b/src/views/plan/masterproductionschedule/index.vue
@@ -46,7 +46,7 @@
             </el-dropdown-menu>
           </el-dropdown>
 
-          <el-dropdown
+          <!-- <el-dropdown
             v-if="permissions.masterproductionschedule_doc_relate"
             @command="documentHandle"
             style="margin-left: 10px"
@@ -63,7 +63,7 @@
                 {{ item.label }}
               </el-dropdown-item>
             </el-dropdown-menu>
-          </el-dropdown>
+          </el-dropdown> -->
           <!--瀹℃牳鐘舵�佹敼鍙�-->
           <el-dropdown
             v-if="permissions.masterproductionschedule_audit_change"
@@ -82,15 +82,15 @@
               >
             </el-dropdown-menu>
           </el-dropdown>
-          <el-button
+          <!-- <el-button
             v-if="permissions.masterproductionschedule_submit_oa"
             @click="commitOa()"
             type="primary"
             style="margin-left:10px;"
             :loading="loadingOa"
             >鎻愪氦OA
-          </el-button>
-          <el-button
+          </el-button> -->
+          <!-- <el-button
             v-if="permissions.masterproductionschedule_sync_scm"
             @click="syncScm()"
             type="primary"
@@ -103,7 +103,7 @@
             type="primary"
             style="margin-left:10px;"
             >SCM鐘舵�佸彉鏇�
-          </el-button>
+          </el-button> -->
         </template>
       </ttable>
 
@@ -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,39 +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.searchOrderHandle
-          }
-        ],
+        operator: null,
         operatorConfig: {
           fixed: 'right',
           label: '鎿嶄綔',
-          width: 240,
+          width: 100,
           minWidth: 100
         }
       },
@@ -662,40 +637,17 @@
   },
   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.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({
@@ -749,6 +701,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)
@@ -762,22 +718,6 @@
         }
       }
       return ''
-    },
-    // 鍒犻櫎
-    deleteHandle(row) {
-      this.$confirm('鏄惁纭鍒犻櫎ID涓�' + row.id, '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        closeOnClickModal: false,
-        type: 'warning'
-      })
-        .then(function() {
-          return delObj(row.id)
-        })
-        .then((data) => {
-          this.$message.success('鍒犻櫎鎴愬姛')
-          this.getData()
-        })
     },
     // 鏌ョ湅鐢熶骇璁″垝鏉ユ簮
     searchMasterPlanSourceHandle(row) {

--
Gitblit v1.9.3