[FIX]电投-桂企-责任保费保存产品接口请求参数问题修复

This commit is contained in:
yuweiqi
2020-05-22 14:26:09 +08:00
parent 7d19f07a6d
commit 5d13235c8f

View File

@@ -469,17 +469,17 @@ export default {
}) })
// 判断是否 含有 后台配置js验证函数 // 判断是否 含有 后台配置js验证函数
if(localStorage.ruleExpression){ if (localStorage.ruleExpression) {
let ruleExpression = JSON.parse(localStorage.ruleExpression); let ruleExpression = JSON.parse(localStorage.ruleExpression)
this.ruleExpression = ruleExpression this.ruleExpression = ruleExpression
let productCodes = Object.keys(ruleExpression) let productCodes = Object.keys(ruleExpression)
productCodes.forEach(itemKey => { productCodes.forEach(itemKey => {
// console.log(ruleExpression[itemKey]); // console.log(ruleExpression[itemKey]);
let rules = ruleExpression[itemKey]; let rules = ruleExpression[itemKey]
rules.eventList = []; rules.eventList = []
rules.forEach( item => { rules.forEach(item => {
let config = '' let config = ''
config = JSON.parse(item.ruleExpression); config = JSON.parse(item.ruleExpression)
// let errorMsg = item.errorMsg; // let errorMsg = item.errorMsg;
// config = { // config = {
// eventName: 'GFRS_M0020_payEndYear_insuYear', // eventName: 'GFRS_M0020_payEndYear_insuYear',
@@ -535,7 +535,7 @@ export default {
// funPar: ['par','ParKey','Par'], // funPar: ['par','ParKey','Par'],
// } // }
// console.log("config",config); // console.log("config",config);
this.$on(config.eventName, new Function( ...config.funPar, config.funBody.join(''))); this.$on(config.eventName, new Function(...config.funPar, config.funBody.join('')))
rules.eventList.push(config.eventName) rules.eventList.push(config.eventName)
}) })
}) })
@@ -701,15 +701,15 @@ export default {
// } // }
// } // }
let productCode = this.chooseProducts[this.productIndex].productCode let productCode = this.chooseProducts[this.productIndex].productCode
if(this.ruleExpression[productCode]){ if (this.ruleExpression[productCode]) {
this.errorMsg = [] this.errorMsg = []
let currentFactor = this.chooseProducts[this.productIndex].calFactorLst let currentFactor = this.chooseProducts[this.productIndex].calFactorLst
let currentEle = currentFactor[this.calFactorIndex] let currentEle = currentFactor[this.calFactorIndex]
this.ruleExpression[productCode].eventList.forEach(item => { this.ruleExpression[productCode].eventList.forEach(item => {
this.$emit(item,currentFactor,currentEle.code,value); this.$emit(item, currentFactor, currentEle.code, value)
}) })
if(this.errorMsg.length > 0){ if (this.errorMsg.length > 0) {
this.$toast(this.errorMsg[0]); this.$toast(this.errorMsg[0])
this.errorMsg = [] this.errorMsg = []
this.popupShow = false this.popupShow = false
return false return false
@@ -1457,6 +1457,11 @@ export default {
riskItem['dutyLst'] = this.trialList[index].duty riskItem['dutyLst'] = this.trialList[index].duty
//930折中方案责任险分档 //930折中方案责任险分档
riskItem['amt'] = this.trialList[index].amt riskItem['amt'] = this.trialList[index].amt
} else {
//国富人寿桂企保重大疾病保险产品专写
if (this.trialList[index].productCode == 'GFRS_M0024') {
riskItem['dutyLst'] = this.trialInfos[index].duty
}
} }
//保费算保额 //保费算保额
console.log('this.trialList', this.trialList[index].trialType) console.log('this.trialList', this.trialList[index].trialType)
@@ -1485,7 +1490,6 @@ export default {
this.trialInfos[index].amt = this.trialList[0].prem this.trialInfos[index].amt = this.trialList[0].prem
} }
// console.log(riskItem) // console.log(riskItem)
console.log(this.trialInfos[index])
riskItem = Object.assign(riskItem, this.trialInfos[index]) riskItem = Object.assign(riskItem, this.trialInfos[index])
// console.log(riskItem) // console.log(riskItem)
riskDTOLst.push(riskItem) riskDTOLst.push(riskItem)
@@ -1494,6 +1498,14 @@ export default {
if (!rollInResult) { if (!rollInResult) {
return return
} }
//国富人寿桂企保重大疾病保险产品专写
this.trialInfos.map((v, i) => {
if (v.productCode == 'GFRS_M0024') {
delete riskDTOLst[i].duty
}
})
// console.log('riskDTOLst', riskDTOLst) // console.log('riskDTOLst', riskDTOLst)
//建议书需要添加全部投保人信息电投只需要投保人ID //建议书需要添加全部投保人信息电投只需要投保人ID
let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, { riskDTOLst: riskDTOLst }) let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, { riskDTOLst: riskDTOLst })