refactor(ui): [UI8] 彻底移除遗留Card并补充下拉框中文化

这个提交包含在:
2026-03-06 10:09:18 +08:00
父节点 5a6a6f67c9
当前提交 3883f14a48
共修改 25 个文件,包含 87 行新增和 95 行删除
+12 -13
查看文件
@@ -21,7 +21,6 @@ import { CardSkeleton } from "../components/common/CardSkeleton";
import { ConfirmDialog } from "../components/common/ConfirmDialog";
import { PageHeader } from "../components/common/PageHeader";
import { Button } from "../components/ui/button";
import { Card } from "../components/ui/card";
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../components/ui/table";
import { ReimbursementActions, type PayPayload } from "./reimbursement-detail/ReimbursementActions";
import {
@@ -195,9 +194,9 @@ export function ReimbursementDetailPage() {
if (!reimbursementId) {
return (
<Card className="p-6">
<div className="card-std p-6">
<p className="text-sm text-red-600">缺少 reimbursementId 参数。</p>
</Card>
</div>
);
}
@@ -215,12 +214,12 @@ export function ReimbursementDetailPage() {
: "加载报销详情失败";
return (
<Card className="space-y-3 p-6">
<div className="card-std space-y-3 p-6">
<p className="text-sm text-red-600">{message}</p>
<Button asChild variant="secondary">
<Link to="/reimbursements">返回报销列表</Link>
</Button>
</Card>
</div>
);
}
@@ -281,17 +280,17 @@ export function ReimbursementDetailPage() {
}
/>
<Card className="space-y-2 p-6 text-sm" data-testid="reimbursement-summary">
<div className="card-std space-y-2 p-6 text-sm" data-testid="reimbursement-summary">
<div>报销ID:{detail.id}</div>
<div>报销日期:{detail.reimbursementDate ?? "-"}</div>
<div>金额:{detail.totalAmount ?? "-"}</div>
<div>提交人:{detail.submitter?.name ?? "-"}</div>
<div>报销人:{detail.owner?.name ?? "-"}</div>
<div>说明:{detail.description || "-"}</div>
</Card>
</div>
{budgetHint ? (
<Card className="space-y-2 p-6 text-sm" data-testid="reimbursement-budget-hint">
<div className="card-std space-y-2 p-6 text-sm" data-testid="reimbursement-budget-hint">
<h3 className="text-base font-semibold text-zinc-900">预算提示</h3>
<div>预算池:{budgetHint.budgetCode} / {budgetHint.budgetName}</div>
<div>
@@ -310,10 +309,10 @@ export function ReimbursementDetailPage() {
) : (
<p className="text-zinc-500">当前预算充足,可继续提交。</p>
)}
</Card>
</div>
) : null}
<Card className="space-y-4 p-6" data-testid="reimbursement-items">
<div className="card-std space-y-4 p-6" data-testid="reimbursement-items">
<div className="flex flex-col gap-3 md:flex-row md:items-center md:justify-between">
<div className="space-y-1">
<h3 className="text-base font-semibold text-zinc-900">报销明细</h3>
@@ -418,7 +417,7 @@ export function ReimbursementDetailPage() {
isPending={itemSaveMutation.isPending}
/>
) : null}
</Card>
</div>
<ReimbursementActions
status={detail.status}
@@ -430,7 +429,7 @@ export function ReimbursementDetailPage() {
onPay={(payload) => mutation.mutate({ action: "pay", payload })}
/>
<Card className="space-y-2 p-6" data-testid="reimbursement-invoices">
<div className="card-std space-y-2 p-6" data-testid="reimbursement-invoices">
<h3 className="text-base font-semibold text-zinc-900">关联票据</h3>
{(detail.invoices ?? []).length ? (
<div className="space-y-2 text-sm">
@@ -446,7 +445,7 @@ export function ReimbursementDetailPage() {
) : (
<p className="text-sm text-zinc-500">暂无关联票据</p>
)}
</Card>
</div>
<ConfirmDialog
open={Boolean(confirmDeleteItemId)}