From 13dbe41a76f0bc8160b95b05db98257347a0fa8b Mon Sep 17 00:00:00 2001 From: tx <2622874537@qq.com> Date: Mon, 9 Sep 2024 18:02:17 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 24 ++-- pages/my.vue | 8 +- pages_admin/admin_order.vue | 108 +++++++++-------- pages_admin/admin_worke.vue | 4 +- pages_admin/order/order_detail.vue | 79 +++++++----- pages_admin/worke/bind_mac.vue | 186 +++++++++++++++++++++++++++-- 6 files changed, 298 insertions(+), 111 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 4a55e68..20e73a4 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -355,7 +355,7 @@ 使用时间:{{timeString}} - + - {{orderinfo.totalFee}} + {{orderinfo.payFee}} @@ -1474,7 +1474,7 @@ uni.setStorageSync('areaId', res.data.areaId); this.getinfo() this.getmarks() - this.getlist() + // this.getlist() this.getParking() if (uni.getStorageSync('token')) { this.getisInOrder() @@ -1559,6 +1559,7 @@ if (res.code === 200) { this.isqrcode = true this.deviceInfos = res.data; + this.getlist(res.data.getlist) if (!this.orderinfo.sn) { this.mac = res.data.mac } @@ -1684,7 +1685,7 @@ if (res.code === 200) { this.isqrcode = true this.deviceInfos = res.data; - + this.getlist(res.data.getlist) if (num == 0) { // this.routePlanning(res.data.latitude, // res.data.longitude) @@ -1818,8 +1819,6 @@ }); } }, - - mapFun() { console.log('点击了'); uni.openLocation({ @@ -2896,10 +2895,9 @@ }, backDevice() { - - this.$u.post('/appVerify/device/return?returnType=1&orderNo=' + this.orderinfo.orderNo + - '&isInParkingArea=' + this.isInParkingArea).then(( - res) => { + // that.backgps.latitude + // that.backgps.longitude + this.$u.post('/appVerify/device/return?returnType=1&orderNo=' + this.orderinfo.orderNo +'&isInParkingArea=' + this.isInParkingArea+ '&lon=' + this.backgps.longitude +'&lat=' + this.backgps.latitude ).then((res) => { if (res.code === 200) { this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/ukD735zCS1yQXw2aGun8'; @@ -4813,10 +4811,10 @@ this.freeListIndex = index }, - getlist() { + getlist(modelId) { this.freList = [] let data = { - areaId: this.areaInfo.areaId + modelId: modelId } this.$u.get('/app/fee/list?', data).then((res) => { if (res.code === 200) { diff --git a/pages/my.vue b/pages/my.vue index 98b4ecf..b3304dd 100644 --- a/pages/my.vue +++ b/pages/my.vue @@ -230,19 +230,19 @@ - + 月卡会员 仅需¥{{CarkTypeList[0].retailPrice }},可享30天免费骑行权益 - + 月卡会员 月卡会员{{ daysUntilExpiration }}天后到期 立即续费 - + @@ -576,7 +576,7 @@ this.getCarkType() this.$store.commit('SET_USERID', res.user.userId); this.info = res.user - this.calculateDaysUntilExpiration() + // this.calculateDaysUntilExpiration() if (info.role != 1) { this.getareaList() } diff --git a/pages_admin/admin_order.vue b/pages_admin/admin_order.vue index c95f5c9..64c400d 100644 --- a/pages_admin/admin_order.vue +++ b/pages_admin/admin_order.vue @@ -810,6 +810,7 @@ appointmentFee:0, reason:'', pageNum:1, + isback:false } @@ -977,57 +978,64 @@ }, // 退款 backMoney() { - uni.showLoading({ - title:'加载中' - }) - let data = { - orderNo: this.orderInfo.orderNo, - dispatchFee: this.dispatchFee, - manageFee: this.manageFee, - ridingFee: this.ridingFee, - appointmentFee: this.appointmentFee, - // reason: this.reason - } - if ( - data.dispatchFee > this.orderInfo.dispatchFee || - data.manageFee > this.orderInfo.manageFee || - data.ridingFee > this.orderInfo.ridingFee || - data.appointmentFee > this.orderInfo.appointmentFee - ) { - uni.showToast({ - title: '退款金额不能大于实际支付金额', - icon: 'none', - duration: 2000 - }); - return; // 阻止请求的发送 - } - this.$u.put('/appVerify/order/refund', data).then((res) => { - if (res.code === 200) { - // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构 - this.show = false - this.showgj = false - this.showtk = false - this.orderInfo = {} - if (this.curtitidx == 0) { - this.orderList() - } else if (this.curtitidx == 3) { - this.orderList3() - } - uni.showToast({ - title: '退款成功', - icon: 'none', - duration: 2000 - }); - } else { - uni.showToast({ - title: res.msg, - icon: 'none', - duration: 2000 - }); + + if(this.isback==false){ + this.isback=true + uni.showLoading({ + title:'加载中' + }) + let data = { + orderNo: this.orderInfo.orderNo, + dispatchFee: this.dispatchFee, + manageFee: this.manageFee, + ridingFee: this.ridingFee, + appointmentFee: this.appointmentFee, + // reason: this.reason } - }).catch(error => { - console.error("Error fetching area data:", error); - }); + if ( + data.dispatchFee > this.orderInfo.dispatchFee || + data.manageFee > this.orderInfo.manageFee || + data.ridingFee > this.orderInfo.ridingFee || + data.appointmentFee > this.orderInfo.appointmentFee + ) { + uni.showToast({ + title: '退款金额不能大于实际支付金额', + icon: 'none', + duration: 2000 + }); + return; // 阻止请求的发送 + } + this.$u.put('/appVerify/order/refund', data).then((res) => { + this.isback=false + if (res.code === 200) { + // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构 + this.show = false + this.showgj = false + this.showtk = false + this.orderInfo = {} + if (this.curtitidx == 0) { + this.orderList() + } else if (this.curtitidx == 3) { + this.orderList3() + } + this.showtk=false + uni.showToast({ + title: '退款成功', + icon: 'none', + duration: 2000 + }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }).catch(error => { + console.error("Error fetching area data:", error); + }); + } + }, showtks(item) { this.orderInfo = item diff --git a/pages_admin/admin_worke.vue b/pages_admin/admin_worke.vue index 6779586..4da5095 100644 --- a/pages_admin/admin_worke.vue +++ b/pages_admin/admin_worke.vue @@ -30,7 +30,7 @@ 财务报表 - + 设备管理 @@ -48,7 +48,7 @@ 用户页面 - + 车辆绑定 diff --git a/pages_admin/order/order_detail.vue b/pages_admin/order/order_detail.vue index 29a34c3..7988179 100644 --- a/pages_admin/order/order_detail.vue +++ b/pages_admin/order/order_detail.vue @@ -559,6 +559,7 @@ manageFee: 0, ridingFee: 0, appointmentFee: 0, + isback:false } }, @@ -1228,44 +1229,56 @@ }, backMoney() { - let data = { - orderNo: this.orderInfo.orderNo, - dispatchFee: this.dispatchFee, - manageFee: this.manageFee, - ridingFee: this.ridingFee, - appointmentFee: this.appointmentFee, - // reason: this.reason - } - if ( - data.dispatchFee > this.orderInfo.dispatchFee || - data.manageFee > this.orderInfo.manageFee || - data.ridingFee > this.orderInfo.ridingFee || - data.appointmentFee > this.orderInfo.appointmentFee - ) { - uni.showToast({ - title: '退款金额不能大于实际支付金额', - icon: 'none', - duration: 2000 - }); - return; // 阻止请求的发送 - } - this.$u.put('/appVerify/order/refund', data).then((res) => { - if (res.code === 200) { - // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构 - this.show = false - - this.showtk = false - this.getOrderDetail() - } else { + if(this.isback==false){ + uni.showLoading({ + title:'加载中' + }) + this.isback=true + let data = { + orderNo: this.orderInfo.orderNo, + dispatchFee: this.dispatchFee, + manageFee: this.manageFee, + ridingFee: this.ridingFee, + appointmentFee: this.appointmentFee, + // reason: this.reason + } + if ( + data.dispatchFee > this.orderInfo.dispatchFee || + data.manageFee > this.orderInfo.manageFee || + data.ridingFee > this.orderInfo.ridingFee || + data.appointmentFee > this.orderInfo.appointmentFee + ) { uni.showToast({ - title: res.msg, + title: '退款金额不能大于实际支付金额', icon: 'none', duration: 2000 }); + return; // 阻止请求的发送 } - }).catch(error => { - console.error("Error fetching area data:", error); - }); + this.$u.put('/appVerify/order/refund', data).then((res) => { + if (res.code === 200) { + // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构 + this.show = false + this.isback=false + this.showtk = false + this.getOrderDetail() + uni.showToast({ + title: '退款成功', + icon: 'none', + duration: 2000 + }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }).catch(error => { + console.error("Error fetching area data:", error); + }); + } + }, getOrderDetail() { this.$u.get('/appVerify/order/' + this.orderId).then((res) => { diff --git a/pages_admin/worke/bind_mac.vue b/pages_admin/worke/bind_mac.vue index 0691464..5b30841 100644 --- a/pages_admin/worke/bind_mac.vue +++ b/pages_admin/worke/bind_mac.vue @@ -34,6 +34,9 @@ 确认添加 + + + @@ -56,7 +59,30 @@ 接口响铃 - + + + + + 操作提示 + + + + + 该mac号已有绑定sn码是否修改为当前sn码 + + + + + + + + 取消 + + + 确定 + + +