[Snow Team] frontend-fixer-2: auto-commit work

This commit is contained in:
yml
2026-06-09 17:04:40 +08:00
parent f5b38ff772
commit 42a54b474a
16 changed files with 376 additions and 130 deletions
@@ -15,7 +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 { centToYuan, formatMoney, formatMoneyWithSymbol } from '@/shared/utils/money'
import { handoffStatusLabel, orderStatusLabel } from '@/utils/statusLabels'
import { formatDateTime } from '@/utils/time'
import { formatListingNo } from '@/utils/listingDisplay'
@@ -111,6 +111,11 @@ function money(value: unknown) {
return formatMoney(Number(value || 0))
}
function amountYuan(cent: unknown, legacyYuan?: unknown) {
if (cent !== undefined && cent !== null) return centToYuan(Number(cent || 0))
return Number(legacyYuan || 0)
}
async function handleRefund() {
if (!order.value) return
refunding.value = true
@@ -227,15 +232,15 @@ function formatHandoffRecordType(type: string) {
</div>
<div class="metric-card">
<span>订单金额</span>
<strong>¥{{ money(order.rent_amount) }}</strong>
<strong>¥{{ money(amountYuan(order.rent_amount_cent, order.rent_amount)) }}</strong>
</div>
<div class="metric-card">
<span>平台费用</span>
<strong>¥{{ money(order.platform_fee) }}</strong>
<strong>¥{{ money(amountYuan(order.platform_fee_cent, order.platform_fee)) }}</strong>
</div>
<div class="metric-card">
<span>押金</span>
<strong>¥{{ money(order.deposit_amount) }}</strong>
<strong>¥{{ money(amountYuan(order.deposit_amount_cent, order.deposit_amount)) }}</strong>
</div>
<div v-if="refundStatus" class="metric-card">
<span>退款状态</span>