修复采购审核竞态并整理管理页面展示
This commit is contained in:
@@ -96,6 +96,38 @@ describe('CarrierScheduleQueryPanel loading states', () => {
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it.each([false, true])('renders PDA warehouse events as business text without technical references (dense=%s)', async (dense) => {
|
||||
vi.mocked(listCarrierScheduleQueries).mockResolvedValue({ records: [], page: 1, size: 200, total: 0, pages: 0 })
|
||||
const businessRemark = '托盘 TP-TEST-018 已核对箱数,按实际拣货结果提交。'.repeat(6)
|
||||
const wrapper = mount(CarrierScheduleQueryPanel, {
|
||||
props: { dense, oceanBookingId: '2', warehouseTimeline: [
|
||||
{ eventType: 'PDA_PICK_PALLET', detail: 'item-pick_pallet-10001-20001-batch-a', operatorName: '仓库员甲', occurredAt: '2026-10-29T11:58:00' },
|
||||
{ eventType: 'PDA_PICK_PALLET', detail: 'item-pick_pallet-10001-20002-batch-b', operatorName: '仓库员乙', occurredAt: '2026-10-29T11:58:00' },
|
||||
{ eventType: 'PDA_PICK_PALLET', summary: 'item-pick_pallet-10001-20003-batch-c', reason: businessRemark, operatorName: '仓库员丙', occurredAt: '2026-10-29T11:58:30' },
|
||||
{ eventType: 'PDA_COMPLETE_LOADING', detail: 'complete-loading-test-key', operatorName: '复核员', occurredAt: '2026-10-29T11:59:00' },
|
||||
{ eventType: 'PDA_BATCH', detail: 'batch-reference', idempotencyKey: 'batch-reference', operatorName: '仓库员', occurredAt: '2026-10-29T11:57:00' },
|
||||
] },
|
||||
global: { plugins: [ElementPlus, pinia] },
|
||||
})
|
||||
await flushPromises()
|
||||
|
||||
const rows = dense ? wrapper.findAll('.fulfillment-table tbody tr') : wrapper.findAll('.fulfillment-timeline li')
|
||||
expect(rows).toHaveLength(5)
|
||||
expect(rows[0]!.text()).toContain('完成装柜')
|
||||
expect(rows[0]!.text()).toContain('已通过 PDA 完成装柜作业')
|
||||
expect(rows[1]!.text()).toContain(businessRemark)
|
||||
for (const row of rows.slice(2, 4)) {
|
||||
expect(row.text()).toContain('托盘拣货')
|
||||
expect(row.text()).toContain('已通过 PDA 完成托盘拣货')
|
||||
expect(row.text()).toContain('仓内操作')
|
||||
}
|
||||
expect(rows[4]!.text()).toContain('已通过 PDA 提交拣货结果')
|
||||
expect(wrapper.text()).toContain('仓库员甲')
|
||||
expect(wrapper.text()).toContain('仓库员乙')
|
||||
expect(wrapper.text()).not.toMatch(/PDA_PICK_PALLET|item-pick_pallet-|complete-loading-test-key|batch-reference|确认离仓|已出库/)
|
||||
expect(wrapper.get('.history-count').text()).toBe('仓内 5 条 · 共 5 条')
|
||||
})
|
||||
|
||||
it.each([false, true])('isolates nested manual entry from its parent and reopens in ordinary mode (dense=%s)', async (dense) => {
|
||||
vi.mocked(listCarrierScheduleQueries).mockResolvedValue({ records: [], page: 1, size: 200, total: 0, pages: 0 })
|
||||
const host = mount(AppDialog, {
|
||||
|
||||
Reference in New Issue
Block a user