diff --git a/src/views/ebiz/cardList/information.vue b/src/views/ebiz/cardList/information.vue index 954b24b71..543940b60 100644 --- a/src/views/ebiz/cardList/information.vue +++ b/src/views/ebiz/cardList/information.vue @@ -594,6 +594,7 @@ import dateUtils from '@/assets/js/utils/date-utils' import Vue from 'vue' import { GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant' import riskRules from '../common/risk-rules' +import occupationList from '@/components/ebiz/occipation/data/occupation' DataDictionary.relationToAppnt = DataDictionary.relationToAppnt.slice(0, 4) Vue.use(Checkbox).use(CheckboxGroup) @@ -940,13 +941,34 @@ export default { methods: { //试算逻辑国富万福卡GFRS_M0071 insureTrial() { - let that = this // if(this.insuredInfo.birthday || that.$route.query.relationToAppnt == '1'){ + if (this.userInfo.relationToInsured == 1) { + Object.assign(this.insuredInfo, this.userInfo) + } if(this.insuredInfo.birthday){ // 获取卡单列表 let birthday = this.insuredInfo.birthday + let jobLevel = '' + let collect = (data,code) => { + data.forEach(item => { + if (item.code == code) { + if (this.trialDTOS.productInsuredDTO.healthGrade && this.trialDTOS.productInsuredDTO.healthGrade != '0') { + jobLevel = item.healthGrade + } + if (this.trialDTOS.productInsuredDTO.lifeGrade && this.trialDTOS.productInsuredDTO.lifeGrade != '0') { + jobLevel = item.lifeGrade + } + } else { + if (item.subs && item.subs.length != 0) { + collect(item.subs,code) + } + } + }) + } + collect(occupationList,this.insuredInfo.occupationCode) + let data = { - trialInfos: [{ productCode: that.itemProductDTOS.productCode,birthday:birthday}], + trialInfos: [{ productCode: this.itemProductDTOS.productCode,birthday:birthday,jobLevel:jobLevel}], } insureTrial(data) @@ -954,7 +976,7 @@ export default { if (res.result == 0) { //选择保障方案 this.trialList = res.trialList - this.allPrice = res.trialList[0].prem + this.allPrice = res.trialList[0].prem } else { this.$toast(res.resultMessage) }