diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index 30144ce7a..2a10e55fc 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -148,7 +148,8 @@ export default { [Picker.name]: Picker, [Stepper.name]: Stepper, [Field.name]: Field, - [Checkbox.name]: Checkbox + [Checkbox.name]: Checkbox, + [Dialog.name]: Dialog }, data() { return { @@ -232,45 +233,45 @@ export default { }, // 责任保额份数变化 dutyStepperChange(value, productIndex, calFactorIndex, dutyItemIndex, isChecked, min, max) { - if (value < min || value > max) { - this.nextStepFlag = true - this.changeFlag = false - } else { - this.changeFlag = true - } - if (isChecked) { - ;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex] - let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules - currentEle.forEach(item => { - item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit) - }) - this.mainRiskInfluenceAddRisk() - this.getTrial() - } else { - ;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex] - let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules - currentEle.forEach(item => { - item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit) - }) - } let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules[dutyItemIndex] - if ((Number(value) * 10000) % (Number(currentEle.limit) * 10000) != 0) { - currentEle.defaultDutyAmt = currentEle.minDutyAmt - console.log() - Dialog.alert({ - message: localStorage.hint - }).then(() => { - // on close - }) + if (value < min || value > max) { + this.$toast(localStorage.hint) } else { - this.mainRiskInfluenceAddRisk() - // currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit) - this.getTrial() + if ((Number(value) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + Dialog.alert({ + message: localStorage.hint + }).then(()=> { + currentEle.defaultDutyAmt = currentEle.minDutyAmt + }) + + // this.$toast(localStorage.hint) + + } else { + // this.mainRiskInfluenceAddRisk() + // currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit) + // this.getTrial() + if (isChecked) { + ;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex] + let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules + currentEle.forEach(item => { + item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit) + }) + this.mainRiskInfluenceAddRisk() + this.getTrial() + } else { + ;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex] + let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules + currentEle.forEach(item => { + item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit) + }) + } + } } + + }, //弹框选择 toSelect(index, index1, columns) { - console.log(index, index1, columns) ;[this.popupShow, this.productIndex, this.calFactorIndex] = [true, index, index1] this.columns = columns },