新增财务仪表盘并统一金额到角
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { computed } from 'vue'
|
||||
import { RouterLink } from 'vue-router'
|
||||
import type { Listing } from '@/features/listings'
|
||||
import { formatMoney } from '@/shared/utils/money'
|
||||
import {
|
||||
formatHafCoinM,
|
||||
getCoinWan,
|
||||
@@ -135,11 +136,11 @@ function formatStatNumber(value: number) {
|
||||
<div class="card-price">
|
||||
<div class="price-item total">
|
||||
<small>总租金</small>
|
||||
<strong>¥{{ getListingDisplayPrice(listing) }}</strong>
|
||||
<strong>¥{{ formatMoney(getListingDisplayPrice(listing)) }}</strong>
|
||||
</div>
|
||||
<div class="price-item deposit">
|
||||
<small>押金</small>
|
||||
<span>¥{{ listing.deposit_amount }}</span>
|
||||
<span>¥{{ formatMoney(listing.deposit_amount) }}</span>
|
||||
</div>
|
||||
<div class="price-action">
|
||||
<button class="rent-btn">立即租用</button>
|
||||
|
||||
@@ -67,7 +67,7 @@ onMounted(async () => {
|
||||
})
|
||||
|
||||
const orderTotal = computed(() => {
|
||||
if (!listing.value) return '0'
|
||||
if (!listing.value) return '0.0'
|
||||
return formatMoney(getListingDisplayPrice(listing.value))
|
||||
})
|
||||
|
||||
@@ -102,7 +102,7 @@ const detailMetrics = computed(() => {
|
||||
tone: 'coin',
|
||||
},
|
||||
{ label: '价格', value: `¥${orderTotal.value}`, tone: 'price' },
|
||||
{ label: '押金', value: `¥${listing.value.deposit_amount}`, tone: '' },
|
||||
{ label: '押金', value: `¥${formatMoney(listing.value.deposit_amount)}`, tone: '' },
|
||||
]
|
||||
})
|
||||
|
||||
@@ -401,7 +401,7 @@ function listingPrice(item: Listing) {
|
||||
<strong>{{ resource.quantity }}</strong>
|
||||
<em>
|
||||
<b>{{ resource.mode || '--' }}</b>
|
||||
<small v-if="resource.amount > 0">¥{{ resource.amount }}</small>
|
||||
<small v-if="resource.amount > 0">¥{{ formatMoney(resource.amount) }}</small>
|
||||
<small v-else-if="resource.mode === '收费'">{{ resource.price || '¥0' }}</small>
|
||||
<small v-else>无额外收费</small>
|
||||
</em>
|
||||
@@ -458,14 +458,14 @@ function listingPrice(item: Listing) {
|
||||
<div class="order-price-breakdown">
|
||||
<div>
|
||||
<span>基础租金</span>
|
||||
<strong>¥{{ orderPriceBreakdown.rent }}</strong>
|
||||
<strong>¥{{ formatMoney(orderPriceBreakdown.rent) }}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>额外物品</span>
|
||||
<strong>¥{{ orderPriceBreakdown.consumable }}</strong>
|
||||
<strong>¥{{ formatMoney(orderPriceBreakdown.consumable) }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<em>押金另付 ¥{{ listing.deposit_amount }}</em>
|
||||
<em>押金另付 ¥{{ formatMoney(listing.deposit_amount) }}</em>
|
||||
</div>
|
||||
<dl class="order-check-list">
|
||||
<div>
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
type ListingPublishOptions,
|
||||
} from '@/features/listings/api/listingOptions'
|
||||
import { fetchListings, type Listing } from '@/features/listings/api/listings'
|
||||
import { formatMoney } from '@/shared/utils/money'
|
||||
import {
|
||||
defaultHomeAnnouncements,
|
||||
defaultHomeBanners,
|
||||
@@ -620,8 +621,8 @@ function parseQuantityUnit(price: string) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="resource-price-box">
|
||||
<strong>¥{{ getListingDisplayPrice(item) }}</strong>
|
||||
<span class="rent-sub">押金¥{{ item.deposit_amount }}</span>
|
||||
<strong>¥{{ formatMoney(getListingDisplayPrice(item)) }}</strong>
|
||||
<span class="rent-sub">押金¥{{ formatMoney(item.deposit_amount) }}</span>
|
||||
</div>
|
||||
</RouterLink>
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { showToast } from 'vant'
|
||||
import MobileBottomNav from '@/components/MobileBottomNav.vue'
|
||||
|
||||
import { ensureSupportChat } from '@/features/chats/api/chats'
|
||||
import { formatMoney } from '@/shared/utils/money'
|
||||
import {
|
||||
emptyListingPublishOptions,
|
||||
type ListingPublishOptions,
|
||||
@@ -695,8 +696,8 @@ function chipTone(label: string) {
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="price-col">
|
||||
<strong>¥{{ getListingDisplayPrice(item) }}</strong>
|
||||
<span class="rent-sub">押金 ¥{{ item.deposit_amount }}</span>
|
||||
<strong>¥{{ formatMoney(getListingDisplayPrice(item)) }}</strong>
|
||||
<span class="rent-sub">押金 ¥{{ formatMoney(item.deposit_amount) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -94,8 +94,8 @@ const detailMetrics = computed(() => {
|
||||
value: dailyLoss ? `${dailyLoss}/天` : '--',
|
||||
tone: 'coin',
|
||||
},
|
||||
{ label: '价格', value: `¥${getListingDisplayPrice(listing.value)}`, tone: 'price' },
|
||||
{ label: '押金', value: `¥${listing.value.deposit_amount}`, tone: '' },
|
||||
{ label: '价格', value: `¥${formatMoney(getListingDisplayPrice(listing.value))}`, tone: 'price' },
|
||||
{ label: '押金', value: `¥${formatMoney(listing.value.deposit_amount)}`, tone: '' },
|
||||
]
|
||||
})
|
||||
|
||||
@@ -369,7 +369,7 @@ async function copyListingCode() {
|
||||
<strong>{{ resource.quantity }}</strong>
|
||||
<em>
|
||||
<b>{{ resource.mode || '--' }}</b>
|
||||
<small v-if="resource.amount > 0">¥{{ resource.amount }}</small>
|
||||
<small v-if="resource.amount > 0">¥{{ formatMoney(resource.amount) }}</small>
|
||||
<small v-else-if="resource.mode === '收费'">{{ resource.price || '¥0' }}</small>
|
||||
<small v-else>无额外收费</small>
|
||||
</em>
|
||||
@@ -414,8 +414,8 @@ async function copyListingCode() {
|
||||
<span class="price-amount">¥{{ orderTotal }}</span>
|
||||
</div>
|
||||
<div class="order-price-detail">
|
||||
<span>租金 ¥{{ orderPriceBreakdown.rent }}</span>
|
||||
<span>额外 ¥{{ orderPriceBreakdown.consumable }}</span>
|
||||
<span>租金 ¥{{ formatMoney(orderPriceBreakdown.rent) }}</span>
|
||||
<span>额外 ¥{{ formatMoney(orderPriceBreakdown.consumable) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-button
|
||||
|
||||
Reference in New Issue
Block a user