This commit is contained in:
2026-10-09 11:48:52 +08:00
parent 2aa20b7172
commit 07ba9fcb7c
6 changed files with 285 additions and 113 deletions
@@ -41,7 +41,7 @@ test('贴标申请移除操作项下方的解释文字,保留必要状态', ()
test('贴标申请可从当前客户仍有库存的入仓单或退货单选择来源', () => {
assert.match(view, /海外操作仓(中转仓)/)
assert.match(view, /选择有库存的入仓单或退货单/)
assert.match(view, /quantityUnit: candidate\.sourceType === 'RETURN_CARTON' \? '件' : '箱'/)
assert.match(view, /quantityUnit: candidate\.returnCartonId \? '件' : '箱'/)
assert.match(view, /当前中转仓暂无可用库存/)
assert.match(view, /relabelInboundOptions/)
assert.match(view, /listRelabelInventoryCandidates\(form\.warehouse\)/)
@@ -96,7 +96,7 @@ test('上传关系支持部分或全量选择后导入本次换标明细', () =>
})
test('箱唛换标一行固定代表一箱', () => {
const cartonTable = view.match(/<div v-if="!isReturnRelabelSource && labelingMode === 'carton'" class="warehouse-table-scroll">.+?(?=<div v-else class="warehouse-table-scroll">)/s)?.[0]
const cartonTable = view.match(/<div v-if="labelingMode === 'carton'" class="warehouse-table-scroll">.+?(?=<div v-else class="warehouse-table-scroll">)/s)?.[0]
assert.ok(cartonTable)
assert.match(cartonTable, /<th>箱数<\/th>/)
assert.match(cartonTable, /<td><strong>1 箱<\/strong><\/td>/)
@@ -141,13 +141,12 @@ test('一次申请单选库存来源且退货库存按退货单汇总', () => {
assert.match(view, /current\.availablePackages \+= inventoryQuantity\(candidate\.availablePackages\)/)
assert.match(view, /availablePackages: inventoryQuantity\(candidate\.availablePackages\)/)
assert.match(view, /const quantity = Number\(value\)/)
assert.match(view, /interface ReturnRelabelSkuRow/)
assert.match(view, /current\.availableQuantity \+= quantity/)
assert.match(view, /库存总数/)
assert.match(view, /本次贴标数量/)
assert.match(view, /returnRelabelSkuRows\.value = \[\.\.\.grouped\.values\(\)\]/)
assert.match(view, /createReturnRelabel\(selectedReturnOrderNo\.value/)
assert.match(view, /uploadReturnRelabelFile\(created\.relabelNo, fileScope, selectedFile\)/)
assert.match(view, /可用散件 SKU/)
assert.match(view, /系统箱唛号/)
assert.match(view, /箱内 SKU/)
assert.match(view, /returnLooseCandidates/)
assert.match(view, /returnBoxCandidates/)
assert.doesNotMatch(view, /submitReturnRelabel/)
assert.doesNotMatch(view, /candidate\.sourceType === 'RETURN_CARTON'\) rows\.push\(\.\.\.Array\.from/)
assert.match(view, /sourceInventoryBalanceId: String\(candidate\.inventoryBalanceId\)/)
assert.match(view, /sourceInventoryPositionId: String\(position\.positionId\)/)
@@ -155,11 +154,11 @@ test('一次申请单选库存来源且退货库存按退货单汇总', () => {
assert.match(api, /sourceInventoryBalanceId\?: string; sourceInventoryPositionId\?: string; sourceInboundOrderId\?: string; returnCartonId\?: string/)
})
test('退货贴标总文件二选一且提交使用退货专用链路', () => {
test('退货贴标复用普通申请,混贴要求两份总文件', () => {
assert.match(view, /cartonTotalFile\.value && !requiresBothTotalFiles\.value\) clearCreateTotalFile\('SKU_TOTAL'\)/)
assert.match(view, /skuTotalFile\.value && !requiresBothTotalFiles\.value\) clearCreateTotalFile\('CARTON_TOTAL'\)/)
assert.match(view, /fileScope = cartonTotalFile\.value \? 'CARTON_TOTAL' as const : 'SKU_TOTAL' as const/)
assert.match(view, /destinationFbaWarehouseId: String\(destination\.id\)/)
assert.match(view, /const created = await createRelabel/)
assert.doesNotMatch(view, /&& !isReturnRelabelSource.value && labelingMode.value === 'carton_and_sku'/)
})
test('SKU 和箱唛都换时两份总文件必须同时上传', () => {