| | |
| | | return requestClient.download('/mes/wm/barcode/export-excel', { params }); |
| | | } |
| | | |
| | | /** 生成条码内容 */ |
| | | export function generateBarcodeContent(bizType: number, bizCode: string) { |
| | | /** 生成条码内容(支持多占位符组合,可传入业务名称) */ |
| | | export function generateBarcodeContent( |
| | | bizType: number, |
| | | bizCode: string, |
| | | bizName?: string, |
| | | ) { |
| | | return requestClient.get<string>('/mes/wm/barcode/generate-content', { |
| | | params: { bizCode, bizType }, |
| | | params: { bizCode, bizName, bizType }, |
| | | }); |
| | | } |
| | | |
| | | /** 生成条码/二维码图片(服务端 zxing 成图,返回 PNG Base64,不落库) */ |
| | | export function renderBarcodeImage( |
| | | content: string, |
| | | format?: number, |
| | | width?: number, |
| | | height?: number, |
| | | ) { |
| | | return requestClient.post<string>('/mes/wm/barcode/render', null, { |
| | | params: { content, format, height, width }, |
| | | }); |
| | | } |
| | | |
| | | /** 解析条码内容(优先精确命中,其次按启用配置模板反解,返回业务字段) */ |
| | | export function parseBarcodeContent(content: string) { |
| | | return requestClient.post<Record<string, any>>('/mes/wm/barcode/parse', null, { |
| | | params: { content }, |
| | | }); |
| | | } |