修改支付百分比

master
lynn 4 months ago
parent 0566900e2a
commit 724fc1d02b

@ -41,7 +41,7 @@
</div>
<div class="payment-registration-row">
<div class="payment-registration-row-title">支付占比</div>
<div class="payment-registration-row-content">{{ percentPay() }}%</div>
<div class="payment-registration-row-content">{{ percentPay() }}</div>
</div>
<div class="payment-registration-row">
<div class="payment-registration-row-title">已付笔数</div>
@ -54,7 +54,7 @@
:close-on-close="false"
ref="paymentListPoptip"
>
<div>点击查看列表</div>
<div>同一支出记录下的其他付款记录</div>
<template v-slot:content>
<template v-if="payment&&payment.length>0">
<div class="table-container">
@ -871,7 +871,11 @@ export default {
//
percentPay() {
const total = this.totalMoney()
return ((total / this.contract.money) * 100).toFixed(2) || 0
if (!total || !this.contract || !this.contract.money || isNaN(total) || isNaN(this.contract.money)) {
return '0%'
}
const percent = (total / this.contract.money) * 100
return isNaN(percent) ? '0%' : percent.toFixed(2) + '%'
},
//

Loading…
Cancel
Save