【GFRS-3784】保费试算页面 责任步进器 增加判断 产品GFRS_M0077 隐藏输入框

【GFRS-3784】保费试算页面 责任步进器 增加判断 产品GFRS_M0077 根据被保人年龄以及性别设置默认选中得责任判断逻辑
This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-08-14 16:35:17 +08:00
parent 905e986b4e
commit f68982f5cb

View File

@@ -13,9 +13,9 @@
<van-tag type="primary" v-if="item.isMainRisk == 0" class="mr5 green" plain>主险</van-tag>
<van-tag type="primary" v-else class="mr5 green" plain>附加险</van-tag>
<span class="ml5 center fs13 flex1">{{ item.riskName }}</span>
<van-tag type="primary" v-if="item.isMainRisk == 0 && item.hasAddtionRisk && isEnterAddtionRisk" plain @click="selectAddtionRisk" class="green mr8"
></van-tag
>
<van-tag type="primary" v-if="item.isMainRisk == 0 && item.hasAddtionRisk && isEnterAddtionRisk" plain @click="selectAddtionRisk" class="green mr8">
</van-tag>
<van-icon name="search" size="20" v-if="item.documentDTOS && item.documentDTOS.length > 0" @click="seeDocument(index)" class="green mr5" />
<van-icon name="delete" size="22" @click="deleteRisk(index,item)" class="green" />
</div>
@@ -109,6 +109,7 @@
item.productCode == 'GFRS_M0051' ||
item.productCode == 'GFRS_M0054' ||
item.productCode == 'GFRS_M0073' ||
item.productCode == 'GFRS_M0077' ||
item.productCode == 'GFRS_M0057'
)
"
@@ -127,6 +128,7 @@
item.productCode == 'GFRS_M0051' ||
item.productCode == 'GFRS_M0054' ||
item.productCode == 'GFRS_M0073' ||
item.productCode == 'GFRS_M0077' ||
item.productCode == 'GFRS_M0057'
)
"
@@ -747,6 +749,31 @@ export default {
}
})
}
if (item.mainRiskCode == 'GFRS_M0077') {
item.calFactorLst.map((i) => {
if (i.code == 'dutyGroup') {
if(i.rules && i.rules.length != 0) {
i.rules.forEach(ii=>{
if(this.saleInsuredPersonInfo.insuredAge < 18) {
if(ii.duty == '311504'){
ii.necess = true
}
}else{
if(this.saleInsuredPersonInfo.sex == '0'){
if(ii.duty == '311505'){
ii.necess = true
}
} else {
if(ii.duty == '311506'){
ii.necess = true
}
}
}
})
}
}
})
}
if (item.mainRiskCode == 'GFRS_M0046') {
if (this.saleInsuredPersonInfo.relationToAppnt == 1) {
this.isEnterAddtionRiskListFunc()
@@ -774,25 +801,11 @@ export default {
}
}
// if (item.productCode == 'GFRS_A0003') {
// //该附加险的责任保额=主险的保费
// item.calFactorLst.map(v => {
// if (v.code == 'dutyGroup' && v.rules.length > 0) {
// v.rules.map(y => {
// if (y.defaultDutyAmt === null) {
// y.defaultDutyAmt = (JSON.parse(localStorage.trialList)[0].prem / 10000).toFixed(6)
// }
// y.moneyUnit = 10000
// y.changeWithMainRisk = true //责任险保额=主险保费,不允许用户手动更改
// })
// }
// })
// }
//保存主险险种编号
if (item.isMainRisk == 0) {
this.mainRiskCode = item.mainRiskCode
}
})
//保存主险险种编号
if (item.isMainRisk == 0) {
this.mainRiskCode = item.mainRiskCode
}
})
if (this.mainRiskCode == 'GFRS_M0005') {
this.chooseProducts.map((item) => {
if (item.productCode == 'GFRS_A0004') {
@@ -850,91 +863,6 @@ export default {
rules.forEach((item) => {
let config = ''
config = JSON.parse(item.ruleExpression)
// let errorMsg = item.errorMsg;
// config = {
// eventName: 'GFRS_M0020_payEndYear_insuYear',
// eventType: 'onConfirm',
// funBody: [
// 'let ageMap = {',
// ' "10Y":{"30Y": 55,"70A": 55,"88A": 55},',
// ' "20Y":{ "30Y": 55, "70A": 50, "88A": 55 }, ',
// ' "30Y":{ "30Y": 45, "70A": 40, "88A": 45 },',
// '};',
// 'let payEndYear = "";',
// 'let insuYear = "";',
// 'let age = this.saleInsuredPersonInfo.insuredAge;',
// 'let parObj = {};',
// 'par.map(item => {',
// ' parObj[item.code] = item;',
// '});',
// 'if(ParKey == "payEndYear"){',
// ' payEndYear = Par.value + Par.flag;',
// ' lintAgeObj = ageMap[payEndYear];',
// ' let flag = true, num = parObj.insuYear.columns.length;',
// ' parObj.insuYear.columns.forEach(item => {',
// ' let lintAge = lintAgeObj[ item.value + item.flag ];',
// ' if( age > lintAge ){',
// ' item.disabled = true;',
// ' num = num - 1 ;',
// ' }else{',
// ' if(flag){',
// ' parObj.insuYear.insuYear = item.value;',
// ' parObj.insuYear.insuYearFlag = item.flag;',
// ' parObj.insuYear.showContent = item.text;',
// ' flag = false;',
// ' };',
// ' item.disabled = false;',
// ' };',
// ' });',
// ' if(!num){',
// ' this.errorMsg.push("被保险人年龄不符合当前所选交费期间");',
// ' payEndYear = parObj.payEndYear.payEndYear + parObj.payEndYear.payEndYearFlag;',
// ' lintAgeObj = ageMap[payEndYear];',
// ' parObj.insuYear.columns.forEach(item => {',
// ' let lintAge = lintAgeObj[ item.value + item.flag ];',
// ' if( age > lintAge ){',
// ' item.disabled = true;',
// ' }else{',
// ' item.disabled = false;',
// ' };',
// ' });',
// ' return false;',
// ' };',
// ' return true;',
// '}'],
// funPar: ['par','ParKey','Par'],
// }
// config = {
// eventName: 'GFRS_A0003_noMainCode',
// eventType: 'init',
// initBody: [
// 'for(let item of that.chooseProducts){',
// ' if(item.productCode == "GFRS_A0003"){',
// ' for(let itemC of item.calFactorLst){',
// ' if(itemC.code == "dutyGroup"){',
// ' for(let itemR of itemC.rules){',
// ' that.$emit("GFRS_A0003_noMainCode", itemR, that.mainRiskCode)',
// ' }',
// ' }',
// ' }',
// ' }',
// ' }',
// ],
// funBody: [
// 'let noMainCode = {',
// ' "GFRS_M0004" : true,',
// ' "GFRS_M0011" : true',
// '};',
// 'let noduty = {',
// ' "310101" : true',
// '};',
// 'if(noMainCode[mainRiskCode] && noduty[dutyItem.duty]){',
// ' dutyItem.necess = false;',
// ' dutyItem.isDisabled = true;',
// '}',
// ],
// funPar:['dutyItem', 'mainRiskCode'],
// }
this.$on(config.eventName, new Function(...config.funPar, config.funBody.join('')))
if (config.eventType == 'init') {
let initFn = new Function('that', config.initBody.join(''))
@@ -2809,6 +2737,7 @@ export default {
this.trialList[index].productCode == 'GFRS_M0051' ||
this.trialList[index].productCode == 'GFRS_M0054' ||
this.trialList[index].productCode == 'GFRS_M0073' ||
this.trialList[index].productCode == 'GFRS_M0077' ||
this.trialList[index].productCode == 'GFRS_M0057'
) {
riskItem['dutyLst'] = this.trialInfos[index].duty
@@ -2871,7 +2800,7 @@ export default {
//国富人寿桂企保重大疾病保险产品专写
this.trialInfos.map((v, i) => {
if (v.productCode == 'GFRS_M0024' || v.productCode == 'GFRS_M0040' || v.productCode == 'GFRS_M0044'
|| v.productCode == 'GFRS_M0046'|| v.productCode == 'GFRS_M0051'|| v.productCode == 'GFRS_M0057' || v.productCode == 'GFRS_M0073') {
|| v.productCode == 'GFRS_M0046'|| v.productCode == 'GFRS_M0051'|| v.productCode == 'GFRS_M0057' || v.productCode == 'GFRS_M0073'|| v.productCode == 'GFRS_M0077') {
delete riskDTOLst[i].duty
}
})