diff --git a/src/views/ebiz/sale/AddBeneficiaryInfo.vue b/src/views/ebiz/sale/AddBeneficiaryInfo.vue index 85d44d130..3a2ff23ae 100644 --- a/src/views/ebiz/sale/AddBeneficiaryInfo.vue +++ b/src/views/ebiz/sale/AddBeneficiaryInfo.vue @@ -660,6 +660,25 @@ export default { this.userInfo.nativeplace = data.country //国家地区 this.userInfo.birthday = data.birthday //出生日期 this.userInfo.idType = data.customerIdType //证件类型 + // 证件截止日期证件截止日期应为第16周岁的生日日期 + if(this.userInfo.idType == '2'){ + //证件类型如果是户口本时,证件有效止期不可编辑 + this.idLimit = true + this.effectiveDateTypeAble = false + this.userInfo.effectiveDateType = false + } + if(this.userInfo.idType == '1' ||this.userInfo.idType == '2'){ + // 获取出生日期年份+16 + let year = Number(this.userInfo.birthday.substr(0,4)) + 16 + if(this.userInfo.birthday.substr(5,5) == '02-29'){ + // 获取某年某月一共多少天 + let date = new Date(year, 2, 1) + let dayEnd = new Date(date.getTime() - 864e5).getDate() + this.userInfo.certiexpiredate = year +'-02-'+ dayEnd + }else{ + this.userInfo.certiexpiredate = year +'-'+ this.userInfo.birthday.substr(5,5) + } + } this.userInfo.idNo = data.customerIdNumber //证件号码 this.setCustomerMarriage(data.marryStatus) this.userInfo.village = data.homeAddress diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index 4fde376e9..a9961fa7c 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -705,6 +705,24 @@ export default { // { code: saleInsuredPersonInfo.homeArea } // ]) //联系地址 // } + if(this.userInfo.idType == '2'){ + //证件类型如果是户口本时,证件有效止期不可编辑 + this.idLimit = true + this.effectiveDateTypeAble = false + this.userInfo.effectiveDateType = false + } + if(this.userInfo.idType == '1' ||this.userInfo.idType == '2'){ + // 获取出生日期年份+16 + let year = Number(this.userInfo.birthday.substr(0,4)) + 16 + if(this.userInfo.birthday.substr(5,5) == '02-29'){ + // 获取某年某月一共多少天 + let date = new Date(year, 2, 1) + let dayEnd = new Date(date.getTime() - 864e5).getDate() + this.userInfo.certiexpiredate = year +'-02-'+ dayEnd + }else{ + this.userInfo.certiexpiredate = year +'-'+ this.userInfo.birthday.substr(5,5) + } + } } //------------------------专为惠企写死--begin---------------// if (res.orderDTO.insuredDTOs[0] && res.orderDTO.insuredDTOs[0].riskDTOLst) { @@ -1181,6 +1199,25 @@ export default { this.userInfo.nativeplace = data.country //国家地区 this.userInfo.birthday = data.birthday //出生日期 this.userInfo.idType = data.customerIdType //证件类型 + // 证件截止日期证件截止日期应为第16周岁的生日日期 + if(this.userInfo.idType == '2'){ + //证件类型如果是户口本时,证件有效止期不可编辑 + this.idLimit = true + this.effectiveDateTypeAble = false + this.userInfo.effectiveDateType = false + } + if(this.userInfo.idType == '1' ||this.userInfo.idType == '2'){ + // 获取出生日期年份+16 + let year = Number(this.userInfo.birthday.substr(0,4)) + 16 + if(this.userInfo.birthday.substr(5,5) == '02-29'){ + // 获取某年某月一共多少天 + let date = new Date(year, 2, 1) + let dayEnd = new Date(date.getTime() - 864e5).getDate() + this.userInfo.certiexpiredate = year +'-02-'+ dayEnd + }else{ + this.userInfo.certiexpiredate = year +'-'+ this.userInfo.birthday.substr(5,5) + } + } this.userInfo.idNo = data.customerIdNumber //证件号码 // this.userInfo.certificateValidate = data.idEffectStartDate //证件起始日期 // this.userInfo.certiexpiredate = data.idEffectEndDate //证件截止日期