From b24792d68ac257ece67215eed9a1b08bdcffadd0 Mon Sep 17 00:00:00 2001 From: liyuetong Date: Thu, 2 Dec 2021 17:18:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8A=95=E4=BF=9D=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2--=E8=A2=AB=E4=BF=9D=E4=BA=BA=EF=BC=8C=E5=8F=97?= =?UTF-8?q?=E7=9B=8A=E4=BA=BA=E8=AF=81=E4=BB=B6=E7=B1=BB=E5=9E=8B=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E6=98=AF=E8=BA=AB=E4=BB=BD=E8=AF=81=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E8=AF=81=E4=BB=B6=E6=88=AA=E6=AD=A2=E6=97=A5=E6=9C=9F=E8=AF=81?= =?UTF-8?q?=E4=BB=B6=E6=88=AA=E6=AD=A2=E6=97=A5=E6=9C=9F=E5=BA=94=E4=B8=BA?= =?UTF-8?q?=E7=AC=AC16=E5=91=A8=E5=B2=81=E7=9A=84=E7=94=9F=E6=97=A5?= =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ebiz/insureAgain/InsureInformation.vue | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/src/views/ebiz/insureAgain/InsureInformation.vue b/src/views/ebiz/insureAgain/InsureInformation.vue index 65b4ca252..0150782f3 100644 --- a/src/views/ebiz/insureAgain/InsureInformation.vue +++ b/src/views/ebiz/insureAgain/InsureInformation.vue @@ -353,6 +353,8 @@ import CacheUtils from '@/assets/js/utils/cacheUtils' import SelectBankName from '@/components/ebiz/account/SelectBankName' import areaList from '@/assets/js/utils/area' import occupationList from '@/components/ebiz/occipation/data/occupation' +import { idToData } from './js/verification' + export default { name: 'InsureInformation', components: { @@ -575,9 +577,23 @@ export default { }) this.setInsuredCustomerMarriage(this.insuredPersonInfo.marriage) - //是否长期 - // this.insuredPersonInfo.effectiveDateType = res.orderDTO.insuredDTOs[0].effectiveDateType == 'false' ? false : true - this.insuredPersonInfo.effectiveDateType = res.orderDTO.insuredDTOs[0].effectiveDateType == 'true' ? true : false + //被保人证件类型如果是身份证时,证件截止日期证件截止日期应为第16周岁的生日日期。 + if(this.insuredPersonInfo.idType == '2' && idToData(this.insuredPersonInfo.idNo).age <16){ + // 获取当前年份 + const currentYear = new Date().getFullYear() + if(this.insuredPersonInfo.birthday.substr(5,5) == '02-29'){ + // 获取某年某月一共多少天 + let year = currentYear + Number(16-idToData(this.insuredPersonInfo.idNo).age) + let date = new Date(year, 2, 1) + let dayEnd = new Date(date.getTime() - 864e5).getDate() + this.insuredPersonInfo.certiexpiredate = currentYear + Number(16-idToData(this.insuredPersonInfo.idNo).age)+'-02-'+ dayEnd + }else{ + this.insuredPersonInfo.certiexpiredate = currentYear + Number(16-idToData(this.insuredPersonInfo.idNo).age)+'-'+ this.insuredPersonInfo.birthday.substr(5,5) + } + }else{ + //是否长期 + this.insuredPersonInfo.effectiveDateType = this.insuredPersonInfo.effectiveDateType == 'true' ? true : false + } if (this.insuredPersonInfo.homeProvince.length) { this.insuredHomeName = getAreaName([ { code: this.insuredPersonInfo.homeProvince }, @@ -609,6 +625,20 @@ export default { } }) }) + //受益人证件类型如果是身份证时,证件截止日期证件截止日期应为第16周岁的生日日期。 + if(item.idType == '2' && idToData(item.idNo).age <16){ + // 获取当前年份 + const currentYear = new Date().getFullYear() + if(item.birthday.substr(5,5) == '02-29'){ + // 获取某年某月一共多少天 + let year = currentYear + Number(16-idToData(item.idNo).age) + let date = new Date(year, 2, 1) + let dayEnd = new Date(date.getTime() - 864e5).getDate() + item.certiexpiredate = currentYear + Number(16-idToData(item.idNo).age)+'-02-'+ dayEnd + }else{ + item.certiexpiredate = currentYear + Number(16-idToData(item.idNo).age)+'-'+ item.birthday.substr(5,5) + } + } }) } else { this.bnftype = '0'