From 0883ada813c21259025883b8de15a2ad0159e1cc Mon Sep 17 00:00:00 2001 From: "li.yuetong"
被保人信息
被保人信息
-受益人信息
@@ -541,7 +418,7 @@ export default { medical:'0',//有无社保 schoolName: '', className: '', - relationToAppnt:'' + relationToAppnt:'1' }, selectUser: '', areaList: areaList, @@ -569,6 +446,7 @@ export default { }, occupationalType: DataDictionary.queryOccupationalByType[0].id, isInsuredCertiexpiredate:true, //被保人有效止期是否显示 + isAppnt: false // 是否投被同人 } }, created() { @@ -597,7 +475,7 @@ export default { // if (this.itemProductDTOS.productCode === 'GFRS_M0048' || this.itemProductDTOS.productCode === 'GFRS_M0049' || this.itemProductDTOS.productCode === 'GFRS_M0050') { // //金掌桂学平险产品指定生效日规则调整的申请,学平险+60 // this.filterMaxDate = afterDate.getAfterDays(60) - // this.userInfo.relationToAppnt = '' + // this.insuredInfo.relationToAppnt = '' // this.showField = true // let currentTime = dateUtils.formatDate(new Date(), 'yyyy-MM-dd') // let currentDataArr = currentTime.split('-') @@ -639,7 +517,7 @@ export default { // } // //GFRS-2641 少儿安康 // if (this.itemProductDTOS.productCode === 'GFRS_M0052') { - // this.userInfo.relationToAppnt = '3' + // this.insuredInfo.relationToAppnt = '3' // //GFRS-2641 保留首次投保、保险期间届满重新投保,默认首次投保 // this.showFirstOr = true // //GFRS-2641 被保险人去掉电子邮箱、手机号码字段 @@ -682,9 +560,10 @@ export default { // if (this.itemProductDTOS.productCode != 'GFRS_M0032') { // this.userInfo.averageAnnualIncome = '0' // } - this.userInfo.relationToAppnt = this.$route.query.relationToAppnt this.insuredInfo.relationToAppnt = this.$route.query.relationToAppnt - + if(this.insuredInfo.relationToAppnt == '1'){ + this.isAppnt = true + } if (this.$route.query.cardOrderNo) { this.cardOrderNo = this.$route.query.cardOrderNo } @@ -694,58 +573,41 @@ export default { } cardOrderDetail(cardInfoDTO).then(res => { if (res.result == '0') { + Object.assign(this.userInfo,res.orderDTO.appntDTO) if(that.$route.query.insuredId){ //编辑 res.orderDTO.insuredDTOs.forEach(item => { if(that.$route.query.insuredId == item.insuredId){ - // that.insuredInfo = item - if(that.$route.query.relationToAppnt == '1'){ - Object.assign(this.userInfo,item) - that.userInfo.certiexpiredate = that.userInfo.effectiveDateType == 'true'?'':that.userInfo.certiexpiredate - that.userInfo.homeName = getAreaName([ - { code: that.userInfo.homeProvince }, - { code: that.userInfo.homeCity }, - { code: that.userInfo.homeArea } - ]) - that.insuredInfo.birthday = that.userInfo.birthday - }else{ - Object.assign(that.insuredInfo,item) - that.insuredInfo.certiexpiredate = that.insuredInfo.effectiveDateType == 'true'?'':that.insuredInfo.certiexpiredate - that.insuredInfo.homeName = getAreaName([ - { code: that.insuredInfo.homeProvince }, - { code: that.insuredInfo.homeCity }, - { code: that.insuredInfo.homeArea } - ]) - } + Object.assign(that.insuredInfo,item) + that.insuredInfo.effectiveDateType = that.insuredInfo.effectiveDateType == 'true'?true:false + that.insuredInfo.certiexpiredate = that.insuredInfo.effectiveDateType == 'true'?'':that.insuredInfo.certiexpiredate + that.insuredInfo.homeName = getAreaName([ + { code: that.insuredInfo.homeProvince }, + { code: that.insuredInfo.homeCity }, + { code: that.insuredInfo.homeArea } + ]) + that.proScheme = that.insuredInfo.riskDTOLst[0].proScheme + that.proSchemeCode = that.insuredInfo.riskDTOLst[0].proSchemeCode + that.allPrice = that.insuredInfo.riskDTOLst[0].prem + that.trialList = that.insuredInfo.riskDTOLst } }) - console.log(that.insuredInfo,'that.insuredInfo') } else { if(that.$route.query.relationToAppnt == '1'){ //新增关系为本人 - Object.assign(this.userInfo,res.orderDTO.appntDTO) - that.userInfo.certiexpiredate = that.userInfo.effectiveDateType == 'true'?'':that.userInfo.certiexpiredate - this.userInfo.homeName = getAreaName([ - { code: this.userInfo.homeProvince }, - { code: this.userInfo.homeCity }, - { code: this.userInfo.homeArea } + Object.assign(this.insuredInfo,res.orderDTO.appntDTO) + that.insuredInfo.effectiveDateType = that.insuredInfo.effectiveDateType == 'true'?true:false + that.insuredInfo.certiexpiredate = that.insuredInfo.effectiveDateType == 'true'?'':that.userInfo.certiexpiredate + this.insuredInfo.homeName = getAreaName([ + { code: this.insuredInfo.homeProvince }, + { code: this.insuredInfo.homeCity }, + { code: this.insuredInfo.homeArea } ]) - that.insuredInfo.birthday = that.userInfo.birthday - that.userInfo.medical = '0' + that.insuredInfo.medical = '0' } } } }) }, methods: { - //长期状态改变时 - effectiveDataTypeChange(val) { - //勾选长期状态时,证件截止日期置空 - if (val) { - this.userInfo.certiexpiredate = '' - this.certiexpiredateRequired = false - } else { - this.certiexpiredateRequired = true - } - }, //长期状态改变时--被保人 effectiveDataTypeChangeInsured(val) { if (val) { @@ -770,10 +632,7 @@ export default { } }) this.occupationShowPicker = false - if (this.insureType === '1') { - this.userInfo.occupationName = name - this.userInfo.occupationCode = code - } else if (this.insureType === '2') { + if (this.insureType === '2') { this.insuredInfo.occupationName = name this.insuredInfo.occupationCode = code } @@ -784,6 +643,10 @@ export default { * @return {*} */ openOccupation(insureType) { + // 投被保险人不允许编辑 + if (this.isAppnt) { + return + } this.$jump({ flag: 'navigation', extra: { @@ -793,28 +656,22 @@ export default { }) this.occupationShowPicker = !this.occupationShowPicker this.insureType = insureType - if (this.insureType === '1') { - this.occupationName = this.userInfo.occupationName - this.occupationCode = this.userInfo.occupationCode - } else if (this.insureType === '2') { + if (this.insureType === '2') { this.occupationName = this.insuredInfo.occupationName this.occupationCode = this.insuredInfo.occupationCode } }, areaSelect(insureType) { + // 投被同人不允许编辑 + if (this.isAppnt) { + return + } ;[this.homeShow, this.insureType] = [true, insureType] - if (insureType === '1') { - this.areaCode = this.userInfo.homeArea - } else if (insureType === '2') { + if (insureType === '2') { this.areaCode = this.insuredInfo.homeArea } }, //监听名字变化 - nameChange(name) { - // console.log('name',name) - this.userInfo.name = name - }, - //监听名字变化 nameChanges(name) { // console.log('name',name) this.insuredInfo.name = name @@ -827,6 +684,10 @@ export default { * @return {*} */ selectClick(index, value, insureType) { + // 投被同人不允许编辑 + if (this.isAppnt) { + return + } if (value !== undefined) { this.selectUser = value } @@ -873,6 +734,10 @@ export default { }, //弹框选择 toSelect(pickerType, valueKey) { + // 投被同人不允许编辑 + if (this.isAppnt && pickerType != '10') { + return + } //pickerType 1、国家地区 2、证件类型 3、文化程度 4、有无社保(弃用) 5、税收居民身份 6、婚姻状况 7、在职情况 8、收入来源, 9 关系 ;[this.popupShow, this.pickerType] = [true, pickerType] if (valueKey) this.valueKey = valueKey @@ -965,7 +830,7 @@ export default { } else if (this.pickerType == '8') { this.userInfo.salarySource = value.id } else if (this.pickerType == '9') { - this.userInfo.relationToAppnt = value.id + this.insuredInfo.relationToAppnt = value.id } else if (this.pickerType == '66') { this.insuredInfo.marriage = value.id this.insuredInfo.marriageStatus = value.text @@ -1021,9 +886,10 @@ export default { //试算逻辑 insureTrial() { let that = this - if(this.insuredInfo.birthday || that.$route.query.relationToAppnt == '1'){ + // if(this.insuredInfo.birthday || that.$route.query.relationToAppnt == '1'){ + if(this.insuredInfo.birthday){ // 获取卡单列表 - let birthday = that.$route.query.relationToAppnt == '1'?this.userInfo.birthday:this.insuredInfo.birthday + let birthday = this.insuredInfo.birthday let data = { trialInfos: [{ productCode: that.itemProductDTOS.productCode,birthday:birthday}], } @@ -1312,9 +1178,7 @@ export default { // console.log(this.userInfo.salarySource) // console.log(this.userInfo.otherSalarySource) //表单校验, 成功跳转 - if (this.userInfo.relationToAppnt == 1) { - Object.assign(this.insuredInfo, this.userInfo) - } + console.log(this.insuredInfo,'this.insuredInfo') this.$validator.validate().then(valid => { if (true === valid) { // localStorage.chooseProductCodesNew = localStorage.chooseProductCodes @@ -1352,7 +1216,7 @@ export default { if (!this.insuredInfo.homeAddress) { return this.$toast('被保人详细地址不能为空') } - if (this.userInfo.relationToAppnt == 2 && this.userInfo.sex == this.insuredInfo.sex) { + if (this.insuredInfo.relationToAppnt == 2 && this.userInfo.sex == this.insuredInfo.sex) { return this.$toast('哦~配偶性别不能相同的哟~') } @@ -1437,7 +1301,7 @@ export default { if (this.itemProductDTOS.productCode === 'GFRS_M0022') { // return // 如果是未成年人 - if (insuredAge < 7 && this.userInfo.relationToAppnt != '3') { + if (insuredAge < 7 && this.insuredInfo.relationToAppnt != '3') { return this.$toast('0-7岁未成年人须由其父母投保,请确定') } @@ -1490,20 +1354,20 @@ export default { } } // 投被保人年龄与投被保人年龄之间校验逻辑 - // if (this.userInfo.relationToAppnt == '4') { + // if (this.insuredInfo.relationToAppnt == '4') { // //投被保人关系是子女 // // 被保险人的出生日期大于投保人的出生日期(即被保险人年龄小于投保人年龄)点击【下一步】提示“当前被保险人是投保人的子女,被保险人年龄需小于投保人年龄。 // if (age > insuredAge) { // return this.$toast('当前投保人是被保险人的子女,投保人年龄需小于被保险人年龄') // } - // } else if (this.userInfo.relationToAppnt == '3') { + // } else if (this.insuredInfo.relationToAppnt == '3') { // //投被保人关系是父母 // // 被保险人的出生日期小于投保人的出生日期(即被保险人年龄大于投保人年龄)点击【下一步】提示“当前被保险人是投保人的父母,被保险人年龄需大于投保人年龄。 // if (age < insuredAge) { // return this.$toast('当前投保人是被保险人的父母,投保人年龄需大于被保险人年龄') // } // } - if (this.userInfo.relationToAppnt != '1') { + if (this.insuredInfo.relationToAppnt != '1') { //投被保人关系不是本人 //投保人和被保险人的证件信息(证件号码、证件类型)相同时,关系只能是本人,当“是投保人的”枚举为非本人(配偶、父母、子女、其他),但证件号码和本人相同,点击【下一步】提示“投保人和被保人关系不是本人,证件号码不可一致,请修改。” if (this.userInfo.idNo == this.insuredInfo.idNo && this.userInfo.idType == this.insuredInfo.idType) { @@ -1511,9 +1375,6 @@ export default { } } // 是否长期选项 赋值 - if (this.userInfo.effectiveDateType){ - this.userInfo.certiexpiredate = '9999-01-01' - } if (this.insuredInfo.effectiveDateType) { this.insuredInfo.certiexpiredate = '9999-01-01' } @@ -1801,106 +1662,106 @@ export default { // this.codeDisabled = false // }, watch: { - 'userInfo.relationToAppnt': { - handler(newV) { - // 如果关系为本人,将投保人信息带入到被保人信息上 - if (newV === 1) { - Object.assign(this.insuredInfo, this.userInfo) - } else { - this.insuredInfo = { - name: '', // 被保人姓名 - idType: '1', //被保人证件类型 - idNo: '', //被保人证件号码 - sex: '0', //被保人性别 - birthday: '', //被保人出生日期 - occupationCode: '', //职业代码 - occupationName: '', //职业名称 - lifeGrade: '', //寿险等级 - healthGrade: '', //健康等级 - nativeplace: '1', //国家地区 - marriageStatus: '', //婚姻状况 - homeProvince: '', //家庭省 - homeCity: '', //家庭市 - homeArea: '450101', //家庭区 - homeName: '', //联系地址 - homeAddress: '', //详细地址 - mobile: '', //移动电话 - email: '', //电子邮箱 - effectiveDateType: false, //是否长期 - medical:'0',//有无社保 - relationToAppnt: this.$route.query.relationToAppnt - } - // 设置选中‘同投保人’的勾选项 - this.withRootUser.value = true - this.insuredInfo.homeName = getAreaName([ - { code: this.userInfo.homeProvince }, - { code: this.userInfo.homeCity }, - { code: this.userInfo.homeArea } - ]) - this.insuredInfo.homeProvince = this.userInfo.homeProvince - this.insuredInfo.homeCity = this.userInfo.homeCity - this.insuredInfo.homeArea = this.userInfo.homeArea - this.insuredInfo.homeAddress = this.userInfo.homeAddress - // 针对 3款学平险 和 少儿安康产品 被保人证件类型默认为户口本 --2021-08-26 + // 'insuredInfo.relationToAppnt': { + // handler(newV) { + // // 如果关系为本人,将投保人信息带入到被保人信息上 + // if (newV === 1) { + // Object.assign(this.insuredInfo, this.userInfo) + // } else { + // this.insuredInfo = { + // name: '', // 被保人姓名 + // idType: '1', //被保人证件类型 + // idNo: '', //被保人证件号码 + // sex: '0', //被保人性别 + // birthday: '', //被保人出生日期 + // occupationCode: '', //职业代码 + // occupationName: '', //职业名称 + // lifeGrade: '', //寿险等级 + // healthGrade: '', //健康等级 + // nativeplace: '1', //国家地区 + // marriageStatus: '', //婚姻状况 + // homeProvince: '', //家庭省 + // homeCity: '', //家庭市 + // homeArea: '450101', //家庭区 + // homeName: '', //联系地址 + // homeAddress: '', //详细地址 + // mobile: '', //移动电话 + // email: '', //电子邮箱 + // effectiveDateType: false, //是否长期 + // medical:'0',//有无社保 + // relationToAppnt: this.$route.query.relationToAppnt + // } + // // 设置选中‘同投保人’的勾选项 + // this.withRootUser.value = true + // this.insuredInfo.homeName = getAreaName([ + // { code: this.userInfo.homeProvince }, + // { code: this.userInfo.homeCity }, + // { code: this.userInfo.homeArea } + // ]) + // this.insuredInfo.homeProvince = this.userInfo.homeProvince + // this.insuredInfo.homeCity = this.userInfo.homeCity + // this.insuredInfo.homeArea = this.userInfo.homeArea + // this.insuredInfo.homeAddress = this.userInfo.homeAddress + // // 针对 3款学平险 和 少儿安康产品 被保人证件类型默认为户口本 --2021-08-26 - // 2516--三款学平险-- 0048义务教育 0049 幼儿园 0050 高中 - // GFRS-2641--被保险人职业:幼儿园版默认学龄前儿童,义务教育、高中/高等教育默认一般学生 - // 被保险人婚姻默认未婚,允许修改 - // 被保险人手机及邮箱默认投保人,允许修改 - if (this.itemProductDTOS.productCode == 'GFRS_M0048' || this.itemProductDTOS.productCode == 'GFRS_M0050') { - this.insuredInfo.occupationCode = '2099907' - this.insuredInfo.occupationName = '一般学生' - this.insuredInfo.marriage = '2' - this.insuredInfo.mobile = this.userInfo.mobile - this.insuredInfo.email = this.userInfo.email - this.insuredInfo.idType = '2' - // this.insuredInfo.effectiveDateType = true - // this.insuredInfo.certiexpiredate = '9999-01-01' - // 去掉--选择户口本时,是否长期默认为是,不可点击,有效止期隐藏(证件类型为户口本时,被保人年龄小于16周岁时,户口本有效止期长期变更为第16周岁日期) - // this.effectiveDateTypeAbleInsured = true - // this.isInsuredCertiexpiredate = false - this.isInsuredCertiexpiredate = true - } else if (this.itemProductDTOS.productCode == 'GFRS_M0049') { - this.insuredInfo.occupationCode = '2099908' - this.insuredInfo.occupationName = '学龄前儿童' - this.insuredInfo.marriage = '2' - this.insuredInfo.idType = '2' - // this.insuredInfo.effectiveDateType = true - // this.insuredInfo.certiexpiredate = '9999-01-01' - // 去掉--选择户口本时,是否长期默认为是,不可点击,有效止期隐藏(证件类型为户口本时,被保人年龄小于16周岁时,户口本有效止期长期变更为第16周岁日期) - // this.effectiveDateTypeAbleInsured = true - // this.isInsuredCertiexpiredate = false - this.isInsuredCertiexpiredate = true - } - // GFRS-2641--少儿安康,默认户口本,且户口本证件截止日期默认长期 - if (this.itemProductDTOS.productCode == 'GFRS_M0052') { - this.insuredInfo.idType = '2' - // this.insuredInfo.certiexpiredate = '9999-01-01' - // this.insuredInfo.effectiveDateType = true - this.insuredInfo.occupationCode = '2099907' - this.insuredInfo.occupationName = '一般学生' - this.insuredInfo.marriage = '2' - // 去掉--选择户口本时,是否长期默认为是,不可点击,有效止期隐藏(证件类型为户口本时,被保人年龄小于16周岁时,户口本有效止期长期变更为第16周岁日期) - this.effectiveDateTypeAbleInsured = true - // this.isInsuredCertiexpiredate = false - this.isInsuredCertiexpiredate = true - } + // // 2516--三款学平险-- 0048义务教育 0049 幼儿园 0050 高中 + // // GFRS-2641--被保险人职业:幼儿园版默认学龄前儿童,义务教育、高中/高等教育默认一般学生 + // // 被保险人婚姻默认未婚,允许修改 + // // 被保险人手机及邮箱默认投保人,允许修改 + // if (this.itemProductDTOS.productCode == 'GFRS_M0048' || this.itemProductDTOS.productCode == 'GFRS_M0050') { + // this.insuredInfo.occupationCode = '2099907' + // this.insuredInfo.occupationName = '一般学生' + // this.insuredInfo.marriage = '2' + // this.insuredInfo.mobile = this.userInfo.mobile + // this.insuredInfo.email = this.userInfo.email + // this.insuredInfo.idType = '2' + // // this.insuredInfo.effectiveDateType = true + // // this.insuredInfo.certiexpiredate = '9999-01-01' + // // 去掉--选择户口本时,是否长期默认为是,不可点击,有效止期隐藏(证件类型为户口本时,被保人年龄小于16周岁时,户口本有效止期长期变更为第16周岁日期) + // // this.effectiveDateTypeAbleInsured = true + // // this.isInsuredCertiexpiredate = false + // this.isInsuredCertiexpiredate = true + // } else if (this.itemProductDTOS.productCode == 'GFRS_M0049') { + // this.insuredInfo.occupationCode = '2099908' + // this.insuredInfo.occupationName = '学龄前儿童' + // this.insuredInfo.marriage = '2' + // this.insuredInfo.idType = '2' + // // this.insuredInfo.effectiveDateType = true + // // this.insuredInfo.certiexpiredate = '9999-01-01' + // // 去掉--选择户口本时,是否长期默认为是,不可点击,有效止期隐藏(证件类型为户口本时,被保人年龄小于16周岁时,户口本有效止期长期变更为第16周岁日期) + // // this.effectiveDateTypeAbleInsured = true + // // this.isInsuredCertiexpiredate = false + // this.isInsuredCertiexpiredate = true + // } + // // GFRS-2641--少儿安康,默认户口本,且户口本证件截止日期默认长期 + // if (this.itemProductDTOS.productCode == 'GFRS_M0052') { + // this.insuredInfo.idType = '2' + // // this.insuredInfo.certiexpiredate = '9999-01-01' + // // this.insuredInfo.effectiveDateType = true + // this.insuredInfo.occupationCode = '2099907' + // this.insuredInfo.occupationName = '一般学生' + // this.insuredInfo.marriage = '2' + // // 去掉--选择户口本时,是否长期默认为是,不可点击,有效止期隐藏(证件类型为户口本时,被保人年龄小于16周岁时,户口本有效止期长期变更为第16周岁日期) + // this.effectiveDateTypeAbleInsured = true + // // this.isInsuredCertiexpiredate = false + // this.isInsuredCertiexpiredate = true + // } - // 2516--除万福卡,投保人、被保险人年收入,默认为0,允许修改 - if (this.itemProductDTOS.productCode != 'GFRS_M0032') { - this.insuredInfo.averageAnnualIncome = '0' - } - if (newV === 2) { - this.userInfo.sex === '0' ? (this.insuredInfo.sex = '1') : (this.insuredInfo.sex = '0') - } - } - }, - immediate: true, - deep: true - }, + // // 2516--除万福卡,投保人、被保险人年收入,默认为0,允许修改 + // if (this.itemProductDTOS.productCode != 'GFRS_M0032') { + // this.insuredInfo.averageAnnualIncome = '0' + // } + // if (newV === 2) { + // this.userInfo.sex === '0' ? (this.insuredInfo.sex = '1') : (this.insuredInfo.sex = '0') + // } + // } + // }, + // immediate: true, + // deep: true + // }, 'userInfo.sex': { handler(newV) { - if (this.userInfo.relationToAppnt === 2) { + if (this.insuredInfo.relationToAppnt === 2) { this.insuredInfo.sex = this.userInfo.sex === '0' ? '1' : '0' } }, @@ -1908,12 +1769,13 @@ export default { deep: true }, //监听'insuredInfo.birthday'被保人年龄有变化,清空保障方案和总保费 - 'insuredInfo.birthday': { - handler(newV) { - if (newV) { + 'insuredInfo.idNo': { + handler(oldV,newV) { + if (newV && oldV != '') { this.proScheme = '' this.proSchemeCode = '' this.allPrice = 0 + this.trialList = [] } }, immediate: true,