From fddf3a3bc7f0ae1638e2ad4fa8bf3d51eaa4d441 Mon Sep 17 00:00:00 2001 From: shunli Date: Mon, 31 Aug 2026 23:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8A=A5=E9=94=80=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E9=98=BB=E6=96=AD=E6=96=87=E6=A1=88=E9=97=A8=E7=A6=81?= =?UTF-8?q?=EF=BC=8808-30-b2-submit-error-ocr-fallback=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .trellis/spec/hyb-oa/frontend-react-vite-design.md | 1 + client/src/features/navigation/schema.ts | 1 + client/src/pages/MobileReimbursementDetailPage.tsx | 8 ++++---- client/src/pages/PaymentAccountsPage.tsx | 2 +- client/src/pages/ReimbursementDetailPage.tsx | 6 +++--- .../ReimbursementItemEditor.tsx | 9 ++++++--- .../e2e/r111-invoice-reimbursement-guard.spec.ts | 14 +++++++++++++- 7 files changed, 29 insertions(+), 12 deletions(-) diff --git a/.trellis/spec/hyb-oa/frontend-react-vite-design.md b/.trellis/spec/hyb-oa/frontend-react-vite-design.md index 126f085a..b488ded8 100644 --- a/.trellis/spec/hyb-oa/frontend-react-vite-design.md +++ b/.trellis/spec/hyb-oa/frontend-react-vite-design.md @@ -104,6 +104,7 @@ and verification contracts. Do not copy broad aesthetic guidance from Rewriting Host to `127.0.0.1:3000` makes full-page reloads lose the session with `AUTH_005`. - Run `cd client && npm run typecheck && npm run build` for frontend changes. +- Any task that changes user-visible frontend copy must also run `node scripts/qa/check-ui-design-rules.mjs --strict` before commit and again before deployment. Treat the public bundle copy scan as a post-deploy witness, not the first place to discover forbidden user-facing terms. For reimbursement/invoice flows, regression assertions cover all four internal terms: `绑定整单`, `不绑定明细`, `发票池`, and `OCR`. ## Scenario: Playwright API Mocks Against A Production PWA Build diff --git a/client/src/features/navigation/schema.ts b/client/src/features/navigation/schema.ts index f48ccfa8..04a4739a 100644 --- a/client/src/features/navigation/schema.ts +++ b/client/src/features/navigation/schema.ts @@ -45,6 +45,7 @@ const PAGE_TITLES: Array<{ path: string; title: string; group: string }> = [ { path: "/mobile/purchase-requests", title: "移动采购", group: "移动工作台" }, { path: "/mobile/reimbursements", title: "移动报销", group: "移动工作台" }, { path: "/mobile", title: "移动首页", group: "移动工作台" }, + { path: "/system/settings", title: "管理", group: "管理" }, { path: "/settings/profile", title: "个人设置", group: "账号设置" }, { path: "/dashboard", title: "数据看板", group: "更多" }, ]; diff --git a/client/src/pages/MobileReimbursementDetailPage.tsx b/client/src/pages/MobileReimbursementDetailPage.tsx index 39069024..fa024e14 100644 --- a/client/src/pages/MobileReimbursementDetailPage.tsx +++ b/client/src/pages/MobileReimbursementDetailPage.tsx @@ -1158,7 +1158,7 @@ export function MobileReimbursementDetailPage() { /> {shouldShowOfficeElectronicsHint( - expenseTypes.find((type) => type.id === itemForm.expenseTypeId)?.code, + expenseTypes.find((type) => type.id === itemForm.expenseTypeId), itemForm.amount, ) ? (

该金额通常应选择办公电子设备。

@@ -1199,7 +1199,7 @@ export function MobileReimbursementDetailPage() {
{formatMoney(item.amount)}
{item.description ?

{item.description}

: null} - {shouldShowOfficeElectronicsHint(item.expenseType?.code, item.amount) ? ( + {shouldShowOfficeElectronicsHint(item.expenseType, item.amount) ? (

该金额通常应选择办公电子设备。

) : null} {invoiceGuardItemMessages(invoiceGuardIssues, item.id).map((message) => ( @@ -1259,7 +1259,7 @@ export function MobileReimbursementDetailPage() { {detail.invoiceAmountManualReviewRequired ? (

- 本单包含未执行 OCR 的发票,系统未自动比较相关明细金额;财务审批时需查看发票原件核对。 + 本单包含票面金额未自动读取的发票,系统未自动比较相关明细金额;财务审批时需查看发票原件核对。

) : null} @@ -1418,7 +1418,7 @@ export function MobileReimbursementDetailPage() { ) : null} {invoice.amountEvidenceStatus === "ocr_failed" ? (

- OCR 已处理但未取得票面金额,提交前需要重试识别或联系财务。 + 该发票的票面金额未能读取,暂时无法提交;请重新上传这张发票,或联系财务处理。

) : null} {canMaintainReimbursement && !invoice.linkedItemId ? ( diff --git a/client/src/pages/PaymentAccountsPage.tsx b/client/src/pages/PaymentAccountsPage.tsx index 7089c801..70b92edd 100644 --- a/client/src/pages/PaymentAccountsPage.tsx +++ b/client/src/pages/PaymentAccountsPage.tsx @@ -138,7 +138,7 @@ export function PaymentAccountsPage() { {canManage && companyState.kind === "multiple" ? (
-

检测到多条启用的公司信息,系统不会猜测付款账户应关联哪一条。请先处理公司信息。

+

检测到多条启用的公司信息,系统不会猜测付款账户应关联哪一条。请先完善公司信息。

{canManageCompanyInformation ? (