This commit is contained in:
Sliverber 2024-08-12 08:48:46 +08:00
parent c9456a3b85
commit 56322153aa
2 changed files with 85 additions and 30 deletions

View File

@ -280,7 +280,7 @@
</view>
<view class="cont">
<view class="left">
<view class="text">
<view class="text" v-if="OrderdeviceInfos.sn!='' ">
可继续行驶{{OrderdeviceInfos.remainingMileage}}公里
</view>
<view class="speed" style="background: #ccc; ">
@ -288,9 +288,12 @@
</view>
</view>
<view class="mac">
<view class="mac" v-if="OrderdeviceInfos.sn ">
NO.{{orderinfo.sn}}
</view>
<view class="mac" v-if="!OrderdeviceInfos.sn " style="color: red;">
换车开锁失败请点击换车按钮重新换车
</view>
</view>
<view class="right">
<image src="https://api.ccttiot.com/smartmeter/img/static/uHTCZOVUbmBkKW4G0wuF" mode="">
@ -321,16 +324,22 @@
</view>
</view>
<view class="btn" style=" margin-right: 16rpx;"
v-if="OrderdeviceInfos.sn!='' && (OrderdeviceInfos.status == 3 || OrderdeviceInfos.status == 6)" @click="taploadmask (2)">
v-if="OrderdeviceInfos.sn && (OrderdeviceInfos.status == 3 || OrderdeviceInfos.status == 6)" @click="taploadmask (2)">
临时锁车
</view>
<view class="btn" style=" margin-right: 16rpx;" v-if="OrderdeviceInfos.status==4"
@click=" taploadmask(3)">
解锁用车
</view>
<view class="btn1" @click=" taploadmask(4)">
<view class="btn" style=" margin-right: 16rpx;" @click="tochange()" v-if="!OrderdeviceInfos.sn">
继续换车
</view>
<view class="btn1" @click=" taploadmask(4)" v-if="OrderdeviceInfos.sn">
还车
</view>
<view class="btn1" @click=" taploadmask(4)" v-if="!OrderdeviceInfos.sn">
结束订单
</view>
</view>
</view>
@ -1669,6 +1678,7 @@
if (res.code === 200) {
this.isqrcode=false
this.mac = this.OrderdeviceInfos.mac;
// this.OrderdeviceInfos.onlineStatus = '1'
if (this.OrderdeviceInfos.onlineStatus !== res.data.onlineStatus) {
this.OrderdeviceInfos = res.data;
@ -2605,7 +2615,10 @@
let data = {
longitude: this.deviceGps.longitude,
latitude: this.deviceGps.latitude,
deptId :uni.getStorageSync('deptId')
}
this.$u.get(`/app/vehicleLocalization?`, data).then((res) => {
if (res.code === 200) {
@ -4245,7 +4258,9 @@
clearInterval(this.timer)
this.starTime()
}
// if (this.areaInfo.areaId != res.data[0].areaId) {
// this.getArea()
// }
} else {
clearInterval(this.timer)
this.orderinfo = {}

View File

@ -4,12 +4,23 @@
back-icon-color='#000'></u-navbar>
<view class="account_box">
<view class="txt">
账户余额
</view>
<view class="num">
{{info.balance}}
<view class="li_box">
<view class="txt">
账户总余额
</view>
<view class="num">
{{info.balance}}
</view>
</view>
<view class="li_box">
<view class="txt">
待结算金额
</view>
<view class="num">
{{info.settlementAmount}}
</view>
</view>
</view>
<view class="ipt_box">
<view class="ipt">
@ -21,6 +32,11 @@
</view>
</view>
<view class="" style="margin: 0 auto;
margin-top: 38rpx;
width: 676rpx;color: #ccc;" >
可提现金额{{info.withdrawableAmount}}
</view>
<view class="info_card">
<view class="info_li">
<view class="text">提现金额{{price}}</view>
@ -97,7 +113,8 @@
realprice: 0,
Quantity: 0,
border: false,
isThrottled: false
isThrottled: false,
moneyInfo:{}
}
},
onLoad(e) {
@ -119,10 +136,10 @@
methods: {
ckinpt() {
if (parseFloat(this.amount) > parseFloat(this.info.balance)) {
if (parseFloat(this.amount) > parseFloat(this.info.withdrawableAmount)) {
uni.showToast({
title: '提现金额不能大于账户余额',
title: '提现金额不能大于可提现金额',
icon: 'none',
duration: 2000
});
@ -201,10 +218,19 @@
});
return;
}
//
this.isThrottled = true;
if (parseFloat(this.realprice) > parseFloat(this.info.withdrawableAmount)) {
uni.showToast({
title: '提现金额不能大于可提现金额',
icon: 'none',
duration: 2000
});
}
let data = {
amount: this.realprice,
areaId: this.areaId
@ -252,13 +278,21 @@
let data = {
areaId: this.areaId
}
this.$u.get('/appVerify/getDept', data).then((res) => {
this.$u.get('/appVerify/getDept?', data).then((res) => {
if (res.code == 200) {
this.info = res.data
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
this.$u.get('index/statistics?', data).then((res) => {
if (res.code == 200) {
this.moneyInfo = res.data
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
getlist() {
let data = {
@ -351,21 +385,27 @@
height: 196rpx;
background: #12D2AC;
border-radius: 20rpx 20rpx 20rpx 20rpx;
.txt {
width: 100%;
font-weight: 400;
font-size: 32rpx;
color: #FFFFFF;
}
.num {
margin-top: 10rpx;
width: 100%;
font-weight: 400;
font-size: 48rpx;
color: #FFFFFF;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.li_box{
.txt {
width: 100%;
font-weight: 400;
font-size: 32rpx;
color: #FFFFFF;
}
.num {
margin-top: 10rpx;
width: 100%;
font-weight: 400;
font-size: 48rpx;
color: #FFFFFF;
}
}
}
.patBtn {