提交保费计算

This commit is contained in:
皮伟
2019-12-05 17:04:08 +08:00
parent 25c76b7205
commit c60d512aa3
2 changed files with 30 additions and 8 deletions

View File

@@ -29,6 +29,8 @@
v-model="item.calFactorLst[riskFactorIndex].defaultValue"
:min="riskFactor.minAmt || riskFactor.minPrem"
:max="riskFactor.maxAmt || riskFactor.maxPrem"
:show-plus="false"
:show-minus="false"
class="ml10"
@change="stepperChange(item.calFactorLst[riskFactorIndex].defaultValue, index, riskFactorIndex)"
input-width="100"
@@ -60,6 +62,8 @@
v-model="dutyItem.defaultDutyAmt"
:min="dutyItem.minDutyAmt"
:max="dutyItem.maxDutyAmt"
:show-plus="false"
:show-minus="false"
class="ml10 mr10"
@focus="focusStep"
@blur="blurStep"
@@ -165,7 +169,7 @@ export default {
influenceAddRiskCodes: [],
influences: [],
nextStepFlag: false,
isFrom: localStorage.isFrom === 'sale',
isFrom: localStorage.isRelated === '0',
policyNo: '', //关联保单号
// 份数
mult: ''
@@ -198,12 +202,16 @@ export default {
//构建提交数据、渲染险种
this.chooseProducts = JSON.parse(localStorage.chooseProducts)
this.chooseProducts.map(item => {
if (item.mainRiskCode == 'GFRS_M0006') {
item.isHidden = true
}
item.calFactorLst.map(i => {
if (i.defaultValue) {
this.mult = i.defaultValue
}
})
})
// this.influenceAddRiskCodes
if (this.chooseProducts[0].influences && this.chooseProducts[0].influences.length > 0) {
@@ -243,6 +251,7 @@ export default {
},
//弹框选择
toSelect(index, index1, columns) {
console.log(index, index1, columns)
;[this.popupShow, this.productIndex, this.calFactorIndex] = [true, index, index1]
this.columns = columns
},
@@ -256,7 +265,9 @@ export default {
this.columns = []
let currentFactor = this.chooseProducts[this.productIndex].calFactorLst
let currentEle = currentFactor[this.calFactorIndex]
console.log('value', value)
console.log('currentFactor', currentFactor)
console.log('currentEle', currentEle)
if (currentEle.showContent != value.text) {
//通用规则校验
if (this.payExceedInsured(currentEle, currentFactor, value.value)) {
@@ -604,11 +615,11 @@ export default {
this.chooseProducts.forEach((item, index) => {
let trialInfo = {}
item.calFactorLst.forEach(factor => {
//type 类型 0为picker 1计步器 2职业等级
if (factor.type == 0) {
if (factor.hasFlag == '1') {
trialInfo[factor.code] = factor[factor.code]
trialInfo[factor.code + 'Flag'] = factor[factor.code + 'Flag']
// trialInfo[factor.payEndYear] = factor[factor.payEndYear]
} else {
trialInfo[factor.code] = factor[factor.code]
}
@@ -637,8 +648,9 @@ export default {
})
//通用规则1交费方式为一次交情无交费期限
if (trialInfo['payIntv'] == '0') {
trialInfo['payEndYear'] = '1'
trialInfo['payEndYear'] = '1000'
trialInfo['payEndYearFlag'] = 'Y'
trialInfo['insuYearFlag'] = 'Y'
}
//责任险参数构建
// if (trialInfo.duty) {
@@ -699,9 +711,19 @@ export default {
console.log(value)
this.mult = value
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit)
this.getTrial()
if ((Number(value) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
currentEle.defaultValue = currentEle.rules[productIndex].defaultValue
Dialog.alert({
message: `输入不能超过${Number(currentEle.limit) * 10000}的倍数`
}).then(() => {
// on close
})
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
},
//下一步
async nextStep() {