|
@@ -78,10 +78,10 @@ export const printTempl = function(tsc,data){
|
|
|
const lightHeight = 24 // 行高3mm,1mm = 8点
|
|
|
const pageW = 60 // 页签宽度mm
|
|
|
const pageH = 40 // 页签高度mm
|
|
|
- const maxFontNums = Math.floor((pageW*8-left*4)/lightHeight) // 每行最多字体数
|
|
|
+ const maxFontNums = Math.floor((pageW*8-left*3)/lightHeight) // 每行最多字体数
|
|
|
const leftMaxFnums = Math.floor(maxFontNums*0.4)
|
|
|
const rightMaxFnums = leftMaxFnums + 1
|
|
|
- let rightLeft = (leftMaxFnums+2.5)*lightHeight
|
|
|
+ let rightLeft = (leftMaxFnums+0.5)*lightHeight
|
|
|
// 初始化打印机
|
|
|
const command = tsc.jpPrinter.createNew()
|
|
|
command.init()
|
|
@@ -95,9 +95,10 @@ export const printTempl = function(tsc,data){
|
|
|
top = textFormat(command,data.shelfName,maxFontNums,left,top,lightHeight,"center",1)
|
|
|
// 二维码
|
|
|
top = top+15
|
|
|
- command.setQR(left*6, top, "M", 5, "A", data.barCode)
|
|
|
+ command.setQR(left*2, top, "M", 5, "A", data.barCode)
|
|
|
// 货位号
|
|
|
- const rightTop = textFormat(command,data.shelfPlaceCode,rightMaxFnums,rightLeft,top,lightHeight,"left",4)
|
|
|
+ top = top + 6
|
|
|
+ const rightTop = textFormat(command,data.shelfPlaceCode,rightMaxFnums,rightLeft,top,lightHeight,"left",3)
|
|
|
// 产品编码
|
|
|
top = rightTop + 1
|
|
|
top = textFormat(command,data.productCode,rightMaxFnums,rightLeft,top,lightHeight,"left",1)
|