diff --git a/src/modules/appointment-calendar/AppointmentCalendarDialogs.native.test.ts b/src/modules/appointment-calendar/AppointmentCalendarDialogs.native.test.ts index e0b9f2b0..9f6df90e 100644 --- a/src/modules/appointment-calendar/AppointmentCalendarDialogs.native.test.ts +++ b/src/modules/appointment-calendar/AppointmentCalendarDialogs.native.test.ts @@ -124,13 +124,16 @@ it('preserves real FBA fields and entered values when expanding the create dialo expect(creationBody().get('[aria-label="预约保存回执"]').findAll('input, textarea, select')).toHaveLength(0) expect(creationBody().text()).toContain('AP-001') }) -it('shows every saved server field as readonly text including confirmed offsets and long remarks', async () => { +it('shows saved dates, confirmed offsets and long remarks without planned time ranges', async () => { const saved = { ...batchContext().appointment, plannedDate: '2026-10-26', plannedAt: '2026-10-26T08:00:00', plannedEndAt: '2026-10-26T18:00:00', timezone: 'America/Los_Angeles', appointmentStatus: 'SUCCESS', confirmationNo: 'CONFIRM-001', appointmentAt: '2026-11-01T01:30:00', appointmentEndAt: '2026-11-01T01:45:00', appointmentStartUtc: '2026-11-01T08:30:00Z', appointmentEndUtc: '2026-11-01T09:45:00Z', appointmentRemark: '完整预约备注'.repeat(30) } vi.mocked(createSourceAppointment).mockResolvedValue(saved) const wrapper = await open(); await create(wrapper) await creationBody().findAll('button').find(button => button.text() === '保存预约安排')!.trigger('click'); await flushPromises() const receipt = creationBody().get('[aria-label="预约保存回执"]') - for (const text of ['AP-001', saved.plannedDate, saved.plannedAt, saved.plannedEndAt, saved.timezone, '已取得对方正式确认', saved.confirmationNo, saved.appointmentAt, saved.appointmentEndAt, '-07:00', '-08:00', saved.appointmentRemark]) expect(receipt.text()).toContain(text) + for (const text of ['AP-001', saved.plannedDate, saved.timezone, '已取得对方正式确认', saved.confirmationNo, saved.appointmentAt, saved.appointmentEndAt, '-07:00', '-08:00', saved.appointmentRemark]) expect(receipt.text()).toContain(text) + expect(receipt.text()).not.toMatch(/计划开始时段|计划结束时段/) + expect(receipt.text()).not.toContain(saved.plannedAt) + expect(receipt.text()).not.toContain(saved.plannedEndAt) expect(receipt.findAll('input, textarea, select')).toHaveLength(0) expect(receipt.text()).not.toMatch(/item-1|customer-a|FBA_APPOINTMENT:1/) }) diff --git a/src/modules/appointment-calendar/AppointmentConfirmationCargo.test.ts b/src/modules/appointment-calendar/AppointmentConfirmationCargo.test.ts index 60e3234b..2b004beb 100644 --- a/src/modules/appointment-calendar/AppointmentConfirmationCargo.test.ts +++ b/src/modules/appointment-calendar/AppointmentConfirmationCargo.test.ts @@ -32,9 +32,9 @@ it('names the missing material and supplements the canonical booking inside the const wrapper = render(); await flushPromises() expect(resolvePlanningOrder).toHaveBeenCalledWith(lookup) expect(wrapper.text()).toContain('IN-TEST'); expect(wrapper.text()).toContain('缺少本票 FBA 货件号或追踪号') - expect(wrapper.text()).toContain('不能代替货件号'); expect(wrapper.text()).not.toContain(source.orderId) + expect(wrapper.text()).not.toContain(source.orderId) await wrapper.findAll('button').find(button => button.text() === '在此补齐资料')!.trigger('click'); await flushPromises() - expect((wrapper.get('input[type=number]').element as HTMLInputElement).value).toBe('20') + expect(wrapper.find('input[type=number]').exists()).toBe(false) await wrapper.get('form').trigger('submit'); await flushPromises() expect(saveCargoVerification).not.toHaveBeenCalled() await wrapper.get('textarea[aria-label="本票货件号"]').setValue('FBA-TEST') @@ -44,6 +44,22 @@ it('names the missing material and supplements the canonical booking inside the expect(wrapper.text()).toContain('资料齐全,无需重复填写') expect(wrapper.emitted('ready')?.at(-1)).toEqual([true]); wrapper.unmount() }) +it('allows missing or changed quantities to be verified before saving shipment references', async () => { + for (const cargo of [ + { ...context, effectivePackages: null }, + { ...context, sourceChanged: true }, + ]) { + vi.mocked(getCargoVerification).mockResolvedValue(cargo) + vi.mocked(saveCargoVerification).mockClear() + const wrapper = render(); await flushPromises() + await wrapper.findAll('button').find(button => button.text() === '在此补齐资料')!.trigger('click'); await flushPromises() + await wrapper.get('input[type=number]').setValue('20') + await wrapper.get('textarea[aria-label="本票货件号"]').setValue('FBA-TEST') + await wrapper.get('form').trigger('submit'); await flushPromises() + expect(saveCargoVerification).toHaveBeenCalledWith(source, expect.objectContaining({ packageCount: 20, shipmentReferences: ['FBA-TEST'] })) + wrapper.unmount() + } +}) it('leaves pending arrangements lazy and reads only when formal confirmation is selected', async () => { const wrapper = render(false); await flushPromises() expect(resolvePlanningOrder).not.toHaveBeenCalled() diff --git a/src/modules/appointment-calendar/AppointmentConfirmationCargo.vue b/src/modules/appointment-calendar/AppointmentConfirmationCargo.vue index 57027ebc..fd8e0e29 100644 --- a/src/modules/appointment-calendar/AppointmentConfirmationCargo.vue +++ b/src/modules/appointment-calendar/AppointmentConfirmationCargo.vue @@ -66,7 +66,6 @@ onBeforeUnmount(() => { ++generation; unregister?.() })

正式确认前:核对本次送仓货物

重新核对资料 -

本票总箱数用于校验预约货量;FBA 货件号或追踪号用于识别送的是哪批货。外部约号只代表仓库的预约确认号,不能代替货件号。

diff --git a/src/modules/appointment-calendar/AppointmentCreatePanel.vue b/src/modules/appointment-calendar/AppointmentCreatePanel.vue index 5b0667e0..facd6cca 100644 --- a/src/modules/appointment-calendar/AppointmentCreatePanel.vue +++ b/src/modules/appointment-calendar/AppointmentCreatePanel.vue @@ -129,7 +129,6 @@ onBeforeUnmount(() => { ++generation; ++selectionGeneration; ++destinationsReque
操作入仓码 / 外接登记号本票总箱数FBA 货件号 / 追踪号需要补充的资料
- diff --git a/src/modules/appointment-calendar/CargoVerificationForm.vue b/src/modules/appointment-calendar/CargoVerificationForm.vue index 93a1ae5f..8f69960b 100644 --- a/src/modules/appointment-calendar/CargoVerificationForm.vue +++ b/src/modules/appointment-calendar/CargoVerificationForm.vue @@ -59,14 +59,13 @@ onMounted(() => load())
系统单号{{ created.appointmentNo || '—' }}目的仓时区{{ created.timezone || '待核实' }}
计划送仓日期{{ createdForm.plannedDate || '—' }}本次登记{{ ({ PENDING: '等待对方确认', SUCCESS: '已取得对方正式确认', FAILED: '未约成', CANCELLED: '已取消' })[createdForm.appointmentStatus] }}
计划开始时段{{ createdForm.plannedAt || '—' }}计划结束时段{{ createdForm.plannedEndAt || '—' }}
外部约号{{ createdForm.confirmationNo || '—' }}
对方确认开始时间{{ createdForm.appointmentAt || '—' }}对方确认结束时间{{ createdForm.appointmentEndAt || '—' }}
确认开始时差{{ createdForm.startOffset || '—' }}确认结束时差{{ createdForm.endOffset || '—' }}