|
@@ -42,19 +42,16 @@
|
|
|
<view class="details-body">
|
|
|
<dl><dt>停车时长:</dt> <dd>{{leaveDetail.duration}}</dd></dl>
|
|
|
<dl><dt>车辆类型:</dt> <dd>{{leaveDetail.vehicleType|filterCarType}}</dd></dl>
|
|
|
- <dl><dt>本次应收:</dt> <dd class="u-type-primary">{{leaveDetail.totalAmount}}元</dd></dl>
|
|
|
+ <dl><dt>本次应收:</dt> <dd class="u-type-primary">{{leaveDetail.payAmount}}元</dd></dl>
|
|
|
<dl><dt>历史欠费:</dt> <dd class="u-type-warning">{{leaveDetail.oweAmount}}元</dd></dl>
|
|
|
<view class="tip">
|
|
|
你是否将该车辆出场,如果是请缴费,否则点击取消!
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="details-footer u-flex u-row-between">
|
|
|
- <!-- <view class="details-footer-btn details-footer-btn--blue" @click="payAll">全部缴费</view>
|
|
|
- <view class="details-footer-btn details-footer-btn--yellow" @click="payThis">本次缴费</view>
|
|
|
- -->
|
|
|
- <u-button type="primary" :disabled="detailModel.payAllbtn" @click="payAll">全部缴费</u-button>
|
|
|
- <u-button type="warning" :disabled="detailModel.payOnebtn" @click="payThis">本次缴费</u-button>
|
|
|
- <view class="details-footer-btn bg-gray" @click="openPage('pages/getout/getout')">取消</view>
|
|
|
+ <u-button type="primary" :disabled="detailModel.payAllbtn" @click="onPayAll">全部缴费</u-button>
|
|
|
+ <u-button type="warning" :disabled="detailModel.payOnebtn" @click="onPayThis">本次缴费</u-button>
|
|
|
+ <view class="details-footer-btn bg-gray" @click="onPayCancel">取消</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
<!-- 支付方式 -->
|
|
@@ -146,8 +143,8 @@
|
|
|
timer: null, // 定时器
|
|
|
detailModel:{
|
|
|
show: false,
|
|
|
- payAllbtn: true,
|
|
|
- payOnebtn: true
|
|
|
+ payAllbtn: false,
|
|
|
+ payOnebtn: false
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -159,7 +156,7 @@
|
|
|
this.orderSpaceName = page.orderSpaceName;
|
|
|
this.orderVehicleNo = page.orderVehicleNo;
|
|
|
// #ifdef APP-PLUS
|
|
|
- this.speaks(this.orderVehicleNo);
|
|
|
+ // this.speaks(this.orderVehicleNo);
|
|
|
// #endif
|
|
|
|
|
|
},
|
|
@@ -167,10 +164,11 @@
|
|
|
this.handleEntranceOutDetail();
|
|
|
},
|
|
|
methods:{
|
|
|
- openPage(path) {
|
|
|
- console.log('path',path);
|
|
|
- this.$u.route({
|
|
|
- url: path
|
|
|
+
|
|
|
+ onPayCancel(){
|
|
|
+ this.$u.route({
|
|
|
+ type: 'redirectTo',
|
|
|
+ url: '/pages/getout/getout'
|
|
|
})
|
|
|
},
|
|
|
speaks(msg){
|
|
@@ -190,13 +188,9 @@
|
|
|
},
|
|
|
handleOut(res){
|
|
|
let that = this;
|
|
|
- // this.showOrderDetails = true;
|
|
|
this.$u.api.getOut({spaceId:this.orderID})
|
|
|
.then(res=>{
|
|
|
//1、当前订单金额和历史缴费金额都为0 --无需缴费--跳转
|
|
|
- // ALog.info({msg: that.leaveDetail.oweAmount});
|
|
|
- // ALog.info({msg: res.data.payAmount});
|
|
|
- debugger
|
|
|
if(that.leaveDetail.oweAmount == 0 && res.data.payAmount == 0){
|
|
|
that.$refs.uToast.show({
|
|
|
title: '金额为0无需支付',
|
|
@@ -205,22 +199,21 @@
|
|
|
});
|
|
|
}else if (that.leaveDetail.oweAmount == 0 && res.data.payAmount > 0){
|
|
|
that.detailModel.show = true;
|
|
|
- that.detailModel.payAllbtn = false;
|
|
|
- that.detailModel.payOnebtn = true;
|
|
|
+ that.detailModel.payAllbtn = true;
|
|
|
+ that.detailModel.payOnebtn = false;
|
|
|
}else if (that.leaveDetail.oweAmount > 0 && res.data.payAmount == 0){
|
|
|
that.detailModel.show = true;
|
|
|
- that.detailModel.payOnebtn = false;
|
|
|
- that.detailModel.payAllbtn = true;
|
|
|
+ that.detailModel.payOnebtn = true;
|
|
|
+ that.detailModel.payAllbtn = false;
|
|
|
}else {
|
|
|
that.detailModel.show = true;
|
|
|
- that.detailModel.payOnebtn = true;
|
|
|
- that.detailModel.payAllbtn = true;
|
|
|
+ that.detailModel.payOnebtn = false;
|
|
|
+ that.detailModel.payAllbtn = false;
|
|
|
}
|
|
|
//#ifdef APP-PLUS
|
|
|
that.speaks(res.data.speak);
|
|
|
device.print(res.data.print);
|
|
|
//#endif
|
|
|
- console.log('getOut',res)
|
|
|
}).catch(err=>{
|
|
|
this.$refs.uToast.show({
|
|
|
title: err.msg,
|
|
@@ -229,15 +222,13 @@
|
|
|
console.log('getOut ',err)
|
|
|
});
|
|
|
},
|
|
|
- async payThis(){
|
|
|
- // this.showOrderDetails = false;
|
|
|
+ async onPayThis(){
|
|
|
this.detailModel.show = false;
|
|
|
this.showPayway = true;
|
|
|
this.payParams.orderList.push(this.leaveDetail.orderId);
|
|
|
// await this.confirmOut();
|
|
|
},
|
|
|
- async payAll(){
|
|
|
- // this.showOrderDetails = false;
|
|
|
+ async onPayAll(){
|
|
|
this.detailModel.show = false;
|
|
|
this.showPayway = true;
|
|
|
this.payParams.orderList.push(this.leaveDetail.orderId);
|
|
@@ -250,19 +241,13 @@
|
|
|
this.showPayway = false;
|
|
|
},
|
|
|
scanPay(){
|
|
|
- console.log('this.payParams',this.payParams);
|
|
|
uni.scanCode({
|
|
|
onlyFromCamera: true,
|
|
|
+ scanType:['barCode','qrCode'],
|
|
|
success: (res) => {
|
|
|
- //#ifdef APP-PLUS
|
|
|
- ALog.info({msg:'条码内容:' + res.result});
|
|
|
- //#endif
|
|
|
this.payParams.code = res.result;
|
|
|
this.$u.api.gzbankSwept(this.payParams)
|
|
|
.then(res=>{
|
|
|
- //#ifdef APP-PLUS
|
|
|
- // plus.nativeUI.toast(res.msg);
|
|
|
- //#endif
|
|
|
// 启动定时器查询订单状态
|
|
|
uni.showLoading({
|
|
|
title: '查询支付状态中'
|
|
@@ -277,8 +262,6 @@
|
|
|
//#endif
|
|
|
});
|
|
|
|
|
|
- // console.log('条码类型:' + res.scanType);
|
|
|
- // console.log('条码内容:' + res.result);
|
|
|
},
|
|
|
fail:function(err){
|
|
|
//#ifdef APP-PLUS
|