统一业务台账首屏设计(05-30-unified-page-design-review)
这个提交包含在:
@@ -229,32 +229,6 @@ function prettyJson(value: unknown) {
|
||||
}
|
||||
}
|
||||
|
||||
function SummaryCard({
|
||||
title,
|
||||
value,
|
||||
tone = "zinc",
|
||||
}: {
|
||||
title: string;
|
||||
value: number | string;
|
||||
tone?: "zinc" | "amber" | "red" | "emerald";
|
||||
}) {
|
||||
const toneClass =
|
||||
tone === "amber"
|
||||
? "text-amber-700"
|
||||
: tone === "red"
|
||||
? "text-red-700"
|
||||
: tone === "emerald"
|
||||
? "text-emerald-700"
|
||||
: "text-zinc-900";
|
||||
|
||||
return (
|
||||
<div className="finance-metric-card">
|
||||
<div className="finance-metric-card__label">{title}</div>
|
||||
<div className={`finance-metric-card__value ${toneClass}`}>{value}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function SectionError({ message }: { message: string }) {
|
||||
return (
|
||||
<div className="rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-600">
|
||||
@@ -619,7 +593,6 @@ export function ApOperationsPage() {
|
||||
<ListWorkspace>
|
||||
<WorkspaceHeader
|
||||
title="应付账款"
|
||||
subtitle="优先处理待付款、异常付款、风险和对账差异;导出和代账交接进入台账工具。"
|
||||
actions={
|
||||
<>
|
||||
<Button
|
||||
@@ -654,30 +627,11 @@ export function ApOperationsPage() {
|
||||
<SectionError message={resolveErrorMessage(financeLedgerQuery.error, "财务台账加载失败")} />
|
||||
) : null}
|
||||
|
||||
<div className="finance-status-strip" data-testid="ap-operations-summary">
|
||||
<SummaryCard title="待付款" value={summaryQuery.data?.summary.pendingPaymentCount ?? "-"} />
|
||||
<SummaryCard title="异常" value={summaryQuery.data?.summary.exceptionCount ?? "-"} tone="red" />
|
||||
<SummaryCard
|
||||
title="部分匹配"
|
||||
value={summaryQuery.data?.summary.partialMatchCount ?? "-"}
|
||||
tone="amber"
|
||||
/>
|
||||
<SummaryCard title="台账记录" value={financeLedgerQuery.data?.total ?? "-"} />
|
||||
<SummaryCard
|
||||
title="预算超支"
|
||||
value={summaryQuery.data?.summary.budgetOverspendCount ?? "-"}
|
||||
tone="amber"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{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>
|
||||
<p className="mt-1 text-sm leading-6 text-zinc-500">
|
||||
导出只用于财务复核和代账交接,范围按当前筛选条件生成;文件可能包含付款、票据和员工摘要信息。
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex shrink-0 flex-wrap gap-2">
|
||||
<Button
|
||||
@@ -698,9 +652,6 @@ export function ApOperationsPage() {
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="rounded-lg border border-slate-200 bg-slate-50 px-3 py-2 text-sm text-slate-600">
|
||||
当前工具不会执行真实付款,也不会生成正式总账凭证;付款仍由线下银行或既有财务流程完成。
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户