From 1bc6e481707861fb2310c546e407023ba71fc7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Fri, 6 Mar 2026 15:24:09 +0800 Subject: [PATCH] =?UTF-8?q?```=20fix(changeManagement):=20=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E6=89=A7=E8=A1=8C=E4=BF=A1=E6=81=AF=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E4=BA=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 chooseItemList 数组存在性和长度验证 - 检查每个项目是否包含有效的执行人信息 - 在缺少执行人时显示警告消息并阻止提交 - 确保数据完整性以避免后续处理错误 ``` --- .../modules/changeManagement/changeRecord.vue | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue index 0fac2b1..5ef9325 100644 --- a/src/views/modules/changeManagement/changeRecord.vue +++ b/src/views/modules/changeManagement/changeRecord.vue @@ -4250,7 +4250,22 @@ this.$message.warning('请添加需要变更的技术参数卡!') return } - + if(!Array.isArray(this.chooseItemList) || this.chooseItemList.length== 0){ + this.$message.warning('缺少执行信息!') + return + } + let flag = 0 + if(Array.isArray(this.chooseItemList) && this.chooseItemList.length > 0){ + this.chooseItemList.forEach(item => { + if (item.executor === '' || item.executor == null) { + flag = 1 + } + }) + } + if (flag === 1) { + this.$message.warning('执行信息里面缺少执行人!') + return + } this.costImpactData.changeTotalCost = this.totalCost this.executionInfoData.chooseItemList = this.chooseItemList this.executionInfoData.chooseItemList2 = this.chooseItemList2 @@ -4587,7 +4602,22 @@ return } } - + if(!Array.isArray(this.chooseItemList) || this.chooseItemList.length== 0){ + this.$message.warning('缺少执行信息!') + return + } + let flag = 0 + if(Array.isArray(this.chooseItemList) && this.chooseItemList.length > 0){ + this.chooseItemList.forEach(item => { + if (item.executor === '' || item.executor == null) { + flag = 1 + } + }) + } + if (flag === 1) { + this.$message.warning('执行信息里面缺少执行人!') + return + } this.costImpactData.changeTotalCost = this.totalCost this.executionInfoData.chooseItemList = this.chooseItemList this.executionInfoData.chooseItemList2 = this.chooseItemList2