From 9f6a5f6fde6d8c1745f37ca1d3c161ddd2310d7d Mon Sep 17 00:00:00 2001
From: zhoushengchen <3057083327@qq.com>
Date: Mon, 12 Oct 2026 13:47:01 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=80=E8=B4=A7=E5=8F=96=E4=BB=B6=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=EF=BC=9A=E6=95=B4=E8=A1=8C=E7=82=B9=E5=87=BB=E5=BC=82?=
=?UTF-8?q?=E6=AD=A5=E5=8A=A0=E8=BD=BD=E8=AF=A6=E6=83=85=EF=BC=8C=E6=9C=AC?=
=?UTF-8?q?=E5=9C=B0=20opcache=20=E6=8F=90=E9=80=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/Http/Controllers/Business/Pages.php | 24 +++
deploy/php-local.ini | 10 +-
.../partials/return-pickup-detail.blade.php | 115 ++++++++++
.../return-pickup-management.blade.php | 201 ++++++++----------
routes/admin.php | 4 +
.../ReturnPickupManagementPageTest.php | 80 +++++++
6 files changed, 315 insertions(+), 119 deletions(-)
create mode 100644 resources/views/business/pages/courier-payables/partials/return-pickup-detail.blade.php
diff --git a/app/Http/Controllers/Business/Pages.php b/app/Http/Controllers/Business/Pages.php
index e7136f59..aa11cafe 100644
--- a/app/Http/Controllers/Business/Pages.php
+++ b/app/Http/Controllers/Business/Pages.php
@@ -6247,6 +6247,30 @@ class Pages extends Controller
);
}
+ /** 详情局部刷新:点行后只返回详情面板,避免整页重载。 */
+ public function returnPickupManagementDetail(Request $request): \Illuminate\Contracts\View\View
+ {
+ $pickupId = max((int) $request->query('pickup_id', 0), 0);
+
+ abort_if($pickupId <= 0, 404);
+
+ $repository = app(\Modules\EcommerceFinance\Repositories\ReturnPickupManagementMirrorRepository::class);
+ $detail = $this->enrichReturnPickupDetail(
+ $repository->detail($pickupId),
+ $repository->warehouseDirectory(),
+ );
+
+ abort_if($detail === null, 404);
+
+ return view('business.pages.courier-payables.partials.return-pickup-detail', [
+ 'detail' => $detail,
+ 'closeUrl' => route('business.pages.show', [
+ 'section' => 'courier-payables',
+ 'page' => 'return-pickup-management',
+ ]),
+ ]);
+ }
+
protected function contentForReturnPickupManagement(): array
{
$filters = $this->returnPickupFilters(request());
diff --git a/deploy/php-local.ini b/deploy/php-local.ini
index 812a4875..b46b0273 100644
--- a/deploy/php-local.ini
+++ b/deploy/php-local.ini
@@ -1,6 +1,10 @@
-; Local development serves bind-mounted PHP/Blade source directly. Disable
-; opcode caching so a browser refresh always executes the current source.
-opcache.enable=0
+; Local development serves bind-mounted PHP/Blade source directly. Keep opcode
+; caching on with per-request timestamp validation so a browser refresh still
+; executes the current source, without recompiling the whole framework each time.
+opcache.enable=1
opcache.enable_cli=0
opcache.validate_timestamps=1
opcache.revalidate_freq=0
+opcache.memory_consumption=256
+opcache.max_accelerated_files=40000
+opcache.interned_strings_buffer=16
diff --git a/resources/views/business/pages/courier-payables/partials/return-pickup-detail.blade.php b/resources/views/business/pages/courier-payables/partials/return-pickup-detail.blade.php
new file mode 100644
index 00000000..caff0bde
--- /dev/null
+++ b/resources/views/business/pages/courier-payables/partials/return-pickup-detail.blade.php
@@ -0,0 +1,115 @@
+ @if ($detail !== null)
+ @php
+ $main = $detail['main'];
+ @endphp
+
+
+
+
+
+
+
+ @forelse ($detail['items'] as $item)
+ @php
+ $volumeWeight = ($item->length && $item->width && $item->height)
+ ? round(((float) $item->length * (float) $item->width * (float) $item->height) / 6000, 2)
+ : null;
+ @endphp
+ 应退货号
+ 实退货号
+ 平台商品id
+ 平台skuid
+ 条形码
+ 品名
+ 应退数量
+ 实退数量
+ 待核销数量
+ 明细退货进度
+ 发货仓
+ 收件人
+ 收件地址
+ 长
+ 宽
+ 高
+ 毛重(kg)
+ 体积重(kg)
+ 重量取大(kg)
+ 计费重量(kg)
+ 面单(元)
+ 费率(元/kg)
+ 预估运费(元)
+ 实际运费(元)
+ 未算出原因
+ 加收(元)
+ 差异(元)
+ 实退单号
+
+
+ @empty
+ {{ $item->returnProcode ?: '-' }}
+ {{ $item->actualReturnProcode ?: '-' }}
+ {{ $item->platformProductId ?: '-' }}
+ {{ $item->platformSkuId ?: '-' }}
+ {{ $item->barcode ?: '-' }}
+ {{ $item->productName ?: '-' }}
+ {{ $item->returnQuantity ?? '-' }}
+ {{ $item->actualReturnQuantity ?? '-' }}
+ {{ $item->unverifiedQuantity ?? '-' }}
+ {{ $item->returnProgress ?: '-' }}
+ {{ ($item->warehouse_name ?? null) ?: ($item->warehouse ?: '-') }}
+ {{ $item->receiverName ?: '-' }} {{ $item->receiverPhone ?: '' }}
+ {{ $item->receiverAddress ?: '-' }}
+ {{ $item->length !== null ? number_format((float) $item->length, 2) : '-' }}
+ {{ $item->width !== null ? number_format((float) $item->width, 2) : '-' }}
+ {{ $item->height !== null ? number_format((float) $item->height, 2) : '-' }}
+ {{ $item->grossWeight !== null ? number_format((float) $item->grossWeight, 2) : '-' }}
+ {{ $volumeWeight !== null ? number_format($volumeWeight, 2) : '-' }}
+ {{ $item->freight_settlement !== null ? number_format((float) $item->freight_settlement, 2) : '—' }}
+ {{ $item->freight_billable !== null ? number_format((float) $item->freight_billable, 2) : '—' }}
+ {{ $item->freight_base_amount !== null ? number_format((float) $item->freight_base_amount, 2) : '—' }}
+ {{ $item->freight_increment_amount !== null ? number_format((float) $item->freight_increment_amount, 2) : '—' }}
+ {{ $item->estimatedFreight !== null ? number_format((float) $item->estimatedFreight, 2) : '-' }}
+
+ {{ $item->actual_freight !== null ? number_format((float) $item->actual_freight, 2) : '—' }}
+
+
+ {{ $item->actual_freight === null ? ($item->freight_note ?: '未匹配到报价') : '—' }}
+
+
+ {{ ($item->freight_surcharge ?? 0) > 0 ? number_format((float) $item->freight_surcharge, 2) : '—' }}
+
+
+ @if ($item->freight_diff !== null)
+ {{ number_format((float) $item->freight_diff, 2) }}
+ @else
+ —
+ @endif
+
+ {{ $item->actualReturnOrderNo ?: '-' }}
+
+ @endforelse
+
+ @if (($detail['totals'] ?? null) !== null)
+
+ 该取件单暂无明细分录。
+
+
+ @endif
+ 合计({{ count($detail['items']) }} 条明细,差异 = 预估 − 实际运费,加收单列)
+ {{ number_format((float) $detail['totals']['estimated'], 2) }}
+ {{ $detail['totals']['actual'] !== null ? number_format((float) $detail['totals']['actual'], 2) : '—' }}
+ —
+ {{ ($detail['totals']['surcharge'] ?? 0) > 0 ? number_format((float) $detail['totals']['surcharge'], 2) : '—' }}
+
+ {{ $detail['totals']['diff'] !== null ? number_format((float) $detail['totals']['diff'], 2) : '—' }}
+
+ —
+
| 应退货号 | -实退货号 | -平台商品id | -平台skuid | -条形码 | -品名 | -应退数量 | -实退数量 | -待核销数量 | -明细退货进度 | -发货仓 | -收件人 | -收件地址 | -长 | -宽 | -高 | -毛重(kg) | -体积重(kg) | -重量取大(kg) | -计费重量(kg) | -面单(元) | -费率(元/kg) | -预估运费(元) | -实际运费(元) | -未算出原因 | -加收(元) | -差异(元) | -实退单号 | -
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $item->returnProcode ?: '-' }} | -{{ $item->actualReturnProcode ?: '-' }} | -{{ $item->platformProductId ?: '-' }} | -{{ $item->platformSkuId ?: '-' }} | -{{ $item->barcode ?: '-' }} | -{{ $item->productName ?: '-' }} | -{{ $item->returnQuantity ?? '-' }} | -{{ $item->actualReturnQuantity ?? '-' }} | -{{ $item->unverifiedQuantity ?? '-' }} | -{{ $item->returnProgress ?: '-' }} | -{{ ($item->warehouse_name ?? null) ?: ($item->warehouse ?: '-') }} | -{{ $item->receiverName ?: '-' }} {{ $item->receiverPhone ?: '' }} | -{{ $item->receiverAddress ?: '-' }} | -{{ $item->length !== null ? number_format((float) $item->length, 2) : '-' }} | -{{ $item->width !== null ? number_format((float) $item->width, 2) : '-' }} | -{{ $item->height !== null ? number_format((float) $item->height, 2) : '-' }} | -{{ $item->grossWeight !== null ? number_format((float) $item->grossWeight, 2) : '-' }} | -{{ $volumeWeight !== null ? number_format($volumeWeight, 2) : '-' }} | -{{ $item->freight_settlement !== null ? number_format((float) $item->freight_settlement, 2) : '—' }} | -{{ $item->freight_billable !== null ? number_format((float) $item->freight_billable, 2) : '—' }} | -{{ $item->freight_base_amount !== null ? number_format((float) $item->freight_base_amount, 2) : '—' }} | -{{ $item->freight_increment_amount !== null ? number_format((float) $item->freight_increment_amount, 2) : '—' }} | -{{ $item->estimatedFreight !== null ? number_format((float) $item->estimatedFreight, 2) : '-' }} | -- {{ $item->actual_freight !== null ? number_format((float) $item->actual_freight, 2) : '—' }} - | -- {{ $item->actual_freight === null ? ($item->freight_note ?: '未匹配到报价') : '—' }} - | -- {{ ($item->freight_surcharge ?? 0) > 0 ? number_format((float) $item->freight_surcharge, 2) : '—' }} - | -- @if ($item->freight_diff !== null) - {{ number_format((float) $item->freight_diff, 2) }} - @else - — - @endif - | -{{ $item->actualReturnOrderNo ?: '-' }} | -
| 该取件单暂无明细分录。 | |||||||||||||||||||||||||||
| 合计({{ count($detail['items']) }} 条明细,差异 = 预估 − 实际运费,加收单列) | -{{ number_format((float) $detail['totals']['estimated'], 2) }} | -{{ $detail['totals']['actual'] !== null ? number_format((float) $detail['totals']['actual'], 2) : '—' }} | -— | -{{ ($detail['totals']['surcharge'] ?? 0) > 0 ? number_format((float) $detail['totals']['surcharge'], 2) : '—' }} | -- {{ $detail['totals']['diff'] !== null ? number_format((float) $detail['totals']['diff'], 2) : '—' }} - | -— | -|||||||||||||||||||||