Commit a9610d6d authored by pengguangpu's avatar pengguangpu

添加打印配置判断;

parent bbc82c5e
......@@ -267,23 +267,25 @@
<image mode="aspectFit" style="position:absolute;width:277rpx;height:196rpx;" src="/images/bg_paper.png"/>
<view style="position: absolute;top:88rpx;text-align: center;align-items: center;width:277rpx;">
<block a:if="{{isPrintSuccess}}">
<text>提示顾客带好小票</text>
<text>{{payResultPrintSuccessHint}}</text>
</block>
<block a:else>
<view hidden="{{isPrinting}}">
<button type="ghost" style="margin:0 auto;font-size:28rpx;height:40rpx;border-radius:20rpx;border-color:#FF7F19;color:#FF7F19;width:166rpx;line-height:40rpx;text-align:center;font-size:24rpx;" onTap="onReprint">重新打印</button>
</view>
<block a:if="{{printEnabled}}">
<view hidden="{{isPrinting}}">
<button type="ghost" style="margin:0 auto;font-size:28rpx;height:40rpx;border-radius:20rpx;border-color:#FF7F19;color:#FF7F19;width:166rpx;line-height:40rpx;text-align:center;font-size:24rpx;" onTap="onReprint">重新打印</button>
</view>
</block>
</block>
</view>
</view>
<view hidden="{{isPrinting}}">
<button type="primary" style="height:60rpx;margin-top:8rpx;border-radius:5rpx;background-color:#007AFF;border-color:#007AFF;opacity: 0.7;width:252rpx;line-height:60rpx;text-align:center;font-size:24rpx;" size="mini" hover-class="loginButtonHover" onTap="onNextPayFromPayResult">继续款</button>
<button type="primary" style="height:60rpx;margin-top:8rpx;border-radius:5rpx;background-color:#007AFF;border-color:#007AFF;opacity: 0.7;width:252rpx;line-height:60rpx;text-align:center;font-size:24rpx;" size="mini" hover-class="loginButtonHover" onTap="onNextPayFromPayResult">继续款</button>
</view>
</block>
<block a:else>
<text style="font-size:26rpx;color:#333333;font-weight:bold;margin-top:35rpx;">请重新支付...</text>
<image mode="aspectFit" style="width:166rpx;height:143rpx;margin-top:39rpx;" src="/images/img_scan_guide.png"/>
<button type="primary" style="height:60rpx;margin-top:32rpx;border-radius:5rpx;background-color:#007AFF;border-color:#007AFF;opacity: 0.7;width:252rpx;" hover-class="loginButtonHover" onTap="">重新付款</button>
<button type="primary" style="height:60rpx;margin-top:32rpx;border-radius:5rpx;background-color:#007AFF;border-color:#007AFF;opacity: 0.7;width:252rpx;text-align:center;font-size:24rpx;line-height:60rpx;" hover-class="loginButtonHover" onTap="payResultPayRetry">重新收款</button>
</block>
</view>
</view>
......
......@@ -18,7 +18,7 @@ Page({
//页面控制相关参数
//吐司显示
isShowToast: false,
toastText:"------",
toastText: "------",
pageShow: {
"home": true,
"landscan": false,
......@@ -31,7 +31,7 @@ Page({
"appsetting": false,
},
// 前屏是否完成登录
isFrontScreenLoginOK: false,
isFrontScreenLoginOK: true,
flowType: "", //流程类型:用于区分易混淆的流程,以及共同界面使用时用该标识位作为区分
/**账号信息 */
......@@ -48,9 +48,10 @@ Page({
isPaySuccess: true,
payPriceYuan: "--.--",
printResult: "正在打印小票...",
isPrinting: true,
isPrinting: false,
isPrintSuccess: false,
payPriceFen: 0,
payResultPrintSuccessHint: "提示顾客带好小票",
/**商品扫码页相关参数 */
//优惠券 0关闭 录入券弹窗 1等待录入 2.录入中 3.录入成功 4.录入失败
......@@ -123,7 +124,7 @@ Page({
let context = this;
context.setData({
isShowToast: true,
toastText:text
toastText: text
});
setTimeout(
function () {
......@@ -249,6 +250,21 @@ Page({
payPriceFen: res.data.tradeAmount,
payPriceYuan: miyapay.fen2Yuan(res.data.tradeAmount) + "",
});
if (context.data.printEnabled == false) {
//不打印小票
context.setData({
printResult: "打印机关闭",
payResultPrintSuccessHint: "如需打印请设置打印机",
isPrinting: false
});
} else {
//不打印小票
context.setData({
printResult: "正在打印小票...",
payResultPrintSuccessHint: "提示顾客拿好小票",
isPrinting: true
});
}
context.goPage('payresult');
} else if (res.action == ACTION_ON_PAY_FAILED) {
......@@ -604,6 +620,11 @@ Page({
},
/**payresult页面逻辑方法 */
//重新收款
payResultPayRetry() {
//跳转至结算页
this.goPage('waitoperate');
},
onReprint() {
if (this.data.printEnabled != true) {
return;
......
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