From 7884edf73570b8d835c6b500042bebe224cb8de9 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Thu, 22 Oct 2026 11:08:03 +0800 Subject: [PATCH] 1 --- package1/index/orderDetail.vue | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/package1/index/orderDetail.vue b/package1/index/orderDetail.vue index dc76a07..cc2374e 100644 --- a/package1/index/orderDetail.vue +++ b/package1/index/orderDetail.vue @@ -2243,6 +2243,10 @@ let pageNum = 1 let Xindex = 0 let xNum = 0 + const isLimitedHeightPrinterShop = that.shopId == '1822829636942434305' + const getSmallPrintPageHeight = (height) => { + return isLimitedHeightPrinterShop ? 1990 : (height >= 1990 ? 1990 : height) + } if(this.businessDistrictLevel == "1"){ xNum = 30 } @@ -2873,9 +2877,7 @@ strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); - strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + colorHeight) >= 1990 ? 1990 : ( - this - .printHeight - that.yNum + colorHeight), 1, 0, 162); + strCmd = blesdk.CreatCPCLPage(1080, getSmallPrintPageHeight(this.printHeight - that.yNum + colorHeight), 1, 0, 162); that.yNum = 0 pageNum++ if (this.printingMethod != '2') { @@ -2894,8 +2896,7 @@ if (that.yNum + 64 >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); - strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 64) >= 1990 ? 1990 : ( - this.printHeight - that.yNum + 64), 1, 0, 162); + strCmd = blesdk.CreatCPCLPage(1080, getSmallPrintPageHeight(this.printHeight - that.yNum + 64), 1, 0, 162); that.yNum = 0 pageNum++ @@ -2922,9 +2923,7 @@ if (that.yNum + colorHeight >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); - strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + colorHeight) >= 1990 ? - 1990 : ( - this.printHeight - that.yNum + colorHeight), 1, 0, 180); + strCmd = blesdk.CreatCPCLPage(1080, getSmallPrintPageHeight(this.printHeight - that.yNum + colorHeight), 1, 0, 180); that.yNum = 0 pageNum++ @@ -2987,9 +2986,7 @@ if (that.yNum + colorHeight >= 1990) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); - strCmd = blesdk.CreatCPCLPage(1080, (that.printHeight - that.yNum + colorHeight) >= - 1990 ? 1990 : ( - that.printHeight - that.yNum + colorHeight), 1, 0, 180); + strCmd = blesdk.CreatCPCLPage(1080, getSmallPrintPageHeight(that.printHeight - that.yNum + colorHeight), 1, 0, 180); that.yNum = 0 pageNum++ @@ -3995,12 +3992,12 @@ } else { //正常的金额显示 - if (that.yNum + 84 >= 1990 * pageNum) { + let shouldPageSalesSummary = isLimitedHeightPrinterShop ? that.yNum + 84 >= 1990 : that.yNum + 84 >= 1990 * pageNum + if (shouldPageSalesSummary) { strCmd += blesdk.addCPCLPrint(); that.bufferData.push(strCmd); - strCmd = blesdk.CreatCPCLPage(1080, (this.printHeight - that.yNum + 84) >= 1990 ? 1990 : (this - .printHeight - that.yNum + 84), 1, 0, 162); + strCmd = blesdk.CreatCPCLPage(1080, getSmallPrintPageHeight(this.printHeight - that.yNum + 84), 1, 0, 162); that.yNum = 0 pageNum++ strCmd +=