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