From 0a91d2d5b91574327a0c1c4f2addc7c36cc0c98b Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期四, 28 十二月 2023 14:19:07 +0800 Subject: [PATCH] modified: src/views/warehouse/pallettransports/index.vue --- src/views/plan/masterproductionschedule/index.vue | 99 ++++++++----------------------------------------- 1 files changed, 16 insertions(+), 83 deletions(-) diff --git a/src/views/plan/masterproductionschedule/index.vue b/src/views/plan/masterproductionschedule/index.vue index 4476606..dcfb387 100644 --- a/src/views/plan/masterproductionschedule/index.vue +++ b/src/views/plan/masterproductionschedule/index.vue @@ -591,42 +591,11 @@ } */ ], 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: 140, + width: 100, minWidth: 100 } }, @@ -668,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({ @@ -714,7 +660,6 @@ this.getSysParam(sysParam.IS_REPORT_OPERATION) }, methods: { - deleteMainPlan(row){}, getSysParam(paramKey) { getSysParam(paramKey).then((response) => { var paramVal = response.data.data @@ -756,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) @@ -769,22 +718,6 @@ } } return '' - }, - // 鍒犻櫎 - deleteMainPlan(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