mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 02:16:44 +08:00
身份证OCR校验之前端校验身份证有效期 --李婕煜
This commit is contained in:
@@ -1244,14 +1244,24 @@ export default {
|
||||
isFlag = false;
|
||||
}
|
||||
}
|
||||
// else if('appentBack' == flag){
|
||||
// //投保人身份证反面
|
||||
// //"ValidDate": "2010.07.21-2020.07.21"
|
||||
// res.content.validDate = res.content.validDate.split('-')[1].replace(/\./g,'-')
|
||||
// if(this.saleInsuredInfo.certiexpiredate != res.content.validDate){
|
||||
// isFlag = false;
|
||||
// }
|
||||
// }
|
||||
else if('appentBack' == flag){
|
||||
//投保人身份证反面
|
||||
//"ValidDate": "2010.07.21-2020.07.21"
|
||||
//"ValidDate": "2010.07.21-长期"
|
||||
let certiexpireDate = res.content.validDate.split('-')[1]
|
||||
if('长期' == certiexpireDate){
|
||||
res.content.validDate = '9999-01-01'
|
||||
if(this.saleInsuredInfo.certiexpiredate != res.content.validDate){
|
||||
isFlag = false;
|
||||
}
|
||||
}else{
|
||||
res.content.validDate = res.content.validDate.split('-')[1].replace(/\./g,'-')
|
||||
if(this.saleInsuredInfo.certiexpiredate != res.content.validDate){
|
||||
isFlag = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if('insuredFront' == flag){
|
||||
this.saleInsuredPersonInfo.sex = this.saleInsuredPersonInfo.sex == '0'? '男' :'女'
|
||||
res.content.birth = utils.formatDate(Date.parse(res.content.birth), 'yyyy-MM-dd')
|
||||
@@ -1264,14 +1274,24 @@ export default {
|
||||
isFlag = false;
|
||||
}
|
||||
}
|
||||
// else if('insuredBack' == flag){
|
||||
// //被保人身份证反面
|
||||
// //"ValidDate": "2010.07.21-2020.07.21"
|
||||
// res.content.validDate = res.content.validDate.split('-')[1].replace(/\./g,'-')
|
||||
// if(this.saleInsuredInfo.certiexpiredate != res.content.validDate){
|
||||
// isFlag = false;
|
||||
// }
|
||||
// }
|
||||
else if('insuredBack' == flag){
|
||||
//被保人身份证反面
|
||||
//"ValidDate": "2010.07.21-2020.07.21"
|
||||
//"ValidDate": "2010.07.21-长期"
|
||||
let certiexpireDate = res.content.validDate.split('-')[1]
|
||||
console.log("res.content.validDate", res.content.validDate)
|
||||
if('长期' == certiexpireDate){
|
||||
res.content.validDate = '9999-01-01'
|
||||
if(this.saleInsuredInfo.certiexpiredate != res.content.validDate){
|
||||
isFlag = false;
|
||||
}
|
||||
}else{
|
||||
res.content.validDate = res.content.validDate.split('-')[1].replace(/\./g,'-')
|
||||
if(this.saleInsuredInfo.certiexpiredate != res.content.validDate){
|
||||
isFlag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!isFlag){
|
||||
this.$toast.clear()
|
||||
this.$toast("上传的证件信息与录入的证件信息不一致,请核对修改并重新上传。")
|
||||
|
||||
Reference in New Issue
Block a user