diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 618f9b6..e8120ef 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -499,6 +499,22 @@ +@php + $batchActivationRunId = trim((string) ($filters['batch_activation_run_id'] ?? '')); +@endphp +@if($batchActivationRunId !== '') +
+
当前批次筛选
+
+
+ 当前 run_id:{{ $batchActivationRunId }} + + 清除批次筛选 +
+
+
+@endif +

平台订单总数

diff --git a/tests/Feature/AdminPlatformOrderIndexBatchActivationRunIdBadgeShouldRenderTest.php b/tests/Feature/AdminPlatformOrderIndexBatchActivationRunIdBadgeShouldRenderTest.php new file mode 100644 index 0000000..0f39a96 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexBatchActivationRunIdBadgeShouldRenderTest.php @@ -0,0 +1,34 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_platform_orders_page_should_render_run_id_badge_and_clear_link_when_filter_present(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin/platform-orders?batch_activation_run_id=BAS_BADGE_0001'); + $res->assertOk(); + + $res->assertSee('当前批次筛选'); + $res->assertSee('BAS_BADGE_0001'); + $res->assertSee('清除批次筛选'); + $res->assertSee('/admin/platform-orders?batch_activation_run_id=', false); + } +}