From c45896bdf7fc7ddd0284be25045ab04650af39c5 Mon Sep 17 00:00:00 2001
From: qiuxiang <394405259@qq.com>
Date: Tue, 10 Nov 2026 13:30:24 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9C=88=E5=BA=A6=E6=9C=9F=E6=9C=AB?=
=?UTF-8?q?=E4=BD=99=E9=A2=9D=E6=B1=87=E6=80=BB=E6=94=B9=E4=B8=BA=E4=B8=87?=
=?UTF-8?q?=E5=85=83=E5=B1=95=E7=A4=BA=20(#1033)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
月度余额及环比金额统一按万元展示。
---
.../StoreReceivingBalanceOverview.vue | 20 +++++++++----------
.../StoreReceivingBalanceOverviewTest.php | 5 +++++
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/resources/assets/js/components/business/StoreReceivingBalanceOverview.vue b/resources/assets/js/components/business/StoreReceivingBalanceOverview.vue
index 601d2e58..a973515d 100644
--- a/resources/assets/js/components/business/StoreReceivingBalanceOverview.vue
+++ b/resources/assets/js/components/business/StoreReceivingBalanceOverview.vue
@@ -132,7 +132,7 @@
月度期末余额汇总
新增
- 2026 年 7-10 月各平台期末余额 · 金额单位:元
+ 2026 年 7-10 月各平台期末余额 · 金额单位:万元
{{ monthlyClosing.summary.available_platform_count }} / {{ monthlyClosing.summary.platform_count }} 个平台
@@ -167,10 +167,10 @@
>
{{ row.name }} |
- {{ monthlyBalance(row, month.key) }}
+ {{ monthlyBalanceWan(row, month.key) }}
|
- {{ signedMoney(row.change.amount) }}
+ {{ signedMoneyWan(row.change.amount) }}
{{ signedPercent(row.change.rate) }}
@@ -180,7 +180,7 @@
@@ -756,24 +756,24 @@ export default {
return amount === '—' ? '' : `原值:${amount}`;
},
- monthlyBalance(row, month) {
+ monthlyBalanceWan(row, month) {
const value = row && row.balances ? row.balances[month] : null;
if (value === null || value === undefined || !Number.isFinite(Number(value))) return '—';
- return Number(value).toLocaleString('zh-CN', {
+ return `¥${(Number(value) / 10000).toLocaleString('zh-CN', {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
- });
+ })}万`;
},
- signedMoney(value) {
+ signedMoneyWan(value) {
if (value === null || value === undefined || !Number.isFinite(Number(value))) return '—';
const amount = Number(value);
const sign = amount > 0 ? '+' : '';
- return `${sign}${amount.toLocaleString('zh-CN', {
+ return `${sign}¥${(amount / 10000).toLocaleString('zh-CN', {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
- })}`;
+ })}万`;
},
signedPercent(value) {
if (value === null || value === undefined || !Number.isFinite(Number(value))) return '';
diff --git a/tests/Unit/View/StoreReceivingBalanceOverviewTest.php b/tests/Unit/View/StoreReceivingBalanceOverviewTest.php
index d8a6829c..96199a7a 100644
--- a/tests/Unit/View/StoreReceivingBalanceOverviewTest.php
+++ b/tests/Unit/View/StoreReceivingBalanceOverviewTest.php
@@ -70,6 +70,11 @@ class StoreReceivingBalanceOverviewTest extends TestCase
$this->assertStringContainsString('平台账户', $source);
$this->assertStringContainsString('monthly-closing-table', $source);
$this->assertStringContainsString('2026 年 7-10 月各平台期末余额', $source);
+ $this->assertStringContainsString('金额单位:万元', $source);
+ $this->assertStringContainsString('monthlyBalanceWan', $source);
+ $this->assertStringContainsString('signedMoneyWan', $source);
+ $this->assertStringContainsString('Number(value) / 10000', $source);
+ $this->assertStringContainsString('amount / 10000', $source);
$this->assertStringContainsString('环比口径:2026年10月期末余额 − 2026年9月期末余额', $source);
$this->assertStringContainsString('monthlyClosingRows', $source);
$this->assertStringContainsString('fetchMonthlyClosing', $source);
|