diff --git a/api/pda-dropship.js b/api/pda-dropship.js index f1d744b..67a9e00 100644 --- a/api/pda-dropship.js +++ b/api/pda-dropship.js @@ -59,3 +59,13 @@ export function downloadDropshipPalletLabel(taskId, warehouseId, palletId) { return response.tempFilePath }) } + +export function downloadAllDropshipPalletLabels(taskId, warehouseId) { + const baseUrl = String(session.apiBase || '/api/platform/v1').replace(/\/$/, '') + const url = `${baseUrl}${ROOT}/tasks/${encodeURIComponent(taskId)}/pallets/print?warehouseId=${encodeURIComponent(stableId(warehouseId))}` + return apiDownload({ url }).then((response) => { + const contentType = response.header?.['Content-Type'] || response.header?.['content-type'] || '' + if (response.statusCode < 200 || response.statusCode >= 300 || !response.tempFilePath || (contentType && !/^application\/pdf/i.test(contentType))) throw new Error('全部托盘码打印文件生成失败') + return response.tempFilePath + }) +} diff --git a/pages/dropship-palletization/dropship-palletization.vue b/pages/dropship-palletization/dropship-palletization.vue index 4087725..50cd7f9 100644 --- a/pages/dropship-palletization/dropship-palletization.vue +++ b/pages/dropship-palletization/dropship-palletization.vue @@ -54,14 +54,13 @@ - 2. 托盘码打开 A4 托盘信息单,装完后封托 - 暂无托盘 - - {{ pallet.palletNo }}{{ pallet.status === 'SEALED' ? '已封托' : '待封托' }} - {{ pallet.cartonCount || 0 }} 箱 · {{ pallet.skuCount || 0 }} SKU · {{ pallet.weightKg || 0 }} kg · {{ pallet.volumeCbm || 0 }} m³ - - - + 2. 托盘操作直接扫描托盘码,只显示当前操作的托盘 + 已生成 {{ task.generatedPalletCount || 0 }} 个托盘码 + + {{ currentPalletDetails.palletNo }}{{ currentPalletDetails.status === 'SEALED' ? '已封托' : '待封托' }} + {{ currentPalletDetails.cartonCount || 0 }} 箱 · {{ currentPalletDetails.skuCount || 0 }} SKU · {{ currentPalletDetails.weightKg || 0 }} kg · {{ currentPalletDetails.volumeCbm || 0 }} m³ + + @@ -72,7 +71,7 @@