|
|
|
@ -12,7 +12,7 @@ const handleTitlePrint = (LODOP, templateData)=>{
|
|
|
|
|
// // 设置打印后自动关闭
|
|
|
|
|
LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1); |
|
|
|
|
// // data就是一段html文本
|
|
|
|
|
LODOP.ADD_PRINT_HTM('40', '0%', '100%', '100%', templateData); |
|
|
|
|
LODOP.ADD_PRINT_HTM('30', '0%', '100%', '100%', templateData); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 打印配送单 */ |
|
|
|
@ -48,12 +48,16 @@ const print = (nodeList, type = 'deliveryPrint') => {
|
|
|
|
|
// 循环列表内元素并打印
|
|
|
|
|
nodeList.forEach(orderNode => { |
|
|
|
|
let templateData = orderNode.innerHTML; |
|
|
|
|
// let templateData="<h1>1111</h1>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (type === 'titlePrint') handleTitlePrint(LODOP, templateData) |
|
|
|
|
else handleDeliveryPrint(LODOP, templateData) |
|
|
|
|
// LODOP.NewPage()
|
|
|
|
|
LODOP.PRINT(); //直接打印
|
|
|
|
|
// LODOP.PRINT(); //直接打印
|
|
|
|
|
}); |
|
|
|
|
// LODOP.PREVIEW(); //预览(预览打印无脚标)
|
|
|
|
|
LODOP.PREVIEW(); //预览(预览打印无脚标)
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const newPrint = nodeName => { |
|
|
|
|