shish 5 лет назад
Родитель
Сommit
2d78fc63db
2 измененных файлов с 18 добавлено и 4 удалено
  1. 6 0
      ghsApp/src/admin/billing/affirm.vue
  2. 12 4
      ghsApp/src/mixins/BLE.js

+ 6 - 0
ghsApp/src/admin/billing/affirm.vue

@@ -97,6 +97,11 @@
             <view class="tui-title">优惠</view>
             <text style="color: #3385FF">{{	(allPrice.toFixed(2) - modifyPrice + Number(this.form.sendCost)).toFixed(2) }}</text>
           </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+						<textarea style="height: 100rpx" v-model="form.remark" placeholder="备注"/>
+					</tui-list-cell>
+
           </view>
         </view>
       </form>
@@ -169,6 +174,7 @@ export default {
         sendCost: "",
         customId: "",
         product: "",
+        remark:""
       },
       money: "",
       modifyPrice: 0,

+ 12 - 4
ghsApp/src/mixins/BLE.js

@@ -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){