fix:老车间工单打印报错

This commit is contained in:
zhangzq
2024-11-07 10:24:54 +08:00
parent 5d09730b64
commit 2525cd6861

View File

@@ -600,7 +600,6 @@ export default {
},
printNumber() {
const parse = JSON.parse(this.currentRow.package_ext)
this.currentRow.print_num = this.printForm.print_num
this.currentRow.is_flip = parse.is_flip
this.currentRow.target_roadway = parse.target_roadway
@@ -609,18 +608,19 @@ export default {
this.crud.notify('该工单需要打印的箱数为0', CRUD.NOTIFICATION_TYPE.INFO)
return
}
debugger
res.forEach((item) => {
console.log(item)
const LODOP = getLodop()
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
// 打印纸张大小设置https://www.it610.com/article/2094844.html
LODOP.SET_PRINT_PAGESIZE(1, '80mm', '50mm', '')
// LODOP.ADD_PRINT_RECT('0mm', '0mm', '48mm', '28mm', 0, 1)
LODOP.ADD_PRINT_BARCODE('10mm', '12mm', '60mm', '25mm', '128Auto', item.bar_code)
LODOP.ADD_PRINT_BARCODE('10mm', '12mm', '60mm', '25mm', '128Auto', item)
LODOP.SET_PRINT_STYLEA(0, 'ShowBarText', 0)
LODOP.ADD_PRINT_TEXT('35mm', '22mm', '40mm', '20mm', item.bar_code.substring(0, 9))
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 20)
LODOP.ADD_PRINT_TEXT('42mm', '25mm', '40mm', '20mm', item.bar_code.substring(9, 16))
console.log(item.barcode)
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 20)
LODOP.PRINT()// 打印
// LODOP.PREVIEW()