From 9b85b88ccfc86f94dac5763fdadecd7238f226d3 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 15 Jul 2026 17:08:42 +0800 Subject: [PATCH] =?UTF-8?q?2026-07-15=20=E5=BC=82=E5=B8=B8=E8=A7=84?= =?UTF-8?q?=E5=88=99=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/yieldReport/com_separate_roll.vue | 79 +++++++++++++++---- 1 file changed, 62 insertions(+), 17 deletions(-) diff --git a/src/views/modules/yieldReport/com_separate_roll.vue b/src/views/modules/yieldReport/com_separate_roll.vue index cc506f9..09ea51f 100644 --- a/src/views/modules/yieldReport/com_separate_roll.vue +++ b/src/views/modules/yieldReport/com_separate_roll.vue @@ -469,6 +469,8 @@ export default { abnormalCutLoading: false, // 异常截卷loading exceptionRuleLocked: false, // 异常规则触发后的强制锁定 exceptionRuleLockMessage: '', // 锁定提示文案 + pendingRuleFollowupAction: '', // 提示类规则在成功后需打开的功能动作 + pendingRuleFollowupResultMap: null, scheduleData: { site: this.$store.state.user.site, username: this.$store.state.user.name, @@ -718,6 +720,7 @@ export default { // 重置异常规则锁定状态 this.exceptionRuleLocked = false; this.exceptionRuleLockMessage = ''; + this.resetPendingRuleFollowup(); // 重置缓存数据标记 this.hasCachedData = false; this.cachedDataCount = 0; @@ -1304,19 +1307,14 @@ export default { return false; } - // 校验每卷不良原因数量是否等于该卷面损数量 - if (!this.validateRollDefectQtyBySurfaceLoss()) { + // Packing List 显示时要求必填 + if (!this.validatePackingListRequired()) { return false; } - try { - const passRuleCheck = await this.checkSplitRuleBeforeAction('异常截卷') - if (!passRuleCheck) { - return false - } - } catch (error) { - this.$message.error(error.message || '异常规则校验失败') - return false + // 校验每卷不良原因数量是否等于该卷面损数量 + if (!this.validateRollDefectQtyBySurfaceLoss()) { + return false; } // 确认框 @@ -1330,6 +1328,16 @@ export default { return false; // 用户取消 } + try { + const passRuleCheck = await this.checkSplitRuleBeforeAction('异常截卷') + if (!passRuleCheck) { + return false + } + } catch (error) { + this.$message.error(error.message || '异常规则校验失败') + return false + } + // 开启loading this.abnormalCutLoading = true; @@ -1397,7 +1405,7 @@ export default { buNo: this.scheduleData.buNo, rollQty: totalGoodQty, rollNums: 1, - totalDefectQty: totalDefectQty, + defectQty: totalDefectQty, rollRows: rollRows, rollDefectDetails: this.getRollDefectDetails(rollIndex + 1), packingList: rollPackingList, @@ -1478,6 +1486,11 @@ export default { this.$message.warning(completeError.message || '回写代办操作状态失败,请联系管理员检查'); } + if (this.triggerPendingRuleFollowupIfNeeded()) { + this.abnormalCutLoading = false; + return true; + } + // 延时关闭弹窗 setTimeout(() => { this.closeDialog(); @@ -1704,6 +1717,7 @@ export default { /*关闭modal*/ closeDialog(){ this.stopSplitRuleLockPolling() + this.resetPendingRuleFollowup() //刷新报工的页面 this.$emit('refreshPageData'); //关闭当前的页面 @@ -1770,6 +1784,31 @@ export default { } }, + resetPendingRuleFollowup () { + this.pendingRuleFollowupAction = '' + this.pendingRuleFollowupResultMap = null + }, + + triggerPendingRuleFollowupIfNeeded () { + const action = this.pendingRuleFollowupAction + if (!action) { + return false + } + const resultMap = this.pendingRuleFollowupResultMap || {} + this.resetPendingRuleFollowup() + this.$emit('refreshPageData') + this.$emit('update:visible', false) + if (action === 'OPEN_DEFECT') { + this.$emit('openDefectByExceptionRule', resultMap) + return true + } + if (action === 'OPEN_DOWNTIME') { + this.$emit('openDownTimeByExceptionRule', resultMap) + return true + } + return false + }, + async completeSplitRuleTodoOperationIfNeeded () { const payload = this.buildSplitRuleStatusPayload() if (!payload.site || !payload.buNo || !payload.orderNo || !payload.seqNo) { @@ -1812,6 +1851,7 @@ export default { }, async checkSplitRuleBeforeAction (actionName) { + this.resetPendingRuleFollowup() const payload = this.buildSplitRuleCheckPayload(actionName) const { data } = await checkSplitRollExceptionRule(payload) if (!data || data.code === 500) { @@ -1832,15 +1872,15 @@ export default { const message = resultMap.message || '触发异常规则,请先处理。' if (action === 'OPEN_DEFECT') { this.$message.warning(message) - this.$emit('openDefectByExceptionRule', resultMap) - this.$emit('update:visible', false) - return false + this.pendingRuleFollowupAction = action + this.pendingRuleFollowupResultMap = resultMap + return true } if (action === 'OPEN_DOWNTIME') { this.$message.warning(message) - this.$emit('openDownTimeByExceptionRule', resultMap) - this.$emit('update:visible', false) - return false + this.pendingRuleFollowupAction = action + this.pendingRuleFollowupResultMap = resultMap + return true } if (action === 'LOCK_PAGE') { this.exceptionRuleLocked = true @@ -2062,6 +2102,11 @@ export default { this.$message.warning(completeError.message || '回写代办操作状态失败,请联系管理员检查') } + if (this.triggerPendingRuleFollowupIfNeeded()) { + this.yieldReportLoading = false + return true + } + // 延时关闭弹窗 setTimeout(() =>{ //关闭当前的页面