achao 2 年之前
父节点
当前提交
ba0521cb92
共有 1 个文件被更改,包括 15 次插入10 次删除
  1. 15 10
      pages/erpbusiness/sendCommand.vue

+ 15 - 10
pages/erpbusiness/sendCommand.vue

@@ -208,7 +208,7 @@
 				if (that.gridList.qualityNo) {
 					command.setText(that.gridList.qualityNo.substring(that.gridList.qualityNo.length - 3));
 					command.bold(3); //加粗
-					command.setFontSize(36); //字体大小
+					command.setFontSize(0); //字体大小
 					command.setSelectJustification(1) //居中
 					command.rowSpace(200);
 					command.setPrint();
@@ -222,6 +222,7 @@
 
 				command.setText("粮食质检单");
 				command.bold(1); //加粗
+				command.setFontSize(0); //字体大小
 				command.setSelectJustification(1) //居中
 				command.rowSpace(60);
 				// command.rowSpace(10);
@@ -238,12 +239,14 @@
 				//客户姓名
 
 				command.setText("客户姓名:" + that.gridList.customerName);
+				command.setFontSize(0); //字体大小
 				command.setSelectJustification(0); //居左
 				command.setLeftMargin(30)
 				command.setPrint();
 				//客户身份证
 
 				command.setText("客户身份证:" + that.gridList.customerNumberCard);
+				command.setFontSize(24); //字体大小
 				command.setSelectJustification(0); //居左
 				command.setLeftMargin(30)
 				command.setPrint();
@@ -251,6 +254,7 @@
 				//客户电话
 
 				command.setText("客户电话:" + that.gridList.customerPhone);
+				command.setFontSize(50); //字体大小
 				command.setSelectJustification(0); //居左
 				command.setLeftMargin(30)
 				command.setPrint();
@@ -258,6 +262,7 @@
 				//车牌号
 
 				command.setText("车牌号:" + that.gridList.carNumber);
+				command.setFontSize(100); //字体大小
 				command.setSelectJustification(0); //居左
 				command.setLeftMargin(30)
 				command.setPrint();
@@ -449,10 +454,10 @@
 				var time = that.oneTimeData;
 				var looptime = parseInt(buff.length / time);
 				var lastData = parseInt(buff.length % time); //console.log(looptime + "---" + lastData)
-				
+
 				this.looptime = looptime + 1
-				this.lastData = lastData 
-				this.currentTime =  1
+				this.lastData = lastData
+				this.currentTime = 1
 				that.Send(buff);
 			},
 			//查询打印机状态
@@ -494,7 +499,7 @@
 
 				uni.writeBLECharacteristicValue({
 					deviceId: BLEInformation.deviceId,
-				 serviceId: BLEInformation.writeServiceId,
+					serviceId: BLEInformation.writeServiceId,
 					characteristicId: BLEInformation.writeCharaterId,
 					value: buf,
 					success: function(res) {
@@ -504,8 +509,8 @@
 							// })
 						} else {
 							uni.showToast({
-				 			title: '已打印第' + currentPrint + '张成功'
-				  	});
+								title: '已打印第' + currentPrint + '张成功'
+							});
 						} //console.log(res)
 					},
 					fail: function(e) {
@@ -513,13 +518,13 @@
 							title: '打印第' + currentPrint + '张失败',
 							icon: 'none'
 						}); //console.log(e)
-				 },
+					},
 					complete: function() {
 						currentTime++;
 
 						if (currentTime <= loopTime) {
 							that.currentTime = currentTime
-							
+
 							that.Send(buff);
 						} else {
 							if (currentPrint == printNum) {
@@ -532,7 +537,7 @@
 								currentPrint++;
 								that.currentPrint = currentPrint
 								that.currentTime = 1
-								
+
 								that.Send(buff);
 							}
 						}