diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 9095cdb..4309e7d 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -256,6 +256,27 @@

工具

清除仅影响订单 meta 中的失败标记,不改变订单/订阅状态。
+ @php + $hasReconcileMismatchFilter = (($filters['reconcile_mismatch'] ?? '') === '1'); + $hasRefundInconsistentFilter = (($filters['refund_inconsistent'] ?? '') === '1'); + @endphp + + @if($hasReconcileMismatchFilter || $hasRefundInconsistentFilter) +
+ 提示:当前筛选包含 + @if($hasReconcileMismatchFilter) + 对账不一致 + @endif + @if($hasReconcileMismatchFilter && $hasRefundInconsistentFilter) + + @endif + @if($hasRefundInconsistentFilter) + 退款不一致 + @endif + 。建议先完成金额/状态治理(补回执/核对退款)后,再执行批量同步订阅等工具动作。 +
+ @endif +
diff --git a/tests/Feature/AdminPlatformOrderToolsGovernanceHintTest.php b/tests/Feature/AdminPlatformOrderToolsGovernanceHintTest.php new file mode 100644 index 0000000..a25a364 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderToolsGovernanceHintTest.php @@ -0,0 +1,41 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_platform_orders_tools_show_governance_hint_when_reconcile_mismatch_filter_present(): void + { + $this->loginAsPlatformAdmin(); + + $this->get('/admin/platform-orders?reconcile_mismatch=1') + ->assertOk() + ->assertSee('建议先完成金额/状态治理', false) + ->assertSee('对账不一致', false); + } + + public function test_platform_orders_tools_show_governance_hint_when_refund_inconsistent_filter_present(): void + { + $this->loginAsPlatformAdmin(); + + $this->get('/admin/platform-orders?refund_inconsistent=1') + ->assertOk() + ->assertSee('建议先完成金额/状态治理', false) + ->assertSee('退款不一致', false); + } +}