1.修改千猪确认订单问题

yj-dev
杨杰 2 years ago
parent 3ca8449850
commit afe3002f72
  1. 40
      member-Recharge/rec-confirmation/rec-confirmation.vue
  2. 24
      qianzhu-KFC/confirmOrder/confirmOrder.vue

@ -32,7 +32,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="width94 concont mart10 backcorfff"> <view class="width94 concont mart10 backcorfff marb100">
<view class="height50 width100 paddtop5 backcorfff" @click="showPopup()"> <view class="height50 width100 paddtop5 backcorfff" @click="showPopup()">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> <view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
优惠抵扣<text class="yhqky">{{OrderPreList.length}}张可用</text> 优惠抵扣<text class="yhqky">{{OrderPreList.length}}张可用</text>
@ -86,7 +86,7 @@
</view> </view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" <view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse"> style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='2'" color="#c72a20"/> <radio :checked="paytype=='2'" color="#c72a20" />
</view> </view>
</view> </view>
<view class="width94 line1 mart5 marb5" v-if="item == 3"></view> <view class="width94 line1 mart5 marb5" v-if="item == 3"></view>
@ -153,7 +153,8 @@
findUser, findUser,
qianzhuorderToPayByWx, qianzhuorderToPayByWx,
czhltUnionCardPay, czhltUnionCardPay,
getUserOrderPreList getUserOrderPreList,
thirdCancelOrder
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
// #ifdef H5 // #ifdef H5
var jweixin = require('jweixin-module'); var jweixin = require('jweixin-module');
@ -203,9 +204,9 @@
this.totalprice = options.price; this.totalprice = options.price;
this.payPrice = options.price; this.payPrice = options.price;
this.goodName = options.name; this.goodName = options.name;
this.customerMobile = app.globalData.userInfo.phone;
}, },
onShow() { onShow() {
this.customerMobile = app.globalData.userInfo.phone;
this.findUser(); this.findUser();
}, },
methods: { methods: {
@ -284,10 +285,12 @@
blockEnd() { blockEnd() {
this.isDiscount = 1; this.isDiscount = 1;
if (this.deductionPrice == 0) { if (this.deductionPrice == 0) {
this.payPrice = Math.abs(parseFloat(this.totalprice - parseFloat(this.priceValue[1] / 100).toFixed(2)).toFixed( this.payPrice = Math.abs(parseFloat(this.totalprice - parseFloat(this.priceValue[1] / 100).toFixed(2))
2)); .toFixed(
2));
} else { } else {
this.payPrice = Math.abs(parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) - this this.payPrice = Math.abs(parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) -
this
.deductionPrice).toFixed(2)); .deductionPrice).toFixed(2));
} }
if (this.payPrice == 0) { if (this.payPrice == 0) {
@ -368,7 +371,7 @@
"openIdType": this.showType "openIdType": this.showType
} }
this.qianzhuorderToPayByWx(params); this.qianzhuorderToPayByWx(params);
}else { } else {
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
icon: 'none', icon: 'none',
@ -452,10 +455,12 @@
// //
calculatepayPrice() { calculatepayPrice() {
if (this.deductionPrice == 0) { if (this.deductionPrice == 0) {
this.payPrice = Math.abs(parseFloat(this.totalprice - (parseFloat(this.priceValue[1] / 100).toFixed(2))) this.payPrice = Math.abs(parseFloat(this.totalprice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)))
.toFixed(2)); .toFixed(2));
} else { } else {
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) - this this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this
.deductionPrice).toFixed(2)); .deductionPrice).toFixed(2));
} }
}, },
@ -522,12 +527,14 @@
title: '工会卡余额不足', title: '工会卡余额不足',
duration: 2000, duration: 2000,
}); });
that.thirdCancelOrder();
return; return;
} }
if (!that.user.isSetPayPwd) { if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url: '../../pages/login/updatePas/updatePas' url: '../../pages/login/updatePas/updatePas'
}) })
that.thirdCancelOrder();
return; return;
} }
if (!that.user.isSetHltCard) { if (!that.user.isSetHltCard) {
@ -543,6 +550,7 @@
}, 1000) }, 1000)
} }
}); });
that.thirdCancelOrder();
return; return;
} }
that.$refs.paymentPassword.modalFun('show'); that.$refs.paymentPassword.modalFun('show');
@ -554,6 +562,17 @@
}) })
} }
}, },
//
thirdCancelOrder() {
let params = {
orderId: this.orderId,
}
thirdCancelOrder(params).then(res => {
if (res.return_code == '000000') {
this.orderId = '';
}
})
},
submitHandle(e) { submitHandle(e) {
uni.showLoading({ uni.showLoading({
title: '支付中...' title: '支付中...'
@ -595,6 +614,7 @@
}) })
return; return;
} }
this.thirdCancelOrder();
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
icon: 'none', icon: 'none',

@ -225,7 +225,8 @@
</view> </view>
<view class="width20 flright"> <view class="width20 flright">
<view class="yhprice"> <view class="yhprice">
<radio v-if="typeid == 1 && items.discountCondition && orderPrice >= items.discountCondition" <radio
v-if="typeid == 1 && items.discountCondition && orderPrice >= items.discountCondition"
color="#c72a20" :checked="items.id == memDiscountId" /> color="#c72a20" :checked="items.id == memDiscountId" />
<radio v-if="typeid == 1 && items.discountCondition && orderPrice < items.discountCondition" <radio v-if="typeid == 1 && items.discountCondition && orderPrice < items.discountCondition"
@ -234,7 +235,8 @@
<radio v-if="typeid == 1 && !items.discountCondition" color="#c72a20" <radio v-if="typeid == 1 && !items.discountCondition" color="#c72a20"
:checked="items.id == memDiscountId" /> :checked="items.id == memDiscountId" />
<radio v-if="typeid == 2 && items.discountCondition && orderPrice >= items.discountCondition" <radio
v-if="typeid == 2 && items.discountCondition && orderPrice >= items.discountCondition"
color="#2f6f43" :checked="items.id == memDiscountId" /> color="#2f6f43" :checked="items.id == memDiscountId" />
<radio v-if="typeid == 2 && items.discountCondition && orderPrice < items.discountCondition" <radio v-if="typeid == 2 && items.discountCondition && orderPrice < items.discountCondition"
@ -262,7 +264,8 @@
findUser, findUser,
qianzhuorderToPayByWx, qianzhuorderToPayByWx,
czhltUnionCardPay, czhltUnionCardPay,
getUserOrderPreList getUserOrderPreList,
thirdCancelOrder
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
// #ifdef H5 // #ifdef H5
var jweixin = require('jweixin-module'); var jweixin = require('jweixin-module');
@ -579,6 +582,17 @@
} }
}) })
}, },
//
thirdCancelOrder() {
let params = {
orderId: this.orderId,
}
thirdCancelOrder(params).then(res => {
if (res.return_code == '000000') {
this.orderId = '';
}
})
},
// //
getUserOrderPreList() { getUserOrderPreList() {
let cope; let cope;
@ -733,12 +747,14 @@
title: '工会卡余额不足', title: '工会卡余额不足',
duration: 2000, duration: 2000,
}); });
that.thirdCancelOrder();
return; return;
} }
if (!that.user.isSetPayPwd) { if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url: '../../pages/login/updatePas/updatePas' url: '../../pages/login/updatePas/updatePas'
}) })
that.thirdCancelOrder();
return; return;
} }
if (!that.user.isSetHltCard) { if (!that.user.isSetHltCard) {
@ -754,6 +770,7 @@
}, 1000) }, 1000)
} }
}); });
that.thirdCancelOrder();
return; return;
} }
that.$refs.paymentPassword.modalFun('show'); that.$refs.paymentPassword.modalFun('show');
@ -831,6 +848,7 @@
}) })
return; return;
} }
this.thirdCancelOrder();
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
icon: 'none', icon: 'none',

Loading…
Cancel
Save