This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
<span>{{ currentRefund?.refund_no }}</span>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="申请退款金额">
|
||||
<span>{{ formatCurrency(currentRefund?.requested_refund_amount || 0) }}</span>
|
||||
<span>{{ formatCurrency(currentRefund?.requested_refund_amount) }}</span>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="实际退款金额" prop="approved_refund_amount">
|
||||
<ElInputNumber
|
||||
@@ -410,7 +410,9 @@
|
||||
const refundList = ref<Refund[]>([])
|
||||
|
||||
// 格式化货币 - 将分转换为元
|
||||
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)}`
|
||||
}
|
||||
|
||||
@@ -496,8 +498,7 @@
|
||||
prop: 'approved_refund_amount',
|
||||
label: '实际退款金额',
|
||||
width: 150,
|
||||
formatter: (row: Refund) =>
|
||||
row.approved_refund_amount === null ? '-' : formatCurrency(row.approved_refund_amount)
|
||||
formatter: (row: Refund) => formatCurrency(row.approved_refund_amount)
|
||||
},
|
||||
{
|
||||
prop: 'actual_received_amount',
|
||||
@@ -797,8 +798,8 @@
|
||||
const handleShowResubmit = (row: Refund) => {
|
||||
currentRefund.value = row
|
||||
// 预填充原有数据
|
||||
resubmitForm.requested_refund_amount = row.requested_refund_amount / 100
|
||||
resubmitForm.actual_received_amount = fenToYuan(row.actual_received_amount)
|
||||
resubmitForm.requested_refund_amount = fenToYuan(row.requested_refund_amount) || undefined
|
||||
resubmitForm.actual_received_amount = fenToYuan(row.actual_received_amount) || undefined
|
||||
resubmitForm.refund_reason = row.refund_reason
|
||||
resubmitDialogVisible.value = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user