From fc0127bfafa037660d1b5be47a58a9d18de1738e Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Thu, 1 Feb 2024 09:55:40 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9bug81639?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/BaseInfoForm.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue b/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue index e54f045c..589fcddc 100644 --- a/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue +++ b/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue @@ -468,7 +468,7 @@ export default { }, // 企标是否试行改变,标准状态需要跟着变,试行周期必填校验也跟着变 'formInline.tryFlag' (val) { - if (val) { + if (val && !this.isEditSetData) { if (val === IsTrial.YES.value) { // 试行周期给默认值24 this.formInline.trialPeriod = '24' @@ -480,6 +480,14 @@ export default { // 不试行,试行周期非必填 this.rules.trialPeriod[0].required = false } + } else if (val && this.isEditSetData) { + if (val === IsTrial.YES.value) { + // 试行,试行周期必填 + this.rules.trialPeriod[0].required = true + } else { + // 不试行,试行周期非必填 + this.rules.trialPeriod[0].required = false + } } } }, @@ -680,7 +688,9 @@ export default { } }).finally(() => { this.loading = false - this.isEditSetData = false + setTimeout(() => { + this.isEditSetData = false + }, 500) }) }, // 零部件名称选择完成的回调