From 47ab3b599d4765161d4adaf5b9a368429b152845 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期四, 11 四月 2024 14:30:00 +0800 Subject: [PATCH] 添加按钮 --- src/views/plan/masterproductionschedule/index.vue | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/views/plan/masterproductionschedule/index.vue b/src/views/plan/masterproductionschedule/index.vue index 7a7823b..8618138 100644 --- a/src/views/plan/masterproductionschedule/index.vue +++ b/src/views/plan/masterproductionschedule/index.vue @@ -22,6 +22,7 @@ <el-dropdown-item :command="item.command" v-for="item in orderTypeArr" + :key="item.value" :disabled="item.disabled" >{{ item.label }}</el-dropdown-item > @@ -40,6 +41,7 @@ <el-dropdown-item :command="item.command" v-for="item in stateTagArr" + :key="item.value" :disabled="item.disabled" >{{ item.label }}</el-dropdown-item > @@ -65,7 +67,7 @@ </el-dropdown-menu> </el-dropdown> --> <!--瀹℃牳鐘舵�佹敼鍙�--> - <el-dropdown + <!-- <el-dropdown v-if="permissions.masterproductionschedule_audit_change" @command="handleCommitCommand" style="margin-left: 10px" @@ -81,7 +83,7 @@ >{{ item.label }}</el-dropdown-item > </el-dropdown-menu> - </el-dropdown> + </el-dropdown> --> <!-- <el-button v-if="permissions.masterproductionschedule_submit_oa" @click="commitOa()" @@ -258,7 +260,7 @@ label: '鏍囪宸插畬鎴�', command: 'COMPLETED', disabled: false, - permitArr: ['04completed'] + permitArr: ['04completed','02processed'] } ], documentTagArr: [ @@ -661,7 +663,7 @@ label: '鑷姩鏂板', command: 'AUTO', disabled: false, - permitArr: ['01pending'] + permitArr: ['04completed'] }) } this.getSysParam(sysParam.IS_REPORT_OPERATION) @@ -1049,6 +1051,19 @@ this.stateTagArr[i].disabled = true } } + for (var i = 0; i < this.orderTypeArr.length; i++) { + if ( + uniqueStateArr.every((val) => + this.orderTypeArr[i].permitArr.length <= 0 + ? true + : this.orderTypeArr[i].permitArr.includes(val) + ) + ) { + this.orderTypeArr[i].disabled = true + } else { + this.orderTypeArr[i].disabled = false + } + } this.masterPlanSelection = val }, // 鏌ョ湅搴撳瓨 -- Gitblit v1.9.3