From d3735f83ff9f0f8ff43be22f5fc82c10fd765847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sat, 14 Mar 2026 19:09:43 +0000 Subject: [PATCH] refactor(platform_orders): use BackUrl::withBackAndFragment for anchor links in index --- .../views/admin/platform_orders/index.blade.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 673d754..a19161e 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -1222,10 +1222,10 @@ $rowDelta = (float) ($order->reconciliation_delta_row ?? 0); // 统一口径:按分取整判断是否对账不一致,避免浮点误差导致 0.01 边界不稳定 $isReconcileMismatchRow = (bool) $order->isReconcileMismatch(); - $reconcileShowUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#payment-receipts'; + $reconcileShowUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'payment-receipts'); @endphp @if($isReconcileMismatchRow) - @php $reconcileFixUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#add-payment-receipt'; @endphp + @php $reconcileFixUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'add-payment-receipt'); @endphp ¥{{ number_format($rowDelta, 2) }}
对账不一致 @@ -1244,7 +1244,7 @@ @endphp @if($receiptCount > 0) @php - $receiptCountShowUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#payment-receipts'; + $receiptCountShowUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'payment-receipts'); @endphp {{ $receiptCount }} @else @@ -1259,7 +1259,7 @@ @endphp @if($refundCount > 0) @php - $refundCountShowUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#refund-receipts'; + $refundCountShowUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'refund-receipts'); @endphp {{ $refundCount }} @else @@ -1271,11 +1271,11 @@ $refundTotal = (float) $order->refundTotal(); $isRefundInconsistent = (bool) $order->isRefundInconsistent(); - $refundShowUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#refund-receipts'; + $refundShowUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'refund-receipts'); @endphp @if($refundTotal > 0) @if($isRefundInconsistent) - @php $refundFixUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#refund-receipts'; @endphp + @php $refundFixUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'refund-receipts'); @endphp ¥{{ number_format($refundTotal, 2) }}
疑似不一致 @@ -1307,8 +1307,8 @@ // 精简视图也要可达的“治理入口”:不要只依赖可选列(col-optional)里的提示 $needReconcileFix = (bool) $order->isReconcileMismatch(); $needRefundFix = (bool) $order->isRefundInconsistent(); - $reconcileFixUrlCompact = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#add-payment-receipt'; - $refundFixUrlCompact = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#refund-receipts'; + $reconcileFixUrlCompact = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'add-payment-receipt'); + $refundFixUrlCompact = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'refund-receipts'); @endphp @if($needReconcileFix || $needRefundFix)