From 6c81dfc3bb4e0194646e694a4c8079feb1046daf Mon Sep 17 00:00:00 2001 From: shanshi <3316401569@qq.com> Date: Wed, 21 Oct 2026 11:23:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E5=8F=B0=E8=B4=A6=EF=BC=9A?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B5=E7=AD=BE=E7=AD=9B=E9=80=89=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=B8=A2=E5=A4=B1=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/pages/financial-ledger/ledger.blade.php | 3 ++- .../Business/FinanceLedgerAccountStatusTest.php | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/resources/views/business/pages/financial-ledger/ledger.blade.php b/resources/views/business/pages/financial-ledger/ledger.blade.php index 3560b03a..ae08b65d 100644 --- a/resources/views/business/pages/financial-ledger/ledger.blade.php +++ b/resources/views/business/pages/financial-ledger/ledger.blade.php @@ -17,7 +17,8 @@ ], static fn ($value): bool => trim((string) $value) !== '')); $money = static fn ($value): string => $value === null || $value === '' ? '' : number_format((float) $value, 2); $date = static fn ($value): string => $value ? \Illuminate\Support\Carbon::parse($value)->format('Y-m-d') : ''; - $tabUrl = static fn (string $tab): string => route('business.pages.show', ['section' => 'financial-ledger', 'page' => 'ledger', 'tab' => $tab]); + $ledgerPageUrl = route('business.pages.show', ['section' => 'financial-ledger', 'page' => 'ledger']); + $tabUrl = static fn (string $tab): string => $ledgerPageUrl . '?' . http_build_query(['tab' => $tab]); $sourceLabels = ['dingtalk' => '钉钉审批', 'shop' => '店铺提现', 'payable' => '供应商应付', 'store' => '店铺开店', 'workorder' => '聚工单']; @endphp diff --git a/tests/Feature/Business/FinanceLedgerAccountStatusTest.php b/tests/Feature/Business/FinanceLedgerAccountStatusTest.php index 4cef3470..085aa02f 100644 --- a/tests/Feature/Business/FinanceLedgerAccountStatusTest.php +++ b/tests/Feature/Business/FinanceLedgerAccountStatusTest.php @@ -86,6 +86,17 @@ class FinanceLedgerAccountStatusTest extends FeatureTestCase ->assertSee('value="normal" selected', false); } + public function test_financial_ledger_tab_forms_submit_to_query_tab_routes(): void + { + $pageUrl = $this->pageUrl(); + $response = $this->loginAs()->get($pageUrl)->assertOk(); + + foreach (['accounts', 'shops', 'flows', 'transactions', 'mapping'] as $tab) { + $response->assertSee('action="' . $pageUrl . '?tab=' . $tab . '"', false); + $response->assertDontSee('action="' . $pageUrl . '/' . $tab . '"', false); + } + } + public function test_account_pagination_lists_page_urls_with_current_filter(): void { $rows = [];