mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-12 17:16:43 +08:00
外国人永久居留身份证增加长度校验
This commit is contained in:
@@ -773,8 +773,6 @@
|
|||||||
this.isNewPeopleFlagTipshow = true
|
this.isNewPeopleFlagTipshow = true
|
||||||
},
|
},
|
||||||
workcompanys(list) {
|
workcompanys(list) {
|
||||||
// 单位数据
|
|
||||||
console.log(list)
|
|
||||||
this.userWorkcompanys = list
|
this.userWorkcompanys = list
|
||||||
},
|
},
|
||||||
setCustomerMarriage(marriageCode) {
|
setCustomerMarriage(marriageCode) {
|
||||||
@@ -1606,9 +1604,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getRelatedData(val, source) {
|
getRelatedData(val, source) {
|
||||||
if (this.userInfo.idType != '1') {
|
if (this.userInfo.idType != '1' && this.userInfo.idType != '8') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(this.userInfo.idType == '1'){
|
||||||
//如果证件校验不通过,恢复默认值
|
//如果证件校验不通过,恢复默认值
|
||||||
if (idToData(val).text) {
|
if (idToData(val).text) {
|
||||||
;[this.userInfo.idNo, this.userInfo.sex, this.userInfo.birthday, this.effectiveDateTypeAble] = ['', '0', '', false]
|
;[this.userInfo.idNo, this.userInfo.sex, this.userInfo.birthday, this.effectiveDateTypeAble] = ['', '0', '', false]
|
||||||
@@ -1636,6 +1635,12 @@
|
|||||||
} else {
|
} else {
|
||||||
// this.userInfo.effectiveDateType = false
|
// this.userInfo.effectiveDateType = false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if(this.userInfo.idType == '8'){
|
||||||
|
this.userInfo.birthday = idToData(val).birthday
|
||||||
|
this.userInfo.sex = idToData(val).sex
|
||||||
|
console.log(this.userInfo.birthday)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,30 @@ export function idToData(idNo) {
|
|||||||
text: '您填写的证件号码有误'
|
text: '您填写的证件号码有误'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log('12321321321')
|
||||||
|
let birthday = getBirthById(idNo)
|
||||||
|
let age = utilsAge.getAge(birthday, new Date())
|
||||||
|
let sex = getSexById(idNo)
|
||||||
|
return {
|
||||||
|
birthday,
|
||||||
|
age,
|
||||||
|
sex
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//外国人永久居留身份证带出出生日期,性别,年龄
|
||||||
|
export function idToData8(idNo) {
|
||||||
|
//非空
|
||||||
|
if (!idNo.trim()) {
|
||||||
|
return {
|
||||||
|
text: '证件号码不能为空'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (idNo.length != 15 && idNo.length != 18) {
|
||||||
|
return {
|
||||||
|
text: '外国人永久居留身份证位数有误'
|
||||||
|
}
|
||||||
|
}
|
||||||
let birthday = getBirthById(idNo)
|
let birthday = getBirthById(idNo)
|
||||||
let age = utilsAge.getAge(birthday, new Date())
|
let age = utilsAge.getAge(birthday, new Date())
|
||||||
let sex = getSexById(idNo)
|
let sex = getSexById(idNo)
|
||||||
|
|||||||
Reference in New Issue
Block a user