[FIX]修复默认值bug

This commit is contained in:
yuweiqi
2020-01-20 21:14:38 +08:00
parent fbd2423119
commit aa195ebeca

View File

@@ -28,7 +28,7 @@
<!-- {{riskFactorIndex}} -->
<!-- {{defalutAmt}} -->
<van-stepper
v-model="item.calFactorLst[riskFactorIndex].defaultValue"
v-model="item.calFactorLst[riskFactorIndex].displayAmount"
:min="riskFactor.minAmt || riskFactor.minPrem"
:max="riskFactor.maxAmt || riskFactor.maxPrem"
:show-plus="false"
@@ -36,7 +36,7 @@
class="ml30"
@change="
stepperChange(
item.calFactorLst[riskFactorIndex].defaultValue,
item.calFactorLst[riskFactorIndex].displayAmount,
index,
riskFactorIndex,
riskFactor.minAmt || riskFactor.minPrem,
@@ -109,10 +109,12 @@
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst" :key="riskFactorIndex">
<div class="flex justify-content-s pv10 border-bottom" v-if="riskFactor.type == 1">
<div class="flex align-items-c">
<span v-if="item.productTrialYearDTOS[payEndYearColumnsIndex].suffix" class="fs14">{{ riskFactor.name + '(' + item.productTrialYearDTOS[payEndYearColumnsIndex]['suffix'] + ')' }}</span>
<span v-if="item.productTrialYearDTOS[payEndYearColumnsIndex].suffix" class="fs14">{{ riskFactor.name + '(' + item.productTrialYearDTOS
[payEndYearColumnsIndex]['suffix'] + ')' }}</span>
<span v-else class="fs14">{{ riskFactor.name }} &nbsp;&nbsp; &nbsp;&nbsp;</span>
<van-stepper
v-model="item.productTrialYearDTOS[payEndYearColumnsIndex].defaultValue"
v-model="item.productTrialYearDTOS[payEndYearColumnsIndex].displayAmount"
:min="item.productTrialYearDTOS[payEndYearColumnsIndex].minAmt || item.productTrialYearDTOS[payEndYearColumnsIndex].minPrem"
:max="item.productTrialYearDTOS[payEndYearColumnsIndex].maxAmt || item.productTrialYearDTOS[payEndYearColumnsIndex].maxPrem"
:show-plus="false"
@@ -120,7 +122,7 @@
class="ml30"
@change="
stepperChange(
item.productTrialYearDTOS[payEndYearColumnsIndex].defaultValue,
item.productTrialYearDTOS[payEndYearColumnsIndex].displayAmount,
index,
riskFactorIndex,
item.productTrialYearDTOS[payEndYearColumnsIndex].minAmt || item.productTrialYearDTOS[payEndYearColumnsIndex].minPrem,
@@ -764,12 +766,15 @@ export default {
}
} else if (factor.type == 1) {
if (factor.code == 'inputPrem') {
trialInfo['prem'] = factor.moneyUnit == undefined ? Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].defaultValue) * Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].moneyUnit) : Number(factor.defaultValue) * Number(factor.moneyUnit)
trialInfo['prem'] = factor.moneyUnit == undefined ? Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].displayAmount) * Number
(item.productTrialYearDTOS[this.payEndYearColumnsIndex].moneyUnit) : Number(factor.displayAmount) * Number(factor.moneyUnit)
console.log('==== ', Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].displayAmount))
} else {
if (item.isRemit == 0) {
trialInfo['amt'] = Number(factor.defaultValue) * Number(factor.moneyUnit)
trialInfo['amt'] = Number(factor.displayAmount) * Number(factor.moneyUnit)
} else {
trialInfo['amt'] = Number(factor.defaultValue) * Number(factor.moneyUnit)
trialInfo['amt'] = Number(factor.displayAmount) * Number(factor.moneyUnit)
}
}
} else if (factor.type == 2) {