From 70ec1ae4edd56626d19a0970fd89d98ba0f40554 Mon Sep 17 00:00:00 2001 From: zhoulinf <2507241354@qq.com> Date: Wed, 10 Apr 2024 16:58:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index/driverAdd.vue | 13 ++++++++++--- src/views/index/vehicleAdd.vue | 2 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/views/index/driverAdd.vue b/src/views/index/driverAdd.vue index e82a2756..25ca47b8 100644 --- a/src/views/index/driverAdd.vue +++ b/src/views/index/driverAdd.vue @@ -19,6 +19,7 @@ @@ -259,9 +261,14 @@ export default { cardSide: 'FRONT' }); if( res?.data ) { - this.driverInfo.drivingBeginDate = res?.data?.dateOfFirstIssue; + this.driverInfo.drivingBeginDate = (res?.data?.dateOfFirstIssue + ' 00:00:00' ) || ''; this.driverInfo.lssueDate = res?.data?.dateOfFirstIssue ? (res?.data?.dateOfFirstIssue + ' 00:00:00') : ''; - this.driverInfo.drivingLicenceValidityDate = res?.data?.endDate; + if( res?.data?.endDate.indexOf('长期') != -1 ) { + this.driverInfo.drivingLicenceValidityDate = '2099-01-01 00:00:00'; + } else { + this.driverInfo.drivingLicenceValidityDate = res?.data?.endDate + ' 00:00:00'; + } + this.drivingModel = res.data?.class_; this.drivingLicenceName = res.data?.name if( this.driverName && this.drivingLicenceName != this.driverName ) { @@ -291,7 +298,7 @@ export default { return } if( this.driverInfo.drivingLicenceValidityDate ) { - if( new Date(this.driverInfo.drivingLicenceValidityDate).getTime() < new Date().getTime() ) { + if(this.driverInfo.drivingLicenceValidityDate && new Date(this.driverInfo.drivingLicenceValidityDate).getTime() < new Date().getTime() ) { this.$toast('驾驶证已过期') return } diff --git a/src/views/index/vehicleAdd.vue b/src/views/index/vehicleAdd.vue index 9d445fcd..34fed3a9 100644 --- a/src/views/index/vehicleAdd.vue +++ b/src/views/index/vehicleAdd.vue @@ -20,6 +20,7 @@