修复平台代管财务差异
This commit is contained in:
@@ -71,6 +71,7 @@ function financeStatusLabel(status: string) {
|
||||
refund_pending: '退款中',
|
||||
refund_failed: '退款失败',
|
||||
settlement_diff: '结算差异',
|
||||
offline_settlement_pending: '待线下结算',
|
||||
}
|
||||
return map[status] || status
|
||||
}
|
||||
@@ -78,7 +79,7 @@ function financeStatusLabel(status: string) {
|
||||
function financeStatusType(status: string) {
|
||||
if (status === 'normal') return 'success'
|
||||
if (status === 'settlement_diff' || status === 'refund_failed') return 'danger'
|
||||
if (status === 'refund_pending') return 'warning'
|
||||
if (status === 'refund_pending' || status === 'offline_settlement_pending') return 'warning'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
@@ -91,6 +92,23 @@ function settlementStatusLabel(status: string) {
|
||||
return map[status] || status || '-'
|
||||
}
|
||||
|
||||
function isPlatformManaged(row: FinanceDetail) {
|
||||
return row.handoff_mode === 'platform' || row.settlement_mode === 'platform_managed'
|
||||
}
|
||||
|
||||
function settlementModeLabel(row: FinanceDetail) {
|
||||
return isPlatformManaged(row) ? '平台代管' : '号主钱包'
|
||||
}
|
||||
|
||||
function offlineSettlementStatusLabel(status: string) {
|
||||
const map: Record<string, string> = {
|
||||
none: '无需线下结算',
|
||||
pending: '待线下结算',
|
||||
settled: '已线下结算',
|
||||
}
|
||||
return map[status] || status || '-'
|
||||
}
|
||||
|
||||
function shortDateTime(value?: string) {
|
||||
if (!value) return '-'
|
||||
const text = formatDateTime(value)
|
||||
@@ -114,7 +132,7 @@ function defaultEndDate() {
|
||||
<div class="page-header">
|
||||
<p class="eyebrow">Finance Details</p>
|
||||
<h1>财务明细</h1>
|
||||
<p>按订单核对收款、退款、平台收入、号主应得与钱包实际入账。</p>
|
||||
<p>按订单核对收款、退款、平台收入、号主应得与钱包入账/线下结算。</p>
|
||||
</div>
|
||||
<div class="toolbar-actions">
|
||||
<el-button @click="resetFilters">重置</el-button>
|
||||
@@ -191,7 +209,7 @@ function defaultEndDate() {
|
||||
<div class="amount-cell">净入</div>
|
||||
<div class="amount-cell">平台</div>
|
||||
<div class="amount-cell">应得</div>
|
||||
<div class="amount-cell">入账</div>
|
||||
<div class="amount-cell">入账/线下</div>
|
||||
<div class="amount-cell">差异</div>
|
||||
</div>
|
||||
|
||||
@@ -206,7 +224,13 @@ function defaultEndDate() {
|
||||
|
||||
<div class="status-stack">
|
||||
<span>{{ orderStatusLabel(row.order_status) }}</span>
|
||||
<small>{{ settlementStatusLabel(row.settlement_status) }}</small>
|
||||
<small
|
||||
>{{ settlementStatusLabel(row.settlement_status) }} ·
|
||||
{{ settlementModeLabel(row) }}</small
|
||||
>
|
||||
<small v-if="isPlatformManaged(row)">
|
||||
{{ offlineSettlementStatusLabel(row.offline_settlement_status) }}
|
||||
</small>
|
||||
<el-tag size="small" :type="financeStatusType(row.finance_status)">
|
||||
{{ financeStatusLabel(row.finance_status) }}
|
||||
</el-tag>
|
||||
@@ -232,7 +256,7 @@ function defaultEndDate() {
|
||||
moneyCent(row.checkout_owner_income_cent)
|
||||
}}</span>
|
||||
<span class="amount-text amount-cell">{{
|
||||
moneyCent(row.owner_wallet_income_amount_cent)
|
||||
moneyCent(row.owner_effective_settlement_amount_cent)
|
||||
}}</span>
|
||||
<span
|
||||
class="amount-text amount-cell"
|
||||
|
||||
Reference in New Issue
Block a user