From 8a4c836df7e591b58f8cfea9f82659adea86d0b2 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Wed, 25 May 2022 15:48:39 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=AE=8C=E5=96=84=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=97=B6=E9=97=B4=E6=8F=90=E4=BA=A4=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../edit-inform-time/edit-inform-time.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.ts b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.ts index 042d6b8..7f305be 100644 --- a/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.ts +++ b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.ts @@ -24,10 +24,11 @@ export class EditInformTimeComponent implements OnInit { this.validateForm = this.fb.group({ time1: [this.dataCopy.handleRemindDays, [Validators.required]], time2: [this.dataCopy.closingRemindDays, [Validators.required]], - time: [this.dataCopy.yearlyCheckDate, [Validators.required]],//年检时间 + time: [this.dataCopy.yearlyCheckDate, this.dataCopy.isYearlyCheckDefault ? [Validators.required] : null],//年检时间 explain: [null] }); + } @@ -46,7 +47,7 @@ export class EditInformTimeComponent implements OnInit { organizationId: this.dataCopy.organizationId, handleRemindDays: this.validateForm.value.time1, closingRemindDays: this.validateForm.value.time2, - yearlyCheckDate: moment(this.validateForm.value.time).format('YYYY-MM-DD'), + yearlyCheckDate: this.dataCopy.isYearlyCheckDefault ? moment(this.validateForm.value.time).format('YYYY-MM-DD') : null, remark: this.validateForm.value.explain } console.log(body)