金额使用整数, 不再扣押金, 价格每个人看到自己的-1
This commit is contained in:
@@ -20,7 +20,7 @@ async function loadDashboard() {
|
||||
}
|
||||
|
||||
function money(value?: number) {
|
||||
return `¥${Number(value || 0).toFixed(2)}`
|
||||
return `¥${Math.round(Number(value || 0))}`
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ function readError(error: unknown, fallback: string) {
|
||||
v-model="amount"
|
||||
class="full-control panel-action"
|
||||
:min="0"
|
||||
:precision="2"
|
||||
:precision="0"
|
||||
:step="10"
|
||||
placeholder="裁决金额"
|
||||
/>
|
||||
|
||||
@@ -54,7 +54,7 @@ async function submitAction() {
|
||||
}
|
||||
|
||||
function money(value: number) {
|
||||
return `¥${Number(value || 0).toFixed(2)}`
|
||||
return `¥${Math.round(Number(value || 0))}`
|
||||
}
|
||||
|
||||
function listingPrice(row: Listing) {
|
||||
|
||||
@@ -63,7 +63,7 @@ function openEvidence(row: Listing) {
|
||||
}
|
||||
|
||||
function listingPrice(row: Listing) {
|
||||
return `¥${Number(row.price || 0).toFixed(2)}`
|
||||
return `¥${Math.round(Number(row.price || 0))}`
|
||||
}
|
||||
|
||||
function extractObjectKey(url: string) {
|
||||
|
||||
@@ -39,7 +39,7 @@ function resetFilters() {
|
||||
}
|
||||
|
||||
function money(value: number) {
|
||||
return `¥${Number(value || 0).toFixed(2)}`
|
||||
return `¥${Math.round(Number(value || 0))}`
|
||||
}
|
||||
|
||||
function listingPrice(row: Listing) {
|
||||
|
||||
@@ -75,6 +75,10 @@ function orderEstimatedEndAt() {
|
||||
if (!rentedAt || durationHours <= 0) return undefined
|
||||
return new Date(new Date(rentedAt).getTime() + durationHours * 60 * 60 * 1000).toISOString()
|
||||
}
|
||||
|
||||
function money(value: unknown) {
|
||||
return Math.round(Number(value || 0))
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -105,15 +109,15 @@ function orderEstimatedEndAt() {
|
||||
</div>
|
||||
<div class="metric-card">
|
||||
<span>订单金额</span>
|
||||
<strong>¥{{ order.rent_amount }}</strong>
|
||||
<strong>¥{{ money(order.rent_amount) }}</strong>
|
||||
</div>
|
||||
<div class="metric-card">
|
||||
<span>平台费用</span>
|
||||
<strong>¥{{ order.platform_fee }}</strong>
|
||||
<strong>¥{{ money(order.platform_fee) }}</strong>
|
||||
</div>
|
||||
<div class="metric-card">
|
||||
<span>押金</span>
|
||||
<strong>¥{{ order.deposit_amount }}</strong>
|
||||
<strong>¥{{ money(order.deposit_amount) }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ function handleSizeChange() {
|
||||
}
|
||||
|
||||
function money(value: number) {
|
||||
return `¥${value.toFixed(2)}`
|
||||
return `¥${Math.round(Number(value || 0))}`
|
||||
}
|
||||
|
||||
function directionType(direction: string) {
|
||||
|
||||
Reference in New Issue
Block a user