国富commit-2ecc58241492ab82267476b5fe7ec8c39498988b

This commit is contained in:
xiaokun
2019-09-22 14:58:04 +08:00
parent 83e94dbfa3
commit cf45352eea
27 changed files with 2013 additions and 1380 deletions

View File

@@ -117,8 +117,8 @@
</van-cell-group>
<!-- 工作信息 -->
<van-cell-group class="mt5">
<p class="title pl10 pv5">工作信息</p>
<van-cell-group>
<p class="title pl10 pv12 mt10">工作信息</p>
<van-field
:value="userInfo.degree | idToText('degree')"
readonly
@@ -229,7 +229,7 @@
<!-- 家庭信息 -->
<van-cell-group class="mt5">
<p class="title pl10 pv5">家庭信息</p>
<p class="title pl10 pv12 mt10">家庭信息</p>
<van-field
:value="userInfo.marriage | idToText('marriage')"
readonly
@@ -468,11 +468,16 @@ export default {
}
}
}
// 证件号码规则校验
// // 证件号码规则校验
if (!idNoCheck.isIdno(this.userInfo.customerIdNumber)) {
return this.$toast('您填写的证件号码有误只能为18位以内数字或字母组合')
} else {
this.$parent.updateCustomerInfo()
//判断婚否
if (this.userInfo.birthday && this.userInfo.marriage) {
this.validateMarr()
} else {
this.$parent.updateCustomerInfo()
}
}
//证件是户口本
} else if (this.userInfo.idType == '2' && this.userInfo.customerIdNumber.length != 18) {
@@ -494,12 +499,34 @@ export default {
} else if (!/^(H|M)[0-9]{8}$/.test(this.userInfo.customerIdNumber)) {
return this.$toast('证件类型为港澳居民通行证的,证件号码首位字母为"H"/"M",证件号码第2位至第9位为阿拉伯数字')
} else {
this.$parent.updateCustomerInfo()
//判断婚否
if (this.userInfo.birthday && this.userInfo.marriage) {
this.validateMarr()
} else {
this.$parent.updateCustomerInfo()
}
}
//证件是台湾居民通行证
} else if (this.userInfo.idType == '6' && this.userInfo.customerIdNumber.length != 8) {
console.log('证件类型是台湾居民通行证')
return this.$toast('证件类型为台湾居民通行证的证件号码须为8位数字')
} else {
if (this.userInfo.birthday && this.userInfo.marriage) {
this.validateMarr()
} else {
this.$parent.updateCustomerInfo()
}
}
},
//婚否校验
validateMarr() {
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
if ((this.userInfo.customerSex == '0' && age < 22) || (this.userInfo.customerSex == '1' && age < 20)) {
if (this.userInfo.marriage != '2') {
return this.$toast('年龄与婚姻状况不符')
} else {
this.$parent.updateCustomerInfo()
}
} else {
this.$parent.updateCustomerInfo()
}
@@ -561,12 +588,14 @@ export default {
this.valueKey = value.text
} else if (this.pickerType == '2') {
;[this.userInfo.idType, this.idType] = [value.id, value.text]
//身份证以外的证件类型可以使用长期
if (value.id != '1') {
this.effectiveDateTypeAble = false
} else {
//身份证,出生证明,护照以外的证件类型可以使用长期
if (value.id == '1') {
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.effectiveDateTypeAble = !(age >= 45)
} else if (value.id == '2' || value.id == '3') {
this.effectiveDateTypeAble = true
} else {
this.effectiveDateTypeAble = false
}
} else if (this.pickerType == '3') {
;[this.userInfo.degree, this.degree] = [value.id, value.text]
@@ -684,7 +713,8 @@ export default {
</script>
<style lang="scss" scoped>
.title {
font-weight: 600;
font-size: 15px;
font-weight: bold;
border-bottom: 1px solid #ebedf0;
}
[class*='van-hairline']::after {