diff --git a/src/views/ebiz/sale/AddBeneficiaryInfo.vue b/src/views/ebiz/sale/AddBeneficiaryInfo.vue index 9e0ebe38f..8c508bc90 100644 --- a/src/views/ebiz/sale/AddBeneficiaryInfo.vue +++ b/src/views/ebiz/sale/AddBeneficiaryInfo.vue @@ -98,8 +98,8 @@ = 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 { diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index f35fc300f..fe8f758c4 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -110,8 +110,8 @@