From c9f3e5b323256da8f59db614f677b1f8d9ffb672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E6=9C=A8?= <594326199@qq.com> Date: Sat, 17 Oct 2026 09:47:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=AF=B9=E8=B4=A6?= =?UTF-8?q?=EF=BC=9A=E5=8E=82=E5=AE=B6=E4=B8=8A=E4=BC=A0=E7=9A=84=E5=AF=B9?= =?UTF-8?q?=E8=B4=A6=E6=95=B0=E6=8D=AE=E6=94=B9=E4=B8=BA=E6=AF=8F=E9=A1=B5?= =?UTF-8?q?=2015=20=E8=A1=8C=20+=20=E9=A1=B5=E7=A0=81=E7=BF=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 上传的对账数据表原来一页 100 行太长:改为每页 15 行的短表,底部显示总行数/页码(首尾页+当前页附近页码、上一页/下一页),翻页保留所选厂家。 --- .../View/SupplierReconciliationPageData.php | 3 +- .../supplier-data.blade.php | 28 +++++++++++++++++-- .../Business/SupplierReconciliationTest.php | 27 ++++++++++++++++++ 3 files changed, 54 insertions(+), 4 deletions(-) diff --git a/modules/EcommerceFinance/View/SupplierReconciliationPageData.php b/modules/EcommerceFinance/View/SupplierReconciliationPageData.php index 08ad4d0d..a66abff4 100644 --- a/modules/EcommerceFinance/View/SupplierReconciliationPageData.php +++ b/modules/EcommerceFinance/View/SupplierReconciliationPageData.php @@ -15,7 +15,8 @@ use Modules\EcommerceFinance\Services\SupplierStatementStore; */ class SupplierReconciliationPageData { - private const PER_PAGE = 100; + /** 厂家上传的对账数据表:每页行数(短表 + 翻页)。 */ + private const PER_PAGE = 15; public function __construct( private readonly SupplierPayableOverrideStore $store, diff --git a/resources/views/business/pages/supplier-reconciliation/supplier-data.blade.php b/resources/views/business/pages/supplier-reconciliation/supplier-data.blade.php index e65fbb4a..f4d02676 100644 --- a/resources/views/business/pages/supplier-reconciliation/supplier-data.blade.php +++ b/resources/views/business/pages/supplier-reconciliation/supplier-data.blade.php @@ -132,13 +132,35 @@ @if ($statementTotal > $perPage) + @php + $pageCount = max((int) ceil($statementTotal / $perPage), 1); + $pageStart = max(1, min($rowsPage - 4, $pageCount - 8)); + $pageEnd = min($pageCount, $pageStart + 8); + $pageUrl = fn (int $number): string => route('business.pages.show', [ + 'section' => $section['slug'], 'page' => $page['slug'], + 'supplier' => $selectedSupplier, 'rows_page' => $number, + ]); + @endphp