diff --git a/src/api/yieldReport/com_separate_roll.js b/src/api/yieldReport/com_separate_roll.js index bb9d65b..6a5adcf 100644 --- a/src/api/yieldReport/com_separate_roll.js +++ b/src/api/yieldReport/com_separate_roll.js @@ -3,17 +3,18 @@ import { createAPI } from '@/utils/httpRequest.js' // 校验创建分卷的操作 export const checkCreateSplitSfdcRoll = data => createAPI('schedule/checkCreateSplitSfdcRoll', 'POST', data) +// 创建分卷前异常规则校验 +export const checkSplitRollExceptionRule = data => createAPI('schedule/checkSplitRollExceptionRule', 'POST', data) + // 执行创建分卷的操作 export const createSplitSfdcRoll = data => createAPI('schedule/createSplitSfdcRoll', 'POST', data) - // 校验fqc创建分卷的操作 export const otherCheckCreateSplitSfdcRoll = data => createAPI('schedule/otherCheckCreateSplitSfdcRoll', 'POST', data) // 执行fqc创建分卷的操作 export const otherCreateSplitSfdcRoll = data => createAPI('schedule/otherCreateSplitSfdcRoll', 'POST', data) - // 换包装分卷 export const workbenchCreateslittingrollRepackAction = data => createAPI('schedule/workbench_createslittingroll_Repack_action', 'POST', data) @@ -47,4 +48,3 @@ export const getUnprocessedAbnormalRollData = data => createAPI('schedule/abnorm // 更新异常截卷数据为已处理 export const markAbnormalRollAsProcessed = data => createAPI('schedule/abnormalRoll/markAsProcessed', 'POST', data) - diff --git a/src/views/modules/sys/sceneExceptionRuleConfig.vue b/src/views/modules/sys/sceneExceptionRuleConfig.vue index 4dad105..4d6e8cf 100644 --- a/src/views/modules/sys/sceneExceptionRuleConfig.vue +++ b/src/views/modules/sys/sceneExceptionRuleConfig.vue @@ -320,7 +320,7 @@ export default { responsibilityDept: '', triggerEvent: '' }, - relationFieldOptions: ['排数', '分切卷数', '良品数', '面损', '性能不良', '不良数', '良率', '不良率', '总数'], + relationFieldOptions: ['排数', '分切卷数', '总卷数', '良品数', '面损', '性能不良', '不良数', '良率', '不良率', '总数'], compareSymbolOptions: ['>', '=', '<', '>=', '<='], forceTypeOptions: ['强制', '提示'], applyPageOptions: ['过站采集'], diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue index 2f9f1ac..f4a1e9d 100644 --- a/src/views/modules/yieldReport/com_produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -696,7 +696,11 @@ + :visible.sync="showSeparateFlag" + @refreshPageData="refreshPageData" + @openDefectByExceptionRule="onSeparateRuleOpenDefect" + @openDownTimeByExceptionRule="onSeparateRuleOpenDownTime" + @lockPageByExceptionRule="onSeparateRuleLockPage"> @@ -1083,6 +1087,7 @@ export default { showOperatorFlag: false, showSwitchFlag: false, showSeparateFlag: false, + exceptionRuleForceLock: false, showFinishFlag: false, showFinishPartFlag: false, showMergeFlag: false, @@ -4651,6 +4656,10 @@ export default { //刷新当前页面的菜单 async refreshPageButtons() { + if (this.exceptionRuleForceLock) { + this.lockWorkbenchButtonsByRule() + return + } //判断是否存在人员 if (this.operatorData.operatorId == null || this.operatorData.operatorId == '') { this.buttonTags.createNewRollFlag = true; @@ -4871,6 +4880,36 @@ export default { }); }, + lockWorkbenchButtonsByRule () { + Object.keys(this.buttonTags || {}).forEach(key => { + this.buttonTags[key] = true + }) + }, + + onSeparateRuleOpenDefect () { + this.showSeparateFlag = false + this.$nextTick(() => { + this.defectRollModal() + }) + }, + + onSeparateRuleOpenDownTime () { + this.showSeparateFlag = false + this.$nextTick(() => { + this.produceDownModal() + }) + }, + + onSeparateRuleLockPage (resultMap) { + this.showSeparateFlag = false + this.exceptionRuleForceLock = true + this.lockWorkbenchButtonsByRule() + this.$alert((resultMap && resultMap.message) || '触发强制异常规则,当前页面已锁定。', '提示', { + confirmButtonText: '确定', + type: 'warning' + }) + }, + /*创建分卷的modal调用*/ separateRollModal() { //1.首先调用菜单判断方式 看看是否可以结束卷 diff --git a/src/views/modules/yieldReport/com_separate_roll.vue b/src/views/modules/yieldReport/com_separate_roll.vue index 6c6d503..41c36e9 100644 --- a/src/views/modules/yieldReport/com_separate_roll.vue +++ b/src/views/modules/yieldReport/com_separate_roll.vue @@ -143,11 +143,14 @@ +
+ {{ exceptionRuleLockMessage }} +
- 产量报告 - 换班结转 - 异常截卷 - {{ buttons.closeButton }} + 产量报告 + 换班结转 + 异常截卷 + {{ buttons.closeButton }} @@ -384,13 +387,12 @@