新增财务仪表盘并统一金额到角

This commit is contained in:
yml
2026-06-09 00:13:03 +08:00
parent a2a0489158
commit 2dfa2611fd
40 changed files with 1324 additions and 70 deletions
@@ -4,6 +4,7 @@ import { computed, ref } from 'vue'
import MobileBottomNav from '@/components/MobileBottomNav.vue'
import { usePublishForm } from '@/features/seller/composables/usePublishForm'
import { formatMoney } from '@/shared/utils/money'
import type { AgreementContent } from '@/features/listings/api/listingOptions'
const {
@@ -549,7 +550,7 @@ function selectRadio<T extends string>(value: T, setter: (value: T) => void) {
</template>
</van-field>
<button class="deposit-recommend-btn" type="button" @click="useRecommendedDeposit">
推荐押金 ¥{{ recommendedDepositAmount }}
推荐押金 ¥{{ formatMoney(recommendedDepositAmount) }}
</button>
<van-field label="每日损耗" required class="publish-field">
<template #input>
@@ -638,7 +639,7 @@ function selectRadio<T extends string>(value: T, setter: (value: T) => void) {
</template>
</van-field>
<van-field
:model-value="calculatedCoinBasePrice ? `¥${calculatedCoinBasePrice}` : ''"
:model-value="calculatedCoinBasePrice ? `¥${formatMoney(calculatedCoinBasePrice)}` : ''"
label="纯币基础价"
readonly
required
@@ -652,13 +653,13 @@ function selectRadio<T extends string>(value: T, setter: (value: T) => void) {
</template>
</van-field>
<van-field
:model-value="`¥${calculatedConsumablePrice}`"
:model-value="`¥${formatMoney(calculatedConsumablePrice)}`"
label="额外消耗品"
readonly
class="publish-field result-field"
/>
<van-field
:model-value="calculatedSellerPrice ? `¥${calculatedSellerPrice}` : ''"
:model-value="calculatedSellerPrice ? `¥${formatMoney(calculatedSellerPrice)}` : ''"
label="卖家价格"
readonly
required
@@ -10,6 +10,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { computed, ref } from 'vue'
import { usePublishForm } from '@/features/seller/composables/usePublishForm'
import { formatMoney } from '@/shared/utils/money'
import type { AgreementContent } from '@/features/listings/api/listingOptions'
import OptionChips from './components/OptionChips.vue'
import PublishSection from './components/PublishSection.vue'
@@ -489,13 +490,13 @@ function selectDailyLoss(value: string | number) {
:placeholder="priceConfig.deposit_placeholder"
/>
<button class="recommend-button" type="button" @click="useRecommendedDeposit">
使用推荐 ¥{{ recommendedDepositAmount }}
使用推荐 ¥{{ formatMoney(recommendedDepositAmount) }}
</button>
</div>
<div class="deposit-breakdown">
<span v-for="item in depositBreakdownItems" :key="`${item.label}-${item.count}`">
{{ item.label }}<template v-if="item.count > 1"> x{{ item.count }}</template> ¥{{
item.amount
formatMoney(item.amount)
}}
</span>
</div>
@@ -579,15 +580,15 @@ function selectDailyLoss(value: string | number) {
</div>
<div class="price-cell">
<span>纯币基础价</span>
<strong>{{ calculatedCoinBasePrice ? `¥${calculatedCoinBasePrice}` : '--' }}</strong>
<strong>{{ calculatedCoinBasePrice ? `¥${formatMoney(calculatedCoinBasePrice)}` : '--' }}</strong>
</div>
<div class="price-cell">
<span>额外消耗品</span>
<strong>¥{{ calculatedConsumablePrice }}</strong>
<strong>¥{{ formatMoney(calculatedConsumablePrice) }}</strong>
</div>
<div class="price-cell accent">
<span>发布价格</span>
<strong>{{ calculatedSellerPrice ? `¥${calculatedSellerPrice}` : '--' }}</strong>
<strong>{{ calculatedSellerPrice ? `¥${formatMoney(calculatedSellerPrice)}` : '--' }}</strong>
</div>
</div>
@@ -607,21 +608,21 @@ function selectDailyLoss(value: string | number) {
<div class="summary-panel">
<div class="summary-main">
<span>卖家发布价格</span>
<strong>{{ calculatedSellerPrice ? `¥${calculatedSellerPrice}` : '--' }}</strong>
<strong>{{ calculatedSellerPrice ? `¥${formatMoney(calculatedSellerPrice)}` : '--' }}</strong>
</div>
<div class="summary-breakdown">
<div class="summary-breakdown-title">价格明细</div>
<div>
<span>纯币价格</span>
<strong>{{ calculatedCoinBasePrice ? `¥${calculatedCoinBasePrice}` : '--' }}</strong>
<strong>{{ calculatedCoinBasePrice ? `¥${formatMoney(calculatedCoinBasePrice)}` : '--' }}</strong>
</div>
<div>
<span>额外物品价格</span>
<strong>¥{{ calculatedConsumablePrice }}</strong>
<strong>¥{{ formatMoney(calculatedConsumablePrice) }}</strong>
</div>
<div>
<span>押金价格</span>
<strong>{{ form.deposit_amount === '' ? '--' : `¥${form.deposit_amount}` }}</strong>
<strong>{{ form.deposit_amount === '' ? '--' : `¥${formatMoney(Number(form.deposit_amount))}` }}</strong>
</div>
</div>
<div class="summary-list">
@@ -9,6 +9,7 @@ import {
submitListingReview,
type Listing,
} from '@/features/listings'
import { formatMoney, formatMoneyWithSymbol } from '@/shared/utils/money'
import { listingReviewStatusLabel, listingStatusLabel } from '@/utils/statusLabels'
import { formatListingCode, getListingSellerPrice } from '@/utils/listingDisplay'
@@ -103,7 +104,7 @@ function replaceListing(next: Listing) {
}
function listingPrice(row: Listing) {
return `¥${Math.round(getListingSellerPrice(row))}`
return formatMoneyWithSymbol(getListingSellerPrice(row))
}
async function copyListingCode(row: Listing) {
@@ -226,7 +227,7 @@ function isPendingReview(row: Listing) {
</div>
<div>
<span>押金</span>
<strong>¥{{ item.deposit_amount }}</strong>
<strong>¥{{ formatMoney(item.deposit_amount) }}</strong>
</div>
</div>