|
|
@ -102,6 +102,7 @@ |
|
|
|
import {dateNow} from "@/utils/date"; |
|
|
|
import {dateNow} from "@/utils/date"; |
|
|
|
import NProgress from 'nprogress'; |
|
|
|
import NProgress from 'nprogress'; |
|
|
|
import 'nprogress/nprogress.css'; |
|
|
|
import 'nprogress/nprogress.css'; |
|
|
|
|
|
|
|
import { getLodop } from '@/utils/LodopFuncs'; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
@ -286,6 +287,7 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
//批量打印数据处理代码 |
|
|
|
//批量打印数据处理代码 |
|
|
|
|
|
|
|
//批量打印数据处理代码 |
|
|
|
printTemplate() { |
|
|
|
printTemplate() { |
|
|
|
let that=this; |
|
|
|
let that=this; |
|
|
|
this.selectionList.map(item=>{ |
|
|
|
this.selectionList.map(item=>{ |
|
|
@ -300,6 +302,24 @@ |
|
|
|
// checkcode.push(item.orderPackageCode) |
|
|
|
// checkcode.push(item.orderPackageCode) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//批量打印打印代码 |
|
|
|
|
|
|
|
w_print(templateData){ |
|
|
|
|
|
|
|
let LODOP = getLodop(); |
|
|
|
|
|
|
|
// let templateData = "res.data.data"; |
|
|
|
|
|
|
|
// console.log(templateData); |
|
|
|
|
|
|
|
LODOP.PRINT_INITA(1, 1, 900, 660, '测试预览功能'); |
|
|
|
|
|
|
|
LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Godex G500'); |
|
|
|
|
|
|
|
LODOP.SET_PRINT_STYLEA(0,"TextNeatRow",true);//允许标点溢出,且英文单词拆开 |
|
|
|
|
|
|
|
// // 设置打印整宽且不变形 |
|
|
|
|
|
|
|
LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Auto-Width'); |
|
|
|
|
|
|
|
// // 设置打印后自动关闭 |
|
|
|
|
|
|
|
LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1); |
|
|
|
|
|
|
|
// // data就是一段html文本 |
|
|
|
|
|
|
|
LODOP.ADD_PRINT_HTM('0%', '0%', '100%', '100%', templateData); |
|
|
|
|
|
|
|
// LODOP.PREVIEW(); //预览(预览打印无脚标) |
|
|
|
|
|
|
|
LODOP.PRINT(); //直接打印 |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
handleqr(){ |
|
|
|
handleqr(){ |
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
if (this.selectionList.length === 0) { |
|
|
|