fix(dispatch): unify loading document tabs and remove duplicate photo prompt

This commit is contained in:
2026-10-21 21:11:44 +08:00
parent dbd7c473c2
commit d8fbc16fd7
3 changed files with 8 additions and 5 deletions
@@ -49,7 +49,9 @@ it('reads existing delivery files in one dialog and saves receipt without requir
it('switches customer scope exactly and keeps unsaved delivery edits when switching tabs', async () => {
const wrapper = setup(); await flushPromises()
await wrapper.findAll('[role="tab"]').find(tab => tab.text() === '装车资料')!.trigger('click')
expect(wrapper.getComponent(DeliveryDocumentsDialog).props('categories')).toEqual(['LOADING_PHOTO', 'BOL'])
expect(wrapper.getComponent(DeliveryDocumentsDialog).props('categories')).toEqual(['BOL'])
expect(wrapper.find('[data-category="LOADING_PHOTO"]').exists()).toBe(false)
expect(wrapper.getComponent(DeliveryDocumentsDialog).text()).toContain('0/1 已上传')
await wrapper.getComponent(DeliveryDocumentsDialog).find('input').setValue('BOL-CHANGED')
await wrapper.findAll('[role="tab"]').find(tab => tab.text() === '油耗图片')!.trigger('click')
expect(getDeliveryDocuments).toHaveBeenCalledTimes(1)