diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index bfd497cda..b76d40715 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -49,7 +49,7 @@ /> -
{ // console.log(ruleExpression[itemKey]); - let rules = ruleExpression[itemKey]; - rules.eventList = []; - rules.forEach( item => { + let rules = ruleExpression[itemKey] + rules.eventList = [] + rules.forEach(item => { let config = '' - config = JSON.parse(item.ruleExpression); + config = JSON.parse(item.ruleExpression) // let errorMsg = item.errorMsg; // config = { // eventName: 'GFRS_M0020_payEndYear_insuYear', @@ -534,8 +534,8 @@ export default { // '}'], // funPar: ['par','ParKey','Par'], // } - // console.log("config",config); - this.$on(config.eventName, new Function( ...config.funPar, config.funBody.join(''))); + // console.log("config",config); + this.$on(config.eventName, new Function(...config.funPar, config.funBody.join(''))) rules.eventList.push(config.eventName) }) }) @@ -688,7 +688,7 @@ export default { return false } // console.log("productCode ==>" , productCode) - + // if(this.ruleExpression[productCode]){ // this.errorMsg = [] // this.ruleExpression[productCode].eventList.forEach(item => { @@ -701,28 +701,28 @@ export default { // } // } let productCode = this.chooseProducts[this.productIndex].productCode - if(this.ruleExpression[productCode]){ + if (this.ruleExpression[productCode]) { this.errorMsg = [] let currentFactor = this.chooseProducts[this.productIndex].calFactorLst let currentEle = currentFactor[this.calFactorIndex] 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){ - this.$toast(this.errorMsg[0]); + if (this.errorMsg.length > 0) { + this.$toast(this.errorMsg[0]) this.errorMsg = [] this.popupShow = false return false } } - + // 后台配置 的 js函数 验证 // if(hasR){ // if(currentEle.code == 'payEndYear' || currentEle.code == 'insuYear'){ // this.payEndYear(currentEle.code,value.value,this.tmpInsuYear.insuYear + this.tmpInsuYear.insuYearFlag) // } // } - + currentEle.showContent = value.text let name = currentEle.code currentEle[name] = value.value @@ -1457,6 +1457,11 @@ export default { riskItem['dutyLst'] = this.trialList[index].duty //930折中方案,责任险分档 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) @@ -1485,7 +1490,6 @@ export default { this.trialInfos[index].amt = this.trialList[0].prem } // console.log(riskItem) - console.log(this.trialInfos[index]) riskItem = Object.assign(riskItem, this.trialInfos[index]) // console.log(riskItem) riskDTOLst.push(riskItem) @@ -1494,6 +1498,14 @@ export default { if (!rollInResult) { return } + + //国富人寿桂企保重大疾病保险产品专写 + this.trialInfos.map((v, i) => { + if (v.productCode == 'GFRS_M0024') { + delete riskDTOLst[i].duty + } + }) + // console.log('riskDTOLst', riskDTOLst) //建议书需要添加全部投保人信息,电投只需要投保人ID let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, { riskDTOLst: riskDTOLst })