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 cde9c190..4ca559fc 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
@@ -277,6 +277,25 @@ describe('限价管理', () => {
expect(screen.queryByRole('button', { name: '导出明细' })).not.toBeInTheDocument()
})
+ it('条码候选值跟随已选商品状态,避免选出与明细条件冲突的条码', async () => {
+ render()
+ await screen.findByText('测试岩板餐桌')
+
+ fireEvent.click(screen.getByRole('button', { name: '筛选条码', exact: true }))
+ await screen.findByRole('dialog', { name: '筛选条码' })
+
+ let optionRequest = ''
+ await waitFor(() => {
+ optionRequest = (global.fetch as jest.Mock).mock.calls
+ .map((call) => String(call[0]))
+ .filter((url) => url.includes('/limit-management/options') && url.includes('field=barcode'))
+ .at(-1) ?? ''
+ expect(optionRequest).not.toBe('')
+ })
+ const filters = new URL(optionRequest, 'http://localhost').searchParams.get('filters') ?? '{}'
+ expect(JSON.parse(filters)).toEqual({ productStatus: ['销售'] })
+ })
+
it('限价页按《限价抬头及逻辑》显示分组表头,并展示产品全量档案数据', async () => {
render()
diff --git a/furniture-3d-system/src/app/supply-chain/management/custom-table/LimitPriceTab.tsx b/furniture-3d-system/src/app/supply-chain/management/custom-table/LimitPriceTab.tsx
index 4ba17a38..17fe0734 100644
--- a/furniture-3d-system/src/app/supply-chain/management/custom-table/LimitPriceTab.tsx
+++ b/furniture-3d-system/src/app/supply-chain/management/custom-table/LimitPriceTab.tsx
@@ -430,6 +430,10 @@ export function LimitPriceTab({ userId, canExport = false }: { userId: string; c
const visibleFilterFields = settings.filterFields
.map((key) => LIMIT_TABLE_FILTER_FIELD_MAP.get(key))
.filter((field): field is NonNullable => Boolean(field))
+ const filterContext = useMemo(
+ () => filters as Record,
+ [filters],
+ )
return (
@@ -526,6 +530,7 @@ export function LimitPriceTab({ userId, canExport = false }: { userId: string; c
key={field.key}
field={field}
selected={(filters as Record)[field.key] ?? []}
+ contextFilters={filterContext}
onChange={(values) => updateFilterValue(field.key, values)}
/>
))}
@@ -622,6 +627,7 @@ export function LimitPriceTab({ userId, canExport = false }: { userId: string; c
filterValues={column.filterKey
? ((filters as Record)[column.filterKey] ?? [])
: undefined}
+ filterContext={filterContext}
filterOpen={openFilterKey === column.key}
onToggleFilter={() => setOpenFilterKey((current) => (current === column.key ? null : column.key))}
onCloseFilter={() => setOpenFilterKey(null)}