From 8ee8d4cf9771769e26ab81a91ca82d0b59b51071 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Thu, 27 Feb 2025 15:17:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=8B=A4=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/report/attReport/index.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/report/attReport/index.vue b/src/views/report/attReport/index.vue index 125927b..5d9725e 100644 --- a/src/views/report/attReport/index.vue +++ b/src/views/report/attReport/index.vue @@ -743,25 +743,30 @@ export default { let hasError = false let hasChanges = false; - this.dialogList.forEach((newItem, index) => { const oldItem = this.dialogListOld[index] // 检查toWorkAttCurrentTime或toWorkAttStatus是否改变 if ((newItem.toWorkAttCurrentTime !== oldItem.toWorkAttCurrentTime || newItem.toWorkAttStatus !== oldItem.toWorkAttStatus) && (!newItem.toErrorRemake || newItem.toErrorRemake === '' || !this.hasAttachments(newItem.filesVoList, '1') )) { hasError = true - hasChanges = true; this.$message({ message: '上班时间或状态改变时,原因说明、附件不能为空!', type: 'warning' }) } + if(newItem.toErrorRemake!=""&&this.hasAttachments(newItem.filesVoList, '1')){ + hasChanges = true + } + // 检查offWorkAttCurrentTime或offWorkAttStatus是否改变 if ((newItem.offWorkAttCurrentTime !== oldItem.offWorkAttCurrentTime || newItem.offWorkAttStatus !== oldItem.offWorkAttStatus) && - (!newItem.offErrorRemake || newItem.offErrorRemake === '' || !this.hasAttachments(newItem.filesVoList, '1') )) { + (!newItem.offErrorRemake || newItem.offErrorRemake === '' || !this.hasAttachments(newItem.filesVoList, '2') )) { hasError = true - hasChanges = true; this.$message({ message: '下班时间或状态改变时,原因说明、附件不能为空!', type: 'warning' }) } + if(newItem.offErrorRemake!=""&&this.hasAttachments(newItem.filesVoList, '2')){ + hasChanges = true + } + // 如果没有错误,则构建参数对象 if (!hasError) { let obj = {