From 4aa44258f8a2dc5f7a3c73b2663530ea6468cfe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sat, 14 Mar 2026 17:59:46 +0000 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E9=87=8F=E5=9B=9E=E5=BD=92=EF=BC=9A?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=AE=A2=E5=8D=95=E8=A1=8C=E7=BA=A7=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E9=93=BE=E6=8E=A5=E6=90=BA=E5=B8=A6back=EF=BC=88?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=9B=B4=E6=96=B0=E6=B5=8B=E8=AF=95=E6=96=AD?= =?UTF-8?q?=E8=A8=80=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/platform_orders/index.blade.php | 18 +++++++++--------- ...atformOrderReconcileMismatchRowHintTest.php | 15 +++++++++------ ...derRefundInconsistentRowHintFixLinkTest.php | 11 +++++++---- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 8ca6ae3..caf5f77 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -1076,7 +1076,7 @@ @php $hasReceiptEvidenceRow = (data_get($order->meta, 'payment_summary.total_amount') !== null) || (data_get($order->meta, 'payment_receipts.0.amount') !== null); - $noReceiptFixUrlRow = '/admin/platform-orders/' . $order->id . '#add-payment-receipt'; + $noReceiptFixUrlRow = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#add-payment-receipt'; @endphp @if($order->payment_status === 'paid' && ! $hasReceiptEvidenceRow)
@@ -1287,10 +1287,10 @@ $rowDelta = (float) ($order->reconciliation_delta_row ?? 0); // 统一口径:按分取整判断是否对账不一致,避免浮点误差导致 0.01 边界不稳定 $isReconcileMismatchRow = (bool) $order->isReconcileMismatch(); - $reconcileShowUrl = '/admin/platform-orders/' . $order->id . '#payment-receipts'; + $reconcileShowUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#payment-receipts'; @endphp @if($isReconcileMismatchRow) - @php $reconcileFixUrl = '/admin/platform-orders/' . $order->id . '#add-payment-receipt'; @endphp + @php $reconcileFixUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#add-payment-receipt'; @endphp ¥{{ number_format($rowDelta, 2) }}
对账不一致 @@ -1309,7 +1309,7 @@ @endphp @if($receiptCount > 0) @php - $receiptCountShowUrl = '/admin/platform-orders/' . $order->id . '#payment-receipts'; + $receiptCountShowUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#payment-receipts'; @endphp {{ $receiptCount }} @else @@ -1324,7 +1324,7 @@ @endphp @if($refundCount > 0) @php - $refundCountShowUrl = '/admin/platform-orders/' . $order->id . '#refund-receipts'; + $refundCountShowUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#refund-receipts'; @endphp {{ $refundCount }} @else @@ -1336,11 +1336,11 @@ $refundTotal = (float) $order->refundTotal(); $isRefundInconsistent = (bool) $order->isRefundInconsistent(); - $refundShowUrl = '/admin/platform-orders/' . $order->id . '#refund-receipts'; + $refundShowUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#refund-receipts'; @endphp @if($refundTotal > 0) @if($isRefundInconsistent) - @php $refundFixUrl = '/admin/platform-orders/' . $order->id . '#refund-receipts'; @endphp + @php $refundFixUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $selfWithoutBack]) . '#refund-receipts'; @endphp ¥{{ number_format($refundTotal, 2) }}
疑似不一致 @@ -1372,8 +1372,8 @@ // 精简视图也要可达的“治理入口”:不要只依赖可选列(col-optional)里的提示 $needReconcileFix = (bool) $order->isReconcileMismatch(); $needRefundFix = (bool) $order->isRefundInconsistent(); - $reconcileFixUrlCompact = '/admin/platform-orders/' . $order->id . '#add-payment-receipt'; - $refundFixUrlCompact = '/admin/platform-orders/' . $order->id . '#refund-receipts'; + $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'; @endphp @if($needReconcileFix || $needRefundFix) diff --git a/tests/Feature/AdminPlatformOrderReconcileMismatchRowHintTest.php b/tests/Feature/AdminPlatformOrderReconcileMismatchRowHintTest.php index 8c81400..015df16 100644 --- a/tests/Feature/AdminPlatformOrderReconcileMismatchRowHintTest.php +++ b/tests/Feature/AdminPlatformOrderReconcileMismatchRowHintTest.php @@ -62,11 +62,14 @@ class AdminPlatformOrderReconcileMismatchRowHintTest extends TestCase ], ]); - $this->get('/admin/platform-orders?reconcile_mismatch=1') - ->assertOk() - ->assertSee('PO_RECON_ROW_HINT_0001') - ->assertSee('/admin/platform-orders/' . $order->id . '#payment-receipts', false) - ->assertSee('/admin/platform-orders/' . $order->id . '#add-payment-receipt', false) - ->assertSee('对账不一致'); + $res = $this->get('/admin/platform-orders?reconcile_mismatch=1'); + $res->assertOk(); + $res->assertSee('PO_RECON_ROW_HINT_0001'); + + $indexSelfWithoutBack = '/admin/platform-orders?reconcile_mismatch=1'; + + $res->assertSee('/admin/platform-orders/' . $order->id . '?back=' . urlencode($indexSelfWithoutBack) . '#payment-receipts', false); + $res->assertSee('/admin/platform-orders/' . $order->id . '?back=' . urlencode($indexSelfWithoutBack) . '#add-payment-receipt', false); + $res->assertSee('对账不一致'); } } diff --git a/tests/Feature/AdminPlatformOrderRefundInconsistentRowHintFixLinkTest.php b/tests/Feature/AdminPlatformOrderRefundInconsistentRowHintFixLinkTest.php index 969b3f5..7b4f8e0 100644 --- a/tests/Feature/AdminPlatformOrderRefundInconsistentRowHintFixLinkTest.php +++ b/tests/Feature/AdminPlatformOrderRefundInconsistentRowHintFixLinkTest.php @@ -63,9 +63,12 @@ class AdminPlatformOrderRefundInconsistentRowHintFixLinkTest extends TestCase ], ]); - $this->get('/admin/platform-orders?refund_inconsistent=1') - ->assertOk() - ->assertSee('/admin/platform-orders/' . $order->id . '#refund-receipts', false) - ->assertSee('去核对退款'); + $res = $this->get('/admin/platform-orders?refund_inconsistent=1'); + $res->assertOk(); + + $indexSelfWithoutBack = '/admin/platform-orders?refund_inconsistent=1'; + + $res->assertSee('/admin/platform-orders/' . $order->id . '?back=' . urlencode($indexSelfWithoutBack) . '#refund-receipts', false); + $res->assertSee('去核对退款'); } }