修复财务页面竞态并整理采购与运输展示
This commit is contained in:
@@ -81,6 +81,23 @@ describe('OutboundDetailView', () => {
|
||||
emptyWrapper.unmount()
|
||||
})
|
||||
|
||||
it.each([
|
||||
['WAIT_PICK', '待拣货'], ['WAIT_OUTBOUND', '待出库'], ['PICKING', '拣货中'],
|
||||
['PARTIAL_PICKED', '部分已拣货'], ['PICKED', '已拣货'], ['OUTBOUNDED', '已出库'], ['CANCELLED', '已取消'],
|
||||
[null, '—'], ['FUTURE_STATUS', '未知状态'],
|
||||
])('renders outbound pallet status %s in Chinese', async (status, label) => {
|
||||
vi.mocked(getOutbound).mockResolvedValueOnce({
|
||||
outbound: { id: '1', outboundNo: 'OUT/1', status: 'OUTBOUNDED' },
|
||||
pallets: [{ palletNo: 'DP-1', status }], deliveries: [],
|
||||
})
|
||||
const wrapper = mount(OutboundDetailView, { global: { plugins: [ElementPlus] } })
|
||||
await flushPromises()
|
||||
const table = wrapper.get('.outbound-pallet-table')
|
||||
expect(table.text()).toContain(label)
|
||||
if (status) expect(table.text()).not.toContain(status)
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it('shows cancellation only before picking with the independent permission', async () => {
|
||||
canPermission.mockImplementation((code: string) => code === 'platform:overseas-warehouse:outbound:cancel')
|
||||
vi.mocked(getOutbound).mockResolvedValueOnce({ outbound: { id: '1', outboundNo: 'OUT/1', status: 'WAIT_PICK' }, pallets: [], deliveries: [] })
|
||||
|
||||
Reference in New Issue
Block a user