统一页面右上角操作区(05-31-unified-page-header-actions)
这个提交包含在:
@@ -44,7 +44,7 @@ import { Button } from "../components/ui/button";
|
||||
import { Input } from "../components/ui/input";
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../components/ui/table";
|
||||
import { Textarea } from "../components/ui/textarea";
|
||||
import { ListWorkspace, WorkspaceHeader } from "../components/patterns/ListWorkspace";
|
||||
import { HeaderActionGroup, ListWorkspace, WorkspaceHeader } from "../components/patterns/ListWorkspace";
|
||||
import {
|
||||
BusinessListToolbar,
|
||||
BusinessMobileList,
|
||||
@@ -804,7 +804,7 @@ export function PurchaseRequestsPage() {
|
||||
<WorkspaceHeader
|
||||
title="采购"
|
||||
actions={
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<HeaderActionGroup>
|
||||
{isPurchaseDetailMode ? (
|
||||
<Button type="button" variant="secondary" onClick={returnToPurchaseList}>
|
||||
返回列表
|
||||
@@ -821,19 +821,9 @@ export function PurchaseRequestsPage() {
|
||||
{createMutation.isPending ? "创建中..." : "新建采购"}
|
||||
</Button>
|
||||
) : null}
|
||||
{canShowAdvancedFilters ? (
|
||||
<Button
|
||||
data-testid="purchase-advanced-filters"
|
||||
type="button"
|
||||
variant={showAdvancedFilterPanel ? "default" : "secondary"}
|
||||
onClick={() => setShowAdvancedFilters((current) => !current)}
|
||||
>
|
||||
筛选
|
||||
</Button>
|
||||
) : null}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</HeaderActionGroup>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -847,9 +837,22 @@ export function PurchaseRequestsPage() {
|
||||
<>
|
||||
<BusinessListToolbar
|
||||
actions={
|
||||
<span className="rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-600">
|
||||
{mine ? "我相关" : "全范围"}
|
||||
</span>
|
||||
<>
|
||||
<span className="rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-600">
|
||||
{mine ? "我相关" : "全范围"}
|
||||
</span>
|
||||
{canShowAdvancedFilters ? (
|
||||
<Button
|
||||
data-testid="purchase-advanced-filters"
|
||||
type="button"
|
||||
size="sm"
|
||||
variant={showAdvancedFilterPanel ? "default" : "secondary"}
|
||||
onClick={() => setShowAdvancedFilters((current) => !current)}
|
||||
>
|
||||
筛选
|
||||
</Button>
|
||||
) : null}
|
||||
</>
|
||||
}
|
||||
advanced={showAdvancedFilterPanel ? (
|
||||
<div className="grid gap-3 md:grid-cols-3 xl:grid-cols-4" data-testid="purchase-advanced-filters-panel">
|
||||
|
||||
在新工单中引用
屏蔽一个用户