diff --git a/src/views/ebiz/common/AddRiskList.vue b/src/views/ebiz/common/AddRiskList.vue
index 752cf6cf9..8cbd9dfbe 100644
--- a/src/views/ebiz/common/AddRiskList.vue
+++ b/src/views/ebiz/common/AddRiskList.vue
@@ -76,6 +76,11 @@ export default {
localStorage.isAutoPay = localStorage.isAutoPay == '0' ? '0' : resultData.isAutoPay //自动垫交
localStorage.isRenew = localStorage.isRenew == '0' ? '0' : resultData.isRenew //自动续保
localStorage.isForceRenew = localStorage.isForceRenew == '0' ? '0' : resultData.isForceRenew //自动续保默认是否选中 0-是 1-否
+ 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 (resultData.productTrialInfoDTO.isRemit == '0' && resultData.productTrialInfoDTO.remitType == '0') {
diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue
index bfd497cda..2df33e4a2 100644
--- a/src/views/ebiz/common/CalculatePremium.vue
+++ b/src/views/ebiz/common/CalculatePremium.vue
@@ -49,7 +49,7 @@
/>
-
@@ -377,7 +377,8 @@ export default {
//缴费期间对应index索引
payEndYearColumnsIndex: 0,
// 后台配置的校验规则
- ruleExpression: {}
+ ruleExpression: {},
+ mainRiskCode: ''
}
},
mounted() {
@@ -535,7 +536,42 @@ export default {
// funPar: ['par','ParKey','Par'],
// }
// console.log("config",config);
+ // 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(''));
+ initFn(this)
+ }
rules.eventList.push(config.eventName)
})
})