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 @@