新增财务仪表盘并统一金额到角
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
type RefundStatus,
|
||||
} from '@/features/orders'
|
||||
import { fetchAdminPayments, type AdminPayment } from '@/features/admin/api/adminPayments'
|
||||
import { formatMoney, formatMoneyWithSymbol } from '@/shared/utils/money'
|
||||
import { handoffStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import { formatListingNo } from '@/utils/listingDisplay'
|
||||
@@ -107,7 +108,7 @@ function orderEstimatedEndAt() {
|
||||
}
|
||||
|
||||
function money(value: unknown) {
|
||||
return Math.round(Number(value || 0))
|
||||
return formatMoney(Number(value || 0))
|
||||
}
|
||||
|
||||
async function handleRefund() {
|
||||
@@ -167,7 +168,7 @@ function paymentBizTypeLabel(type: string) {
|
||||
}
|
||||
|
||||
function moneyCent(value: number) {
|
||||
return `¥${(Number(value || 0) / 100).toFixed(2)}`
|
||||
return formatMoneyWithSymbol(Number(value || 0) / 100)
|
||||
}
|
||||
|
||||
function formatHandoffRecordType(type: string) {
|
||||
@@ -240,7 +241,7 @@ function formatHandoffRecordType(type: string) {
|
||||
<span>退款状态</span>
|
||||
<strong>{{ refundStatusLabel(refundStatus.refund_status) }}</strong>
|
||||
<small v-if="refundStatus.refund_amount_cent > 0"
|
||||
>¥{{ (refundStatus.refund_amount_cent / 100).toFixed(2) }}</small
|
||||
>{{ moneyCent(refundStatus.refund_amount_cent) }}</small
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user