Browse Source

Merge branch 'dev' of http://47.108.105.48:3000/java_project/logpm_page into dev

pre-production
qb 7 months ago
parent
commit
5a801315bf
  1. 10
      src/utils/print.js

10
src/utils/print.js

@ -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 => {

Loading…
Cancel
Save