task#13769, 驾驶员录入时少数名字识别异常比对解决

This commit is contained in:
2024-05-15 17:00:31 +08:00
parent 43bb5a0f1e
commit 5cf2559335

View File

@ -258,7 +258,12 @@ export default {
})
this.driverName = res?.data?.name;
this.identityCardNumber = res?.data?.idNum;
if( this.drivingLicenceName && this.driverName != this.drivingLicenceName ) {
let aaa=''
if(this.drivingLicenceName){
aaa = this.drivingLicenceName.replace(/[^\u4e00-\u9fff]+/g, '');
}
let bbb=this.driverName.replace(/[^\u4e00-\u9fff]+/g, '');
if( this.drivingLicenceName && aaa != bbb ) {
this.$toast('身份证信息与驾驶证信息不匹配')
}
},
@ -299,7 +304,12 @@ export default {
this.drivingModel = res.data?.class_;
this.drivingLicenceName = res.data?.name
if( this.driverName && this.drivingLicenceName != this.driverName ) {
let aaa=''
if(this.driverName){
aaa = this.driverName.replace(/[^\u4e00-\u9fff]+/g, '');
}
let bbb = this.drivingLicenceName.replace(/[^\u4e00-\u9fff]+/g, '');
if( this.driverName && bbb != aaa ) {
this.$toast('身份证信息与驾驶证信息不匹配')
}
}