统一菜单命名并移除剩余台账工具(05-31-unified-menu-remove-ledger-tools-wave2)
这个提交包含在:
@@ -44,6 +44,7 @@ import { ConfirmDialog } from "../components/common/ConfirmDialog";
|
||||
import { DateTextInput } from "../components/common/DateTextInput";
|
||||
import { ListWorkspace, WorkspaceHeader } from "../components/patterns/ListWorkspace";
|
||||
import { Button } from "../components/ui/button";
|
||||
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../components/ui/dropdown-menu";
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -258,7 +259,6 @@ export function ApOperationsPage() {
|
||||
const [ledgerDateTo, setLedgerDateTo] = useState("");
|
||||
const [ledgerSearch, setLedgerSearch] = useState("");
|
||||
const [ledgerPage, setLedgerPage] = useState(1);
|
||||
const [showLedgerTools, setShowLedgerTools] = useState(false);
|
||||
const [showLedgerAdvancedFilters, setShowLedgerAdvancedFilters] = useState(false);
|
||||
|
||||
const [reviewTarget, setReviewTarget] = useState<PaymentBatch | null>(null);
|
||||
@@ -605,13 +605,26 @@ export function ApOperationsPage() {
|
||||
>
|
||||
刷新
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
variant="secondary"
|
||||
onClick={() => setShowLedgerTools((current) => !current)}
|
||||
>
|
||||
台账工具
|
||||
</Button>
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button
|
||||
data-testid="ap-export"
|
||||
type="button"
|
||||
variant="secondary"
|
||||
disabled={exportMutation.isPending}
|
||||
>
|
||||
{exportMutation.isPending ? "导出中..." : "导出"}
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
<DropdownMenuItem data-testid="ap-export-csv" onSelect={() => exportMutation.mutate("csv")}>
|
||||
导出 CSV
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem data-testid="ap-export-xlsx" onSelect={() => exportMutation.mutate("xlsx")}>
|
||||
导出 Excel
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
@@ -629,34 +642,6 @@ export function ApOperationsPage() {
|
||||
<SectionError message={resolveErrorMessage(financeLedgerQuery.error, "财务台账加载失败")} />
|
||||
) : null}
|
||||
|
||||
{showLedgerTools ? (
|
||||
<div className="finance-command-panel space-y-3" data-testid="ap-ledger-tools">
|
||||
<div className="flex flex-col gap-3 md:flex-row md:items-start md:justify-between">
|
||||
<div>
|
||||
<h3 className="text-base font-semibold text-zinc-900">台账工具</h3>
|
||||
</div>
|
||||
<div className="flex shrink-0 flex-wrap gap-2">
|
||||
<Button
|
||||
type="button"
|
||||
variant="secondary"
|
||||
onClick={() => exportMutation.mutate("csv")}
|
||||
disabled={exportMutation.isPending}
|
||||
>
|
||||
{exportMutation.isPending ? "导出中..." : "导出 CSV"}
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
variant="secondary"
|
||||
onClick={() => exportMutation.mutate("xlsx")}
|
||||
disabled={exportMutation.isPending}
|
||||
>
|
||||
{exportMutation.isPending ? "导出中..." : "导出 Excel"}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<div className="finance-command-panel">
|
||||
<Tabs value={activeTab} onValueChange={(value) => setActiveTab(value as OperationsTab)}>
|
||||
<TabsList className="ops-command-bar__tabs !w-full !justify-start">
|
||||
|
||||
在新工单中引用
屏蔽一个用户