补充平台订单工具区快速定位导航

This commit is contained in:
萝卜
2026-03-19 07:02:47 +08:00
parent 0ee0379c74
commit 26a3786e82
2 changed files with 51 additions and 5 deletions

View File

@@ -1198,7 +1198,15 @@
<div class="tool-grid" data-role="po-tools-grid" aria-label="平台订单工具区网格">
<div class="muted muted-xs mb-10" data-role="po-tools-grid-intro" aria-label="平台订单工具区说明">当前工具区承载导出、批量治理与失败标记清理,请先缩小筛选范围再执行动作。</div>
<div class="tool-group focus-box" data-role="po-tools-group-export" aria-label="平台订单导出工具组">
<div class="actions gap-10 mb-10" data-role="po-tools-grid-jump-links">
<a class="btn btn-secondary btn-sm" href="#po-tools-export">导出</a>
<a class="btn btn-secondary btn-sm" href="#batch-activate-subscriptions">批量同步</a>
<a class="btn btn-secondary btn-sm" href="#po-tools-batch-bmpa">批量BMPA</a>
<a class="btn btn-secondary btn-sm" href="#po-tools-batch-mark-activated">批量仅生效</a>
<a class="btn btn-secondary btn-sm" href="#po-tools-clear-sync-errors">清理同步失败</a>
<a class="btn btn-secondary btn-sm" href="#po-tools-clear-bmpa-errors">清理BMPA失败</a>
</div>
<div class="tool-group focus-box" id="po-tools-export" data-role="po-tools-group-export" aria-label="平台订单导出工具组">
<div class="tool-group-title">导出</div>
<form method="get" action="/admin/platform-orders/export" class="mb-0">
<input type="hidden" name="download" value="1">
@@ -1271,7 +1279,7 @@
</form>
</div>
<div class="tool-group focus-box" data-role="po-tools-group-batch-bmpa" aria-label="平台订单批量标记支付并生效工具组">
<div class="tool-group focus-box" id="po-tools-batch-bmpa" data-role="po-tools-group-batch-bmpa" aria-label="平台订单批量标记支付并生效工具组">
<div class="tool-group-title">批量标记支付并生效BMPA</div>
@php
$batchBmpaBlocked = (bool) ($toolGuards['batch_bmpa']['blocked'] ?? false);
@@ -1326,7 +1334,7 @@
</form>
</div>
<div class="tool-group focus-box" data-role="po-tools-group-batch-mark-activated" aria-label="平台订单批量仅标记为已生效工具组">
<div class="tool-group focus-box" id="po-tools-batch-mark-activated" data-role="po-tools-group-batch-mark-activated" aria-label="平台订单批量仅标记为已生效工具组">
<div class="tool-group-title">批量仅标记为已生效</div>
@php
$batchMarkActivatedBlocked = (bool) ($toolGuards['batch_mark_activated']['blocked'] ?? false);
@@ -1384,7 +1392,7 @@
</form>
</div>
<div class="tool-group focus-box" data-role="po-tools-group-clear-sync-errors" aria-label="平台订单清理同步失败标记工具组">
<div class="tool-group focus-box" id="po-tools-clear-sync-errors" data-role="po-tools-group-clear-sync-errors" aria-label="平台订单清理同步失败标记工具组">
<div class="tool-group-title">清理失败标记:同步订阅</div>
@php
$clearSyncBlocked = (bool) ($toolGuards['clear_sync_errors']['blocked'] ?? false);
@@ -1432,7 +1440,7 @@
</form>
</div>
<div class="tool-group focus-box" data-role="po-tools-group-clear-bmpa-errors" aria-label="平台订单清理批量BMPA失败标记工具组">
<div class="tool-group focus-box" id="po-tools-clear-bmpa-errors" data-role="po-tools-group-clear-bmpa-errors" aria-label="平台订单清理批量BMPA失败标记工具组">
<div class="tool-group-title">清理失败标记:批量 BMPA</div>
@php
$clearBmpaBlocked = (bool) ($toolGuards['clear_bmpa_errors']['blocked'] ?? false);

View File

@@ -0,0 +1,38 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexToolGridShouldHaveJumpLinksTest extends TestCase
{
use RefreshDatabase;
protected function loginAsPlatformAdmin(): void
{
$this->seed();
$this->post('/admin/login', [
'email' => 'platform.admin@demo.local',
'password' => 'Platform@123456',
])->assertRedirect('/admin');
}
public function test_platform_orders_tool_grid_should_have_jump_links(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-tools-grid-jump-links"', $html);
$this->assertStringContainsString('href="#po-tools-export"', $html);
$this->assertStringContainsString('href="#batch-activate-subscriptions"', $html);
$this->assertStringContainsString('href="#po-tools-batch-bmpa"', $html);
$this->assertStringContainsString('href="#po-tools-batch-mark-activated"', $html);
$this->assertStringContainsString('href="#po-tools-clear-sync-errors"', $html);
$this->assertStringContainsString('href="#po-tools-clear-bmpa-errors"', $html);
}
}