wangfukang 3 weeks ago
parent
commit
7884edf735
  1. 25
      package1/index/orderDetail.vue

25
package1/index/orderDetail.vue

@ -2243,6 +2243,10 @@
let pageNum = 1 let pageNum = 1
let Xindex = 0 let Xindex = 0
let xNum = 0 let xNum = 0
const isLimitedHeightPrinterShop = that.shopId == '1822829636942434305'
const getSmallPrintPageHeight = (height) => {
return isLimitedHeightPrinterShop ? 1990 : (height >= 1990 ? 1990 : height)
}
if(this.businessDistrictLevel == "1"){ if(this.businessDistrictLevel == "1"){
xNum = 30 xNum = 30
} }
@ -2873,9 +2877,7 @@
strCmd += blesdk.addCPCLPrint(); strCmd += blesdk.addCPCLPrint();
that.bufferData.push(strCmd); that.bufferData.push(strCmd);
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + colorHeight) >= 1990 ? 1990 : ( strCmd = blesdk.CreatCPCLPage(1080, getSmallPrintPageHeight(this.printHeight - that.yNum + colorHeight), 1, 0, 162);
this
.printHeight - that.yNum + colorHeight), 1, 0, 162);
that.yNum = 0 that.yNum = 0
pageNum++ pageNum++
if (this.printingMethod != '2') { if (this.printingMethod != '2') {
@ -2894,8 +2896,7 @@
if (that.yNum + 64 >= 1990) { if (that.yNum + 64 >= 1990) {
strCmd += blesdk.addCPCLPrint(); strCmd += blesdk.addCPCLPrint();
that.bufferData.push(strCmd); that.bufferData.push(strCmd);
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 64) >= 1990 ? 1990 : ( strCmd = blesdk.CreatCPCLPage(1080, getSmallPrintPageHeight(this.printHeight - that.yNum + 64), 1, 0, 162);
this.printHeight - that.yNum + 64), 1, 0, 162);
that.yNum = 0 that.yNum = 0
pageNum++ pageNum++
@ -2922,9 +2923,7 @@
if (that.yNum + colorHeight >= 1990) { if (that.yNum + colorHeight >= 1990) {
strCmd += blesdk.addCPCLPrint(); strCmd += blesdk.addCPCLPrint();
that.bufferData.push(strCmd); that.bufferData.push(strCmd);
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + colorHeight) >= 1990 ? strCmd = blesdk.CreatCPCLPage(1080, getSmallPrintPageHeight(this.printHeight - that.yNum + colorHeight), 1, 0, 180);
1990 : (
this.printHeight - that.yNum + colorHeight), 1, 0, 180);
that.yNum = 0 that.yNum = 0
pageNum++ pageNum++
@ -2987,9 +2986,7 @@
if (that.yNum + colorHeight >= 1990) { if (that.yNum + colorHeight >= 1990) {
strCmd += blesdk.addCPCLPrint(); strCmd += blesdk.addCPCLPrint();
that.bufferData.push(strCmd); that.bufferData.push(strCmd);
strCmd = blesdk.CreatCPCLPage(1080, (that.printHeight - that.yNum + colorHeight) >= strCmd = blesdk.CreatCPCLPage(1080, getSmallPrintPageHeight(that.printHeight - that.yNum + colorHeight), 1, 0, 180);
1990 ? 1990 : (
that.printHeight - that.yNum + colorHeight), 1, 0, 180);
that.yNum = 0 that.yNum = 0
pageNum++ pageNum++
@ -3995,12 +3992,12 @@
} else { } else {
//正常的金额显示 //正常的金额显示
if (that.yNum + 84 >= 1990 * pageNum) { let shouldPageSalesSummary = isLimitedHeightPrinterShop ? that.yNum + 84 >= 1990 : that.yNum + 84 >= 1990 * pageNum
if (shouldPageSalesSummary) {
strCmd += blesdk.addCPCLPrint(); strCmd += blesdk.addCPCLPrint();
that.bufferData.push(strCmd); that.bufferData.push(strCmd);
strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 84) >= 1990 ? 1990 : (this strCmd = blesdk.CreatCPCLPage(1080, getSmallPrintPageHeight(this.printHeight - that.yNum + 84), 1, 0, 162);
.printHeight - that.yNum + 84), 1, 0, 162);
that.yNum = 0 that.yNum = 0
pageNum++ pageNum++
strCmd += strCmd +=

Loading…
Cancel
Save