统一金额分制重构
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
fetchFinanceDetails,
|
||||
type FinanceDetail,
|
||||
} from '@/features/admin/api/adminFinance'
|
||||
import { formatMoneyWithSymbol } from '@/shared/utils/money'
|
||||
import { formatCentWithSymbol } from '@/shared/utils/money'
|
||||
import { orderStatusLabel } from '@/utils/statusLabels'
|
||||
import { formatDateTime } from '@/utils/time'
|
||||
import AdminTablePagination from '../components/AdminTablePagination.vue'
|
||||
@@ -59,12 +59,8 @@ async function handlePageChange() {
|
||||
await loadDetails()
|
||||
}
|
||||
|
||||
function money(value: number) {
|
||||
return formatMoneyWithSymbol(value)
|
||||
}
|
||||
|
||||
function moneyCent(value: number) {
|
||||
return formatMoneyWithSymbol(Number(value || 0) / 100)
|
||||
return formatCentWithSymbol(value)
|
||||
}
|
||||
|
||||
function financeStatusLabel(status: string) {
|
||||
@@ -226,14 +222,14 @@ 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">{{ money(row.checkout_platform_fee) }}</span>
|
||||
<span class="amount-text amount-cell">{{ money(row.checkout_owner_income) }}</span>
|
||||
<span class="amount-text amount-cell">{{ money(row.owner_wallet_income_amount) }}</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) >= 0.05 }"
|
||||
:class="{ 'amount-danger': Math.abs(row.settlement_diff_amount_cent) >= 5 }"
|
||||
>
|
||||
{{ money(row.settlement_diff_amount) }}
|
||||
{{ moneyCent(row.settlement_diff_amount_cent) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user