From 7a90e729f0c6abdab79648c576c79c96e915007d Mon Sep 17 00:00:00 2001 From: shunli Date: Fri, 8 May 2026 23:21:39 +0800 Subject: [PATCH] =?UTF-8?q?A2-A4-A9=20=E5=AE=8C=E5=96=84=E6=8A=A5=E9=94=80?= =?UTF-8?q?=E7=A0=81=E5=80=BC=E4=B8=8E=E6=9F=A5=E9=87=8D=E5=9B=9E=E5=BD=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/ReimbursementDetailPage.tsx | 33 ++- .../r111-invoice-reimbursement-guard.spec.ts | 3 + ...r125-invoice-reupload-after-delete.spec.ts | 8 + docs/trialrun-runbook.md | 14 + docs/trialrun/real-device-public-checklist.md | 85 ++++++ ...8_22-43-20-project-wide-flow-qa-system.csv | 11 + scripts/qa/check-ui-design-rules.mjs | 42 +++ scripts/qa/create-real-device-report.mjs | 78 +++++ scripts/qa/run-isolated-regression-dedup.sh | 266 ++++++++++++++++++ server/scripts/regression-dedup.sh | 83 +++++- 10 files changed, 615 insertions(+), 8 deletions(-) create mode 100644 docs/trialrun/real-device-public-checklist.md create mode 100644 issues/2026-05-08_22-43-20-project-wide-flow-qa-system.csv create mode 100755 scripts/qa/create-real-device-report.mjs create mode 100755 scripts/qa/run-isolated-regression-dedup.sh diff --git a/client/src/pages/ReimbursementDetailPage.tsx b/client/src/pages/ReimbursementDetailPage.tsx index ec6e9df8..66845fba 100644 --- a/client/src/pages/ReimbursementDetailPage.tsx +++ b/client/src/pages/ReimbursementDetailPage.tsx @@ -22,6 +22,7 @@ import { withdrawReimbursement, linkReimbursementProject, type ReimbursementItem, + type ReimbursementStatus, } from "../api/reimbursements"; import { bindInvoice, @@ -66,6 +67,23 @@ import { buildPrecheckDialogMessage } from "../lib/precheck"; type ItemEditorState = { mode: "create" } | { mode: "edit"; itemId: string } | null; type SelectedInvoiceMap = Record; +const REIMBURSEMENT_STATUS_LABEL: Record = { + draft: "草稿", + reviewing: "审批中", + approved: "已通过", + paid: "已支付", + rejected: "已驳回", + cancelled: "已取消", +}; + +const INVOICE_STATUS_LABEL: Record = { + pending_ocr: "识别中", + ocr_failed: "识别失败", + available: "可添加", + bound: "已添加", + archived: "已归档", +}; + function formatDateTime(value: string | null) { if (!value) return "-"; return value.slice(0, 19).replace("T", " "); @@ -87,6 +105,14 @@ function buildActionErrorMessage(error: unknown, fallbackMessage: string) { return fallbackMessage; } +function reimbursementStatusLabel(status: ReimbursementStatus) { + return REIMBURSEMENT_STATUS_LABEL[status] ?? status; +} + +function invoiceStatusLabel(status: string) { + return INVOICE_STATUS_LABEL[status] ?? "未知状态"; +} + function resolveErpSyncStatus( exportState: | { @@ -939,7 +965,7 @@ export function ReimbursementDetailPage() {
-
状态:{detail.status}
+
状态:{reimbursementStatusLabel(detail.status)}
报销编号:{displayCode}
报销日期:{detail.reimbursementDate ?? "-"}
金额:{detail.totalAmount ?? "-"}
@@ -1156,9 +1182,8 @@ export function ReimbursementDetailPage() { >
- {item.expenseType?.name ?? item.expenseTypeId} + {item.expenseType?.name ?? "未识别费用类型"}
-
{item.expenseType?.code ?? "-"}
{item.expenseDate ?? "-"} @@ -1295,7 +1320,7 @@ export function ReimbursementDetailPage() {
- {item.status} + {invoiceStatusLabel(item.status)} {canUnbindInvoices ? (