Commit a3972075 by wusiyi

fix: 快捷质检打印生产单bug修复

parent 5b884426
......@@ -514,10 +514,7 @@ const props = withDefaults(
downloadApi?: (
ids: number[],
) => Promise<{ code?: number; message?: string }>
printApi?: (
ids: number[],
detail?: Record<string, unknown>,
) => Promise<{ code?: number; message?: string }>
printApi?: (id: number) => Promise<{ code?: number; message?: string }>
defaultAutoSure?: boolean
showOperationNoRow?: boolean
notFoundMessage?: string
......@@ -687,10 +684,8 @@ const initPrintDevice = () => {
const getPrintData = async () => {
if (!detail.value || detail.value.id === -1 || !props.printApi) return
const res = await props.printApi(
[detail.value.id],
detail.value as unknown as Record<string, unknown>,
)
const res = await props.printApi(detail.value.id)
if (!res.message) return
print(filePath + res.message, printDevice.value)
}
......
......@@ -3546,11 +3546,7 @@ const completeOperationById = (
const downloadOperationById = (ids: number[]) =>
downloadOperationMaterialApi(ids)
const printOperationById = (
ids: number[],
detail?: Record<string, unknown>,
) => {
const id = Number(detail?.podOrderProductId ?? ids[0])
const printOperationById = (id: number) => {
return printProductionQrCode(id, 'NEWP') as Promise<{
code?: number
message?: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment