|
@@ -77,10 +77,10 @@ export const printTempl = function(tsc,data){
|
|
const lightHeight = 24 // 行高3mm,1mm = 8点
|
|
const lightHeight = 24 // 行高3mm,1mm = 8点
|
|
const pageW = 60 // 页签宽度mm
|
|
const pageW = 60 // 页签宽度mm
|
|
const pageH = 40 // 页签高度mm
|
|
const pageH = 40 // 页签高度mm
|
|
- const maxFontNums = Math.floor((pageW*8-left*2)/lightHeight) // 每行最多字体数
|
|
|
|
|
|
+ const maxFontNums = Math.floor((pageW*8-left*4)/lightHeight) // 每行最多字体数
|
|
const leftMaxFnums = Math.floor(maxFontNums*0.4)
|
|
const leftMaxFnums = Math.floor(maxFontNums*0.4)
|
|
- const rightMaxFnums = maxFontNums*0.5
|
|
|
|
- let rightLeft = (leftMaxFnums+1.5)*lightHeight
|
|
|
|
|
|
+ const rightMaxFnums = leftMaxFnums + 1
|
|
|
|
+ let rightLeft = (leftMaxFnums+2.5)*lightHeight
|
|
// 初始化打印机
|
|
// 初始化打印机
|
|
const command = tsc.jpPrinter.createNew()
|
|
const command = tsc.jpPrinter.createNew()
|
|
command.init()
|
|
command.init()
|
|
@@ -92,11 +92,11 @@ export const printTempl = function(tsc,data){
|
|
// 数字货架名称文字
|
|
// 数字货架名称文字
|
|
top = top+30
|
|
top = top+30
|
|
// 二维码
|
|
// 二维码
|
|
- command.setQR(left*3, top, "M", 5, "A", data.barCode)
|
|
|
|
|
|
+ command.setQR(left*6, top, "M", 5, "A", data.barCode)
|
|
// 货位号
|
|
// 货位号
|
|
const rightTop = textFormat(command,data.shelfPlaceCode,rightMaxFnums,rightLeft,top,lightHeight,"left",4)
|
|
const rightTop = textFormat(command,data.shelfPlaceCode,rightMaxFnums,rightLeft,top,lightHeight,"left",4)
|
|
// 产品编码
|
|
// 产品编码
|
|
- top = rightTop
|
|
|
|
|
|
+ top = rightTop + 1
|
|
top = textFormat(command,data.productCode,rightMaxFnums,rightLeft,top,lightHeight,"left",1)
|
|
top = textFormat(command,data.productCode,rightMaxFnums,rightLeft,top,lightHeight,"left",1)
|
|
// 打印分数1,每个标签重发打印2次
|
|
// 打印分数1,每个标签重发打印2次
|
|
command.setPagePrint(1,data.currentInven)
|
|
command.setPagePrint(1,data.currentInven)
|