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 <van-uploader
v-model="identityCardFrontList" v-model="identityCardFrontList"
:after-read="identityCardFrontHandler" :after-read="identityCardFrontHandler"
:max-size="5 * 1024 * 1024"
max-count="1" max-count="1"
:preview-size="54" :preview-size="54"
accept="image " accept="image "
@ -48,6 +49,7 @@
v-model="drivingLicenceFrontList" v-model="drivingLicenceFrontList"
:after-read="drivingLicenceFrontHandler" :after-read="drivingLicenceFrontHandler"
max-count="1" max-count="1"
:max-size="5 * 1024 * 1024"
:preview-size="54" :preview-size="54"
accept="image " accept="image "
/> />
@ -259,9 +261,14 @@ export default {
cardSide: 'FRONT' cardSide: 'FRONT'
}); });
if( res?.data ) { 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.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.drivingModel = res.data?.class_;
this.drivingLicenceName = res.data?.name this.drivingLicenceName = res.data?.name
if( this.driverName && this.drivingLicenceName != this.driverName ) { if( this.driverName && this.drivingLicenceName != this.driverName ) {
@ -291,7 +298,7 @@ export default {
return return
} }
if( this.driverInfo.drivingLicenceValidityDate ) { 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('驾驶证已过期') this.$toast('驾驶证已过期')
return return
} }

View File

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