From 9360c553a22061aace3da4c8a521bdc22c9c7e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=85=E5=B1=85?= Date: Mon, 19 Oct 2026 14:07:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(supply-chain):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=BB=84=E5=90=88=E5=8D=95=E8=A1=8C=E8=A1=A8=E5=A4=B4=E9=81=AE?= =?UTF-8?q?=E6=8C=A1=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../management/custom-table/ComboLimitSection.tsx | 1 + .../management/custom-table/CustomTableView.test.tsx | 1 + .../management/custom-table/LimitTableHeaderCell.tsx | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/furniture-3d-system/src/app/supply-chain/management/custom-table/ComboLimitSection.tsx b/furniture-3d-system/src/app/supply-chain/management/custom-table/ComboLimitSection.tsx index aeb8993c..eff8ed8c 100644 --- a/furniture-3d-system/src/app/supply-chain/management/custom-table/ComboLimitSection.tsx +++ b/furniture-3d-system/src/app/supply-chain/management/custom-table/ComboLimitSection.tsx @@ -248,6 +248,7 @@ export function ComboLimitSection({ numeric={column.numeric} hint="组合限价 = 各子商品限价 × 组合明细数量后相加" sortScope="all" + stickyTop={0} sort={sort ? { key: sort.field, direction: sort.direction } : null} menuOpen={openSortKey === column.key} onToggleMenu={() => setOpenSortKey((current) => (current === column.key ? null : column.key))} diff --git a/furniture-3d-system/src/app/supply-chain/management/custom-table/CustomTableView.test.tsx b/furniture-3d-system/src/app/supply-chain/management/custom-table/CustomTableView.test.tsx index 36643a75..cde9c190 100644 --- a/furniture-3d-system/src/app/supply-chain/management/custom-table/CustomTableView.test.tsx +++ b/furniture-3d-system/src/app/supply-chain/management/custom-table/CustomTableView.test.tsx @@ -271,6 +271,7 @@ describe('限价管理', () => { expect(screen.getByText('运营甲')).toBeInTheDocument() expect(document.querySelectorAll('[data-limit-filter]')).toHaveLength(2) expect(screen.getByRole('button', { name: '筛选运营负责人' })).toBeInTheDocument() + expect((screen.getByRole('columnheader', { name: /^组合编码/ }) as HTMLElement).style.top).toBe('0px') const columnLabels = screen.getAllByRole('columnheader').map((cell) => (cell.textContent ?? '').replace(/[↕↑↓▾]/g, '').trim()) expect(columnLabels.indexOf('运营负责人')).toBe(columnLabels.indexOf('组合编码') + 1) expect(screen.queryByRole('button', { name: '导出明细' })).not.toBeInTheDocument() diff --git a/furniture-3d-system/src/app/supply-chain/management/custom-table/LimitTableHeaderCell.tsx b/furniture-3d-system/src/app/supply-chain/management/custom-table/LimitTableHeaderCell.tsx index 62529091..46434218 100644 --- a/furniture-3d-system/src/app/supply-chain/management/custom-table/LimitTableHeaderCell.tsx +++ b/furniture-3d-system/src/app/supply-chain/management/custom-table/LimitTableHeaderCell.tsx @@ -29,6 +29,8 @@ type Props = { numeric?: boolean hint?: string sortScope?: 'page' | 'all' + /** 单行表头传 0;双行表头(含分组行)默认沿用 CSS 的 30px */ + stickyTop?: number onToggleMenu: () => void onCloseMenu: () => void onSort: (direction: 'asc' | 'desc') => void @@ -52,6 +54,7 @@ export function LimitTableHeaderCell({ numeric, hint, sortScope = 'page', + stickyTop, onToggleMenu, onCloseMenu, onSort, @@ -135,6 +138,7 @@ export function LimitTableHeaderCell({ return (