优化提交

This commit is contained in:
2026-09-28 17:26:37 +08:00
parent aa189146a0
commit f24674dddc
5 changed files with 142 additions and 58 deletions
@@ -251,6 +251,7 @@ test('贴标申请详情使用紧凑订单概览并中文展示换标状态', ()
assert.match(view, /WAIT_PROCESSING: '待仓库处理'/)
assert.match(view, /relabelFulfillmentLabel\(selectedRelabelDetail\?\.application\.fulfillmentStatus\)/)
assert.match(view, />\.warehouse-detail-header\+\.warehouse-card \.warehouse-detail-grid\{grid-template-columns:repeat\(4,minmax\(180px,1fr\)\)/)
})
test('仓储转运详情按接口具名字段展示订单概览', () => {
const overview = view.split('<h3>订单概览</h3>')[1]?.split('warehouse-transfer-cargo-card')[0] || ''
assert.match(overview, /v-if="props\.service === 'transfer'"/)
@@ -317,7 +318,9 @@ test('仓储转运可在新建页直接提交,也可保存草稿后编辑提
assert.match(api, /warehouse-transfers\/\$\{encodeURIComponent\(transferNo\)\}\/submit/)
assert.match(view, /submit\('draft'\).*保存草稿/s)
assert.match(view, /async function openEdit\(transferNo: string\)/)
assert.match(view, /item\.__status === 'DRAFT'.*openEdit\(item\['0'\]\)/s)
assert.match(view, /\['DRAFT', 'REJECTED'\]\.includes\(item\.__status\).*openEdit\(item\['0'\]\)/s)
assert.match(view, /\['DRAFT', 'REJECTED'\]\.includes\(detail\.status \|\| ''\)/)
assert.match(view, /\['DRAFT', 'REJECTED'\]\.includes\(selectedDetail\?\.status \|\| ''\)/)
assert.match(view, /v-if="props\.service === 'transfer'"[^>]*type="primary"[^>]*native-type="submit"[^>]*>提交订单/)
assert.match(view, /await updateTransfer\(editingTransferNo\.value, payload\)/)
assert.match(view, /await submitTransfer\(transferNo\)/)
@@ -330,6 +333,22 @@ test('仓储转运可在新建页直接提交,也可保存草稿后编辑提
assert.doesNotMatch(view, /<h3>箱唛明细<\/h3>/)
})
test('编辑仓储转运时加载库存转运来源候选', () => {
assert.match(view, /async function loadTransferInventoryCandidates\(warehouseId: string\)/)
assert.match(view, /if \(props\.service === 'transfer' && form\.warehouse\) \{[\s\S]*await loadTransferInventoryCandidates\(form\.warehouse\)/)
assert.match(view, /transferInventoryCandidates\.value = await listRelabelInventoryCandidates\(warehouseId\)/)
assert.match(view, /transferInventoryOptions\.value\.some\(\(option\) => option\.value === sourceInboundCode\)/)
assert.match(view, /selectedTransferInventory\.value = sourceInboundCode/)
assert.match(view, /detail\.sourceOrders \|\| \[\]/)
})
test('仓储转运来源订单雪花 ID 按字符串传递,避免 Number 精度丢失', () => {
assert.match(view, /const selectedTransferSourceOrderIds = ref<string\[\]>\(\[\]\)/)
assert.match(view, /historical\.map\(\(item\) => String\(item\.id \|\| ''\)\)/)
assert.match(api, /sourceLastlegOrderIds\?: string\[\]/)
assert.doesNotMatch(view, /sourceLastlegOrderIds[\s\S]{0,160}Number\(/)
})
test('转运贴标单在PDA确认库存前不误报附件上传失败', () => {
assert.match(view, /if \(!relabelNo\) \{[\s\S]*PDA 入库确认后将自动生成关联换标单/)
assert.match(view, /届时请进入关联换标单详情上传贴标总文件/)