|
@@ -71,7 +71,7 @@ export const printTempl = function(tsc,data){
|
|
const maxFontNums = Math.floor((pageW*8-left*2)/lightHeight) // 每行最多字体数
|
|
const maxFontNums = Math.floor((pageW*8-left*2)/lightHeight) // 每行最多字体数
|
|
const leftMaxFnums = Math.floor(maxFontNums*0.6)
|
|
const leftMaxFnums = Math.floor(maxFontNums*0.6)
|
|
let rightTop = 0
|
|
let rightTop = 0
|
|
- let rightLeft = (leftMaxFnums+2)*lightHeight
|
|
|
|
|
|
+ let rightLeft = (leftMaxFnums+1)*lightHeight
|
|
// 初始化打印机
|
|
// 初始化打印机
|
|
const command = tsc.jpPrinter.createNew()
|
|
const command = tsc.jpPrinter.createNew()
|
|
command.init()
|
|
command.init()
|
|
@@ -96,7 +96,7 @@ export const printTempl = function(tsc,data){
|
|
// 货位号
|
|
// 货位号
|
|
const qrtop = textFormat(command,data.shelfPlaceCode,maxFontNums-leftMaxFnums-2,rightLeft,rightTop,lightHeight,"center",2)
|
|
const qrtop = textFormat(command,data.shelfPlaceCode,maxFontNums-leftMaxFnums-2,rightLeft,rightTop,lightHeight,"center",2)
|
|
// 二维码
|
|
// 二维码
|
|
- command.setQR(rightLeft, qrtop, "L", 3, "A", data.barCode)
|
|
|
|
|
|
+ command.setQR(rightLeft, qrtop, "L", 5, "A", data.barCode)
|
|
command.setPagePrint(1,data.currentInven) // 打印分数1,每个标签重发打印2次
|
|
command.setPagePrint(1,data.currentInven) // 打印分数1,每个标签重发打印2次
|
|
console.log("开始打印了",command.getData())
|
|
console.log("开始打印了",command.getData())
|
|
return command
|
|
return command
|