From dd615aceac8e8e6a3972e695d482f146dc461f3c Mon Sep 17 00:00:00 2001
From: renshen <1005457301@qq.com>
Date: Sat, 12 Sep 2026 17:58:58 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E9=BD=90=E5=BF=AB=E9=80=92=E5=BA=94?=
=?UTF-8?q?=E4=BB=98=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=80=BB=E6=9D=A1=E6=95=B0?=
=?UTF-8?q?=E4=B8=8E=E6=80=BB=E9=A1=B5=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/Http/Controllers/Business/Pages.php | 10 ++++------
.../pages/courier-payables/agreement-signing.blade.php | 9 +++++++++
.../pages/courier-payables/courier-surcharge.blade.php | 2 +-
.../courier-payables/freight-reconciliation.blade.php | 8 ++++++--
.../courier-payables/partials/data-table.blade.php | 2 +-
.../payable-cloud-warehouse-vehicle-fee.blade.php | 6 +++---
.../pages/courier-payables/quote-management.blade.php | 6 +++---
7 files changed, 27 insertions(+), 16 deletions(-)
diff --git a/app/Http/Controllers/Business/Pages.php b/app/Http/Controllers/Business/Pages.php
index 5e868c90..af78481b 100644
--- a/app/Http/Controllers/Business/Pages.php
+++ b/app/Http/Controllers/Business/Pages.php
@@ -533,7 +533,7 @@ class Pages extends Controller
}
}
- protected function agreementTasks(?string $page): Collection
+ protected function agreementTasks(?string $page): Collection|\Illuminate\Contracts\Pagination\LengthAwarePaginator
{
if ($page !== 'agreement-signing') {
return collect();
@@ -542,8 +542,7 @@ class Pages extends Controller
try {
return CourierAgreementSignature::query()
->latest('id')
- ->limit(50)
- ->get();
+ ->paginate(50, ['*'], 'agreement_page')->withQueryString();
} catch (QueryException $exception) {
// 迁移尚未执行时仍允许打开页面;发送接口会明确提示数据库未就绪。
report($exception);
@@ -569,7 +568,7 @@ class Pages extends Controller
}
}
- protected function agreementQuoteSignatures(?string $page): Collection
+ protected function agreementQuoteSignatures(?string $page): Collection|\Illuminate\Contracts\Pagination\LengthAwarePaginator
{
if ($page !== 'agreement-signing') {
return collect();
@@ -579,8 +578,7 @@ class Pages extends Controller
return CourierQuoteSignature::query()
->with('version')
->latest('id')
- ->limit(50)
- ->get();
+ ->paginate(50, ['*'], 'agreement_page')->withQueryString();
} catch (QueryException $exception) {
// 报价签署迁移尚未执行时仍允许打开协议签署页。
report($exception);
diff --git a/resources/views/business/pages/courier-payables/agreement-signing.blade.php b/resources/views/business/pages/courier-payables/agreement-signing.blade.php
index 34ee868d..5e41b41d 100644
--- a/resources/views/business/pages/courier-payables/agreement-signing.blade.php
+++ b/resources/views/business/pages/courier-payables/agreement-signing.blade.php
@@ -1285,6 +1285,15 @@
+ @php($taskTotal = method_exists($agreementTasks, 'total') ? $agreementTasks->total() : $agreementTasks->count())
+ @php($quoteTotal = method_exists($agreementQuoteSignatures, 'total') ? $agreementQuoteSignatures->total() : $agreementQuoteSignatures->count())
+ @php($taskPages = method_exists($agreementTasks, 'lastPage') ? $agreementTasks->lastPage() : 0)
+ @php($quotePages = method_exists($agreementQuoteSignatures, 'lastPage') ? $agreementQuoteSignatures->lastPage() : 0)
+ @php($pageSource = $taskPages >= $quotePages ? $agreementTasks : $agreementQuoteSignatures)
+
规则按生效时间应用到后续结算页面
- 当前筛选结果(全部):{{ $rows->count() }} 条规则编号与操作列固定显示;列设置仅保存于当前用户
+ 当前筛选结果(全部):{{ $rows->count() }} 条 · 共 {{ $rows->isEmpty() ? 0 : 1 }} 页规则编号与操作列固定显示;列设置仅保存于当前用户
@foreach ($columns as $column)
|
diff --git a/resources/views/business/pages/courier-payables/freight-reconciliation.blade.php b/resources/views/business/pages/courier-payables/freight-reconciliation.blade.php
index 709372bd..37b01b31 100644
--- a/resources/views/business/pages/courier-payables/freight-reconciliation.blade.php
+++ b/resources/views/business/pages/courier-payables/freight-reconciliation.blade.php
@@ -87,8 +87,8 @@
| @if ($freightReconciliationPending ?? false) 正在等待物流明细镜像首次同步完成… @else 暂无符合条件的运费对账数据 @endif |
@endforelse
- @if (($freightReconciliations ?? null)?->hasPages())
- 第 {{ $freightReconciliations->currentPage() }} 页 · 本页 {{ $freightReconciliations->count() }} 条{{ $freightReconciliations->links() }}
+ @if ($freightReconciliations ?? null)
+ @if ($summaryReady) 共 {{ number_format((int) $summary['count']) }} 条 · 共 {{ (int) ceil($summary['count'] / $freightReconciliations->perPage()) }} 页 @else 总条数 / 总页数计算中 @endif · 当前第 {{ $freightReconciliations->currentPage() }} 页 · 本页 {{ $freightReconciliations->count() }} 条{{ $freightReconciliations->links() }}
@endif
@@ -117,9 +117,13 @@
current.querySelector('[data-summary-freight]').textContent = '¥ ' + new Intl.NumberFormat('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(data.freight);
current.querySelector('[data-summary-status]').textContent = '完整筛选汇总 · ' + data.computed_at;
current.dataset.summaryReady = 'true';
+ const totals = document.querySelector('[data-recon-page-totals]');
+ if (totals) totals.textContent = '共 ' + new Intl.NumberFormat('zh-CN').format(data.count) + ' 条 · 共 ' + Math.ceil(data.count / Number(totals.dataset.perPage)) + ' 页';
} catch (_) {
const status = document.querySelector('[data-courier-summary] [data-summary-status]');
if (window.location.href === locationKey && status) status.textContent = '完整汇总暂时无法计算,明细仍可正常查看。';
+ const totals = document.querySelector('[data-recon-page-totals]');
+ if (window.location.href === locationKey && totals) totals.textContent = '总条数 / 总页数暂不可用';
}
};
load();
diff --git a/resources/views/business/pages/courier-payables/partials/data-table.blade.php b/resources/views/business/pages/courier-payables/partials/data-table.blade.php
index f7eec8e6..1cba2f5e 100644
--- a/resources/views/business/pages/courier-payables/partials/data-table.blade.php
+++ b/resources/views/business/pages/courier-payables/partials/data-table.blade.php
@@ -251,7 +251,7 @@
{{ $title }}
- 共 {{ $recordCount }} 条
+ 共 {{ $recordCount }} 条 · 共 {{ $recordCount > 0 ? 1 : 0 }} 页
diff --git a/resources/views/business/pages/courier-payables/payable-cloud-warehouse-vehicle-fee.blade.php b/resources/views/business/pages/courier-payables/payable-cloud-warehouse-vehicle-fee.blade.php
index 25c707f9..eded0d9e 100644
--- a/resources/views/business/pages/courier-payables/payable-cloud-warehouse-vehicle-fee.blade.php
+++ b/resources/views/business/pages/courier-payables/payable-cloud-warehouse-vehicle-fee.blade.php
@@ -82,7 +82,7 @@
筛选:类型=快递运费,且用途同时包含“仓”“车费”
镜像状态:{{ $status }}
@if ($syncedAt) 最近同步:{{ $syncedAt }} @endif
- 共 {{ $rows?->total() ?? 0 }} 条明细
+ 共 {{ $rows?->total() ?? 0 }} 条 · 共 {{ $rows ? $rows->lastPage() : 0 }} 页
@@ -126,12 +126,12 @@
@endforelse
+
-
diff --git a/resources/views/business/pages/courier-payables/quote-management.blade.php b/resources/views/business/pages/courier-payables/quote-management.blade.php
index 3a3d01cb..5b3977b2 100644
--- a/resources/views/business/pages/courier-payables/quote-management.blade.php
+++ b/resources/views/business/pages/courier-payables/quote-management.blade.php
@@ -920,13 +920,13 @@
root.querySelector('[data-quote-result-count]').textContent = '共 ' + filteredQuotes.length + ' 个报价版本';
root.querySelector('[data-quote-page-label]').textContent = filteredQuotes.length
- ? '第 ' + currentPage + ' / ' + pageCount + ' 页'
- : '没有匹配记录';
+ ? '共 ' + filteredQuotes.length + ' 条 · 共 ' + pageCount + ' 页 · 当前第 ' + currentPage + ' 页'
+ : '共 0 条 · 共 0 页';
root.querySelector('[data-quote-page="previous"]').disabled = currentPage <= 1;
root.querySelector('[data-quote-page="next"]').disabled = currentPage >= pageCount;
tableWrap.hidden = filteredQuotes.length === 0;
empty.hidden = filteredQuotes.length !== 0;
- pagination.hidden = filteredQuotes.length === 0;
+ pagination.hidden = false;
updateUrl();
}
--
2.47.2