fix: 退款审批可以是0
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m43s

This commit is contained in:
sexygoat
2026-06-06 15:09:31 +08:00
parent c5e4082c26
commit d23e896f97
4 changed files with 177 additions and 13 deletions

View File

@@ -42,7 +42,7 @@
<span>{{ refund?.refund_no }}</span>
</ElFormItem>
<ElFormItem label="申请退款金额">
<span>{{ formatCurrency(refund?.requested_refund_amount || 0) }}</span>
<span>{{ formatCurrency(refund?.requested_refund_amount) }}</span>
</ElFormItem>
<ElFormItem label="实际退款金额" prop="approved_refund_amount">
<ElInputNumber
@@ -236,7 +236,9 @@
refund_reason: ''
})
const formatCurrency = (amount: number): string => {
const formatCurrency = (amount: number | null | undefined): string => {
if (amount === undefined || amount === null || Number.isNaN(amount)) return '-'
return `¥${(amount / 100).toFixed(2)}`
}
@@ -293,8 +295,7 @@
},
{
label: '实际退款金额',
formatter: (_, data) =>
data.approved_refund_amount ? formatCurrency(data.approved_refund_amount) : '-'
formatter: (_, data) => formatCurrency(data.approved_refund_amount)
},
{
label: '实收金额',