This commit is contained in:
2026-10-16 16:19:22 +08:00
parent 45f662ecf2
commit fbee53c9de
2 changed files with 14 additions and 0 deletions
@@ -121,3 +121,13 @@ describe('转运预报与实际签收明细', () => {
expect(wrapper.emitted('summary')!.at(-1)![0]).toMatchObject({ forecastBoxes: 9 })
})
})
// 完成原因直接展示,多个箱保存同一原因时只显示一次。
it('displays saved discrepancy reason once without opening box details', async () => {
const value = fixture()
value.cartons.forEach(box => { box.discrepancyReason = '短收一箱,客户漏发' })
vi.mocked(getWarehouseTransfer).mockResolvedValue(value)
const wrapper = render(); await flushPromises()
expect(wrapper.findAll('.receipt-discrepancy-reason')).toHaveLength(1)
expect(wrapper.find('.receipt-discrepancy-reason').text()).toBe('实收差异原因:短收一箱,客户漏发')
})