Quellcode durchsuchen

fix(web): 对账清单仅保留详情跳转入口

sy vor 2 Tagen
Ursprung
Commit
3c732b426f

+ 1 - 4
web-scaffold/src/pages/SettlementRecordPages.tsx

@@ -494,10 +494,7 @@ export function SettlementStatementListPage() {
                 {rows.map((row) => (
                   <tr key={row.batch_no}>
                     <td>
-                      <Link className="table-cell-title statement-number-link" title={row.batch_no}
-                        to={batchPath(row.holder_id, row.batch_no)} state={listState}>
-                        {row.batch_no}
-                      </Link>
+                      <span className="table-cell-title" title={row.batch_no}>{row.batch_no}</span>
                     </td>
                     <td><strong className="table-cell-title" title={row.holder_name}>{row.holder_name}</strong>
                       <div className="statement-holder-type"><OpsTag tone={holderTone[row.holder_type]}>{HOLDER_TYPE_TEXT[row.holder_type]}</OpsTag></div>

+ 5 - 2
web-scaffold/src/pages/__tests__/settlement-statement-list.test.tsx

@@ -75,7 +75,10 @@ function renderPage(search = "") {
 it("从页头导出,表格分开展示两种状态,改筛选时返回第一页", async () => {
   renderPage("?page=2&type=operator&month=2026-10");
   const table = within(screen.getByRole("region", { name: "对账批次,可横向滚动查看字段" }));
-  expect(await table.findByRole("link", { name: "RECON-001" })).toBeTruthy();
+  const batchNumber = await table.findByText("RECON-001");
+  expect(batchNumber.closest("a")).toBeNull();
+  expect(table.getAllByRole("link")).toEqual([table.getByRole("link", { name: "详情" })]);
+  expect(table.getByRole("link", { name: "详情" }).getAttribute("href")).toBe("/settlement-batches/OP-1/RECON-001");
   expect(table.getByRole("columnheader", { name: "出账状态" })).toBeTruthy();
   expect(table.getByRole("columnheader", { name: "批次状态" })).toBeTruthy();
   expect(table.getByText("出账异常")).toBeTruthy();
@@ -102,7 +105,7 @@ it.each(["", "?month=all"])("默认查询全部自然月并支持选月和重置
   const monthTrigger = screen.getByRole("button", { name: "自然月:全部自然月" });
   expect(within(monthTrigger).getByText("全部自然月").classList.contains("is-placeholder")).toBe(true);
   await waitFor(() => expect(reconGetList).toHaveBeenLastCalledWith(expect.objectContaining({ period: undefined })));
-  await screen.findByRole("link", { name: "RECON-001" });
+  await screen.findByText("RECON-001");
   fireEvent.click(screen.getByRole("button", { name: "导出当前结果" }));
   await waitFor(() => expect(reconExportList).toHaveBeenCalledWith(expect.objectContaining({ period: undefined })));
 

+ 0 - 1
web-scaffold/src/styles/settlement-records.css

@@ -178,7 +178,6 @@
 .statement-ledger :is(th,td):is(:nth-child(n+6):nth-child(-n+8),:last-child):not([colspan]){text-align:right;font-variant-numeric:tabular-nums}
 .statement-ledger :is(th,td):last-child:not([colspan]){padding-inline:10px 16px}
 .statement-ledger .table-cell-title,.statement-progress-table .table-cell-title{display:block}
-.statement-ledger .statement-number-link:hover{color:var(--primary);text-decoration:underline}
 .statement-holder-type{margin-top:4px}
 .statement-ledger .statement-unit{color:var(--muted-foreground);font-size:var(--type-meta)}
 .statement-ledger td .statement-share{color:var(--primary);font-weight:600}