From 56322153aae7f03312fbb2e4ff65e90a9e51f85e Mon Sep 17 00:00:00 2001 From: Sliverber <2622874537@qq.com> Date: Mon, 12 Aug 2024 08:48:46 +0800 Subject: [PATCH] 2 --- pages/index/index.vue | 25 ++++++-- pages_admin/worke/AccountDetails.vue | 90 ++++++++++++++++++++-------- 2 files changed, 85 insertions(+), 30 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index c5f3611..4d341d3 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -280,7 +280,7 @@ - + 可继续行驶{{OrderdeviceInfos.remainingMileage}}公里 @@ -288,9 +288,12 @@ - + NO.{{orderinfo.sn}} + + 换车开锁失败,请点击换车按钮重新换车 + @@ -321,16 +324,22 @@ + v-if="OrderdeviceInfos.sn && (OrderdeviceInfos.status == 3 || OrderdeviceInfos.status == 6)" @click="taploadmask (2)"> 临时锁车 解锁用车 - + + 继续换车 + + 还车 + + 结束订单 + @@ -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 = {} diff --git a/pages_admin/worke/AccountDetails.vue b/pages_admin/worke/AccountDetails.vue index 1720d0a..8f802a2 100644 --- a/pages_admin/worke/AccountDetails.vue +++ b/pages_admin/worke/AccountDetails.vue @@ -4,12 +4,23 @@ back-icon-color='#000'> - - 账户余额 - - - {{info.balance}}元 + + + 账户总余额 + + + {{info.balance}}元 + + + + + 待结算金额 + + + {{info.settlementAmount}}元 + + @@ -21,6 +32,11 @@ 元 + + 可提现金额:{{info.withdrawableAmount}}元 + 提现金额:{{price}}元 @@ -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 {