|
@@ -72,7 +72,7 @@ export const printText = function(tsc,text){
|
|
|
}
|
|
|
// 60 * 40 尺寸模板
|
|
|
export const printTempl = function(tsc,data){
|
|
|
- let top = 48 // 距离顶部
|
|
|
+ let top = 32 // 距离顶部
|
|
|
const left = 8 // 距离左边
|
|
|
const lightHeight = 24 // 行高3mm,1mm = 8点
|
|
|
const pageW = 60 // 页签宽度mm
|
|
@@ -90,8 +90,10 @@ export const printTempl = function(tsc,data){
|
|
|
// 经销商文字高度,是否换行
|
|
|
top = textFormat(command,data.dealerName,maxFontNums,left,top,lightHeight,"center",1)
|
|
|
// 数字货架名称文字
|
|
|
- top = top+30
|
|
|
+ top = top+10
|
|
|
+ top = textFormat(command,data.shelfName,maxFontNums,left,top,lightHeight,"center",1)
|
|
|
// 二维码
|
|
|
+ top = top+15
|
|
|
command.setQR(left*6, top, "M", 5, "A", data.barCode)
|
|
|
// 货位号
|
|
|
const rightTop = textFormat(command,data.shelfPlaceCode,rightMaxFnums,rightLeft,top,lightHeight,"left",4)
|
|
@@ -124,7 +126,9 @@ export const printMiniTempl = function(tsc,data){
|
|
|
top = textFormat(command,data.dealerName,maxFontNums,left,top,lightHeight,"center",1)
|
|
|
// 数字货架名称文字
|
|
|
top = top+10
|
|
|
+ top = textFormat(command,data.shelfName,maxFontNums,left,top,lightHeight,"center",1)
|
|
|
// 二维码
|
|
|
+ top = top+10
|
|
|
command.setQR(left, top, "M", 5, "A", data.barCode)
|
|
|
// 货位号
|
|
|
const rightTop = textFormat(command,data.shelfPlaceCode,rightMaxFnums,rightLeft,top,lightHeight,"left",3)
|