fix: align audit and dispatch workflows and release failed requests

This commit is contained in:
2026-10-22 23:10:09 +08:00
parent 9cdcb9c077
commit 4a3456756f
124 changed files with 1296 additions and 2120 deletions
@@ -19,7 +19,7 @@ function render() {
ElButton: { template: '<button><slot/></button>' }, CapacityOfferSettingsDialog: true,
} } })
}
it('loads same-warehouse trips on demand and retries one immutable atomic preparation', async () => {
it('loads same-warehouse trips on demand and submits a new atomic preparation after failure', async () => {
const wrapper=render(); await flushPromises()
expect(listTrips).not.toHaveBeenCalled()
const select=wrapper.findComponent({ name: 'ElSelect' })
@@ -33,7 +33,7 @@ it('loads same-warehouse trips on demand and retries one immutable atomic prepar
expect(original).toMatchObject({ tripNo: 'TR-READY', recordVersion: 4, dispatchNos: ['DS-ONE','DS-TWO'], plan: null, vehicleId: null, driverId: null })
expect(wrapper.emitted('saved')).toBeUndefined()
dialog.vm.$emit('confirm'); await flushPromises()
expect(prepareTrip).toHaveBeenNthCalledWith(2, original)
expect(prepareTrip).toHaveBeenNthCalledWith(2, { ...original, idempotencyKey: expect.any(String) }); expect(vi.mocked(prepareTrip).mock.calls[1]![0].idempotencyKey).not.toBe(original.idempotencyKey)
expect(wrapper.emitted('saved')).toHaveLength(1)
expect(wrapper.text()).toContain('核对容量并发布余位')
expect(dialog.props('showConfirm')).toBe(false)