Commit 4bfa131e by wusiyi

fix:质检bug修复

parent 4e94662b
......@@ -514,7 +514,10 @@ const props = withDefaults(
downloadApi?: (
ids: number[],
) => Promise<{ code?: number; message?: string }>
printApi?: (ids: number[]) => Promise<{ code?: number; message?: string }>
printApi?: (
ids: number[],
detail?: Record<string, unknown>,
) => Promise<{ code?: number; message?: string }>
defaultAutoSure?: boolean
showOperationNoRow?: boolean
notFoundMessage?: string
......@@ -708,7 +711,10 @@ const initPrintDevice = () => {
const getPrintData = async () => {
if (!detail.value || detail.value.id === -1 || !props.printApi) return
const res = await props.printApi([detail.value.id])
const res = await props.printApi(
[detail.value.id],
detail.value as unknown as Record<string, unknown>,
)
if (!res.message) return
print(filePath + res.message, printDevice.value)
}
......
......@@ -1396,6 +1396,7 @@ import {
remanufactureApi,
} from '@/api/factoryOrderNew'
import { getConfigApi } from '@/api/order'
import { printProductionQrCode } from '@/api/podOrder'
import { getLogisticsWayApi } from '@/api/podUsOrder'
import BigNumber from 'bignumber.js'
import { filePath } from '@/api/axios'
......@@ -3540,11 +3541,17 @@ const completeOperationById = (
const downloadOperationById = (ids: number[]) =>
downloadOperationMaterialApi(ids)
const printOperationById = (ids: number[]) =>
printNewPodOrderProductionOrderApi(ids) as Promise<{
const printOperationById = (
ids: number[],
detail?: Record<string, unknown>,
) => {
const id = Number(detail?.podOrderProductId ?? ids[0])
return printProductionQrCode(id, 'NEWP') as Promise<{
code?: number
message?: string
}>
}
const handleFastProductionSuccess = (data: ResultInfoDataItem[]) => {
if (fastKey.value === 'productionScan' || fastKey.value === 'qualityScan') {
ElMessage.success('操作成功')
......
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