修复前端金额展示并整理依赖

This commit is contained in:
yml
2026-06-09 20:32:17 +08:00
parent 4c2199df58
commit 684e30862d
20 changed files with 129 additions and 194 deletions
@@ -2,10 +2,7 @@
import { Search } from '@element-plus/icons-vue'
import { onMounted, reactive, ref } from 'vue'
import {
fetchFinanceDetails,
type FinanceDetail,
} from '@/features/admin/api/adminFinance'
import { fetchFinanceDetails, type FinanceDetail } from '@/features/admin/api/adminFinance'
import { formatCentWithSymbol } from '@/shared/utils/money'
import { orderStatusLabel } from '@/utils/statusLabels'
import { formatDateTime } from '@/utils/time'
@@ -156,7 +153,12 @@ function formatInputDate(date: Date) {
<el-input v-model="filters.user_id" clearable placeholder="租客或号主 ID" />
</el-form-item>
<el-form-item label="订单状态">
<el-select v-model="filters.order_status" clearable placeholder="全部状态" class="full-control">
<el-select
v-model="filters.order_status"
clearable
placeholder="全部状态"
class="full-control"
>
<el-option label="待支付" value="pending_payment" />
<el-option label="使用中" value="renting" />
<el-option label="待结账" value="pending_checkout_confirm" />
@@ -222,9 +224,15 @@ function formatInputDate(date: Date) {
{{ moneyCent(row.refunding_amount_cent) }}
</span>
<span class="amount-text amount-cell">{{ moneyCent(row.channel_net_amount_cent) }}</span>
<span class="amount-text amount-cell">{{ moneyCent(row.checkout_platform_fee_cent) }}</span>
<span class="amount-text amount-cell">{{ moneyCent(row.checkout_owner_income_cent) }}</span>
<span class="amount-text amount-cell">{{ moneyCent(row.owner_wallet_income_amount_cent) }}</span>
<span class="amount-text amount-cell">{{
moneyCent(row.checkout_platform_fee_cent)
}}</span>
<span class="amount-text amount-cell">{{
moneyCent(row.checkout_owner_income_cent)
}}</span>
<span class="amount-text amount-cell">{{
moneyCent(row.owner_wallet_income_amount_cent)
}}</span>
<span
class="amount-text amount-cell"
:class="{ 'amount-danger': Math.abs(row.settlement_diff_amount_cent) >= 5 }"
@@ -647,7 +647,11 @@ function readError(error: unknown, fallback: string) {
<span>KD {{ assetNumberText(item, 'secret_kd') }}</span>
</div>
<div class="queue-footer">
<span>¥{{ formatCent(item.price_cent) }} / ¥{{ formatCent(item.deposit_amount_cent) }}</span>
<span
>¥{{ formatCent(item.price_cent) }} / ¥{{
formatCent(item.deposit_amount_cent)
}}</span
>
<el-tag v-if="isExternalUpload(item)" size="small" type="info">{{
uploaderName(item)
}}</el-tag>
@@ -245,9 +245,9 @@ function formatHandoffRecordType(type: string) {
<div v-if="refundStatus" class="metric-card">
<span>退款状态</span>
<strong>{{ refundStatusLabel(refundStatus.refund_status) }}</strong>
<small v-if="refundStatus.refund_amount_cent > 0"
>{{ moneyCent(refundStatus.refund_amount_cent) }}</small
>
<small v-if="refundStatus.refund_amount_cent > 0">{{
moneyCent(refundStatus.refund_amount_cent)
}}</small>
</div>
</div>
@@ -253,10 +253,18 @@ function jsonText(value: unknown) {
<el-dialog v-model="detailVisible" title="支付流水详情" width="820px">
<div v-if="activePayment" class="payment-detail">
<div class="detail-grid">
<p><span>业务类型</span><strong>{{ bizTypeLabel(activePayment.biz_type) }}</strong></p>
<p><span>状态</span><strong>{{ paymentStatusLabel(activePayment.status) }}</strong></p>
<p><span>金额</span><strong>{{ moneyCent(activePayment.amount_cent) }}</strong></p>
<p><span>渠道</span><strong>{{ activePayment.provider || '-' }}</strong></p>
<p>
<span>业务类型</span><strong>{{ bizTypeLabel(activePayment.biz_type) }}</strong>
</p>
<p>
<span>状态</span><strong>{{ paymentStatusLabel(activePayment.status) }}</strong>
</p>
<p>
<span>金额</span><strong>{{ moneyCent(activePayment.amount_cent) }}</strong>
</p>
<p>
<span>渠道</span><strong>{{ activePayment.provider || '-' }}</strong>
</p>
</div>
<h3>请求参数</h3>
<pre>{{ jsonText(activePayment.raw_request) }}</pre>