|
|
|
@ -76,13 +76,13 @@ |
|
|
|
|
<view class="flright width40 fotct" v-else> |
|
|
|
|
¥0 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="width100 backcorfff mart10"> |
|
|
|
|
<view class="width96 alijusstart height50 font14 fcor666"> |
|
|
|
|
<view class="width40 fcor333 fontwig6 font16">邀请码</view> |
|
|
|
|
<input class="width60 fotrt font15" style="padding-right: 6%;" v-model="identificationCode" placeholder="请输入邀请码" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="width100 backcorfff mart10"> |
|
|
|
|
<view class="width96 alijusstart height50 font14 fcor666"> |
|
|
|
|
<view class="width40 fcor333 fontwig6 font16">邀请码</view> |
|
|
|
|
<input class="width60 fotrt font15" style="padding-right: 6%;" v-model="identificationCode" placeholder="请输入邀请码" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<!-- //优惠券,积分抵扣 --> |
|
|
|
@ -182,6 +182,48 @@ |
|
|
|
|
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
|
|
<view class="line1" v-if="oilUserCardlist"></view> |
|
|
|
|
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" v-if="oilUserCardlist" |
|
|
|
|
@tap="paytype='fleettruck'"> |
|
|
|
|
<view class="width60 flleft font14"> |
|
|
|
|
车队油卡<text class="font14 fcor666 margle">余额: {{oilUserNoPrice}}元</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="flright width30 fotct" v-if="isUse"> |
|
|
|
|
<radio :checked="paytype=='fleettruck'" color="#0083f5" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view v-if="paytype=='fleettruck'"> |
|
|
|
|
<view class="heightl60 paddleft10 fcor333 fontwig6 font16 width100 backcorfff">车队油卡列表</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 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view> |
|
|
|
@ -248,6 +290,10 @@ |
|
|
|
|
oilPriceDiscountCompute, |
|
|
|
|
getRebateIntegral, |
|
|
|
|
getThirdPartyByDetail |
|
|
|
|
getRebateIntegral, |
|
|
|
|
getUserCardList, |
|
|
|
|
fleetOilCardPay, |
|
|
|
|
getCardListByCardNo |
|
|
|
|
} from '../../../Utils/Api.js'; |
|
|
|
|
import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue'; |
|
|
|
|
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue'; |
|
|
|
@ -286,19 +332,26 @@ |
|
|
|
|
gasOrderList: '', //存的订单信息 |
|
|
|
|
rechargeDes: '', // 支付详情 |
|
|
|
|
rebateIntegral: '', //返回积分 |
|
|
|
|
Integrastu: 1, //返积分状态 |
|
|
|
|
paytypeList: [], //支付方式 |
|
|
|
|
Integrastu: 1, //返积分状态 |
|
|
|
|
paytypeList: [], //支付方式 |
|
|
|
|
identificationCode: '', //渠道商 |
|
|
|
|
Integrastu: 1, //返积分状态 |
|
|
|
|
oilUserCardlist: '', //油卡列表 |
|
|
|
|
oilUserno: '', //油卡卡号 |
|
|
|
|
contactName: '', //油卡联系人 |
|
|
|
|
oilUserNoPrice: '', //油卡余额 |
|
|
|
|
UserCard: '', //车牌号列表 |
|
|
|
|
cardNoNumber: '', // 车牌号 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad(e) { |
|
|
|
|
this.gasOrderList = app.globalData.pelletoilList; |
|
|
|
|
this.orderPrice = this.gasOrderList.highChildOrderList[0].goodsPrice; |
|
|
|
|
// #ifdef H5 |
|
|
|
|
this.identificationCode = app.globalData.staffCode; |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef MP |
|
|
|
|
this.identificationCode = app.globalData.identificationCode; |
|
|
|
|
this.orderPrice = this.gasOrderList.highChildOrderList[0].goodsPrice; |
|
|
|
|
// #ifdef H5 |
|
|
|
|
this.identificationCode = app.globalData.staffCode; |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef MP |
|
|
|
|
this.identificationCode = app.globalData.identificationCode; |
|
|
|
|
// #endif |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
@ -308,6 +361,7 @@ |
|
|
|
|
this.priceValue[1] = 0; |
|
|
|
|
this.reload(); |
|
|
|
|
this.calculatepayPrice(); |
|
|
|
|
this.getUserCardList(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
|
|
|
|
@ -329,8 +383,8 @@ |
|
|
|
|
this.rechargeDes = res.return_data; |
|
|
|
|
this.paytypeList = res.return_data.productPayType.split(','); |
|
|
|
|
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1); |
|
|
|
|
let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2); |
|
|
|
|
let pprice = parseFloat(this.payPrice * 100).toFixed(0) |
|
|
|
|
let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2); |
|
|
|
|
let pprice = parseFloat(this.payPrice * 100).toFixed(0) |
|
|
|
|
let payprice = parseFloat(this.payPrice * 100 * zkprice).toFixed( |
|
|
|
|
0); |
|
|
|
|
if (payprice > this.user.gold) { |
|
|
|
@ -360,6 +414,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() { |
|
|
|
|
if (!this.payPrice) { |
|
|
|
@ -415,7 +503,7 @@ |
|
|
|
|
// this.availIntegal = payprice; |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
this.getRebateIntegral(); |
|
|
|
|
this.getRebateIntegral(); |
|
|
|
|
this.getThirdPartyByDetail(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -495,7 +583,7 @@ |
|
|
|
|
2)) - this |
|
|
|
|
.deductionPrice).toFixed(2)); |
|
|
|
|
} |
|
|
|
|
this.getRebateIntegral(); |
|
|
|
|
this.getRebateIntegral(); |
|
|
|
|
}, |
|
|
|
|
rechangeload() { |
|
|
|
|
this.isUse = false; |
|
|
|
@ -598,6 +686,38 @@ |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (this.paytype == 'fleettruck') { |
|
|
|
|
let params = { |
|
|
|
|
"orderId": this.orderNo, |
|
|
|
|
"password": this.PaymentPassword, |
|
|
|
|
"cardNo": this.oilUserno, |
|
|
|
|
"carLicensePlate": this.cardNoNumber, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
fleetOilCardPay(params).then(res => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '支付成功' |
|
|
|
|
}) |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (res.return_code == '102130') { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '../../login/updatePas/updatePas' |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.return_msg, |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// if (this.paytype == 'jifen') { |
|
|
|
|
// let params = { |
|
|
|
@ -723,6 +843,13 @@ |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//车队油卡 |
|
|
|
|
changeRiado1(item) { |
|
|
|
|
this.oilUserno = item.cardNo; |
|
|
|
|
this.contactName = item.contactName; |
|
|
|
|
this.oilUserNoPrice = item.balance; |
|
|
|
|
this.getCardListByCardNo(item.cardNo); |
|
|
|
|
}, |
|
|
|
|
//获取选择支付方式 |
|
|
|
|
changeRiado() { |
|
|
|
|
// if (!this.user.isSetHltCard && this.paytype == 'gonghuika') { |
|
|
|
@ -786,8 +913,28 @@ |
|
|
|
|
} |
|
|
|
|
if (this.orderNo) { |
|
|
|
|
this.wechatPay(); |
|
|
|
|
// if (this.orderNo) { |
|
|
|
|
// this.orderToPay(); |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
if (this.paytype == 'fleettruck') { |
|
|
|
|
let that = this; |
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '温馨提示', |
|
|
|
|
content: '是否使用当前 ' + that.contactName + ' 车队油卡', |
|
|
|
|
success: function(res) { |
|
|
|
|
if (res.confirm) { |
|
|
|
|
that.addorders(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.addorders(); |
|
|
|
|
}, |
|
|
|
|
//下单整合 |
|
|
|
|
addorders() { |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '提交订单中...' |
|
|
|
|
}) |
|
|
|
@ -803,7 +950,7 @@ |
|
|
|
|
}], |
|
|
|
|
"payGold": this.priceValue[1], |
|
|
|
|
"promoteCode": this.identificationCode, |
|
|
|
|
"payPwd": this.PaymentPassword, |
|
|
|
|
"payPwd": this.PaymentPassword, |
|
|
|
|
memDiscountId:this.memDiscountId |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -928,6 +1075,15 @@ |
|
|
|
|
that.$refs.paymentPassword.modalFun('show'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (that.paytype == 'fleettruck') { |
|
|
|
|
if (!that.user.isSetPayPwd) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '../../login/updatePas/updatePas' |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
that.$refs.paymentPassword.modalFun('show'); |
|
|
|
|
} |
|
|
|
|
if (that.paytype == 'oilcard') { |
|
|
|
|
if (!that.user.isSetPayPwd) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
@ -1131,4 +1287,18 @@ |
|
|
|
|
// margin-left: 10px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
.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> |
|
|
|
|