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