diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 188dfe7..1858f9d 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -553,6 +553,18 @@ @endif @endif + @if((($filters['receipt_status'] ?? '') === 'none') && $hasSyncableOnlyFilter) +
+
回执缺失提示
+
+ 当前集合为「无回执」且已勾选「只看可同步」。为保证收费闭环可治理,建议先补齐支付回执留痕,再执行批量同步订阅。 + 切到有回执集合 + + 取消只看可同步(先治理) +
+
+ @endif + @if($hasSyncFailedFilter)
同步失败治理提示
diff --git a/resources/views/admin/platform_orders/show.blade.php b/resources/views/admin/platform_orders/show.blade.php index 74250c6..f6ebd75 100644 --- a/resources/views/admin/platform_orders/show.blade.php +++ b/resources/views/admin/platform_orders/show.blade.php @@ -163,21 +163,21 @@ @if($canMarkRefunded)
当前支付状态不是「已退款」,但退款总额已达到/超过已付金额。 -
+ @csrf - +
@else
当前支付状态为「已退款」,但退款总额不足。 -
+ @csrf - +
-
+ @csrf - +
@endif @@ -186,9 +186,9 @@ @if($isRefundInconsistent) @if($order->payment_status === 'refunded') -
提示:当前订单状态为「已退款」,但退款总额小于已付金额,可能存在数据不一致,请核对退款轨迹与订单金额。
+
提示:当前订单状态为「已退款」,但退款总额小于已付金额,可能存在数据不一致,请核对退款轨迹与订单金额。
@else -
提示:退款总额已达到/超过已付金额,建议核对是否应将支付状态调整为「已退款」。
+
提示:退款总额已达到/超过已付金额,建议核对是否应将支付状态调整为「已退款」。
@endif @endif @@ -257,8 +257,8 @@
同步订阅治理提示(当前不建议/不可直接同步)
-
原因:订单命中「对账不一致/退款不一致」。为避免把“带病订单”同步到订阅,请先完成金额/状态治理。
-
+
当前订单命中「对账不一致/退款不一致」。为避免把“带病订单”同步到订阅,请先完成金额/状态治理。
+
@if($order->isReconcileMismatch()) @php $fixReceiptUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $orderShowSelf]) . '#add-payment-receipt'; diff --git a/tests/Feature/AdminPlatformOrderToolsReceiptNoneHintTest.php b/tests/Feature/AdminPlatformOrderToolsReceiptNoneHintTest.php new file mode 100644 index 0000000..0bca826 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderToolsReceiptNoneHintTest.php @@ -0,0 +1,69 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_tools_page_shows_receipt_none_hint_when_receipt_status_none_and_syncable_only_present(): void + { + $this->loginAsPlatformAdmin(); + + $merchant = Merchant::query()->firstOrFail(); + $plan = Plan::query()->create([ + 'code' => 'receipt_none_tools_hint_plan', + 'name' => '无回执工具区提示测试套餐', + 'billing_cycle' => 'monthly', + 'price' => 10, + 'list_price' => 10, + 'status' => 'active', + 'sort' => 10, + 'published_at' => now(), + ]); + + PlatformOrder::query()->create([ + 'merchant_id' => $merchant->id, + 'plan_id' => $plan->id, + 'order_no' => 'PO_RCPT_NONE_TOOLS_HINT_0001', + 'order_type' => 'renewal', + 'status' => 'activated', + 'payment_status' => 'paid', + 'plan_name' => $plan->name, + 'billing_cycle' => $plan->billing_cycle, + 'period_months' => 1, + 'quantity' => 1, + 'payable_amount' => 10, + 'paid_amount' => 10, + 'placed_at' => now(), + 'paid_at' => now(), + 'activated_at' => now(), + // 无 payment_summary/payment_receipts,即“无回执”集合 + 'meta' => [], + ]); + + $res = $this->get('/admin/platform-orders?syncable_only=1&receipt_status=none'); + $res->assertOk(); + + $res->assertSee('回执缺失提示', false); + $res->assertSee('当前集合为「无回执」且已勾选「只看可同步」', false); + $res->assertSee('切到有回执集合', false); + $res->assertSee('取消只看可同步(先治理)', false); + } +}