|
|
@@ -264,12 +264,20 @@ export default {
|
|
|
//初始化打印机
|
|
|
arrPrint.push(util.sendDirective([0x1B, 0x40])); //16进制
|
|
|
//正文
|
|
|
- arrPrint.push(util.sendDirective([0x1B, 0x14, 0x00]));
|
|
|
+ arrPrint.push(util.sendDirective([0x1B, 0x0E]));
|
|
|
+ arrPrint.push(util.hexStringToBuff(BleVal.sendNum+ "\n"));
|
|
|
arrPrint.push(util.hexStringToBuff(BleVal.custom.fullAddress+ "\n"));
|
|
|
- arrPrint.push(util.sendDirective([0x1B, 0x14]));
|
|
|
arrPrint.push(util.hexStringToBuff(BleVal.custom.customName+' '+BleVal.custom.customMobile+ "\n"));
|
|
|
- arrPrint.push(util.hexStringToBuff("--------------------------------\n"));
|
|
|
- arrPrint.push(util.hexStringToBuff("备注:"+BleVal.remark+"\n"));
|
|
|
+
|
|
|
+ if(BleVal.remark.length > 0){
|
|
|
+ arrPrint.push(util.hexStringToBuff("--------------------------------\n"));
|
|
|
+ arrPrint.push(util.sendDirective([0x1B, 0x14]));
|
|
|
+ arrPrint.push(util.hexStringToBuff("备注:\n"));
|
|
|
+ arrPrint.push(util.sendDirective([0x1B, 0x0E]));
|
|
|
+ arrPrint.push(util.hexStringToBuff(BleVal.remark+"\n"));
|
|
|
+ }
|
|
|
+
|
|
|
+ arrPrint.push(util.sendDirective([0x1B, 0x14]));
|
|
|
arrPrint.push(util.hexStringToBuff("--------------------------------\n"));
|
|
|
arrPrint.push(util.hexStringToBuff(util.printThreeData('花材', '数量', '价格')));
|
|
|
if(BleVal.product.length > 0){
|