refactor: remove dropship printing from PDA

This commit is contained in:
2026-09-14 17:52:00 +08:00
parent 9933b96189
commit f8f21b9f37
6 changed files with 11 additions and 76 deletions
+4 -10
View File
@@ -19,13 +19,9 @@ test('dropship palletization adapter uses only the dedicated production PDA cont
const api = await read('../api/pda-dropship.js')
for (const route of [
'/tasks/pending', '/cartons/resolve', '/cartons/count',
'/pallets/bind-pending', '/seal', '/print'
'/pallets/bind-pending', '/seal'
]) assert.match(api, new RegExp(route.replaceAll('/', '\\/')))
assert.match(api, /apiDownload/)
assert.match(api, /downloadAllDropshipPalletLabels/)
assert.match(api, /pallets\/print\?warehouseId=/)
assert.match(api, /application\\\/pdf/)
assert.match(api, /session\.apiBase \|\| '\/api\/platform\/v1'/)
assert.doesNotMatch(api, /apiDownload|downloadAllDropshipPalletLabels|pallets\/print/)
assert.match(api, /tasks\/pending\?\$\{params\.join\('&'\)\}/)
assert.match(api, /warehouseId=\$\{encodeURIComponent\(warehouseId\)\}/)
assert.match(api, /operationId\('count'/)
@@ -45,7 +41,7 @@ test('palletization UI accepts carton and pre-generated pallet scans in either o
assert.match(tasks, /\.search-card\s*\{[^}]*display:\s*flex;[^}]*box-shadow:\s*none;/)
assert.match(tasks, /\.task-list\s*\{[^}]*overflow:\s*hidden;[^}]*border-radius:\s*7px;/)
assert.match(tasks, /\.task-card\s*\{[^}]*margin:\s*0;[^}]*border-radius:\s*0;[^}]*box-shadow:\s*none;/)
for (const text of ['一件代发入库', '领取并开始入库', '扫箱清点', '读取 SKU', '确认清点', '扫托盘', '可选', '差异说明', '托盘码', '打开全部 A4 托盘单', '封托']) assert.match(work, new RegExp(text))
for (const text of ['一件代发入库', '领取并开始入库', '扫箱清点', '读取 SKU', '确认清点', '扫托盘', '可选', '差异说明', '托盘码', '封托']) assert.match(work, new RegExp(text))
for (const text of ['sku-label', 'sku-code', 'quantity-stepper', 'adjustQuantity']) assert.match(work, new RegExp(text))
assert.match(work, /减少 \$\{line\.skuCode\} 清点数量/)
assert.match(work, /增加 \$\{line\.skuCode\} 清点数量/)
@@ -70,11 +66,9 @@ test('palletization UI accepts carton and pre-generated pallet scans in either o
assert.match(work, /selectedPalletNo/)
assert.match(work, /已选择仓库开放托盘/)
assert.match(work, /直接扫描托盘码,只显示当前操作的托盘/)
assert.match(work, /打开全部 A4 托盘单/)
assert.match(work, /currentPalletDetails/)
assert.doesNotMatch(work, /v-for="pallet in task\.pallets"/)
assert.match(work, /downloadDropshipPalletLabel/)
assert.match(work, /downloadAllDropshipPalletLabels/)
assert.doesNotMatch(work, /downloadDropshipPalletLabel|downloadAllDropshipPalletLabels|打开当前托盘 A4 单|打开全部 A4 托盘单/)
assert.match(work, /formatApiError/)
assert.doesNotMatch(work, /Number\(this\.warehouseId\)/)
assert.doesNotMatch(work, /taskId\s*\}\}|warehouseId\s*\}\}|inboundId\s*\}\}/)
+2 -3
View File
@@ -28,11 +28,10 @@ test('formal palletization preserves both scan orders, moves and sealing guards'
assert.match(page, /currentPalletDetails\?\.cartons/)
assert.doesNotMatch(page, /模拟成功|actualSkuQuantity/)
})
test('palletization preserves compact multi-SKU input and printing', () => {
test('palletization preserves compact multi-SKU input without desktop printing actions', () => {
assert.match(page, /v-for="\(line, index\) in skuCounts"/)
assert.match(page, /quantity-stepper/)
assert.match(page, /printAllPallets/)
assert.match(page, /printPallet/)
assert.doesNotMatch(page, /printPallet|printAllPallets|打开当前托盘 A4 单|打开全部 A4 托盘单/)
})
test('count and move use the formal multi-SKU contract with versioned retries', () => {
for (const path of ['cartons/count', 'pallets/bind-pending', '/move', '/seal']) assert.ok(api.includes(path))