This commit is contained in:
2026-08-17 19:13:25 +08:00
parent 28f2cd4cc5
commit d618683467
22 changed files with 263 additions and 50 deletions
@@ -95,6 +95,31 @@ describe('InboundTaskList measurement scope', () => {
expect(source).not.toContain("name: 'inbound-order-detail', params: { inboundId: row.id }")
})
it('shows authoritative measurement totals with operation first and no internal IDs as primary columns', () => {
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')
const columnsSource = source.slice(source.indexOf('const columns'), source.indexOf('function text'))
expect(columnsSource.indexOf("key: 'actions'")).toBeLessThan(columnsSource.indexOf("key: 'inboundCode'"))
expect(columnsSource).toContain("key: 'customerName', label: '客户'")
expect(columnsSource).toContain("key: 'channelName', label: '渠道'")
expect(columnsSource).toContain("key: 'totalPackageCount', label: '总箱数'")
expect(columnsSource).toContain("key: 'palletCount', label: '托盘数'")
expect(columnsSource).toContain("key: 'actualGrossWeightKg', label: '实测毛重(kg)'")
expect(columnsSource).toContain("key: 'actualNetWeightKg', label: '货物重量(kg)'")
expect(columnsSource).toContain("key: 'actualVolumeCbm', label: '实测体积(m³)'")
expect(columnsSource).toContain("key: 'measureCompletedAt', label: '提交时间'")
expect(columnsSource).not.toContain("key: 'id'")
expect(columnsSource).not.toContain("key: 'orderId'")
})
it('renders missing list facts as an explicit dash instead of guessing values', () => {
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')
expect(source).toContain("value === null || value === undefined || value === '' ? '—'")
expect(source).toContain("value === null || value === undefined ? '—'")
expect(source).toContain("if (!value) return '—'")
})
it('refreshes cached task lists when users return from measurement work', () => {
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')