From 4abb5693f576f1b098c0718a7fa19db571528cff Mon Sep 17 00:00:00 2001 From: yuweiqi Date: Mon, 15 Jun 2020 15:00:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[FIX]=E3=80=90=E4=BF=9D=E5=85=A8=E3=80=91?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=AF=81=E4=BB=B6=E6=9C=89=E6=95=88=E6=9C=9F?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E2=80=94=E2=80=94=E6=8E=92=E9=99=A4=E2=80=9C?= =?UTF-8?q?=E9=87=8D=E8=A6=81=E8=B5=84=E6=96=99=E5=8F=98=E6=9B=B4=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/preserve/common/Search.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/ebiz/preserve/common/Search.vue b/src/views/ebiz/preserve/common/Search.vue index 9c9d652a4..effe7912b 100644 --- a/src/views/ebiz/preserve/common/Search.vue +++ b/src/views/ebiz/preserve/common/Search.vue @@ -46,7 +46,11 @@ export default { list: [], // 客户列表 selected: 0, // 搜索类型 0 客户姓名 1 证件号码 2 手机号 isSearch: true, // 是否显示搜索按钮 - options: [{ text: '客户姓名', value: 0 }, { text: '证件号码', value: 1 }, { text: '手机号', value: 2 }], + options: [ + { text: '客户姓名', value: 0 }, + { text: '证件号码', value: 1 }, + { text: '手机号', value: 2 } + ], entry: '', // 入口 surrenderType: '' } @@ -102,8 +106,8 @@ export default { }, // 点击客户 handleClick(params) { - if (this.checkValidity(params) == '0') { - return this.$toast('当前客户的身份证件已过期') + if (this.checkValidity(params) == '0' && this.entry != 'CM') { + return this.$toast('您的证件有效期已过期,请立即更新您的证件有效期。如有问题,请致电400-694-6688') } this.entry = this.$route.query.entry let url = '' From 54065f2d37ad0a920082bccec083fe75836e37dc Mon Sep 17 00:00:00 2001 From: yuweiqi Date: Mon, 15 Jun 2020 19:36:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[FIX]=E3=80=90=E4=BF=9D=E5=85=A8=E3=80=91?= =?UTF-8?q?=E5=8F=97=E7=9B=8A=E4=BA=BA=E5=8F=98=E6=9B=B4=E2=80=94=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=BA=AB=E4=BB=BD=E8=AF=81=E6=9C=89=E6=95=88=E6=9C=9F?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ebiz/preserve/bc/BeneficiaryInfo.vue | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/src/views/ebiz/preserve/bc/BeneficiaryInfo.vue b/src/views/ebiz/preserve/bc/BeneficiaryInfo.vue index f6cd3c9c7..e8e6ec898 100644 --- a/src/views/ebiz/preserve/bc/BeneficiaryInfo.vue +++ b/src/views/ebiz/preserve/bc/BeneficiaryInfo.vue @@ -59,6 +59,7 @@ import { RadioGroup, Radio, Icon, Dialog } from 'vant' import { changeEdor, policyInfo } from '@/api/ebiz/preserve/preserve' import filters from '@/views/ebiz/preserve/filters' import businessCommon from '../js/business-common' +import utilsAge from '@/assets/js/utils/age' export default { name: 'BeneficiaryInfo', @@ -148,21 +149,35 @@ export default { }, //下一步 nextStep() { - let checkIdExpDate = true, //校验证件有效期是否过期 true-已过期 false-未过期 - overdueName = '' if (this.type == 2 && this.beneficiariesNew.length < 1) { this.$toast('受益人列表不能为空') return - } else if (this.beneficiariesNew.length > 0) { - checkIdExpDate = this.beneficiariesNew.some(i => { - overdueName = i.name - return Date.parse(i.idExpDate) < Date.parse(new Date()) - }) - } else { - checkIdExpDate = false } - if (checkIdExpDate) { - return this.$toast(`受益人${overdueName}的身份证件已过期`) + + //校验身份证有效期 + for (let i of this.beneficiariesNew) { + if (i.idType == '1') { + let age = utilsAge.getAge(i.birthday, new Date()) + if (Date.parse(i.idExpDate) < Date.parse(new Date())) { + return this.$toast(`受益人${i.name}的身份证件已过期`) + } + if (age < 46 && i.idExpDate == '9999-01-01') { + return this.$toast(`受益人${i.name}证件有效期不正常,年龄小于46周岁,证件有效期不能为长期`) + } + if (age < 16) { + if (Date.parse(i.idExpDate) - Date.parse(new Date()) > Date.parse('1975-01-01')) { + return this.$toast(`受益人${i.name}证件有效期不正常,未满16周岁的公民身份证有效期应小于等于5年`) + } + } else if (age >= 16 && age <= 25) { + if (Date.parse(i.idExpDate) - Date.parse(new Date()) > Date.parse('1980-01-01')) { + return this.$toast(`受益人${i.name}证件有效期不正常,16周岁至25周岁公民身份证有效期应小于等于10年`) + } + } else if (age >= 26 && age <= 45) { + if (Date.parse(i.idExpDate) - Date.parse(new Date()) > Date.parse('1980-01-01')) { + return this.$toast(`受益人${i.name}证件有效期不正常,26周岁至45周岁公民身份证有效期应小于等于20年`) + } + } + } } let beneRatio = 0 this.beneficiariesNew.forEach(item => {