|
|
|
@ -16,6 +16,17 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="content"> |
|
|
|
|
<view class="pay-list" v-for="(item,index) in paytypeList" :key="index"> |
|
|
|
|
<view class="row" @tap="paytype='2'" v-if="item == 2"> |
|
|
|
|
<view class="left"> |
|
|
|
|
<image :src="imagewxUrl+imgadres"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="center"> |
|
|
|
|
微信支付 |
|
|
|
|
</view> |
|
|
|
|
<view class="right"> |
|
|
|
|
<radio :checked="paytype=='2'" color="#0083f5" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="row" @tap="paytype='3'" v-if="item == 3"> |
|
|
|
|
<view class="left"> |
|
|
|
|
<image :src="imagewxUrl+imgadres2"></image> |
|
|
|
@ -27,7 +38,7 @@ |
|
|
|
|
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="row" @tap="paytype='oilcard'"> |
|
|
|
|
<view class="row" @tap="paytype='6'" v-if="item == 6"> |
|
|
|
|
<view class="left"> |
|
|
|
|
<image :src="imagewxUrl+imgadres1"></image> |
|
|
|
|
</view> |
|
|
|
@ -35,20 +46,49 @@ |
|
|
|
|
油卡支付(余额:{{oilPirce}}元) |
|
|
|
|
</view> |
|
|
|
|
<view class="right"> |
|
|
|
|
<radio :checked="paytype=='oilcard'" @click="changeRiado1()" color="#0083f5" /> |
|
|
|
|
<radio :checked="paytype=='6'" color="#0083f5" /> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="row" @tap="paytype='2'" v-if="item == 2"> |
|
|
|
|
</view> |
|
|
|
|
<view class="row" @tap="paytype='7'" v-if="item == 7"> |
|
|
|
|
<view class="left"> |
|
|
|
|
<image :src="imagewxUrl+imgadres"></image> |
|
|
|
|
<image :src="imagewxUrl+imgadres1"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="center"> |
|
|
|
|
微信支付 |
|
|
|
|
车队油卡(余额:{{oilUserNoPrice}}元) |
|
|
|
|
</view> |
|
|
|
|
<view class="right"> |
|
|
|
|
<radio :checked="paytype=='2'" color="#0083f5" /> |
|
|
|
|
<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="changeRiado2(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> |
|
|
|
@ -60,7 +100,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="height110"></view> |
|
|
|
|
<ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle" /> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
@ -68,11 +108,12 @@ |
|
|
|
|
<script> |
|
|
|
|
import { |
|
|
|
|
getHuiLianTongCardBalance, |
|
|
|
|
oilCardPay, |
|
|
|
|
findUser, |
|
|
|
|
wechatPay, |
|
|
|
|
cardPay, |
|
|
|
|
getThirdPartyByDetail |
|
|
|
|
getThirdPartyByDetail, |
|
|
|
|
getUserCardList, |
|
|
|
|
getCardListByCardNo |
|
|
|
|
} from '../../Utils/Api.js' |
|
|
|
|
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue'; |
|
|
|
|
let app = getApp(); |
|
|
|
@ -98,12 +139,18 @@ |
|
|
|
|
oilPirce: 0, //油卡金额 |
|
|
|
|
showType: '', //支付方式 |
|
|
|
|
paytypeList: [], //支付选择 |
|
|
|
|
productType: '' //分类 星巴克 ,肯德基 |
|
|
|
|
productType: '', //分类 星巴克 ,肯德基 |
|
|
|
|
oilUserCardlist: '', //油卡列表 |
|
|
|
|
oilUserno: '', //油卡卡号 |
|
|
|
|
contactName: '', //油卡联系人 |
|
|
|
|
oilUserNoPrice: '', //油卡余额 |
|
|
|
|
UserCard: '', //车牌号列表 |
|
|
|
|
cardNoNumber: '', // 车牌号 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onLoad(e) { |
|
|
|
|
this.orderNo = e.orderId; |
|
|
|
|
this.productType = e.productType; |
|
|
|
|
this.productType = e.productType; |
|
|
|
|
this.amount = e.amount; |
|
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
|
this.findUser() |
|
|
|
@ -128,7 +175,8 @@ |
|
|
|
|
let datas = { |
|
|
|
|
platformId: this.showType, |
|
|
|
|
"companyId": app.globalData.companyId, |
|
|
|
|
productType: this.productType |
|
|
|
|
productType: this.productType, |
|
|
|
|
"orderNo": this.orderNo, |
|
|
|
|
} |
|
|
|
|
getThirdPartyByDetail(datas).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
@ -137,6 +185,36 @@ |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//查询油卡包列表 |
|
|
|
|
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 = ''; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//查询我的信息 |
|
|
|
|
findUser() { |
|
|
|
|
let params; |
|
|
|
@ -150,6 +228,7 @@ |
|
|
|
|
if (res.return_data.oilCard) { |
|
|
|
|
this.oilPirce = res.return_data.oilCard.amount; |
|
|
|
|
} |
|
|
|
|
this.getUserCardList(); |
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "user", |
|
|
|
|
data: res.return_data |
|
|
|
@ -157,6 +236,10 @@ |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//选择车牌号 |
|
|
|
|
bindUserCard(e) { |
|
|
|
|
this.cardNoNumber = this.UserCard[e.target.value].carLicensePlate; |
|
|
|
|
}, |
|
|
|
|
//获取选择支付方式 |
|
|
|
|
changeRiado() { |
|
|
|
|
if (!this.user.isSetHltCard) { |
|
|
|
@ -193,6 +276,14 @@ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
//车队油卡 |
|
|
|
|
changeRiado2(item) { |
|
|
|
|
this.oilUserno = item.cardNo; |
|
|
|
|
this.contactName = item.contactName; |
|
|
|
|
this.oilUserNoPrice = item.balance; |
|
|
|
|
this.getCardListByCardNo(item.cardNo); |
|
|
|
|
}, |
|
|
|
|
//查询工会卡余额 |
|
|
|
|
//查询详情 |
|
|
|
|
getHuiLianTongCardBalance() { |
|
|
|
@ -241,10 +332,21 @@ |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '支付成功' |
|
|
|
|
}) |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + that.orderNo |
|
|
|
|
}) |
|
|
|
|
if (that.productType == 1 || that.productType == 2 || that |
|
|
|
|
.productType == 3) { |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + |
|
|
|
|
that.orderNo |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/pages/user/order_details/order_details?id=' + |
|
|
|
|
that.orderNo |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
fail: function(err) { |
|
|
|
|
uni.hideLoading(); |
|
|
|
@ -296,7 +398,7 @@ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
that.$refs.paymentPassword.modalFun('show'); |
|
|
|
|
} else if (that.paytype == 'oilcard') { |
|
|
|
|
} else if (that.paytype == '6') { |
|
|
|
|
if (!that.user.isSetPayPwd) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/login/updatePas/updatePas' |
|
|
|
@ -319,6 +421,14 @@ |
|
|
|
|
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'); |
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '请选择支付方式', |
|
|
|
@ -332,11 +442,22 @@ |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '支付中...' |
|
|
|
|
}) |
|
|
|
|
if (this.paytype == '3') { |
|
|
|
|
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.orderNo, |
|
|
|
|
"cardNo": this.user.hltCardNo.cardNo, |
|
|
|
|
"password": this.PaymentPassword |
|
|
|
|
"cardNo": cardNo, |
|
|
|
|
"password": this.PaymentPassword, |
|
|
|
|
"carLicensePlate": this.cardNoNumber |
|
|
|
|
} |
|
|
|
|
cardPay(params).then(res => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
@ -344,39 +465,15 @@ |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '支付成功' |
|
|
|
|
}) |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderNo |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (res.return_code == '102130') { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/login/updatePas/updatePas' |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.return_msg, |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (this.paytype == 'oilcard') { |
|
|
|
|
let params = { |
|
|
|
|
"orderId": this.orderNo, |
|
|
|
|
"cardNo": this.user.oilCard.cardNo, |
|
|
|
|
"password": this.PaymentPassword |
|
|
|
|
} |
|
|
|
|
oilCardPay(params).then(res => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '支付成功' |
|
|
|
|
}) |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderNo |
|
|
|
|
}) |
|
|
|
|
if (this.productType == 1 || this.productType == 2 || this.productType == 3) { |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderNo |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/pages/user/order_details/order_details?id=' + this.orderNo |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (res.return_code == '102130') { |
|
|
|
@ -392,6 +489,7 @@ |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
payRequest: function(self) { |
|
|
|
|
uni.showLoading({ |
|
|
|
@ -426,10 +524,19 @@ |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '支付成功' |
|
|
|
|
}) |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + this |
|
|
|
|
.orderNo |
|
|
|
|
}) |
|
|
|
|
if (this.productType == 1 || this.productType == 2 || this |
|
|
|
|
.productType == 3) { |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/qianzhu-KFC/order-details/order-details?id=' + |
|
|
|
|
this.orderNo |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/pages/user/order_details/order_details?id=' + |
|
|
|
|
this.orderNo |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
cancel: function(r) {}, |
|
|
|
|
fail: function(res) {} |
|
|
|
@ -560,4 +667,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> |
|
|
|
|