diff --git a/src/views/ebiz/sale/AddBeneficiaryInfo.vue b/src/views/ebiz/sale/AddBeneficiaryInfo.vue index 6f550b86b..c22c2cf3f 100644 --- a/src/views/ebiz/sale/AddBeneficiaryInfo.vue +++ b/src/views/ebiz/sale/AddBeneficiaryInfo.vue @@ -246,6 +246,8 @@ import idNoCheck from '@/assets/js/utils/idNoCheck' import { idToData } from './js/verification' import { selectComp } from './js/methods' import getAreaName from '@/assets/js/utils/getAreaNameForSale' +import { getOrderDetail } from '@/api/ebiz/sale/sale' + let relationToInsured = [ { id: 2, text: '配偶' }, { id: 3, text: '父母' }, @@ -269,6 +271,7 @@ export default { }, data() { return { + appntDateLabel:'', //订单创建时间 nameLimit: false, idNoLimit: false, birthdayLimit: false, @@ -356,6 +359,17 @@ export default { } else { this.Insured = false } + const orderNo = this.$CacheUtils.getLocItem('orderNo') + if (orderNo) { + getOrderDetail({ orderNo: orderNo }).then((res) => { + if (res.result == 0) { + // 获取订单创建时间 + this.appntDateLabel = res.orderDTO.orderInfoDTO.appntDateLabel + } else { + return this.$toast(res.resultMessage) + } + }) + } }, methods: { setCustomerMarriage(marriageCode) { @@ -494,6 +508,11 @@ export default { console.log('123') let age = utilsAge.getAge(this.userInfo.birthday, new Date()) this.effectiveDateTypeAble = age <= 45 + }else if (value.id == '2') { + //证件类型户口本时,证件截止日期和是否长期不可选择 + this.idLimit = true + this.effectiveDateTypeAble = true + this.userInfo.effectiveDateType = false } // else if (value.id == 2 || value.id == 3) { // this.effectiveDateTypeAble = true @@ -1063,7 +1082,7 @@ export default { return `${year}-${month}-${day}` }, getRelatedData(val, from) { - if (this.userInfo.idType != '1') { + if (this.userInfo.idType != '1' && this.userInfo.idType != '2') { return } //如果证件校验不通过,恢复默认值 @@ -1074,6 +1093,7 @@ export default { this.userInfo.effectiveDateType = false this.effectiveDateTypeAble = idToData(val).age <= 45 this.userInfo.birthday = idToData(val).birthday + this.userInfo.certiexpiredate = Number(this.appntDateLabel.substr(0,4))+16+'-'+ this.userInfo.birthday.substr(5,5) this.userInfo.sex = idToData(val).sex if (idToData(val).age > 45) { if (from) { diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index b46a1fbd5..2b6bea3fb 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -484,6 +484,7 @@ export default { }, data() { return { + appntDateLabel:'', //订单创建时间 isMarriageStatusShow: false, withRootUser: { load: false, //防止重复请求 @@ -614,6 +615,8 @@ export default { if (orderNo) { getOrderDetail({ orderNo: orderNo }).then((res) => { if (res.result == 0) { + // 获取订单创建时间 + this.appntDateLabel = res.orderDTO.orderInfoDTO.appntDateLabel //投被同人 if (res.orderDTO.insuredDTOs.length && res.orderDTO.insuredDTOs[0].relationToAppnt == '1') { this.$nextTick(() => { @@ -874,7 +877,16 @@ export default { this.userInfo.sex = '0' } } - } else if (value.id == 2 || value.id == 3) { + } else if (value.id == 2) { + //证件类型户口本时,证件截止日期和是否长期不可选择 + this.idLimit = true + this.effectiveDateTypeAble = true + this.userInfo.effectiveDateType = false + // this.userInfo.effectiveDateType = true + // this.effectiveDateTypeAble = true + this.userInfo.certiexpiredate = '' + this.$refs.certiexpiredate.date = '' + } else if (value.id == 3) { this.userInfo.effectiveDateType = true // this.effectiveDateTypeAble = true this.userInfo.certiexpiredate = '' @@ -1747,7 +1759,7 @@ export default { }, getRelatedData(val, from) { // debugger - if (this.userInfo.idType != '1') { + if (this.userInfo.idType != '1' && this.userInfo.idType != '2') { return } // if (!['1', '2', '3', 1, 2, 3].includes(this.userInfo.idType)) { @@ -1761,6 +1773,7 @@ export default { this.userInfo.effectiveDateType = false this.effectiveDateTypeAble = idToData(val).age <= 45 this.userInfo.birthday = idToData(val).birthday + this.userInfo.certiexpiredate = Number(this.appntDateLabel.substr(0,4))+16+'-'+ this.userInfo.birthday.substr(5,5) this.userInfo.sex = idToData(val).sex //年龄小于18周岁,工作单位默认值为‘无’ if (idToData(val).age < 18) {