From c2060e4d577f668e9c36cca4161f1d77fb40ecd9 Mon Sep 17 00:00:00 2001 From: yin <3313488199@qq.com> Date: Wed, 13 May 2026 18:14:13 +0800 Subject: [PATCH] =?UTF-8?q?5=E6=9C=8813?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/order.print/orderprint.ts | 4 +- src/api/print/print.ts | 28 ++- src/components/BatchReceivingPrintDialog.vue | 10 +- .../waveOrder/GroupWaveBatchListPanel.vue | 34 +--- .../order/waveOrder/WavePickTaskListPanel.vue | 6 +- .../WavePlatformPrintPreviewDialog.vue | 37 +++- .../order/waveOrder/config/wave-config.ts | 45 ++--- .../interface-details/interface-details.json | 178 +++++++++++------- .../data/module-list/module-list.json | 107 +++++------ .../data/module/config/_module.lifecycle.json | 2 +- .../data/module/config/module.json | 4 +- .../module/dashboard/_module.lifecycle.json | 2 +- .../data/module/dashboard/module.json | 4 +- .../data/module/index/_module.lifecycle.json | 2 +- .../data/module/index/module.json | 4 +- .../order.archiveorder/_module.lifecycle.json | 2 +- .../module/order.archiveorder/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../order.deliveryexpectionorder/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../module/order.deliveryorder/module.json | 4 +- .../order.entrustorder/_module.lifecycle.json | 2 +- .../module/order.entrustorder/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../module/order.expectionorder/module.json | 4 +- .../module/order.index/_module.lifecycle.json | 2 +- .../data/module/order.index/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../module/order.outboundorder/module.json | 4 +- .../order.pendingorder/_module.lifecycle.json | 2 +- .../module/order.pendingorder/module.json | 4 +- .../module/order.print/_module.lifecycle.json | 2 +- .../data/module/order.print/module.json | 26 ++- .../order.revieworder/_module.lifecycle.json | 2 +- .../data/module/order.revieworder/module.json | 4 +- .../module/order.wave/_module.lifecycle.json | 2 +- .../data/module/order.wave/module.json | 9 +- .../data/module/order/_module.lifecycle.json | 2 +- .../data/module/order/module.json | 8 +- .../data/module/pick/_module.lifecycle.json | 2 +- .../data/module/pick/module.json | 4 +- .../data/module/print/_module.lifecycle.json | 2 +- .../data/module/print/module.json | 67 +++++-- .../printer.station/_module.lifecycle.json | 2 +- .../data/module/printer.station/module.json | 4 +- .../setting.account/_module.lifecycle.json | 2 +- .../data/module/setting.account/module.json | 4 +- .../setting.express/_module.lifecycle.json | 2 +- .../data/module/setting.express/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../setting.expressinterface/module.json | 4 +- .../setting.permission/_module.lifecycle.json | 2 +- .../module/setting.permission/module.json | 4 +- .../setting.platform/_module.lifecycle.json | 2 +- .../data/module/setting.platform/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../module/setting.printtemplate/module.json | 4 +- .../setting.role/_module.lifecycle.json | 2 +- .../data/module/setting.role/module.json | 4 +- .../setting.warehouse/_module.lifecycle.json | 2 +- .../data/module/setting.warehouse/module.json | 4 +- .../data/module/stock/_module.lifecycle.json | 2 +- .../data/module/stock/module.json | 4 +- .../storage.entry/_module.lifecycle.json | 2 +- .../data/module/storage.entry/module.json | 4 +- .../storage.inventory/_module.lifecycle.json | 2 +- .../data/module/storage.inventory/module.json | 4 +- .../storage.stockout/_module.lifecycle.json | 2 +- .../data/module/storage.stockout/module.json | 4 +- .../storage_receiving/_module.lifecycle.json | 2 +- .../data/module/storage_receiving/module.json | 4 +- .../data/module/store/_module.lifecycle.json | 2 +- .../data/module/store/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../module/storewarehouse.store/module.json | 10 +- .../data/module/user/_module.lifecycle.json | 2 +- .../data/module/user/module.json | 4 +- .../module/warehouse/_module.lifecycle.json | 2 +- .../data/module/warehouse/module.json | 4 +- .../api-doc-system/data/pending-updates.json | 106 +++++------ 80 files changed, 479 insertions(+), 386 deletions(-) diff --git a/src/api/order.print/orderprint.ts b/src/api/order.print/orderprint.ts index 6232ac11..f171d365 100644 --- a/src/api/order.print/orderprint.ts +++ b/src/api/order.print/orderprint.ts @@ -19,10 +19,12 @@ export type GetWavePlatformPrintDataParams = { wave_ids: Array } -/** 接口文档:summary / wave_ids / platform_groups / order_list / ext */ +/** 接口文档:summary / wave_ids / waveGroups(主)/ platform_groups、order_list(兼容)/ ext */ export type WavePlatformPrintDataPayload = { summary?: Record wave_ids?: Array + /** 主返回:波次 → 平台 → 订单 */ + waveGroups?: unknown[] platform_groups?: unknown[] order_list?: Record[] ext?: Record diff --git a/src/api/print/print.ts b/src/api/print/print.ts index b76faeb4..e48df997 100644 --- a/src/api/print/print.ts +++ b/src/api/print/print.ts @@ -169,6 +169,26 @@ export function getPrintRecordItem(id: string | number) { }) } +/** print.send 请求体(与 print 模块接口一致) */ +export type PrintSendParams = { + computerId: string + count?: number + data: Record + printer: string + template: Record + /** 业务时间戳,可选;接口类型为 string */ + timestamp?: string + type: string +} + +/** print.send 业务响应字段(成功 code 多为 200,flag 为 success) */ +export type PrintSendResult = { + flag?: string + code?: number + message?: string + printId?: number +} + export function savePrinters(data: { defaultPrinter: string express?: Array> @@ -194,7 +214,11 @@ export function savePrinters(data: { }) } -export function sendPrint(data: Record) { +export function sendPrint(data: PrintSendParams) { + const body: PrintSendParams = { ...data } + if (body.timestamp !== undefined && body.timestamp !== null && typeof body.timestamp !== 'string') { + body.timestamp = String(body.timestamp) + } return request({ url: '/system', method: 'post', @@ -203,6 +227,6 @@ export function sendPrint(data: Record) { v, timestamp: stamp() }, - data + data: body }) } diff --git a/src/components/BatchReceivingPrintDialog.vue b/src/components/BatchReceivingPrintDialog.vue index cc36b620..a4a6b296 100644 --- a/src/components/BatchReceivingPrintDialog.vue +++ b/src/components/BatchReceivingPrintDialog.vue @@ -547,12 +547,12 @@ async function doPrint() { const selectedTemplateObj = templateOptions.value.find((item: any) => item.id === printSettings.template) || null const printPayload = { type: 'customize', - computerId: printSettings.station, + computerId: String(printSettings.station), printer: printSettings.printer, - template: selectedTemplateObj, - data: { ...printForm }, - timestamp: Date.now(), - size: 1 + template: (selectedTemplateObj || {}) as Record, + data: { ...printForm } as Record, + timestamp: String(Date.now()), + count: 1 } const res: any = await stationApi.sendPrint(printPayload) diff --git a/src/views/order/waveOrder/GroupWaveBatchListPanel.vue b/src/views/order/waveOrder/GroupWaveBatchListPanel.vue index ddee169f..1ccff3ff 100644 --- a/src/views/order/waveOrder/GroupWaveBatchListPanel.vue +++ b/src/views/order/waveOrder/GroupWaveBatchListPanel.vue @@ -383,7 +383,7 @@ {{ getGroupOrderItemSnapshotText(row) }} - +