From 39d758070e79b911997883897c321e68d84c9f5e Mon Sep 17 00:00:00 2001
From: Sliverber <2622874537@qq.com>
Date: Sat, 20 Jul 2024 18:06:04 +0800
Subject: [PATCH] 11
---
components/tab-bar/tab-bar.vue | 2 +-
pages/index/index.vue | 38 ++---
pages_admin/order/device_detail.vue | 94 ++++++++----
pages_admin/order/order_detail.vue | 212 ++++++++++++++++++++--------
4 files changed, 241 insertions(+), 105 deletions(-)
diff --git a/components/tab-bar/tab-bar.vue b/components/tab-bar/tab-bar.vue
index bfffae2..9e0b8bb 100644
--- a/components/tab-bar/tab-bar.vue
+++ b/components/tab-bar/tab-bar.vue
@@ -111,7 +111,7 @@
justify-content: space-around;
border-top: 2rpx solid #95989D;
.tab{
- width: 60rpx;
+ width: 100rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index dd5ec44..47ede83 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -837,7 +837,10 @@
- 还车前需前往拍照确保车辆是否完好,还车成功且审核通过 将退还押金
+ 还车前需前往拍照确保车辆是否完好,
+
+
+ 还车成功且审核通过 将退还押金
@@ -1857,27 +1860,26 @@
this.maskepage = 0
this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/uRxPPoVoqmnmng6wKlij'
if (num == 1) {
+
if (!this.checkBeforeUnlock()) {
return;
}
-
+
if (this.showxy) {
- if (this.areaInfo.authentication == 1) {
- this.maskloading = true;
- let percentage = 0;
- const interval = setInterval(() => {
- if (percentage < 98) {
- percentage += 2; // 每次增加的百分比,可以调整
- this.toploadtxt = `开锁中${percentage}%`;
- } else {
- clearInterval(interval);
- this.toploadtxt = "开锁中98%";
- }
- }, 40); // 每40毫秒更新一次,可以调整
- setTimeout(() => {
- this.sub1();
- }, 2100);
- }
+ this.maskloading = true;
+ let percentage = 0;
+ const interval = setInterval(() => {
+ if (percentage < 98) {
+ percentage += 2; // 每次增加的百分比,可以调整
+ this.toploadtxt = `开锁中${percentage}%`;
+ } else {
+ clearInterval(interval);
+ this.toploadtxt = "开锁中98%";
+ }
+ }, 40); // 每40毫秒更新一次,可以调整
+ setTimeout(() => {
+ this.sub1();
+ }, 2100);
} else {
uni.showToast({
title: '请勾选协议',
diff --git a/pages_admin/order/device_detail.vue b/pages_admin/order/device_detail.vue
index c9ee803..f805d51 100644
--- a/pages_admin/order/device_detail.vue
+++ b/pages_admin/order/device_detail.vue
@@ -149,10 +149,10 @@
-
+
开锁
-
+
关锁
@@ -278,7 +278,30 @@
-
+
+
+
+
+ 操作提示
+
+
+
+
+ 车辆有正在进行中的订单,是否进行该操作
+
+
+
+
+
+
+
+ 取消
+
+
+ 确定
+
+
+
@@ -350,8 +373,10 @@
bulerebort: false,
getnum:0,
showvehicle:false,
- vehicleNum:''
-
+ vehicleNum:'',
+ showbtntip:false,
+ btnnum:null
+
}
},
@@ -385,6 +410,17 @@
},
methods: {
+ closeshowtip(){
+ this.showbtntip=false
+ },
+ checkbtn(num){
+ if(this.deviceInfos.status == 3||this.deviceInfos.status == 2||this.deviceInfos.status == 4){
+ this.showbtntip=true
+ this.btnnum=num
+ }else{
+ this.btn(num)
+ }
+ },
putvehicle(){
this.$u.put('/appVerify/device/edit?sn=' + this.sn+'&vehicleNum='+this.vehicleNum).then((res) => {
if (res.code == 200) {
@@ -458,6 +494,7 @@
}
},
btn(num) {
+ this.showbtntip=false
if (num == 0) {
this.$u.post('/appVerify/admin/unlocking?sn=' + this.sn).then((res) => {
@@ -1121,7 +1158,9 @@
return '骑行中'
} else if (this.deviceInfos.status == 4) {
return '临时锁车中'
- } else if (this.deviceInfos.status == 8) {
+ }else if (this.deviceInfos.status == 6) {
+ return '调度中'
+ } else if (this.deviceInfos.status == 8) {
return '下线'
}
@@ -1142,8 +1181,27 @@
// }
this.latitude = parseFloat(this.deviceInfos.latitude)
this.longitude = parseFloat(this.deviceInfos.longitude)
+ if (this.deviceInfos.onlineStatus == 0) {
+ this.markers.push({
+ id: parseFloat(this.deviceInfos.sn),
+ latitude: parseFloat(this.deviceInfos.latitude),
+ longitude: parseFloat(this.deviceInfos.longitude),
+ // title: item.deviceName,
+ width: 40,
+ height: 40,
+ iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u4UKmB47AxOj3YKIaajM',
+ callout: {
+ content: '离线', // 修改为你想要显示的文字内容
+ color: '#ffffff', // 修改为文字颜色
+ fontSize: 14, // 修改为文字大小
+ borderRadius: 10, // 修改为气泡圆角大小
+ bgColor: '#000000', // 修改为气泡背景颜色
+ padding: 6, // 修改为气泡内边距
+ display: 'ALWAYS', // 修改为气泡的显示策略
+ }
+ })
- if (this.deviceInfos.status == 0) {
+ }else if (this.deviceInfos.status == 0) {
this.markers.push({
id: parseFloat(this.deviceInfos.sn),
latitude: parseFloat(this.deviceInfos.latitude),
@@ -1277,27 +1335,7 @@
}
})
}
- if (this.deviceInfos.onlineStatus == 0) {
- this.markers.push({
- id: parseFloat(this.deviceInfos.sn),
- latitude: parseFloat(this.deviceInfos.latitude),
- longitude: parseFloat(this.deviceInfos.longitude),
- // title: item.deviceName,
- width: 40,
- height: 40,
- iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u4UKmB47AxOj3YKIaajM',
- callout: {
- content: '离线', // 修改为你想要显示的文字内容
- color: '#ffffff', // 修改为文字颜色
- fontSize: 14, // 修改为文字大小
- borderRadius: 10, // 修改为气泡圆角大小
- bgColor: '#000000', // 修改为气泡背景颜色
- padding: 6, // 修改为气泡内边距
- display: 'ALWAYS', // 修改为气泡的显示策略
- }
- })
- }
this.$forceUpdate()
}
})
@@ -1781,7 +1819,7 @@
border-radius: 50%;
width: 82rpx;
height: 82rpx;
- z-index: 10;
+ // z-index: 1;
.img {
width: 82rpx;
diff --git a/pages_admin/order/order_detail.vue b/pages_admin/order/order_detail.vue
index ad20b38..c3a40c9 100644
--- a/pages_admin/order/order_detail.vue
+++ b/pages_admin/order/order_detail.vue
@@ -136,29 +136,30 @@
-
+
- 提交时间:02-11 15:06:45
+ 提交时间:{{orderInfo.returnTime}}
-
-
+
+
通过
-
+
有损坏
-
+
押金扣款
@@ -211,15 +212,15 @@
开锁时间:{{ displayAmount(item.createTime)}}
-
+
临时锁车时间:{{ displayAmount(item.createTime)}}
-
+
解除时间:{{ displayAmount(item.createTime)}}
@@ -227,9 +228,9 @@
关锁时间:{{ displayAmount(item.createTime)}}
-
+
+
+
+ 退款
+
+
+ 审核通过
+
+
+
+
+ 有损坏
+
+
+ 押金扣款
+
+
+ 联系客户
+
+
+
@@ -322,16 +345,17 @@
押金扣款
-
+
扣款金额
- 元
+ 元
-
+
@@ -376,9 +400,10 @@
show: false,
_mapContext: null,
showpark: true,
- showck:false,
- money:'',
- areaNum:1
+ showck: false,
+ money: '',
+ areaNum: 1,
+ showload:false,
}
@@ -431,54 +456,91 @@
},
methods: {
- ckmoney(){
- if(this.money!=''){
- let data ={
- orderNo:this.orderId,
- status: "7" ,
- deductionAmount:this.money,
- audioFiles:''
+ ckmoney() {
+ uni.showLoading({
+ title:'加载中...'
+ })
+ this.showload=true
+
+ if (this.money != '') {
+ let data = {
+ orderNo: this.orderId,
+ status: "7",
+ deductionAmount: this.money,
+ audioFiles: ''
}
- this.$u.put("/appVerify/order/submitAudit" ,data ).then((res) => {
+ this.$u.put("/appVerify/order/submitAudit", data).then((res) => {
+ this.showload=false
+ uni.hideLoading()
if (res.code === 200) {
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
this.getOrderDetail()
- this.showck=false
+ this.showck = false
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
}
}).catch(error => {
- this.showck=false
+ this.showck = false
console.error("Error fetching area data:", error);
});
- }else{
+ } else {
uni.showToast({
title: '扣款金额不能为空',
icon: 'none',
duration: 2000
});
}
-
+
},
- unpass(){
- let data ={
- orderNo:this.orderId,
- "status": "6"
+ unpass() {
+ this.showload=true
+ uni.showLoading({
+ title:'加载中...'
+ })
+ let data = {
+ orderNo: this.orderId,
+ "status": "6"
}
- this.$u.put("/appVerify/order/damaged" ,data ).then((res) => {
+ this.$u.put("/appVerify/order/damaged", data).then((res) => {
+ this.showload=false
if (res.code === 200) {
+ uni.hideLoading()
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
this.getOrderDetail()
-
+
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
pass() {
+ this.showload=true
+ uni.showLoading({
+ title:'加载中...'
+ })
this.$u.post("/appVerify/passAudit/" + this.orderId).then((res) => {
+ uni.hideLoading()
+ this.showload=false
if (res.code === 200) {
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
this.getOrderDetail()
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
}
}).catch(error => {
console.error("Error fetching area data:", error);
@@ -809,11 +871,11 @@
if (res.code === 200) {
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
this.orderInfo = res.data
- this.areaNum=this.areaNum+1
- if(this.areaNum!=0){
- this.getArea()
+ this.areaNum = this.areaNum + 1
+ if (this.areaNum != 0) {
+ this.getArea()
}
-
+
this.loading = true
this.latitude = parseFloat(this.orderInfo.latitude)
@@ -873,7 +935,41 @@
.page {
padding-bottom: 200rpx;
width: 750rpx;
-
+ .bot_btn {
+
+ position: fixed;
+ bottom: 0;
+ display: flex;
+ flex-wrap: wrap;
+ padding: 40rpx 18rpx;
+ width: 750rpx;
+ // height: 230rpx;
+ background: #fff;
+ // background: linear-gradient( 180deg, #FFFFFF 0%, rgba(255,255,255,0) 100%);
+ box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
+ border-radius: 0rpx 0rpx 0rpx 0rpx;
+ // padding-bottom: 40rpx;
+ .btn:nth-child(4n) {
+ margin-right: 0;
+ }
+
+ .btn {
+ margin-top: 10rpx;
+ margin-right: 18rpx;
+ margin-bottom: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 164rpx;
+ height: 66rpx;
+ background: #E2F2FF;
+ border-radius: 0rpx 0rpx 0rpx 0rpx;
+ border: 2rpx solid #4C97E7;
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #3D3D3D;
+ }
+ }
.tip_box {
position: fixed;
@@ -885,23 +981,23 @@
border-radius: 30rpx 30rpx 30rpx 30rpx;
z-index: 110;
padding-bottom: 100rpx;
-
+
.top {
padding: 52rpx 38rpx 42rpx 36rpx;
-
+
.ipt_box {
margin-top: 22rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
-
+
.text {
width: 350rpx;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
}
-
+
.ipt {
padding: 10rpx 18rpx;
display: flex;
@@ -912,13 +1008,13 @@
height: 64rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
border: 2rpx solid #979797;
-
+
.input {
width: 80%;
}
}
}
-
+
.tip {
width: 100%;
text-align: center;
@@ -926,7 +1022,7 @@
font-size: 32rpx;
color: #3D3D3D;
}
-
+
.txt {
margin-top: 32rpx;
width: 100%;
@@ -936,17 +1032,17 @@
color: #3D3D3D;
}
}
-
+
.bots {
position: absolute;
-
+
width: 610rpx;
// border-top: 2rpx solid #D8D8D8;
display: flex;
flex-wrap: nowrap;
// height: 100%;
bottom: -20rpx;
-
+
.bot_left {
border-radius: 0rpx 0rpx 0rpx 30rpx;
width: 50%;
@@ -959,7 +1055,7 @@
color: #3D3D3D;
background: #EEEEEE;
}
-
+
.bot_right {
border-radius: 0rpx 0rpx 30rpx 0rpx;
width: 50%;
@@ -973,13 +1069,13 @@
font-weight: 500;
font-size: 32rpx;
// color: #4C97E7;
-
+
}
-
+
}
}
-
-
+
+
.map {