From 33a47dad2c00953d20770d249a1ed28f90f31146 Mon Sep 17 00:00:00 2001 From: liufumingren Date: Wed, 13 May 2026 09:12:25 +0800 Subject: [PATCH] 1 --- src/api/print/print.ts | 6 +++--- src/components/BatchReceivingPrintDialog.vue | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/api/print/print.ts b/src/api/print/print.ts index beed5406..b76faeb4 100644 --- a/src/api/print/print.ts +++ b/src/api/print/print.ts @@ -128,8 +128,8 @@ export function getComputer() { }) } -export function getComputerPrinter(id: string | number) { - const numId = Number(id) +export function getComputerPrinter(computerId: string | number) { + const numId = Number(computerId) return request({ url: '/system', method: 'post', @@ -138,7 +138,7 @@ export function getComputerPrinter(id: string | number) { v, timestamp: stamp() }, - data: Number.isFinite(numId) ? { id: numId } : { id } + data: Number.isFinite(numId) ? { id: numId } : { id: computerId } }) } diff --git a/src/components/BatchReceivingPrintDialog.vue b/src/components/BatchReceivingPrintDialog.vue index e5d68fc7..cc36b620 100644 --- a/src/components/BatchReceivingPrintDialog.vue +++ b/src/components/BatchReceivingPrintDialog.vue @@ -39,7 +39,7 @@ - + @@ -434,8 +434,9 @@ async function loadPrintOptions() { if (stations && (stations.code === 200 || stations.code === 0)) { const rawList: any[] = stations.data?.list || stations.data || [] stationOptions.value = rawList.map((item: any) => ({ - id: item.id, - name: item.name || item.label || String(item.id) + id: item.id ?? item.computer_id, + computer_id: item.computer_id ?? item.computerId ?? item.id, + name: item.name || item.label || String(item.computer_id ?? item.computerId ?? item.id) })) } else { console.warn('获取打印台列表失败:', stations)