Merge branch 'hotfix/bug_自助入司人脸识别放开' into dev

# Conflicts:
#	src/router/ebiz/agentEenter.js
#	src/views/ebiz/agentEenter/Paction.vue
This commit is contained in:
yuweiqi
2020-06-28 16:26:35 +08:00
parent d672a1bbce
commit af298fc439
5 changed files with 298 additions and 280 deletions

View File

@@ -988,7 +988,7 @@ export default {
this.userInfo.applyerCertiStartDate = ''
this.$refs.certificateValidate.date = ''
this.$refs.applyerCertiEndDate.date = ''
return this.$toast('16周岁以下的证件有效期为5年')
return this.$toast('证件有效期错误,16周岁以下的证件有效期为5年')
}
//年龄在16-25周岁之间
} else if (age >= 16 && age <= 25) {
@@ -997,7 +997,7 @@ export default {
this.userInfo.applyerCertiStartDate = ''
this.$refs.certificateValidate.date = ''
this.$refs.applyerCertiEndDate.date = ''
return this.$toast('16周岁~25周岁的证件有效期为10年')
return this.$toast('证件有效期错误,16周岁~25周岁的证件有效期为10年')
}
//年龄在26-45周岁之间
} else if (age >= 26 && age <= 45) {
@@ -1006,7 +1006,7 @@ export default {
this.userInfo.applyerCertiStartDate = ''
this.$refs.certificateValidate.date = ''
this.$refs.applyerCertiEndDate.date = ''
return this.$toast('26周岁~45周岁的证件有效期为20年')
return this.$toast('证件有效期错误,26周岁~45周岁的证件有效期为20年')
}
} else if (age >= 46 && age <= 65) {
if (
@@ -1017,7 +1017,7 @@ export default {
this.userInfo.applyerCertiStartDate = ''
this.$refs.certificateValidate.date = ''
this.$refs.applyerCertiEndDate.date = ''
return this.$toast('46周岁~65周岁的证件有效期为20年或为长期')
return this.$toast('证件有效期错误,46周岁~65周岁的证件有效期为20年或为长期')
}
} else if (age >= 66) {
if (this.effectiveDateType !== true) {
@@ -1025,7 +1025,7 @@ export default {
this.userInfo.applyerCertiStartDate = ''
this.$refs.certificateValidate.date = ''
this.$refs.applyerCertiEndDate.date = ''
return this.$toast('年龄大于等于66周岁证件有效期为长期')
return this.$toast('证件有效期错误,年龄大于等于66周岁证件有效期为长期')
}
}
// 证件号码规则校验

View File

@@ -326,21 +326,21 @@ export default {
if (new Date(val).getFullYear() - new Date().getFullYear() > 5) {
this.userInfo.certiTypeEndDate = ''
this.$refs.certiTypeEndDate.date = ''
return this.$toast('16周岁以下的证件有效期为5年')
return this.$toast('证件有效期错误,16周岁以下的证件有效期为5年')
}
//年龄在16-25周岁之间
} else if (age >= 16 && age <= 25) {
if (new Date(val).getFullYear() - new Date().getFullYear() > 10) {
this.userInfo.certiTypeEndDate = ''
this.$refs.certiTypeEndDate.date = ''
return this.$toast('16周岁~25周岁的证件有效期为10年')
return this.$toast('证件有效期错误,16周岁~25周岁的证件有效期为10年')
}
//年龄在26-45周岁之间
} else if (age >= 26 && age <= 45) {
if (new Date(val).getFullYear() - new Date().getFullYear() > 20) {
this.userInfo.certiTypeEndDate = ''
this.$refs.certiTypeEndDate.date = ''
return this.$toast('26周岁~45周岁的证件有效期为20年')
return this.$toast('证件有效期错误,26周岁~45周岁的证件有效期为20年')
}
//此外的年龄段不支持
}
@@ -588,28 +588,28 @@ export default {
let age = utilsAge.getAge(this.userInfo.insuredBirthday, new Date())
//若证件为身份证——进行证件有效期校验
if (age < 46 && this.effectiveDateType) {
return this.$toast('年龄小于46周岁证件有效期不能为长期')
return this.$toast('证件有效期错误,年龄小于46周岁证件有效期不能为长期')
}
// 年龄小于16周岁
if (age <= 15) {
if (Date.parse(this.userInfo.certiTypeEndDate) - Date.parse(new Date()) > Date.parse('1975-01-01')) {
this.userInfo.certiTypeEndDate = ''
this.$refs.certiTypeEndDate.date = ''
return this.$toast('16周岁以下的证件有效期为5年')
return this.$toast('证件有效期错误,16周岁以下的证件有效期为5年')
}
//年龄在16-25周岁之间
} else if (age >= 16 && age <= 25) {
if (Date.parse(this.userInfo.certiTypeEndDate) - Date.parse(new Date()) > Date.parse('1980-01-01')) {
this.userInfo.certiTypeEndDate = ''
this.$refs.certiTypeEndDate.date = ''
return this.$toast('16周岁~25周岁的证件有效期为10年')
return this.$toast('证件有效期错误,16周岁~25周岁的证件有效期为10年')
}
//年龄在26-45周岁之间
} else if (age >= 26 && age <= 45) {
if (Date.parse(this.userInfo.certiTypeEndDate) - Date.parse(new Date()) > Date.parse('1990-01-01')) {
this.userInfo.certiTypeEndDate = ''
this.$refs.certiTypeEndDate.date = ''
return this.$toast('26周岁~45周岁的证件有效期为20年')
return this.$toast('证件有效期错误,26周岁~45周岁的证件有效期为20年')
}
} /*else if (age >= 46 && age <= 65) {
if (

View File

@@ -214,7 +214,11 @@ import idNoCheck from '@/assets/js/utils/idNoCheck'
import { idToData } from './js/verification'
import { selectComp } from './js/methods'
// let relationToInsured = [{ id: 2, text: '配偶' }, { id: 3, text: '父母' }, { id: 4, text: '子女' }, { id: 5, text: '其他' }]
let relationToInsured = [{ id: 2, text: '配偶' }, { id: 3, text: '父母' }, { id: 4, text: '子女' }]
let relationToInsured = [
{ id: 2, text: '配偶' },
{ id: 3, text: '父母' },
{ id: 4, text: '子女' }
]
export default {
name: 'insuredInfo',
@@ -408,7 +412,10 @@ export default {
} else if (pickerType == '3') {
this.columns = DataDictionary.degree
} else if (pickerType == '4') {
this.columns = [{ id: 0, text: '有' }, { id: 1, text: '无' }]
this.columns = [
{ id: 0, text: '有' },
{ id: 1, text: '无' }
]
} else if (pickerType == '5') {
this.columns = DataDictionary.taxIdentity
} else if (pickerType == '6') {
@@ -761,14 +768,17 @@ export default {
console.log('证件号码校验有误')
return this.$toast('您填写的证件号码有误')
}
//年龄在小于周岁不含46周岁证件有效期不能为长期
if (age < 46 && this.userInfo.effectiveDateType == true) {
return this.$toast('证件有效期错误年龄小于46周岁证件有效期不能为长期')
}
//年龄在0-15周岁之间
if (age <= 15) {
if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1975-01-01')) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
// this.effectiveDateTypeAble = true
return this.$toast('证件有效期不正常未满16周岁的公民身份证有效期应小于等于5年')
return this.$toast('证件有效期错误未满16周岁的公民身份证有效期应小于等于5年')
}
//年龄在 16-25 周岁之间
} else if (age >= 16 && age <= 25) {
@@ -776,7 +786,7 @@ export default {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
// this.effectiveDateTypeAble = true
return this.$toast('证件有效期不正常16周岁至25周岁公民身份证有效期应小于等于10年')
return this.$toast('证件有效期错误16周岁至25周岁公民身份证有效期应小于等于10年')
}
//年龄在 26-45 周岁之间
} else if (age >= 26 && age <= 45) {
@@ -784,7 +794,7 @@ export default {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
// this.effectiveDateTypeAble = true
return this.$toast('证件有效期不正常26周岁至45周岁公民身份证有效期应小于等于20年')
return this.$toast('证件有效期错误26周岁至45周岁公民身份证有效期应小于等于20年')
}
}
//证件类型是户口本
@@ -841,7 +851,9 @@ export default {
obj['2'] = true
obj['3'] = true
if (obj[idType] === undefined) {
return this.$toast('亲国籍为中国且未满2周岁儿童证件类型必须“身份证”或“户口本”或“出生证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”')
return this.$toast(
'亲国籍为中国且未满2周岁儿童证件类型必须“身份证”或“户口本”或“出生证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”'
)
}
} else if (age < 16) {
// 小于16岁
@@ -870,7 +882,6 @@ export default {
}
}
let beneficiaries = []
if (localStorage.beneficiaryInfo) {
// 从 localStorage 取出数据
@@ -902,7 +913,6 @@ export default {
}
}
beneficiaries.push(this.userInfo)
// console.log(beneficiaries)
// 保存 新增的受益人信息 以及页面跳转字段

View File

@@ -990,6 +990,10 @@ export default {
return this.$toast('您填写的证件号码有误')
}
//年龄在小于周岁不含46周岁证件有效期不能为长期
if (age < 46 && this.userInfo.effectiveDateType == true) {
return this.$toast('证件有效期错误年龄小于46周岁证件有效期不能为长期')
}
// 年龄在 16-25 周岁之间
if (age >= 16 && age <= 25) {
console.log('年龄在16-25周岁之间')
@@ -997,7 +1001,7 @@ export default {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
this.effectiveDateTypeAble = true
return this.$toast('证件有效期不正常16周岁至25周岁公民身份证有效期应小于等于10年')
return this.$toast('证件有效期错误16周岁至25周岁公民身份证有效期应小于等于10年')
}
//年龄在 26-45 周岁之间
} else if (age >= 26 && age <= 45) {
@@ -1006,7 +1010,7 @@ export default {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
this.effectiveDateTypeAble = true
return this.$toast('证件有效期不正常26周岁至45周岁公民身份证有效期应小于等于20年')
return this.$toast('证件有效期错误26周岁至45周岁公民身份证有效期应小于等于20年')
}
}
//证件类型是户口本

View File

@@ -1275,13 +1275,17 @@ export default {
return this.$toast('您填写的证件号码有误')
}
console.log(age)
//年龄在小于周岁不含46周岁证件有效期不能为长期
if (age < 46 && this.userInfo.effectiveDateType == true) {
return this.$toast('证件有效期错误年龄小于46周岁证件有效期不能为长期')
}
//年龄在0-15周岁之间
if (age <= 15) {
if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1975-01-01')) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
// this.effectiveDateTypeAble = true
return this.$toast('证件有效期不正常未满16周岁的公民身份证有效期应小于等于5年')
return this.$toast('证件有效期错误未满16周岁的公民身份证有效期应小于等于5年')
}
//年龄在 16-25 周岁之间
} else if (age >= 16 && age <= 25) {
@@ -1289,7 +1293,7 @@ export default {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
// this.effectiveDateTypeAble = true
return this.$toast('证件有效期不正常16周岁至25周岁公民身份证有效期应小于等于10年')
return this.$toast('证件有效期错误16周岁至25周岁公民身份证有效期应小于等于10年')
}
//年龄在 26-45 周岁之间
} else if (age >= 26 && age <= 45) {
@@ -1297,7 +1301,7 @@ export default {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
// this.effectiveDateTypeAble = true
return this.$toast('证件有效期不正常26周岁至45周岁公民身份证有效期应小于等于20年')
return this.$toast('证件有效期错误26周岁至45周岁公民身份证有效期应小于等于20年')
}
}
//如果是身份证,且未成年,则与投保人关系必须是子女关系