diff --git a/resources/views/admin/platform_orders/show.blade.php b/resources/views/admin/platform_orders/show.blade.php index af96abf..8d115b4 100644 --- a/resources/views/admin/platform_orders/show.blade.php +++ b/resources/views/admin/platform_orders/show.blade.php @@ -95,6 +95,7 @@
退款状态治理(仅修正状态,不自动写回执/退款回执)
已付:¥{{ number_format($paidAmountFloat, 2) }}|退款总额:¥{{ number_format($refundTotal, 2) }}
+
操作说明:该区块仅用于修正支付状态展示口径,不会改金额、不生成退款记录;请先核对退款轨迹。
查看全部退款不一致订单
diff --git a/tests/Feature/AdminPlatformOrderShowRefundGovernanceBlockNoteTest.php b/tests/Feature/AdminPlatformOrderShowRefundGovernanceBlockNoteTest.php new file mode 100644 index 0000000..d6012fd --- /dev/null +++ b/tests/Feature/AdminPlatformOrderShowRefundGovernanceBlockNoteTest.php @@ -0,0 +1,69 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_show_page_refund_governance_block_has_operation_note(): void + { + $this->loginAsPlatformAdmin(); + + $merchant = Merchant::query()->firstOrFail(); + $plan = Plan::query()->create([ + 'code' => 'refund_governance_block_note_01', + 'name' => '退款治理区块说明测试', + 'billing_cycle' => 'monthly', + 'price' => 10, + 'list_price' => 10, + 'status' => 'active', + 'sort' => 10, + 'published_at' => now(), + ]); + + $order = PlatformOrder::query()->create([ + 'merchant_id' => $merchant->id, + 'plan_id' => $plan->id, + 'order_no' => 'PO_REFUND_GOV_BLOCK_NOTE_0001', + 'order_type' => 'new_purchase', + '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(), + 'meta' => [ + 'refund_summary' => [ + 'count' => 1, + 'total_amount' => 10.00, + ], + ], + ]); + + $this->get('/admin/platform-orders/' . $order->id) + ->assertOk() + ->assertSee('操作说明:该区块仅用于修正支付状态展示口径'); + } +}