From 87df197981aee00b07e0838c1ea5e010844aa8be Mon Sep 17 00:00:00 2001 From: yuweiqi Date: Sun, 28 Jun 2020 16:44:35 +0800 Subject: [PATCH] =?UTF-8?q?[FIX]=E3=80=90=E4=BF=9D=E5=85=A8=E3=80=91?= =?UTF-8?q?=E8=AF=81=E4=BB=B6=E6=9C=89=E6=95=88=E6=9C=9F=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?-=E5=8F=97=E7=9B=8A=E4=BA=BA=E5=8F=98=E6=9B=B4-=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=AF=81=E4=BB=B6=E6=9C=89=E6=95=88=E6=9C=9F=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/preserve/bc/BeneficiaryInfo.vue | 10 +++++----- src/views/ebiz/preserve/bc/BeneficiaryInfoAdd.vue | 10 +++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/views/ebiz/preserve/bc/BeneficiaryInfo.vue b/src/views/ebiz/preserve/bc/BeneficiaryInfo.vue index e8e6ec898..fa5479949 100644 --- a/src/views/ebiz/preserve/bc/BeneficiaryInfo.vue +++ b/src/views/ebiz/preserve/bc/BeneficiaryInfo.vue @@ -162,19 +162,19 @@ export default { return this.$toast(`受益人${i.name}的身份证件已过期`) } if (age < 46 && i.idExpDate == '9999-01-01') { - return this.$toast(`受益人${i.name}证件有效期不正常,年龄小于46周岁,证件有效期不能为长期`) + 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年`) + 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年`) + 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年`) + return this.$toast(`受益人${i.name}证件有效期错误,26周岁至45周岁公民身份证有效期应小于等于20年`) } } } @@ -308,7 +308,7 @@ export default { }) isDetailFlag = totalPrem >= 200000 ? '0' : '1' this.policy.isDetailFlag = isDetailFlag - this.policy.isDetailFlag = '0' //TEST测试专用 + // this.policy.isDetailFlag = '0' //TEST测试专用 } }, filters: { diff --git a/src/views/ebiz/preserve/bc/BeneficiaryInfoAdd.vue b/src/views/ebiz/preserve/bc/BeneficiaryInfoAdd.vue index b83aff768..68b5095a0 100644 --- a/src/views/ebiz/preserve/bc/BeneficiaryInfoAdd.vue +++ b/src/views/ebiz/preserve/bc/BeneficiaryInfoAdd.vue @@ -466,26 +466,30 @@ export default { 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.idExpDate) - Date.parse(new Date()) > Date.parse('1975-01-01')) { this.userInfo.idExpDate = '' this.$refs.effectiveDate.date = '' - return this.$toast('证件有效期不正常,未满16周岁的公民身份证有效期应小于等于5年') + return this.$toast('证件有效期错误,未满16周岁的公民身份证有效期应小于等于5年') } //年龄在 16-25 周岁之间 } else if (age >= 16 && age <= 25) { if (Date.parse(this.userInfo.idExpDate) - Date.parse(new Date()) > Date.parse('1980-01-01')) { this.userInfo.idExpDate = '' this.$refs.effectiveDate.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.idExpDate) - Date.parse(new Date()) > Date.parse('1990-01-01')) { this.userInfo.idExpDate = '' this.$refs.effectiveDate.date = '' - return this.$toast('证件有效期不正常,26周岁至45周岁公民身份证有效期应小于等于20年') + return this.$toast('证件有效期错误,26周岁至45周岁公民身份证有效期应小于等于20年') } } //证件类型是户口本