Merge origin/release/test and preserve pickup workflow

This commit is contained in:
2026-10-21 16:22:08 +08:00
38 changed files with 485 additions and 95 deletions
@@ -173,3 +173,16 @@ describe('whole-dispatch four-tab detail', () => {
wrapper.unmount()
})
})
it('shows saved dispatch exceptions and their own images in the existing dispatch tab', async () => {
const value = detail({ stage: 'DELIVERING' })
value.dispatchInfo.exceptions = [{ exceptionType: 'REFUSED', returnDirection: 'OVERSEAS_WAREHOUSE', description: '现场拒收待处理', imageFileIds: ['901'], occurredAt: '2026-10-21T10:00:00Z' }]
vi.mocked(getDispatch).mockResolvedValue(value)
vi.mocked(getDispatchEvidence).mockResolvedValue({ fileId: '901', fileName: '异常现场.png', contentType: 'image/png', sizeBytes: 3 })
const wrapper = mount(DispatchDetailView, options); await flushPromises()
await wrapper.findAll('[role="tab"]')[1]!.trigger('click'); await flushPromises()
expect(wrapper.text()).toContain('拒收'); expect(wrapper.text()).toContain('退回海外仓'); expect(wrapper.text()).toContain('现场拒收待处理')
expect(getDispatchEvidence).toHaveBeenCalledWith('PC/1', 'EXCEPTION', '901')
expect(wrapper.findAll('[role="tab"]')).toHaveLength(4); expect(wrapper.findAll('input[type="file"]')).toHaveLength(0)
wrapper.unmount()
})