From e2dd6460374df6ba2656a817c525e7b6eb83dc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sat, 14 Mar 2026 04:44:20 +0000 Subject: [PATCH] =?UTF-8?q?chore(admin):=20=E5=BF=AB=E6=8D=B7=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E5=8C=BA=E6=98=BE=E7=A4=BA=E7=BA=BF=E7=B4=A2=E9=94=81?= =?UTF-8?q?=E5=AE=9A=E6=8F=90=E7=A4=BA=E5=B9=B6=E5=8F=AF=E6=B8=85=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/platform_orders/index.blade.php | 35 ++++++++++++------- ...rQuickFilterShouldShowLeadLockHintTest.php | 32 +++++++++++++++++ 2 files changed, 54 insertions(+), 13 deletions(-) create mode 100644 tests/Feature/AdminPlatformOrderQuickFilterShouldShowLeadLockHintTest.php diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 68864c9..fba67b4 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -16,6 +16,16 @@ if (count($currentQuery) > 0) { $selfWithoutBack .= '?' . \Illuminate\Support\Arr::query($currentQuery); } + + // 线索上下文(从开通线索跳转而来):用于提示“当前范围已锁定线索”,以及生成一键清除入口 + $incomingLeadId = (int) request()->query('lead_id', 0); + $clearLeadQuery = $currentQuery; + unset($clearLeadQuery['lead_id'], $clearLeadQuery['page']); + + $clearLeadUrl = '/admin/platform-orders'; + if (count($clearLeadQuery) > 0) { + $clearLeadUrl .= '?' . \Illuminate\Support\Arr::query($clearLeadQuery); + } @endphp

这里是总台视角的平台收费主链骨架页,当前阶段先承接套餐订购 / 续费 / 生效跟踪。

@@ -40,20 +50,9 @@ @php $currentSubscription = $currentSubscription ?? null; - $incomingLeadId = (int) request()->query('lead_id', 0); @endphp @if($incomingLeadId > 0) - @php - // 清除 lead_id 筛选:保留其它筛选条件,但移除 lead_id/page。 - $clearLeadQuery = $currentQuery; - unset($clearLeadQuery['lead_id'], $clearLeadQuery['page']); - - $clearLeadUrl = '/admin/platform-orders'; - if (count($clearLeadQuery) > 0) { - $clearLeadUrl .= '?' . \Illuminate\Support\Arr::query($clearLeadQuery); - } - @endphp
当前线索:#{{ $incomingLeadId }} (已按 lead_id 过滤订单集合) @@ -97,8 +96,18 @@
-

快捷筛选

-
用于运营快速定位当前需要处理的订单集合(口径基于筛选条件组合)。
+
+
+

快捷筛选

+
用于运营快速定位当前需要处理的订单集合(口径基于筛选条件组合)。
+
+ @if($incomingLeadId > 0) +
+ 当前锁定线索:#{{ $incomingLeadId }} + 清除 +
+ @endif +
@php // 快捷筛选:尽量保留当前筛选(站点/套餐/订阅ID/back 等),仅覆盖目标筛选字段,并清空 page。 diff --git a/tests/Feature/AdminPlatformOrderQuickFilterShouldShowLeadLockHintTest.php b/tests/Feature/AdminPlatformOrderQuickFilterShouldShowLeadLockHintTest.php new file mode 100644 index 0000000..2af07d4 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderQuickFilterShouldShowLeadLockHintTest.php @@ -0,0 +1,32 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_quick_filter_block_should_show_lead_lock_hint_when_lead_id_present(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin/platform-orders?lead_id=12'); + $res->assertOk(); + + $res->assertSee('当前锁定线索:#12', false); + $res->assertSee('>清除<', false); + } +}