From 4c3d3826334e37e543bb7f5cdf2a51eeafc2fbf1 Mon Sep 17 00:00:00 2001
From: shanshi <3316401569@qq.com>
Date: Thu, 12 Nov 2026 19:09:54 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=E8=B4=A6=E6=88=B7=E5=9F=BA?=
=?UTF-8?q?=E6=9C=AC=E4=BF=A1=E6=81=AF=E7=A7=BB=E5=85=A5=E8=B4=A6=E6=88=B7?=
=?UTF-8?q?=E8=B5=84=E9=87=91=E6=B1=87=E6=80=BB=20(#1141)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
将账户基本信息卡片索引迁入账户资金汇总,并移除账户总表中的入口。
---
.../View/FinanceLedgerPageData.php | 27 +++----
.../pages/financial-ledger/ledger.blade.php | 70 ++++++++-----------
.../partials/account-home-tabs.blade.php | 8 ++-
.../partials/account-type-cards.blade.php | 26 +++++++
.../Business/FinanceLedgerNavigationTest.php | 37 ++++++++--
5 files changed, 103 insertions(+), 65 deletions(-)
create mode 100644 resources/views/business/pages/financial-ledger/partials/account-type-cards.blade.php
diff --git a/modules/EcommerceFinance/View/FinanceLedgerPageData.php b/modules/EcommerceFinance/View/FinanceLedgerPageData.php
index 6f2ef946..980f952f 100644
--- a/modules/EcommerceFinance/View/FinanceLedgerPageData.php
+++ b/modules/EcommerceFinance/View/FinanceLedgerPageData.php
@@ -88,11 +88,11 @@ class FinanceLedgerPageData
$openingDate = (string) config('finance_ledger.opening_date', '2026-10-17');
$transactionView = $this->transactionView();
$requestedFlowView = trim((string) request('flows_view', 'summary'));
- $flowView = in_array($requestedFlowView, ['summary', 'bank', 'non_store', 'wangshang', 'wallet', 'daily'], true)
+ $flowView = in_array($requestedFlowView, ['summary', 'bank', 'non_store', 'wangshang', 'wallet', 'daily', 'basic'], true)
? $requestedFlowView
: 'summary';
$requestedAccountView = trim((string) request('accounts_view', 'all'));
- $accountView = in_array($requestedAccountView, ['all', 'basic', 'bank', 'non_store', 'wangshang', 'wallet', 'other'], true)
+ $accountView = in_array($requestedAccountView, ['all', 'bank', 'non_store', 'wangshang', 'wallet', 'other'], true)
? $requestedAccountView
: 'all';
$flowPeriod = $this->dateRange('flows');
@@ -101,21 +101,16 @@ class FinanceLedgerPageData
$sourcePeriod = $this->dateRange('sources');
$accountDisplayLabels = $this->accountDisplayLabels();
- $accounts = $accountView === 'basic'
- ? [
- 'rows' => collect(),
- 'summary' => [
- 'count' => 0,
- 'unretained' => 0,
- 'current_balance' => 0,
- 'balance' => 0,
- 'blocked' => 0,
- ],
- ]
- : $this->accounts($accountView, $accountDisplayLabels);
+ $accounts = $this->accounts($accountView, $accountDisplayLabels);
$shops = $this->shops();
$availableBreakdown = $this->availableBreakdown($shops);
- $flows = $this->flows($flowPeriod, $flowView, $accountDisplayLabels);
+ $flows = $flowView === 'basic'
+ ? [
+ 'rows' => collect(),
+ 'summary' => ['count' => 0, 'opening' => 0, 'inflow' => 0, 'outflow' => 0, 'closing' => 0],
+ 'custom_fields' => [],
+ ]
+ : $this->flows($flowPeriod, $flowView, $accountDisplayLabels);
$transactions = $this->transactions($transactionView['account_short'], $transactionPeriod);
$transactionViewIsIndependent = (bool) ($transactionView['independent'] ?? false);
$transactionViewAccountExists = $transactionViewIsIndependent
@@ -132,7 +127,7 @@ class FinanceLedgerPageData
'ledgerAccountView' => $accountView,
'ledgerAccounts' => $accounts['rows'],
'ledgerAccountSummary' => $accounts['summary'],
- 'ledgerAccountTypeCards' => $accountView === 'basic' ? $this->accountTypeCards() : [],
+ 'ledgerAccountTypeCards' => $flowView === 'basic' ? $this->accountTypeCards() : [],
'ledgerShops' => $shops['rows'],
'ledgerShopSummary' => $shops['summary'],
'ledgerShopBalanceDate' => $shops['balance_date'] ?? null,
diff --git a/resources/views/business/pages/financial-ledger/ledger.blade.php b/resources/views/business/pages/financial-ledger/ledger.blade.php
index 39bbf170..7f77a045 100644
--- a/resources/views/business/pages/financial-ledger/ledger.blade.php
+++ b/resources/views/business/pages/financial-ledger/ledger.blade.php
@@ -72,6 +72,8 @@
'accounts_filter_value',
'accounts_sort',
'accounts_direction',
+ 'flows_view',
+ 'txns_view',
])
->filter(static fn ($value): bool => is_scalar($value) || $value === null)
->all();
@@ -92,7 +94,7 @@
$currentMonthEnd = now()->endOfMonth()->toDateString();
$flowPeriod = $ledgerFlowPeriod ?? ['from' => $currentMonthStart, 'to' => $currentMonthEnd];
$flowView = $ledgerFlowView ?? 'summary';
- $flowUsesAccountSummary = $flowView !== 'daily';
+ $flowUsesAccountSummary = ! in_array($flowView, ['daily', 'basic'], true);
$flowSummaryCustomFields = $ledgerFlowSummaryCustomFields ?? [];
$transactionPeriod = $ledgerTransactionPeriod ?? ['from' => $currentMonthStart, 'to' => $currentMonthEnd];
$mappingPeriod = $ledgerMappingPeriod ?? ['from' => $currentMonthStart, 'to' => $currentMonthEnd];
@@ -117,7 +119,15 @@
$transactionDateHeaderOptions = $ledgerTransactionDateHeaderOptions ?? [];
$optionMap = static fn (array $values): array => array_combine($values, $values) ?: [];
$flowViewQuery = collect(request()->query())
- ->except(['flows_page', 'flows_filter_column', 'flows_filter_value', 'flows_sort', 'flows_direction'])
+ ->except([
+ 'flows_page',
+ 'flows_filter_column',
+ 'flows_filter_value',
+ 'flows_sort',
+ 'flows_direction',
+ 'accounts_view',
+ 'txns_view',
+ ])
->filter(static fn ($value): bool => is_scalar($value) || $value === null)
->all();
$flowViewUrl = static fn (string $view): string => $ledgerPageUrl . '?' . http_build_query(array_merge(
@@ -125,14 +135,21 @@
['tab' => 'flows', 'flows_view' => $view],
));
$transactionViewQuery = collect(request()->query())
- ->except(['txns_page', 'txns_filter_column', 'txns_filter_value', 'txns_sort', 'txns_direction'])
+ ->except([
+ 'txns_page',
+ 'txns_filter_column',
+ 'txns_filter_value',
+ 'txns_sort',
+ 'txns_direction',
+ 'accounts_view',
+ 'flows_view',
+ ])
->filter(static fn ($value): bool => is_scalar($value) || $value === null)
->all();
$transactionViewUrl = static fn (string $view): string => $ledgerPageUrl . '?' . http_build_query(array_merge(
$transactionViewQuery,
['tab' => 'transactions', 'txns_view' => $view],
));
- $accountBasicViewUrl = $accountViewUrl('basic');
$flowSummaryEditDate = now()->toDateString();
if (($flowPeriod['to'] ?? null) !== null && $flowSummaryEditDate > $flowPeriod['to']) {
$flowSummaryEditDate = $flowPeriod['to'];
@@ -705,34 +722,6 @@
{{-- 账户总表 --}}
点击账户类型卡片查看对应账户资料;每种账户只展示自己需要的表头。 {{ $card['description'] }}账户基本信息
-
-
-
- @endforeach
-
点击账户类型卡片查看对应账户资料;每种账户只展示自己需要的表头。
+{{ $card['description'] }}
+