diff --git a/pages/order/confirmation.vue b/pages/order/confirmation.vue
index 43eeadc..a82e690 100644
--- a/pages/order/confirmation.vue
+++ b/pages/order/confirmation.vue
@@ -161,6 +161,55 @@
+
+
+
+ 油卡支付可用余额: {{oilPirce}}元
+
+
+
+
+
+
+
+
+ 车队油卡可用余额: {{oilUserNoPrice}}元
+
+
+
+
+
+
+
+
+ 车队油卡列表
+
+
+
+ {{item.cardNo}}({{item.contactName}})
+
+
+
+
+
+
+
+ 车牌号
+
+
+
+
+
+ 11111{{cardNoNumber}}
+
+
+
+
@@ -210,7 +259,9 @@
getRebateIntegral,
getHuiLianTongCardBalance,
getThirdPartyByDetail,
- wechatPay
+ wechatPay,
+ getUserCardList,
+ getCardListByCardNo
} from '../../Utils/Api.js';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import cjSlider from '../../components/cj-slider/cj-slider.vue';
@@ -260,7 +311,14 @@
contactPepole: '', //联系人
contactPhone: '', //联系电话
contactAddress: '', //联系地址
- postPayType: '' //请求支付方式
+ postPayType: '', //请求支付方式
+ oilUserCardlist: '', //油卡列表
+ oilPirce: 0, //油卡余额
+ oilUserno: '', //油卡卡号
+ contactName: '', //油卡联系人
+ oilUserNoPrice: '', //油卡余额
+ UserCard: '', //车牌号列表
+ cardNoNumber: '', // 车牌号
};
},
onLoad(option) {
@@ -281,6 +339,7 @@
// that.paytype = '';
that.user = app.globalData.userInfo;
that.findUser();
+ this.getUserCardList();
},
onHide() {
@@ -352,6 +411,9 @@
if (this.user.hltCardNo) {
this.getHuiLianTongCardBalance();
}
+ if (res.return_data.oilCard) {
+ this.oilPirce = res.return_data.oilCard.amount;
+ }
this.getUserNormalDiscountList();
uni.setStorage({
key: "user",
@@ -360,6 +422,40 @@
}
});
},
+ //查询油卡包列表
+ getUserCardList() {
+ let datas = {
+ type: 3
+ }
+ getUserCardList(datas).then(res => {
+ if (res.return_code == '000000' && res.return_data != '') {
+ this.oilUserCardlist = res.return_data;
+ this.oilUserno = res.return_data[0].cardNo;
+ this.contactName = res.return_data[0].contactName;
+ this.oilUserNoPrice = res.return_data[0].balance;
+ this.getCardListByCardNo(res.return_data[0].cardNo);
+ }
+ });
+ },
+ //查询车牌号列表
+ getCardListByCardNo(item) {
+ let datas = {
+ cardNo: item
+ }
+ getCardListByCardNo(datas).then(res => {
+ if (res.return_code == '000000' && res.return_data != '') {
+ this.UserCard = res.return_data;
+ this.cardNoNumber = res.return_data[0].carLicensePlate;
+ } else {
+ this.UserCard = '';
+ this.cardNoNumber = '';
+ }
+ });
+ },
+ //选择车牌号
+ bindUserCard(e) {
+ this.cardNoNumber = this.UserCard[e.target.value].carLicensePlate;
+ },
//支付返利积分
getRebateIntegral() {
let datas = {
@@ -638,6 +734,14 @@
//获取订单数据
wechatPay(item) {
let that = this;
+ if (that.paytype == '') {
+ uni.showToast({
+ title: '请选择支付方式',
+ icon: 'none',
+ duration: 2000
+ })
+ return;
+ }
if (that.paytype == '2') {
// #ifdef H5
let params = {
@@ -698,7 +802,8 @@
})
}
})
- } else if (that.paytype == '3') {
+ }
+ if (that.paytype == '3') {
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../login/updatePas/updatePas'
@@ -730,12 +835,39 @@
return;
}
that.$refs.paymentPassword.modalFun('show');
- } else {
- uni.showToast({
- title: '请选择支付方式',
- icon: 'none',
- duration: 2000
- })
+ }
+ if (that.paytype == '7') {
+ if (!that.user.isSetPayPwd) {
+ uni.navigateTo({
+ url: '../login/updatePas/updatePas'
+ })
+ return;
+ }
+ that.$refs.paymentPassword.modalFun('show');
+ }
+ if (that.paytype == '6') {
+ if (!that.user.isSetPayPwd) {
+ uni.navigateTo({
+ url: '../login/updatePas/updatePas'
+ })
+ return;
+ }
+ if (!that.user.isSetOilCard) {
+ uni.showToast({
+ icon: 'none',
+ title: '当前账号还未绑定,前往绑定',
+ duration: 2000,
+ success() {
+ setTimeout(() => {
+ uni.navigateTo({
+ url: '../user/bindingCard/bindingCard'
+ })
+ }, 1000)
+ }
+ });
+ return;
+ }
+ that.$refs.paymentPassword.modalFun('show');
}
},
submitHandle(e) {
@@ -788,37 +920,47 @@
})
return;
}
-
- let params = {
- "orderNo": this.orderId,
- "cardNo": this.user.hltCardNo.cardNo,
- "password": this.PaymentPassword
- }
- cardPay(params).then(res => {
- uni.hideLoading();
- if (res.return_code == '000000') {
- uni.showToast({
- title: '支付成功'
- })
- app.globalData.storeid = '';
- app.globalData.storename = '';
- uni.reLaunch({
- url: '../pay/success/success?id=' + this.couponId
- });
- return;
+ if (this.paytype == '3' || this.paytype == '6' || this.paytype == '7') {
+ let cardNo;
+ if (this.paytype == 3) {
+ cardNo = this.user.hltCardNo.cardNo;
}
- if (res.return_code == '102130') {
- uni.navigateTo({
- url: '../../login/updatePas/updatePas'
- })
- return;
+ if (this.paytype == 6) {
+ cardNo = this.user.oilCard.cardNo;
}
- uni.showToast({
- title: res.return_msg,
- icon: 'none'
+ if (this.paytype == 7) {
+ cardNo = this.oilUserno;
+ }
+ let params = {
+ "orderNo": this.orderId,
+ "cardNo": cardNo,
+ "password": this.PaymentPassword
+ }
+ cardPay(params).then(res => {
+ uni.hideLoading();
+ if (res.return_code == '000000') {
+ uni.showToast({
+ title: '支付成功'
+ })
+ app.globalData.storeid = '';
+ app.globalData.storename = '';
+ uni.reLaunch({
+ url: '../pay/success/success?id=' + this.couponId
+ });
+ return;
+ }
+ if (res.return_code == '102130') {
+ uni.navigateTo({
+ url: '../../login/updatePas/updatePas'
+ })
+ return;
+ }
+ uni.showToast({
+ title: res.return_msg,
+ icon: 'none'
+ })
})
- })
-
+ }
},
payRequest: function(self) {
@@ -1274,4 +1416,18 @@
}
}
}
+
+ .username {
+ width: calc(100% - 100upx);
+ height: 100upx;
+ display: flex;
+ align-items: center;
+ border-bottom: 1px solid #f6f6f6;
+ padding: 8upx 20upx;
+
+ .namecont {
+ color: #666666;
+ width: 28%;
+ }
+ }