Commit ac7a9c06 authored by pengguangpu's avatar pengguangpu

调换打印上一单的打印中状态重置顺序;

parent 081e8e35
......@@ -318,21 +318,24 @@ Page({
//打印上一单结果返回
//获取到打印结果
var printLastOrderResult = res.data;
context.setData({
printLastOrderIsPrinting: false
});
if (printLastOrderResult.code == 0) {
//打印成功
context.setData({
printLastOrderIsPrintSuccess: true,
printLastOrderPrintStatusHint: "打印完成"
});
context.setData({
printLastOrderIsPrinting: false
});
} else {
//打印失败
context.setData({
printLastOrderIsPrintSuccess: false,
printLastOrderPrintStatusHint: "打印失败"
});
context.setData({
printLastOrderIsPrinting: false
});
}
} else if (res.action == ACTION_GET_CUR_AD) {
//拿到当前显示的图片url
......@@ -523,6 +526,7 @@ Page({
if (this.data.printEnabled != true) {
return;
}
let context = this;
//发送指令至前屏
//通知前屏重新打印
my.ix.sendBuddyMessage({
......@@ -533,14 +537,15 @@ Page({
data: null
},
success: (res) => {
console.info(`sendBuddyMessage success: ${JSON.stringify(res)}`);
console.info(`onHomePrintLastOrderClicked sendBuddyMessage success: ${JSON.stringify(res)}`);
//跳转至打印上一单页面
context.goPage('printlastorder');
},
fail: (res) => {
console.info(`sendBuddyMessage failed: ${JSON.stringify(res)}`);
context.showToast("发送指令失败");
}
});
//跳转至打印上一单页面
this.goPage('printlastorder');
},
/**
......@@ -962,7 +967,7 @@ Page({
goPay(e) {
//购物车不能为空
if (this.data.goods.length == 0) {
this.showToast("等待收银员录入商品",3000)
this.showToast("等待收银员录入商品", 3000)
return
}
......@@ -988,7 +993,7 @@ Page({
//后屏跳转
this.goPage('waitoperate');
var miyapay = require("/utils/miyapay4.js");
var amount = miyapay.fen2Yuan(miyapay.yuan2Fen(this.data.totalPrice)-miyapay.yuan2Fen(this.data.discCouponPrice));
var amount = miyapay.fen2Yuan(miyapay.yuan2Fen(this.data.totalPrice) - miyapay.yuan2Fen(this.data.discCouponPrice));
this.setData({
waitOperateAmount: amount,
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment