Merge branch 'feature/GFRS-765【0423】电投自核规则前端进行转译提示' into dev

This commit is contained in:
tian.guangyuan
2020-03-24 14:15:28 +08:00
3 changed files with 176 additions and 10 deletions

View File

@@ -98,8 +98,8 @@
<van-field
:value="userInfo.nativeplace | idToText('nativeplace')"
readonly
label="国家/地区"
name="国家/地区"
label="国"
name="国"
required
v-validate="'required'"
right-icon="arrow"
@@ -713,6 +713,9 @@ export default {
}
//如果证件类型是身份证
if (this.userInfo.idType == '1') {
if (this.userInfo.nativeplace != '1') {
return this.$toast('证件类型”为“身份证,国籍必须为中国哦')
}
//校验性别是否与身份证号码位相符
if (this.userInfo.idNo.length == '15') {
//15位身份证第15位是性别位, 奇男偶女
@@ -796,7 +799,12 @@ export default {
// return this.$toast('出生证须大于等于3个字符')
// }
//证件类型是护照
} else if (this.userInfo.idType == '4') {
if (this.userInfo.nativeplace == '1') {
return this.$toast('“证件类型”为“外国人护照”,“国籍”不能选择为“中国”哦~')
}
}
// else if (this.userInfo.idType == '4' && this.userInfo.idNo.length < 3) {
// return this.$toast('护照须大于等于3个字符')
// //证件是港澳居民通行证
@@ -811,6 +819,53 @@ export default {
// return this.$toast('证件类型为台湾居民通行证的证件号码须为8位数字')
// }
// 通过国籍判断 证件是否符合要求
// 如果是国籍选择中国大陆
if (this.userInfo.nativeplace == '1') {
// “身份证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”
let obj = {
'1': true,
'5': true,
'6': true
}
let idType = this.userInfo.idType
// 通过年龄 判断证件是否符合要求
// 小于2岁
if (age < 2) {
// “出生证”,"户口本"
obj['2'] = true
obj['3'] = true
if (obj[idType] === undefined) {
this.$toast('亲国籍为中国且未满2周岁儿童证件类型必须“身份证”或“户口本”或“出生证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”')
}
} else if (age < 16) {
// 小于16岁
// “户口本”
obj['2'] = true
if (obj[idType] === undefined) {
this.$toast(
'亲国籍为中国且大于2周岁小于16周岁的未成年人证件类型必须为“身份证”或“户口本”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”'
)
}
} else {
// 大于16岁
if (obj[idType] === undefined) {
this.$toast('亲,国籍为中国,证件类型必须为“身份证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”')
}
}
} else {
// 非大陆人员按外籍人员
let obj = {
'4': true,
'8': true
}
let idType = this.userInfo.idType
if (obj[idType] === undefined) {
this.$toast('亲,国籍为外籍,证件类型必须为护照或外国人永久居留身份证投保')
}
}
let beneficiaries = []
if (localStorage.beneficiaryInfo) {
// 从 localStorage 取出数据
@@ -841,6 +896,8 @@ export default {
return this.$toast('受益份额不能超过100~')
}
}
beneficiaries.push(this.userInfo)
// console.log(beneficiaries)
// 保存 新增的受益人信息 以及页面跳转字段

View File

@@ -71,8 +71,8 @@
:value="userInfo.nativeplace | idToText('nativeplace')"
readonly
required
label="国家/地区"
name="国家/地区"
label="国"
name="国"
v-validate="'required'"
right-icon="arrow"
placeholder="请选择"
@@ -508,7 +508,7 @@ export default {
// this.userInfo.addressStatus = '0'
//证件类型
this.userInfo.idType = '1'
//国家/地区
//国
this.userInfo.nativeplace = '1'
this.$utils.intLocalStorage(res)
@@ -838,6 +838,11 @@ export default {
//如果证件类型是身份证
if (this.userInfo.idType == '1') {
console.log('证件类型是身份证')
if (this.userInfo.nativeplace != '1') {
return this.$toast('证件类型”为“身份证,国籍必须为中国哦')
}
//校验性别是否与身份证号码位相符
// if (this.userInfo.idNo.length == '15') {
// //15位身份证第15位是性别位, 奇男偶女
@@ -910,6 +915,10 @@ export default {
if (age >= 2) {
return this.$toast('客户年龄在2周岁及以上不能使用出生证作为有效证件')
}
} else if (this.userInfo.idType == '4') {
if (this.userInfo.nativeplace == '1') {
return this.$toast('“证件类型”为“外国人护照”,“国籍”不能选择为“中国”哦~')
}
}
// else if (this.userInfo.idType == '4' && this.userInfo.idNo.length < 3) {
// console.log('证件类型是护照')
@@ -948,7 +957,7 @@ export default {
this.userInfo.occupationCode == '4071203' ||
this.userInfo.occupationCode == '8000001'
) {
console.log(1)
;
} else if (this.userInfo.workcompany.length < 6) {
return this.$toast('亲,您填写的工作单位过于简短哦~')
}
@@ -973,6 +982,52 @@ export default {
// }
// }
// 通过国籍判断 证件是否符合要求
// 如果是国籍选择中国大陆
if (this.userInfo.nativeplace == '1') {
// “身份证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”
let obj = {
'1': true,
'5': true,
'6': true
}
let idType = this.userInfo.idType
// 通过年龄 判断证件是否符合要求
// 小于2岁
if (age < 2) {
// “出生证”,"户口本"
obj['2'] = true
obj['3'] = true
if (obj[idType] === undefined) {
this.$toast('亲国籍为中国且未满2周岁儿童证件类型必须“身份证”或“户口本”或“出生证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”')
}
} else if (age < 16) {
// 小于16岁
// “户口本”
obj['2'] = true
if (obj[idType] === undefined) {
this.$toast(
'亲国籍为中国且大于2周岁小于16周岁的未成年人证件类型必须为“身份证”或“户口本”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”'
)
}
} else {
// 大于16岁
if (obj[idType] === undefined) {
this.$toast('亲,国籍为中国,证件类型必须为“身份证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”')
}
}
} else {
// 非大陆人员按外籍人员
let obj = {
'4': true,
'8': true
}
let idType = this.userInfo.idType
if (obj[idType] === undefined) {
this.$toast('亲,国籍为外籍,证件类型必须为护照或外国人永久居留身份证投保')
}
}
this.infoUpdate()
// console.log('success')
} else {

View File

@@ -110,8 +110,8 @@
<van-field
:value="userInfo.nativeplace | idToText('nativeplace')"
readonly
label="国家/地区"
name="国家/地区"
label="国"
name="国"
required
v-validate="'required'"
right-icon="arrow"
@@ -631,7 +631,7 @@ export default {
// this.userInfo.addressStatus = '0'
//证件类型
this.userInfo.idType = '1'
//国家/地区
//国
this.userInfo.nativeplace = '1'
// if (this.$route.query.isShow) {
//户籍
@@ -1202,6 +1202,9 @@ export default {
//如果证件类型是身份证
if (this.userInfo.idType == '1') {
if (this.userInfo.nativeplace != '1') {
return this.$toast('证件类型”为“身份证,国籍必须为中国哦')
}
//校验性别是否与身份证号码位相符
if (this.userInfo.idNo.length == '15') {
//15位身份证第15位是性别位, 奇男偶女
@@ -1290,6 +1293,10 @@ export default {
// return this.$toast('出生证须大于等于3个字符')
// }
//证件类型是护照
} else if (this.userInfo.idType == '4') {
if (this.userInfo.nativeplace == '1') {
return this.$toast('“证件类型”为“外国人护照”,“国籍”不能选择为“中国”哦~')
}
}
// else if (this.userInfo.idType == '4' && this.userInfo.idNo.length < 3) {
// return this.$toast('护照须大于等于3个字符')
@@ -1322,6 +1329,53 @@ export default {
return this.$toast('被保险人不符合国家婚姻法定年龄')
}
}
// 通过国籍判断 证件是否符合要求
// 如果是国籍选择中国大陆
if (this.userInfo.nativeplace == '1') {
// “身份证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”
let obj = {
'1': true,
'5': true,
'6': true
}
let idType = this.userInfo.idType
// 通过年龄 判断证件是否符合要求
// 小于2岁
if (age < 2) {
// “出生证”,"户口本"
obj['2'] = true
obj['3'] = true
if (obj[idType] === undefined) {
this.$toast('亲国籍为中国且未满2周岁儿童证件类型必须“身份证”或“户口本”或“出生证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”')
}
} else if (age < 16) {
// 小于16岁
// “户口本”
obj['2'] = true
if (obj[idType] === undefined) {
this.$toast(
'亲国籍为中国且大于2周岁小于16周岁的未成年人证件类型必须为“身份证”或“户口本”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”'
)
}
} else {
// 大于16岁
if (obj[idType] === undefined) {
this.$toast('亲,国籍为中国,证件类型必须为“身份证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”')
}
}
} else {
// 非大陆人员按外籍人员
let obj = {
'4': true,
'8': true
}
let idType = this.userInfo.idType
if (obj[idType] === undefined) {
this.$toast('亲,国籍为外籍,证件类型必须为护照或外国人永久居留身份证投保')
}
}
// this.save()
this.infoUpdate()
// console.log('success')