1.新增卡券订单支付方式

yj-dev
杨杰 2 years ago
parent 7bfe5bd8f2
commit bdb3eec7f5
  1. 174
      pages/order/confirmation.vue

@ -161,6 +161,55 @@
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
<view class="width94 line1 mart5 marb5" v-if="item == 6"></view>
<view class="height50 width100 backcorfff" @tap="paytype='6'" v-if="item == 6">
<view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;">
油卡支付<text class="font14 fcor666 margle">可用余额: {{oilPirce}}</text>
</view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='6'" color="#0083f5" />
</view>
</view>
<view class="width94 line1 mart5 marb5" v-if="item == 7"></view>
<view class="height50 width100 backcorfff" @tap="paytype='7'" v-if="item == 7">
<view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;">
车队油卡<text class="font14 fcor666 margle">可用余额: {{oilUserNoPrice}}</text>
</view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;" v-if="isUse">
<radio :checked="paytype=='7'" color="#0083f5" />
</view>
</view>
</view>
<view v-if="paytype=='7'" class="backcorfff">
<view class="heightl60 paddleft10 fcor333 fontwig6 font16 width100 backcorfff flleft">车队油卡列表</view>
<view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-for="(item,index) in oilUserCardlist"
:key="index">
<view class="width60 flleft font14">
{{item.cardNo}}({{item.contactName}})
</view>
<view class="flright width30 fotct">
<radio :checked="oilUserno==item.cardNo" @click="changeRiado1(item)" color="#0083f5" />
</view>
</view>
<view class="username">
<view class="namecont font15">车牌号</view>
<input style="width: 70%;" placeholder="输入车牌号" class="font15" v-model="cardNoNumber">
<!-- <view class="date text1" >{{cardNoNumber}}</view> -->
<!-- </view> -->
<picker mode="selector" style="width: 20%;" :range="UserCard" range-key="carLicensePlate"
@change="bindUserCard">
<view class="date text1"
style="color: white;position: absolute;margin-top: -2px;min-width: 100px;">
11111{{cardNoNumber}}</view>
</picker>
<image class="flright" style="width: 15px;height: 15px;" src="../../static/img/downj.png">
</image>
</view>
</view>
</view>
<view class="width100 height110"></view>
@ -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 {
}
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({
title: '请选择支付方式',
icon: 'none',
duration: 2000
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
that.$refs.paymentPassword.modalFun('show');
}
},
submitHandle(e) {
@ -788,10 +920,20 @@
})
return;
}
if (this.paytype == '3' || this.paytype == '6' || this.paytype == '7') {
let cardNo;
if (this.paytype == 3) {
cardNo = this.user.hltCardNo.cardNo;
}
if (this.paytype == 6) {
cardNo = this.user.oilCard.cardNo;
}
if (this.paytype == 7) {
cardNo = this.oilUserno;
}
let params = {
"orderNo": this.orderId,
"cardNo": this.user.hltCardNo.cardNo,
"cardNo": cardNo,
"password": this.PaymentPassword
}
cardPay(params).then(res => {
@ -818,7 +960,7 @@
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%;
}
}
</style>

Loading…
Cancel
Save