From e02258207ce56d2d35a26d059b102efde33f0261 Mon Sep 17 00:00:00 2001
From: liyuetong
Date: Fri, 10 Dec 2021 12:00:50 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=B7=E5=8F=A3=E6=9C=AC=E8=AF=81?=
=?UTF-8?q?=E4=BB=B6=E6=9C=89=E6=95=88=E6=9C=9F=E3=80=91=E6=8C=87=E5=AE=9A?=
=?UTF-8?q?=E5=8F=97=E7=9B=8A=E4=BA=BA=E5=BD=95=E5=85=A5=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E4=BB=8E=E5=AE=A2=E6=88=B7=E5=88=97=E8=A1=A8=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E6=97=B6-=E8=AF=81=E4=BB=B6=E7=B1=BB=E5=9E=8B=E4=B8=BA?=
=?UTF-8?q?=E6=88=B7=E5=8F=A3=E6=9C=AC=E6=97=B6=EF=BC=8C=E4=BB=8D=E5=8F=AF?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=81=E4=BB=B6=E6=AD=A2=E6=9C=9F=EF=BC=8C?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=8C=E6=88=90=E5=90=8E=E5=8F=AF=E6=93=8D?=
=?UTF-8?q?=E4=BD=9C=E5=88=B0=E4=B8=8B=E4=B8=80=E4=B8=AA=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/ebiz/sale/AddBeneficiaryInfo.vue | 19 +++++++++++
src/views/ebiz/sale/InsuredPerson.vue | 37 ++++++++++++++++++++++
2 files changed, 56 insertions(+)
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 //证件截止日期