From 7b8fcd138eb81a2f19699bbc1f74980e938cfe4c Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Thu, 14 Aug 2025 18:47:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../person-entry/add-or-edit-form.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/construction-person/entry-and-exit-manage/person-entry/add-or-edit-form.vue b/src/views/construction-person/entry-and-exit-manage/person-entry/add-or-edit-form.vue index 8401fdc..8946cfd 100644 --- a/src/views/construction-person/entry-and-exit-manage/person-entry/add-or-edit-form.vue +++ b/src/views/construction-person/entry-and-exit-manage/person-entry/add-or-edit-form.vue @@ -843,7 +843,7 @@ export default { }, methods: { // 检查表单状态 - checkFormStatus(fieldsList, imageFList) { + checkFormStatus(fieldsList, imageFList, type) { // 检查图片是否有上传(排除附件) const imageFieldsToCheck = imageFList.slice(0, -1) // 排除最后一个附件 @@ -853,10 +853,18 @@ export default { // 检查普通字段 fieldsList.forEach((field) => { - if (!this.contractInfoForm[field]) { - emptyFieldCount++ + if (type === 1) { + if (!this.contractInfoForm[field]) { + emptyFieldCount++ + } else { + filledFieldCount++ + } } else { - filledFieldCount++ + if (!this.salaryCardInfoForm[field]) { + emptyFieldCount++ + } else { + filledFieldCount++ + } } }) @@ -913,10 +921,12 @@ export default { const status_1 = this.checkFormStatus( fieldsToCheck_1, this.contractImageList, + 1, ) const status_2 = this.checkFormStatus( fieldsToCheck_2, this.bankImageList, + 2, ) console.log( this.contractInfoForm,