Release/test 合并上生产 #2

Merged
admin merged 736 commits from release/test into main 2026-09-17 11:50:56 +08:00
2 changed files with 20 additions and 1 deletions
Showing only changes of commit 61c8cf13f7 - Show all commits
@@ -57,4 +57,23 @@ describe('OceanBookingLinkDialog', () => {
expect(wrapper.emitted('linked')).toHaveLength(1)
wrapper.unmount()
})
it('prefills and preserves a real container number recorded before booking linkage', async () => {
const existingContainer = { ...container, containerNo: 'MSCU6639870' }
const wrapper = mount(OceanBookingLinkDialog, {
props: { modelValue: true, container: existingContainer },
global: { plugins: [ElementPlus] },
})
await flushPromises()
const vm = wrapper.vm as unknown as { candidateKey: string; containerNo: string; save: () => Promise<void> }
expect(vm.containerNo).toBe('MSCU6639870')
vm.candidateKey = '101:202'
await vm.save()
expect(linkContainerOceanBooking).toHaveBeenCalledExactlyOnceWith('9001', {
oceanBookingId: '101', requirementId: '202', containerNo: 'MSCU6639870', expectedVersion: 7,
})
wrapper.unmount()
})
})
@@ -31,7 +31,7 @@ function close() { emit('update:modelValue', false) }
async function loadCandidates() {
const target = props.container
candidateKey.value = ''
containerNo.value = ''
containerNo.value = normalizeContainerNo(target?.containerNo)
candidates.value = []
error.value = null
if (!target) return