|
@@ -103,7 +103,7 @@
|
|
|
<hc-table-input v-model="row.containChangeTotal" :disabled="isView" @blur="containChangeTotalBlur(row)" />
|
|
|
</template>
|
|
|
<template #payRatio="{ row }">
|
|
|
- <hc-table-input v-model="row.payRatio" :disabled="isView" @blur="unPayRatioBlur(row)" />
|
|
|
+ <hc-table-input v-model="row.payRatio" :disabled="isView || !row.unPayRatio" @blur="unPayRatioBlur(row)" />
|
|
|
</template>
|
|
|
<template #currentMeterMoney="{ row }">
|
|
|
<hc-table-input v-model="row.currentMeterMoney" disabled />
|
|
@@ -474,6 +474,7 @@ const addTableData = ref([])
|
|
|
const isComparedRaVal = ref(-1)
|
|
|
//计算本期计量金额
|
|
|
const currentMeterTotalBlur = (row) => {
|
|
|
+console.log(row, 'row')
|
|
|
//如果为空
|
|
|
let currentMeterTotal = row.currentMeterTotal
|
|
|
const isMeter = isNumberReg(currentMeterTotal)
|
|
@@ -493,8 +494,11 @@ const currentMeterTotalBlur = (row) => {
|
|
|
baseForm.value.meterMoney = meterMoney
|
|
|
//计算本期支付比例
|
|
|
//本期支 付比例=本期计量数量/变更后数量
|
|
|
- row.payRatio = isNaN(BigNumber(currentMeterTotal).dividedBy(row.changeTotal).toString() * 100) ? '0.00' : BigNumber(currentMeterTotal).dividedBy(row.changeTotal).toString() * 100
|
|
|
- row.payRatio = row.payRatio .toFixed(2) === 'Infinity' ? 0 : row.payRatio .toFixed(2)
|
|
|
+ //如果不存在unPayRatio,支付比例不能计算
|
|
|
+ if (row.unPayRatio) {
|
|
|
+ row.payRatio = isNaN(BigNumber(currentMeterTotal).dividedBy(row.changeTotal).toString() * 100) ? '0.00' : BigNumber(currentMeterTotal).dividedBy(row.changeTotal).toString() * 100
|
|
|
+ row.payRatio = row.payRatio .toFixed(2) === 'Infinity' ? 0 : row.payRatio .toFixed(2)
|
|
|
+ }
|
|
|
compareRowUnpayRatio(row, 1)
|
|
|
|
|
|
})
|