From a4040749aa54e2820da941b406d3a8d4edd7c7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Tue, 17 Mar 2026 23:25:28 +0800 Subject: [PATCH] =?UTF-8?q?admin:=20=E5=B9=B3=E5=8F=B0=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=A1=8C=E7=BA=A7BMPA=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=91=BD=E4=B8=AD=E6=B2=BB=E7=90=86=E9=98=BB=E6=96=AD=E6=97=B6?= =?UTF-8?q?=E7=A6=81=E7=94=A8=EF=BC=88=E5=AF=B9=E8=B4=A6/=E9=80=80?= =?UTF-8?q?=E6=AC=BE/=E7=BB=AD=E8=B4=B9=E7=BC=BA=E8=AE=A2=E9=98=85?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/admin/platform_orders/index.blade.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index df56738..f3a8852 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -1780,11 +1780,19 @@ $syncErrorAt = data_get($order->meta, 'subscription_activation_error.at'); @endphp @php - $canMarkPaid = ($order->payment_status !== 'paid') || ($order->status !== 'activated'); - - // 精简视图也要可达的“治理入口”:不要只依赖可选列(col-optional)里的提示 $needReconcileFix = (bool) $order->isReconcileMismatch(); $needRefundFix = (bool) $order->isRefundInconsistent(); + + // 行级 BMPA 安全阀(列表页也应禁用,避免运营误触): + // - 对账不一致/退款不一致:需先治理 + // - 续费缺订阅:需先绑定订阅 + $blockedByMissingSubscriptionOnRenewal = ((string) ($order->order_type ?? '') === 'renewal') && ((int) ($order->site_subscription_id ?? 0) <= 0); + $markPaidBlockedByGovernance = $needReconcileFix || $needRefundFix || $blockedByMissingSubscriptionOnRenewal; + + // 仅当订单尚未处于 paid+activated 时,且未命中治理阻断时,才允许点击 + $canMarkPaid = ((($order->payment_status !== 'paid') || ($order->status !== 'activated')) && (! $markPaidBlockedByGovernance)); + + // 精简视图也要可达的“治理入口”:不要只依赖可选列(col-optional)里的提示 $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, 'add-refund-receipt'); @endphp