自助入司优化:入司申请录入身份证号码错误提示調整 --提交人:阳华祥

This commit is contained in:
阳华祥
2020-05-22 17:31:22 +08:00
parent 94d748b878
commit fe600a1660

View File

@@ -232,6 +232,10 @@ export default {
self.$toast.clear()
if (this.userInfo.idType == '1') {
//身份证
// 证件号码规则校验
if (!idNoCheck.isIdno(this.userInfo.idNo)) {
return this.$toast('请录入正确的身份证')
}
if (this.userInfo.idNo.length == '18') {
//18位身份证第17位是性别位, 奇男偶女
let sexSign = this.userInfo.idNo.substr(16, 1)
@@ -239,12 +243,7 @@ export default {
return this.$toast('性别录入与身份证不符')
}
}
// 证件号码规则校验
if (!idNoCheck.isIdno(this.userInfo.idNo)) {
this.$toast('您填写的证件号码有误')
} else {
self.save()
}
self.save()
} else {
self.save()
}