From d45f34ce64da7b6221540554007cc91031c55055 Mon Sep 17 00:00:00 2001 From: "tian.guangyuan" Date: Tue, 24 Mar 2020 14:15:14 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20GFRS-765=E3=80=900423=E3=80=91=E7=94=B5?= =?UTF-8?q?=E6=8A=95=E8=87=AA=E6=A0=B8=E8=A7=84=E5=88=99=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E8=BD=AC=E8=AF=91=E6=8F=90=E7=A4=BA=20?= =?UTF-8?q?=E5=AF=B9=E6=8A=95=E4=BF=9D=E4=BA=BA=E3=80=81=E8=A2=AB=E4=BF=9D?= =?UTF-8?q?=E9=99=A9=E4=BA=BA=E3=80=81=E6=94=B6=E7=9B=8A=E4=BA=BA=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20=20=E6=B7=BB=E5=8A=A0=E5=9B=BD=E7=B1=8D=E3=80=81?= =?UTF-8?q?=E8=AF=81=E4=BB=B6=E7=9B=B8=E5=85=B3=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/sale/AddBeneficiaryInfo.vue | 63 ++++++++++++++++++++-- src/views/ebiz/sale/InsuredInfo.vue | 63 ++++++++++++++++++++-- src/views/ebiz/sale/InsuredPerson.vue | 60 +++++++++++++++++++-- 3 files changed, 176 insertions(+), 10 deletions(-) diff --git a/src/views/ebiz/sale/AddBeneficiaryInfo.vue b/src/views/ebiz/sale/AddBeneficiaryInfo.vue index 244f1594f..0d91ab8d3 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('证件类型是护照') @@ -889,7 +898,7 @@ export default { this.userInfo.occupationCode == '4071203' || this.userInfo.occupationCode == '8000001' ) { - console.log(1) + ; } else if (this.userInfo.workcompany.length < 6) { return this.$toast('亲,您填写的工作单位过于简短哦~') } @@ -914,6 +923,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 a019b79ed..658214179 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -109,8 +109,8 @@