feat: 统一管理端多语言、配置与票据/结算页面重构

This commit is contained in:
2026-05-20 16:27:06 +08:00
parent 37b13278ef
commit 08a11a1589
81 changed files with 2059 additions and 490 deletions

View File

@@ -1,5 +1,5 @@
export const reportsModuleMeta = {
segment: "reports",
title: "Reports",
title: "报表导出",
description: "",
} as const;

View File

@@ -129,6 +129,9 @@ export function ReportsConsole(): React.ReactElement {
const lastPage = meta
? Math.max(1, meta.last_page)
: 1;
const reportFormatLabel = (value: string) =>
t(`formatOptions.${value}`, { defaultValue: value.toUpperCase() });
const reportStatusLabel = (value: string) => t(`statusOptions.${value}`, { defaultValue: value });
return (
<div className="flex w-full max-w-none flex-col gap-8">
@@ -175,8 +178,8 @@ export function ReportsConsole(): React.ReactElement {
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="csv">CSV</SelectItem>
<SelectItem value="xlsx">XLSX</SelectItem>
<SelectItem value="csv">{t("formatOptions.csv")}</SelectItem>
<SelectItem value="xlsx">{t("formatOptions.xlsx")}</SelectItem>
</SelectContent>
</Select>
</div>
@@ -245,9 +248,9 @@ export function ReportsConsole(): React.ReactElement {
defaultValue: row.report_type,
})}
</TableCell>
<TableCell>{row.export_format}</TableCell>
<TableCell>{reportFormatLabel(row.export_format)}</TableCell>
<TableCell>
<Badge variant="secondary">{row.status}</Badge>
<Badge variant="secondary">{reportStatusLabel(row.status)}</Badge>
</TableCell>
<TableCell className="max-w-[12rem] truncate text-xs text-muted-foreground">
{row.output_path ?? "—"}