mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 04:06:44 +08:00
598 lines
24 KiB
Vue
598 lines
24 KiB
Vue
<template>
|
||
<div class="main-risk-list-container pt10 redRadioCheckbox">
|
||
<template v-if="recommendType == '03' && !isActivityCode">
|
||
<van-tabs v-model="active" @click="onChangeMainList">
|
||
<van-tab title="银保渠道产品" name="normal">
|
||
<van-radio-group v-model="result">
|
||
<van-cell-group>
|
||
<!-- <van-cell v-for="(item, index) in list" clickable @click="result = item" :key="index" v-show="checkItemShow(item)"> -->
|
||
<van-cell v-for="(item, index) in list" clickable @click="result = item" :key="index">
|
||
<p slot="default">
|
||
<van-tag plain class="green fs12 mr10">{{ item.productType }}</van-tag>
|
||
<span class="c-gray-dark fs14">{{ item.riskName }}</span>
|
||
</p>
|
||
<van-radio checked-color="red" slot="right-icon" :name="item" />
|
||
</van-cell>
|
||
</van-cell-group>
|
||
</van-radio-group>
|
||
</van-tab>
|
||
<van-tab title="交叉销售个险产品" name="cross">
|
||
<van-radio-group v-model="result">
|
||
<van-cell-group>
|
||
<van-cell v-for="(item, index) in list" clickable @click="result = item" :key="index">
|
||
<p slot="default">
|
||
<van-tag plain class="green fs12 mr10">{{ item.productType }}</van-tag>
|
||
<span class="c-gray-dark fs14">{{ item.riskName }}</span>
|
||
</p>
|
||
<van-radio checked-color="red" slot="right-icon" :name="item" />
|
||
</van-cell>
|
||
</van-cell-group>
|
||
</van-radio-group>
|
||
</van-tab>
|
||
</van-tabs>
|
||
</template>
|
||
<template v-else>
|
||
<van-radio-group v-model="result">
|
||
<van-cell-group>
|
||
<!-- <van-cell v-for="(item, index) in list" clickable @click="result = item" :key="index" v-show="checkItemShow(item)"> -->
|
||
<van-cell v-for="(item, index) in list" clickable @click="result = item" :key="index">
|
||
<p slot="default">
|
||
<van-tag plain class="green fs12 mr10">{{ item.productType }}</van-tag>
|
||
<span class="c-gray-dark fs14">{{ item.riskName }}</span>
|
||
</p>
|
||
<van-radio checked-color="red" slot="right-icon" :name="item" />
|
||
</van-cell>
|
||
</van-cell-group>
|
||
</van-radio-group>
|
||
</template>
|
||
<div class="white_block"></div>
|
||
<van-button class="bottom-btn" type="danger" @click="nextStep">完成</van-button>
|
||
</div>
|
||
</template>
|
||
<script>
|
||
import { Cell, CellGroup, Tag, Radio, RadioGroup, Tab, Tabs } from 'vant'
|
||
import { mainRiskList, mainRiskListProposal, calculatePremium, getActProductList, occupationCodeCheck } from '@/api/ebiz/common/common'
|
||
import { getOrderDetail, riskLevelCheck } from '@/api/ebiz/sale/sale'
|
||
import { getDetail } from '@/api/ebiz/proposal/proposal.js'
|
||
import riskRules from './risk-rules'
|
||
export default {
|
||
name: 'mainRiskList',
|
||
components: {
|
||
[Radio.name]: Radio,
|
||
[RadioGroup.name]: RadioGroup,
|
||
[CellGroup.name]: CellGroup,
|
||
[Tag.name]: Tag,
|
||
[Cell.name]: Cell,
|
||
[Tab.name]: Tab,
|
||
[Tabs.name]: Tabs
|
||
},
|
||
data() {
|
||
return {
|
||
recommendType: '', // 渠道控制
|
||
isCrossChannel: 0, // 是否选择交叉渠道列表 0-否 1-是
|
||
active: 'normal',
|
||
specilFlag: '0',
|
||
flag: true,
|
||
list: [],
|
||
result: '',
|
||
delList: [],
|
||
radioVal: '',
|
||
isFrom: localStorage.isFrom,
|
||
activeFlag: '',
|
||
isActivityCode: '' //activityCode 有值的话代表是活动,无值代表是普通产品
|
||
}
|
||
},
|
||
async mounted() {
|
||
this.$jump({
|
||
flag: 'navigation',
|
||
extra: {
|
||
title: '主险选择列表'
|
||
}
|
||
})
|
||
if (localStorage.isFrom == 'sale') {
|
||
return new Promise((resolve, reject) => {
|
||
getOrderDetail({ orderNo: this.$route.query.orderNo }).then(
|
||
(res) => {
|
||
if (res.result == 0) {
|
||
//------------------------专为桂/惠企写死--begin---------------//
|
||
if (res.orderDTO.insuredDTOs[0] && res.orderDTO.insuredDTOs[0].riskDTOLst) {
|
||
this.flag = this.specilFlag = res.orderDTO.insuredDTOs[0].riskDTOLst.some((v) => {
|
||
return v.riskCode == 'GFRS_M0024' || v.riskCode == 'GFRS_M0040'
|
||
})
|
||
if (this.flag) {
|
||
this.specilFlag = '1'
|
||
}
|
||
} else if (res.orderDTO.orderInfoDTO.productCode == 'GFRS_M0024' || res.orderDTO.orderInfoDTO.productCode == 'GFRS_M0040') {
|
||
this.specilFlag = '1'
|
||
}
|
||
//isActivityCode 有值代表是活动,无值代表是普通产品
|
||
this.isActivityCode = res.orderDTO.orderInfoDTO.activityCode
|
||
// recommendType 03 银保渠道
|
||
this.recommendType = res.orderDTO.recmdDTO.recommendType
|
||
if (this.recommendType == '02' || this.recommendType == '11' || (this.recommendType == '03' && this.isActivityCode)) {
|
||
// 电投 团险渠道产品 均为交叉渠道销售
|
||
this.isCrossChannel = '1'
|
||
}
|
||
// ------------------------专为桂/惠企写死--end---------------//
|
||
}
|
||
resolve(this.isActivityCodeFunc())
|
||
},
|
||
(error) => {
|
||
reject(this.isActivityCodeFunc())
|
||
}
|
||
)
|
||
})
|
||
} else {
|
||
return new Promise((resolve, reject) => {
|
||
getDetail({
|
||
orderNo: this.$route.query.proposalOrderNo
|
||
}).then(
|
||
(res) => {
|
||
if (res.result == '0') {
|
||
this.recommendType = res.content[0].recmdDTO ? res.content[0].recmdDTO.recommendType : ''
|
||
if (this.recommendType == '02' || this.recommendType == '11') {
|
||
// 电投 团险渠道产品 均为交叉渠道销售
|
||
this.isCrossChannel = '1'
|
||
}
|
||
}
|
||
resolve(this.isActivityCodeFunc())
|
||
},
|
||
(error) => {
|
||
reject(this.isActivityCodeFunc())
|
||
}
|
||
)
|
||
})
|
||
}
|
||
},
|
||
methods: {
|
||
onChangeMainList(name) {
|
||
if (name == 'cross') {
|
||
this.isCrossChannel = '1'
|
||
} else {
|
||
this.isCrossChannel = '0'
|
||
}
|
||
this.isActivityCodeFunc()
|
||
},
|
||
isActivityCodeFunc() {
|
||
//isActivityCode 有值代表是活动,无值代表是普通产品
|
||
// if(this.isActivityCode && this.isCrossChannel == '0'){
|
||
if (this.isActivityCode) {
|
||
this.getActProductListFunc()
|
||
} else {
|
||
this.getMainRiskList()
|
||
}
|
||
},
|
||
//获取主险列表--活动下的产品
|
||
async getActProductListFunc() {
|
||
let mainRiskCodes = localStorage.mainRiskCodes && JSON.parse(localStorage.mainRiskCodes)
|
||
let resultData = await getActProductList({
|
||
activityCode: this.isActivityCode,
|
||
type: 'app'
|
||
})
|
||
if (resultData.result == 0) {
|
||
resultData.content.mainRiskDTOS.forEach((item) => {
|
||
//已选主险不能再选、险种互斥
|
||
if (mainRiskCodes && mainRiskCodes.includes(item.riskProductCode)) {
|
||
this.delList.push(item.riskProductCode)
|
||
if (item.mutexRisk) {
|
||
this.delList = this.delList.concat(item.mutexRisk.split(','))
|
||
}
|
||
}
|
||
})
|
||
//删除已选或互斥险种
|
||
for (let i = 0; i < resultData.content.mainRiskDTOS.length; i++) {
|
||
if (this.delList && this.delList.includes(resultData.content.mainRiskDTOS[i].riskProductCode)) {
|
||
resultData.content.mainRiskDTOS.splice(i, 1)
|
||
i--
|
||
}
|
||
}
|
||
this.list = resultData.content.mainRiskDTOS
|
||
//------------------------专为惠企写死--begin---------------//
|
||
// if (this.list.length > 0 && this.specilFlag == '1' && localStorage.isFrom == 'sale') {
|
||
// this.result = this.list.find(v => {
|
||
// return v.riskProductCode == 'GFRS_M0040'
|
||
// })
|
||
// }
|
||
|
||
// ------------------------专为惠企写死--end---------------//
|
||
//如果是选择产品, 进入电子投保, 在主险列表能默认选中我在产品列表选择的产品
|
||
if (this.list.length > 0) {
|
||
console.log(localStorage.productCodeChooseFromList)
|
||
this.result = this.list.find((v) => {
|
||
return v.riskProductCode == localStorage.productCodeChooseFromList
|
||
})
|
||
}
|
||
|
||
if (this.list.length == 0) {
|
||
this.$route('暂无可选产品')
|
||
// this.$dialog({ message: '暂无可选产品!' }).then(() => {
|
||
// let thismyurl = ''
|
||
// if (this.$route.query.orderNo) {
|
||
// thismyurl = '?orderNo=' + this.$route.query.orderNo
|
||
// } else if (this.$route.query.proposalOrderNo) {
|
||
// thismyurl = '?proposalOrderNo=' + this.$route.query.proposalOrderNo
|
||
// }
|
||
// this.$jump({
|
||
// flag: 'goBack',
|
||
// // extra: {
|
||
// // url: location.origin + '/#/common/selectedProduct'
|
||
// // },
|
||
// routerInfo: {
|
||
// type: 1,
|
||
// path: '/common/selectedProduct' + thismyurl
|
||
// }
|
||
// })
|
||
// })
|
||
}
|
||
}
|
||
},
|
||
//获取主险列表--普通产品
|
||
async getMainRiskList() {
|
||
let mainRiskCodes = localStorage.mainRiskCodes && JSON.parse(localStorage.mainRiskCodes)
|
||
let mainListDate = { platform: 'app' }
|
||
switch (this.isFrom) {
|
||
case 'proposal':
|
||
mainListDate.platform = 'proposal'
|
||
break
|
||
case 'sale':
|
||
mainListDate.platform = 'app'
|
||
break
|
||
}
|
||
if (this.isCrossChannel == '1') {
|
||
mainListDate.platform = 'cross'
|
||
}
|
||
let resultData
|
||
if (this.isFrom == 'proposal') {
|
||
resultData = await mainRiskListProposal(mainListDate)
|
||
} else {
|
||
resultData = await mainRiskList(mainListDate)
|
||
}
|
||
if (resultData.result == 0) {
|
||
resultData.mainRiskDTOS.forEach((item) => {
|
||
//已选主险不能再选、险种互斥
|
||
if (mainRiskCodes && mainRiskCodes.includes(item.riskProductCode)) {
|
||
this.delList.push(item.riskProductCode)
|
||
if (item.mutexRisk) {
|
||
this.delList = this.delList.concat(item.mutexRisk.split(','))
|
||
}
|
||
}
|
||
})
|
||
//删除已选或互斥险种
|
||
for (let i = 0; i < resultData.mainRiskDTOS.length; i++) {
|
||
if (this.delList && this.delList.includes(resultData.mainRiskDTOS[i].riskProductCode)) {
|
||
resultData.mainRiskDTOS.splice(i, 1)
|
||
i--
|
||
}
|
||
}
|
||
this.list = resultData.mainRiskDTOS
|
||
//------------------------专为惠企写死--begin---------------//
|
||
// if (this.list.length > 0 && this.specilFlag == '1' && localStorage.isFrom == 'sale') {
|
||
// this.result = this.list.find(v => {
|
||
// return v.riskProductCode == 'GFRS_M0040'
|
||
// })
|
||
// }
|
||
// ------------------------专为惠企写死--end---------------//
|
||
// 如果是选择产品, 进入电子投保, 在主险列表能默认选中我在产品列表选择的产品
|
||
if (this.list.length > 0) {
|
||
console.log(localStorage.productCodeChooseFromList)
|
||
this.result = this.list.find((v) => {
|
||
return v.riskProductCode == localStorage.productCodeChooseFromList
|
||
})
|
||
}
|
||
|
||
if (this.list.length == 0) {
|
||
this.$route('暂无可选产品')
|
||
// this.$dialog({ message: '暂无可选产品!' }).then(() => {
|
||
// let thismyurl = ''
|
||
// if (this.$route.query.orderNo) {
|
||
// thismyurl = '?orderNo=' + this.$route.query.orderNo
|
||
// } else if (this.$route.query.proposalOrderNo) {
|
||
// thismyurl = '?proposalOrderNo=' + this.$route.query.proposalOrderNo
|
||
// }
|
||
// this.$jump({
|
||
// flag: 'goBack',
|
||
// // extra: {
|
||
// // url: location.origin + '/#/common/selectedProduct'
|
||
// // },
|
||
// routerInfo: {
|
||
// type: 1,
|
||
// path: '/common/selectedProduct' + thismyurl
|
||
// }
|
||
// })
|
||
// })
|
||
}
|
||
}
|
||
},
|
||
|
||
//下一步
|
||
nextStep() {
|
||
if (!this.result) {
|
||
this.$toast('请选择产品')
|
||
return
|
||
}
|
||
/** add by zhangweiwei FCRS-764 国富无忧两全保险(B款)新增主险职业校验逻辑 start at 20240807 */
|
||
let insuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||
occupationCodeCheck({
|
||
occupationCode: insuredPersonInfo.occupationCode,
|
||
productCode: this.result.riskProductCode
|
||
}).then((res) => {
|
||
if (res.result == 0) {
|
||
this.handleMainRisk()
|
||
} else {
|
||
this.$toast(res.resultMessage)
|
||
}
|
||
})
|
||
/** add by zhangweiwei FCRS-764 国富无忧两全保险(B款)新增主险职业校验逻辑 end at 20240807 */
|
||
},
|
||
|
||
/**
|
||
* 处理主险
|
||
*/
|
||
handleMainRisk() {
|
||
if (localStorage.getItem('isFrom') == 'sale') {
|
||
let params = {
|
||
productCode: this.result.riskProductCode,
|
||
orderNo: this.$route.query.orderNo
|
||
}
|
||
if (this.recommendType == '03' && !this.isActivityCode) {
|
||
params.productChannl = this.isCrossChannel
|
||
}
|
||
riskLevelCheck(params).then((res) => {
|
||
if (res.result == 0) {
|
||
if (res.saLevelMatch == 'Y') {
|
||
//置空产品
|
||
localStorage.chooseProducts = ''
|
||
//添加主险
|
||
this.addMainRisk()
|
||
} else {
|
||
this.$toast(res.resultMessage)
|
||
}
|
||
} else {
|
||
this.$toast(res.resultMessage)
|
||
}
|
||
})
|
||
} else {
|
||
//置空产品
|
||
localStorage.chooseProducts = ''
|
||
//添加主险
|
||
this.addMainRisk()
|
||
}
|
||
},
|
||
|
||
//储存主险
|
||
async addMainRisk() {
|
||
localStorage.setItem('isTrial', '1')
|
||
let riskProductCode = this.result.riskProductCode
|
||
let resultData = await calculatePremium({ productCodes: [riskProductCode], platform: 'app', type: '1' })
|
||
if (resultData.result == 0) {
|
||
resultData = resultData.trialDTOS[0]
|
||
localStorage.isTrial = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? '0' : '1'
|
||
localStorage.hint = resultData.hint
|
||
if (resultData.productTrialInfoDTO.dutyGroup != null) {
|
||
resultData.productTrialInfoDTO.dutyGroup.map((item) => {
|
||
if (item.dutyName == '意外身故/伤残保险金') {
|
||
item.defaultDutyAmt = item.minDutyAmt
|
||
}
|
||
})
|
||
}
|
||
|
||
if (resultData.productTrialInfoDTO.ruleExpression) {
|
||
let ruleExpression = localStorage.ruleExpression ? JSON.parse(localStorage.ruleExpression) : {}
|
||
ruleExpression[resultData.productCode] = resultData.productTrialInfoDTO.ruleExpression
|
||
localStorage.ruleExpression = JSON.stringify(ruleExpression)
|
||
}
|
||
|
||
/********start 主险选择限制 start******/
|
||
|
||
// 检验投被人关系 惠企保特殊校验
|
||
if (riskProductCode == 'GFRS_M0040') {
|
||
if (riskRules.relationLimit(resultData, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt, this)) {
|
||
return
|
||
}
|
||
}
|
||
// 检验投被人关系 国富人寿特定疾病药品费用医疗保险特殊校验
|
||
if (riskProductCode == 'GFRS_M0045') {
|
||
if (riskRules.relationCommonLimit(resultData, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt, this)) {
|
||
return
|
||
}
|
||
}
|
||
|
||
if (riskRules.ageLimit(resultData, this, null, riskProductCode)) {
|
||
return
|
||
}
|
||
|
||
if (riskRules.medicalLimit(resultData, this)) {
|
||
return
|
||
}
|
||
|
||
if (riskRules.healthGradeLimit(resultData, this)) {
|
||
return
|
||
}
|
||
// if (riskRules.lifeGradeLimit(resultData, this)) {
|
||
// return
|
||
// }
|
||
//validateAppntFlag 0-职业寿险等级需校验主合同的投保人;1-职业寿险等级无需校验主合同的投保人
|
||
if (resultData.productInsuredDTO.validateAppntFlag == '0') {
|
||
//校验主合同投保人寿险职业等级
|
||
if (riskRules.lifeGradeLimitForBaby(resultData, this)) {
|
||
return
|
||
}
|
||
} else {
|
||
//校验主合同被保险人寿险职业等级
|
||
if (riskRules.lifeGradeLimit(resultData, this)) {
|
||
return
|
||
}
|
||
}
|
||
|
||
let flagPermission = await riskRules.getProductSellPermissionList(resultData.productCode, this, this.isCrossChannel)
|
||
if (flagPermission.flag && localStorage.isFrom != 'proposal') {
|
||
//校验该代理人是否有该产品的售卖权限
|
||
return this.$toast(flagPermission.resultMessage)
|
||
}
|
||
let flagCompany = await riskRules.checkCompany(
|
||
resultData.productCode,
|
||
JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).workcompany,
|
||
JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).isAsync,
|
||
this
|
||
)
|
||
if (flagCompany && localStorage.isFrom != 'proposal') {
|
||
//校验该投保人的工作单位是否能够投保该产品
|
||
return this.$toast('该投保人工作单位不能投保该产品')
|
||
}
|
||
/********end 主险选择限制 end******/
|
||
|
||
//保存附加险
|
||
localStorage.addtionRiskLst = JSON.stringify(resultData.productTrialInfoDTO.addtionRiskLst)
|
||
localStorage.isAutoPay = resultData.isAutoPay
|
||
localStorage.isRenew = resultData.isRenew
|
||
localStorage.isForceRenew = resultData.isForceRenew
|
||
localStorage.isRelated = resultData.isRelated
|
||
|
||
let calFactorLst = this.getFactorList(resultData)
|
||
let productTrialYearDTOS = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? resultData.productTrialInfoDTO.productTrialYearDTOS : null
|
||
let hasAddtionRisk = resultData.productTrialInfoDTO.addtionRiskLst != null && resultData.productTrialInfoDTO.addtionRiskLst.length ? true : false
|
||
let currentProductInfo =
|
||
localStorage.isTrial == '1'
|
||
? {
|
||
isCrossChannel: this.isCrossChannel,
|
||
calFactorLst,
|
||
hasAddtionRisk,
|
||
isMainRisk: 0,
|
||
hint: resultData.hint,
|
||
riskType: resultData.riskType,
|
||
riskName: this.result.riskName,
|
||
productCode: this.result.riskProductCode,
|
||
mainRiskCode: this.result.riskProductCode,
|
||
documentDTOS: resultData.productTrialInfoDTO.documentDTOS,
|
||
influences: resultData.productTrialInfoDTO.influences,
|
||
isRemit: resultData.productTrialInfoDTO.isRemit,
|
||
hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费
|
||
predictTransferPrem: null //建议书使用 预计转入保费字段
|
||
}
|
||
: {
|
||
isCrossChannel: this.isCrossChannel,
|
||
productTrialYearDTOS,
|
||
calFactorLst,
|
||
hasAddtionRisk,
|
||
isMainRisk: 0,
|
||
hint: resultData.hint,
|
||
riskType: resultData.riskType,
|
||
riskName: this.result.riskName,
|
||
productCode: this.result.riskProductCode,
|
||
mainRiskCode: this.result.riskProductCode,
|
||
documentDTOS: resultData.productTrialInfoDTO.documentDTOS,
|
||
influences: resultData.productTrialInfoDTO.influences,
|
||
isRemit: resultData.productTrialInfoDTO.isRemit,
|
||
hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费
|
||
predictTransferPrem: null //建议书使用 预计转入保费字段
|
||
}
|
||
|
||
//构建险种数组
|
||
let productsData
|
||
if (localStorage.chooseProducts) {
|
||
productsData = JSON.parse(localStorage.chooseProducts)
|
||
productsData.push(currentProductInfo)
|
||
} else {
|
||
productsData = [currentProductInfo]
|
||
}
|
||
//保存选择险种
|
||
productsData = this.$utils.unrepeatObj(productsData, 'productCode') //产品数组去重,跳转试算页面未成功重复添加同一产品的情况
|
||
localStorage.chooseProducts = JSON.stringify(productsData)
|
||
this.jumpTo()
|
||
}
|
||
},
|
||
//构建险种因子列表
|
||
getFactorList(resultData) {
|
||
let productTrialInfoDTO = resultData.productTrialInfoDTO
|
||
console.log(productTrialInfoDTO, 'wode')
|
||
let calFactorLst = resultData.productTrialInfoDTO.calFactorLst
|
||
console.log('calFactorLst', calFactorLst)
|
||
|
||
calFactorLst.forEach((item) => {
|
||
item['isMainRisk'] = 0
|
||
item.columns = []
|
||
if (item.type == 0) {
|
||
//1、type=0 select 2、type=1 input+stepper
|
||
productTrialInfoDTO[item.code].forEach((factor) => {
|
||
if (factor.defaultValue == 0) {
|
||
item.showContent = factor.showContent
|
||
if (factor[item.code + 'Flag'] != undefined) {
|
||
item[item.code] = factor[item.code]
|
||
item[item.code + 'Flag'] = factor[item.code + 'Flag']
|
||
item.hasFlag = '1'
|
||
} else if (item.code == 'pensionAge') {
|
||
//养老保险金领取年龄
|
||
item[item.code] = factor[item.code]
|
||
item['sex'] = factor.sex
|
||
} else {
|
||
item[item.code] = factor[item.code]
|
||
}
|
||
}
|
||
let itemColumns = { text: factor.showContent, value: factor[item.code], flag: factor[item.code + 'Flag'], sex: factor.sex }
|
||
if (factor.medical !== undefined) {
|
||
itemColumns.medical = factor.medical
|
||
}
|
||
item.columns.push(itemColumns)
|
||
})
|
||
} else if (item.type == 1) {
|
||
//按年龄选择
|
||
if (productTrialInfoDTO[item.code] != null) {
|
||
productTrialInfoDTO[item.code].forEach((factor) => {
|
||
// item = Object.assign(item, factor)
|
||
if (
|
||
JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).insuredAge >= Number(factor.minAge) &&
|
||
JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).insuredAge <= Number(factor.maxAge)
|
||
) {
|
||
// if(JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).age >= Number(factor.minAge) && JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).age <= Number(factor.maxAge)){
|
||
item = Object.assign(item, factor)
|
||
}
|
||
})
|
||
if (item.code == 'inputPrem') {
|
||
item['inputPrem'] = Number(item.minPrem) * Number(item.moneyUnit)
|
||
} else {
|
||
item['amt'] = Number(item.minAmt) * Number(item.moneyUnit)
|
||
}
|
||
}
|
||
}
|
||
//规则储存
|
||
item['rules'] = productTrialInfoDTO[item.code]
|
||
})
|
||
// // 用于意外险初始化保额
|
||
// calFactorLst.map(item => {
|
||
// if (item.code == '"dutyGroup"') {
|
||
// item.rules.map(factor => {
|
||
// factor[0].defaultDutyAmt = 50
|
||
// })
|
||
// }
|
||
// })
|
||
return calFactorLst
|
||
},
|
||
//页面跳转
|
||
jumpTo() {
|
||
let thismyurl = ''
|
||
if (this.$route.query.orderNo) {
|
||
thismyurl = '?orderNo=' + this.$route.query.orderNo
|
||
} else if (this.$route.query.proposalOrderNo) {
|
||
thismyurl = '?proposalOrderNo=' + this.$route.query.proposalOrderNo
|
||
}
|
||
// this.$router.push({ path: '/common/calculatePremium' + thismyurl })
|
||
this.$jump({
|
||
flag: 'h5',
|
||
extra: {
|
||
url: location.origin + '/#/common/calculatePremium' + thismyurl
|
||
},
|
||
routerInfo: {
|
||
path: '/common/calculatePremium' + thismyurl
|
||
}
|
||
})
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
<style lang="scss" scoped>
|
||
.white_block {
|
||
width: 100%;
|
||
height: 11.73333vw;
|
||
}
|
||
</style>
|