This commit is contained in:
2024-04-10 16:58:40 +08:00
parent 5d5c283e99
commit 70ec1ae4ed
2 changed files with 12 additions and 3 deletions

View File

@ -19,6 +19,7 @@
<van-uploader
v-model="identityCardFrontList"
:after-read="identityCardFrontHandler"
:max-size="5 * 1024 * 1024"
max-count="1"
:preview-size="54"
accept="image "
@ -48,6 +49,7 @@
v-model="drivingLicenceFrontList"
:after-read="drivingLicenceFrontHandler"
max-count="1"
:max-size="5 * 1024 * 1024"
:preview-size="54"
accept="image "
/>
@ -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
}

View File

@ -20,6 +20,7 @@
<van-uploader
v-model="vehicleLicenseFrontList"
:after-read="vehicleLicenseFrontHandler"
:max-size="5 * 1024 * 1024"
max-count="1"
:preview-size="54"
accept="image "
@ -33,6 +34,7 @@
<van-uploader
v-model="vehicleLicenseBackList"
:after-read="vehicleLicenseBackHandler"
:max-size="5 * 1024 * 1024"
max-count="1"
:preview-size="54"
accept="image "