bike/pages_admin/admin_order.vue

1199 lines
30 KiB
Vue
Raw Normal View History

2024-05-08 23:18:30 +08:00
<template>
<view class="page">
2024-06-24 17:59:49 +08:00
<u-navbar :is-back="false" title="订单管理" :border-bottom="false" :background="bgc" title-color='#2E4975'
2024-06-07 18:08:55 +08:00
title-size='36' height='45'></u-navbar>
2024-05-08 23:18:30 +08:00
<view class="top_box">
<view class="left_text">
时间范围
</view>
<view class="timebox">
<view class="left_time" @click="time1=true">
{{firsTime}}
</view>
-
<view class="right_time" @click="time2=true">
{{lasTime}}
</view>
</view>
</view>
<view class="top_box">
<view class="left_text">
手机号
</view>
<view class="sear_ipt">
2024-05-13 18:03:20 +08:00
<input type="text" v-model="searchKeyword" placeholder="请输入内容" class="input"
placeholder-style="color:#C7CDD3" @input="search()">
2024-05-08 23:18:30 +08:00
</view>
</view>
<view class="tap">
<view class="tap_cont " :class="curtitidx==0?'act1':''" @click="changeidx(0)">
全部
</view>
2024-05-13 18:03:20 +08:00
<view class="tap_cont" :class="curtitidx==1?'act1':''" @click="changeidx(1)">
2024-05-08 23:18:30 +08:00
进行中
</view>
2024-05-13 18:03:20 +08:00
<view class="tap_cont" :class="curtitidx==2?'act1':''" @click="changeidx(2)">
2024-05-08 23:18:30 +08:00
待支付
</view>
2024-05-13 18:03:20 +08:00
<view class="tap_cont" :class="curtitidx==3?'act1':''" @click="changeidx(3)">
2024-05-08 23:18:30 +08:00
已完成
</view>
</view>
<u-mask :show="show" @click="show = false" :z-index='100' />
2024-05-13 18:03:20 +08:00
<u-picker mode="time" v-model="time1" :params="params" @confirm="confirm1"
:default-time='pickertime'></u-picker>
<u-picker mode="time" v-model="time2" :params="params" @confirm="confirm2"
:default-time='pickertime'></u-picker>
2024-05-11 18:01:20 +08:00
<view class="warp_box">
2024-05-13 18:03:20 +08:00
<swiper class="swiper" :style="{ height: swiperHeight + 'rpx' }" :current='curtitidx' @change="swiperchange"
next-margin='-20rpx'>
2024-05-11 18:01:20 +08:00
<swiper-item>
2024-05-13 18:03:20 +08:00
<view class="swiper-item " v-if="loading">
<view class="card" v-for="(item,index) in allList" :key="index">
2024-05-11 18:01:20 +08:00
<view class="line"></view>
<view class="top_info">
<view class="top_info_left">
订单编号{{item.orderNo}}
</view>
<view class="top_info_right" v-if="item.status==0||item.status==2">
<view class="yuan"></view>
进行中
</view>
2024-05-13 18:03:20 +08:00
<view class="top_info_right" v-if="item.status==1||item.status==3"
style="color: orangered;">
2024-05-11 18:01:20 +08:00
<view class="yuan" style="background: orangered;"></view>
待支付
</view>
<view class="top_info_right" v-if="item.status==4" style="color: green;">
<view class="yuan" style="background: green;"></view>
已完成
</view>
</view>
2024-05-13 18:03:20 +08:00
2024-05-11 18:01:20 +08:00
<view class="lines"></view>
<view class="order_info">
<view class="info_li">
租赁用户{{item.phonenumber}}
</view>
<view class="info_li">
<view class="half_info_li">
车辆编号{{item.sn}}
</view>
2024-06-24 17:59:49 +08:00
<view class="half_info_li" >
2024-06-21 18:03:21 +08:00
租赁时长{{computedList(item)}}
</view>
2024-06-24 17:59:49 +08:00
2024-05-11 18:01:20 +08:00
</view>
<view class="info_li">
2024-06-25 18:02:39 +08:00
<view class="half_info_li">
订单费用{{item.totalFee}}
</view>
<view class="half_info_li" v-if="item.status==4" >
有无退款<span v-if="item.etRefund==null"></span>
<span v-else style="color: red;"></span>
</view>
2024-05-11 18:01:20 +08:00
</view>
2024-06-25 18:02:39 +08:00
2024-05-11 18:01:20 +08:00
<view class="info_li" v-if="item.unlock_time">
2024-05-13 18:03:20 +08:00
开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }}
2024-05-11 18:01:20 +08:00
</view>
</view>
<view class="lines"></view>
<view class="btn_box">
<view class="btn" v-if="item.status==0||item.status==2" @click="showfzs(item)">
辅助还车
</view>
2024-05-13 18:03:20 +08:00
<view class="btn" v-if="item.status==1||item.status==3" @click="showgjs(item)">
2024-05-11 18:01:20 +08:00
改价
</view>
2024-05-13 18:03:20 +08:00
<view class="btn" v-if="item.status==4" @click="showtks(item)">
退款
2024-05-11 18:01:20 +08:00
</view>
2024-05-13 18:03:20 +08:00
<view class="btn_line">
2024-05-11 18:01:20 +08:00
</view>
2024-05-13 18:03:20 +08:00
<!-- <view class="btn" v-if="item.status==4" style="width: 100%;">
查看详情
</view> -->
<view class="btn" @click="toOrderDetail(item.orderNo)">
2024-05-11 18:01:20 +08:00
查看详情
</view>
</view>
</view>
</view>
</swiper-item>
<swiper-item>
2024-05-13 18:03:20 +08:00
<view class="swiper-item " v-if="loading">
<view class="card" v-for="(item,index) in ingList" :key="index">
2024-05-11 18:01:20 +08:00
<view class="line"></view>
<view class="top_info">
<view class="top_info_left">
订单编号{{item.orderNo}}
</view>
<view class="top_info_right" v-if="item.status==0||item.status==2">
<view class="yuan"></view>
进行中
</view>
2024-05-13 18:03:20 +08:00
<view class="top_info_right" v-if="item.status==1||item.status==3"
style="color: orangered;">
2024-05-11 18:01:20 +08:00
<view class="yuan" style="background: orangered;"></view>
待支付
</view>
<view class="top_info_right" v-if="item.status==4" style="color: green;">
<view class="yuan" style="background: green;"></view>
已完成
</view>
</view>
2024-05-13 18:03:20 +08:00
2024-05-11 18:01:20 +08:00
<view class="lines"></view>
<view class="order_info">
<view class="info_li">
租赁用户{{item.phonenumber}}
</view>
<view class="info_li">
<view class="half_info_li">
车辆编号{{item.sn}}
</view>
2024-06-24 17:59:49 +08:00
<view class="half_info_li" >
2024-06-21 18:03:21 +08:00
租赁时长{{computedList(item)}}
</view>
2024-06-24 17:59:49 +08:00
2024-05-11 18:01:20 +08:00
</view>
<view class="info_li">
订单费用{{item.totalFee}}
</view>
<view class="info_li" v-if="item.unlock_time">
2024-05-13 18:03:20 +08:00
开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }}
2024-05-11 18:01:20 +08:00
</view>
</view>
<view class="lines"></view>
<view class="btn_box">
<view class="btn" v-if="item.status==0||item.status==2" @click="showfzs(item)">
辅助还车
</view>
<view class="btn" v-if="item.status==1||item.status==3" @click="showgjs()">
改价
</view>
2024-05-13 18:03:20 +08:00
<view class="btn" v-if="item.status==4" @click="showtks(item)">
退款
2024-05-11 18:01:20 +08:00
</view>
2024-05-13 18:03:20 +08:00
<view class="btn_line">
2024-05-11 18:01:20 +08:00
</view>
2024-05-13 18:03:20 +08:00
<view class="btn" @click="toOrderDetail(item.orderNo)">
2024-05-11 18:01:20 +08:00
查看详情
</view>
</view>
</view>
</view>
</swiper-item>
<swiper-item>
2024-05-13 18:03:20 +08:00
<view class="swiper-item " v-if="loading">
<view class="card" v-for="(item,index) in reprement" :key="index">
2024-05-11 18:01:20 +08:00
<view class="line"></view>
<view class="top_info">
<view class="top_info_left">
订单编号{{item.orderNo}}
</view>
<view class="top_info_right" v-if="item.status==0||item.status==2">
<view class="yuan"></view>
进行中
</view>
2024-05-13 18:03:20 +08:00
<view class="top_info_right" v-if="item.status==1||item.status==3"
style="color: orangered;">
2024-05-11 18:01:20 +08:00
<view class="yuan" style="background: orangered;"></view>
待支付
</view>
<view class="top_info_right" v-if="item.status==4" style="color: green;">
<view class="yuan" style="background: green;"></view>
已完成
</view>
</view>
2024-05-13 18:03:20 +08:00
2024-05-11 18:01:20 +08:00
<view class="lines"></view>
<view class="order_info">
<view class="info_li">
租赁用户{{item.phonenumber}}
</view>
<view class="info_li">
<view class="half_info_li">
车辆编号{{item.sn}}
</view>
2024-06-24 17:59:49 +08:00
<view class="half_info_li" >
2024-06-21 18:03:21 +08:00
租赁时长{{computedList(item)}}
</view>
2024-05-11 18:01:20 +08:00
</view>
<view class="info_li">
订单费用{{item.totalFee}}
</view>
<view class="info_li" v-if="item.unlock_time">
2024-05-13 18:03:20 +08:00
开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }}
2024-05-11 18:01:20 +08:00
</view>
</view>
<view class="lines"></view>
<view class="btn_box">
<view class="btn" v-if="item.status==0||item.status==2" @click="showfzs(item)">
辅助还车
</view>
2024-05-13 18:03:20 +08:00
<view class="btn" v-if="item.status==1||item.status==3" @click="showgjs(item)">
2024-05-11 18:01:20 +08:00
改价
</view>
2024-05-13 18:03:20 +08:00
<view class="btn" v-if="item.status==4" @click="showtks(item)">
退款
2024-05-11 18:01:20 +08:00
</view>
2024-05-13 18:03:20 +08:00
<view class="btn_line">
2024-05-11 18:01:20 +08:00
</view>
2024-05-13 18:03:20 +08:00
<view class="btn" @click="toOrderDetail(item.orderNo)">
2024-05-11 18:01:20 +08:00
查看详情
</view>
</view>
</view>
</view>
</swiper-item>
<swiper-item>
2024-05-13 18:03:20 +08:00
<view class="swiper-item " v-if="loading">
<view class="card" v-for="(item,index) in alreadyList" :key="index">
2024-05-11 18:01:20 +08:00
<view class="line"></view>
<view class="top_info">
<view class="top_info_left">
订单编号{{item.orderNo}}
</view>
<view class="top_info_right" v-if="item.status==0||item.status==2">
<view class="yuan"></view>
进行中
</view>
2024-05-13 18:03:20 +08:00
<view class="top_info_right" v-if="item.status==1||item.status==3"
style="color: orangered;">
2024-05-11 18:01:20 +08:00
<view class="yuan" style="background: orangered;"></view>
待支付
</view>
<view class="top_info_right" v-if="item.status==4" style="color: green;">
<view class="yuan" style="background: green;"></view>
已完成
</view>
</view>
2024-05-13 18:03:20 +08:00
2024-05-11 18:01:20 +08:00
<view class="lines"></view>
<view class="order_info">
<view class="info_li">
租赁用户{{item.phonenumber}}
</view>
<view class="info_li">
<view class="half_info_li">
车辆编号{{item.sn}}
</view>
2024-06-24 17:59:49 +08:00
<view class="half_info_li" >
2024-06-21 18:03:21 +08:00
租赁时长{{computedList(item)}}
</view>
2024-05-11 18:01:20 +08:00
</view>
2024-06-25 18:02:39 +08:00
<view class="info_li">
<view class="half_info_li">
2024-05-11 18:01:20 +08:00
订单费用{{item.totalFee}}
</view>
2024-06-25 18:02:39 +08:00
<view class="half_info_li" v-if="item.status==4" >
有无退款<span v-if="item.etRefund==null"></span>
<span v-else style="color: red;"></span>
</view>
</view>
2024-05-11 18:01:20 +08:00
<view class="info_li" v-if="item.unlock_time">
2024-05-13 18:03:20 +08:00
开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }}
2024-05-11 18:01:20 +08:00
</view>
</view>
<view class="lines"></view>
<view class="btn_box">
2024-05-13 18:03:20 +08:00
<view class="btn" v-if="item.status==0||item.status==2" @click="showfzs(item)">
2024-05-11 18:01:20 +08:00
辅助还车
</view>
2024-05-13 18:03:20 +08:00
<view class="btn" v-if="item.status==4" @click="showtks(item)">
退款
</view>
2024-05-11 18:01:20 +08:00
<view class="btn_line">
2024-05-13 18:03:20 +08:00
2024-05-11 18:01:20 +08:00
</view>
2024-05-13 18:03:20 +08:00
<view class="btn" @click="toOrderDetail(item.orderNo)">
2024-05-11 18:01:20 +08:00
查看详情
</view>
</view>
</view>
</view>
</swiper-item>
2024-05-13 18:03:20 +08:00
2024-05-11 18:01:20 +08:00
</swiper>
</view>
2024-05-09 17:05:51 +08:00
<view class="tip_box" v-if="showfz">
2024-05-08 23:18:30 +08:00
<view class="top">
<view class="tip">
提示
</view>
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
<view class="txt">
确定要辅助还车吗
</view>
</view>
<view class="bot">
2024-05-11 18:01:20 +08:00
<view class="bot_left" @click="closefz()">
2024-05-08 23:18:30 +08:00
取消
</view>
2024-05-11 18:01:20 +08:00
<view class="bot_right" @click="backDevice()">
2024-05-08 23:18:30 +08:00
确定
</view>
</view>
</view>
2024-05-09 17:05:51 +08:00
<view class="tip_box" v-if="showgj">
<view class="top">
<view class="tip">
改价
</view>
2024-05-13 18:03:20 +08:00
2024-05-09 17:05:51 +08:00
<view class="ipt_box">
<view class="text">
2024-05-13 18:03:20 +08:00
调度费
2024-05-09 17:05:51 +08:00
</view>
<view class="ipt">
2024-05-13 18:03:20 +08:00
<input type="text" v-model="orderInfo.dispatchFee" placeholder="0.00" class="input"
placeholder-style="color:#C7CDD3">
2024-05-09 17:05:51 +08:00
</view>
</view>
<view class="ipt_box">
<view class="text">
2024-05-13 18:03:20 +08:00
管理费
2024-05-09 17:05:51 +08:00
</view>
<view class="ipt">
2024-05-13 18:03:20 +08:00
<input type="text" v-model="orderInfo.manageFee" placeholder="0.00" class="input"
placeholder-style="color:#C7CDD3">
2024-05-09 17:05:51 +08:00
</view>
</view>
<view class="ipt_box">
<view class="text">
2024-05-13 18:03:20 +08:00
骑行费
2024-05-09 17:05:51 +08:00
</view>
<view class="ipt">
2024-05-13 18:03:20 +08:00
<input type="text" v-model="orderInfo.ridingFee" placeholder="0.00" class="input"
placeholder-style="color:#C7CDD3">
2024-05-09 17:05:51 +08:00
</view>
</view>
<view class="ipt_box">
<view class="text">
2024-05-13 18:03:20 +08:00
预约费
2024-05-09 17:05:51 +08:00
</view>
<view class="ipt">
2024-05-13 18:03:20 +08:00
<input type="text" v-model="orderInfo.appointmentFee" placeholder="0.00" class="input"
placeholder-style="color:#C7CDD3">
2024-05-09 17:05:51 +08:00
</view>
</view>
2024-05-13 18:03:20 +08:00
</view>
<view class="bot">
<view class="bot_left" @click="closegj()">
取消
2024-05-09 17:05:51 +08:00
</view>
2024-05-13 18:03:20 +08:00
<view class="bot_right" @click="changeMoney()">
确定
2024-05-09 17:05:51 +08:00
</view>
</view>
2024-05-13 18:03:20 +08:00
</view>
<view class="tip_box" v-if="showtk">
2024-06-21 18:03:21 +08:00
<view class="top" v-if="showtk">
<view class="tip">
退款
</view>
<view class="ipt_box">
<view class="text">
调度费
</view>
<view class="ipt">
<input type="text" v-model="orderInfo.dispatchFee" placeholder="0.00" class="input"
placeholder-style="color:#C7CDD3" @input="checkAndUpdate('dispatchFee')">
</view>
</view>
<view class="ipt_box">
<view class="text">
管理费
</view>
<view class="ipt">
<input type="text" v-model="orderInfo.manageFee" placeholder="0.00" class="input"
placeholder-style="color:#C7CDD3" @input="checkAndUpdate('manageFee')">
</view>
</view>
<view class="ipt_box">
<view class="text">
骑行费
</view>
<view class="ipt">
<input type="text" v-model="orderInfo.ridingFee" placeholder="0.00" class="input"
placeholder-style="color:#C7CDD3" @input="checkAndUpdate('ridingFee')">
</view>
</view>
<view class="ipt_box">
<view class="text">
预约费
</view>
<view class="ipt">
<input type="text" v-model="orderInfo.appointmentFee" placeholder="0.00" class="input"
placeholder-style="color:#C7CDD3" @input="checkAndUpdate('appointmentFee')">
</view>
</view>
<view class="ipt_box">
<view class="text">
原因
</view>
<view class="ipt">
<input type="text" v-model="orderInfo.reason" placeholder="选填" class="input"
placeholder-style="color:#C7CDD3" @input="checkAndUpdate('reason')">
</view>
</view>
</view>
2024-05-09 17:05:51 +08:00
<view class="bot">
2024-05-13 18:03:20 +08:00
<view class="bot_left" @click="closetk()">
2024-05-09 17:05:51 +08:00
取消
</view>
2024-05-13 18:03:20 +08:00
<view class="bot_right" @click="backMoney()">
2024-05-09 17:05:51 +08:00
确定
</view>
</view>
</view>
2024-05-08 23:18:30 +08:00
<tab-bar :indexs='2' style=""></tab-bar>
</view>
</template>
<script>
2024-05-13 18:03:20 +08:00
let timerId;
let timerId1;
2024-05-08 23:18:30 +08:00
export default {
data() {
return {
bgc: {
backgroundColor: "#F7FAFE",
},
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
pickertime: '',
2024-05-13 18:03:20 +08:00
time1: false,
time2: false,
lasTime: '',
firsTime: '',
searchKeyword: '',
curtitidx: 0,
swiperHeight: 400,
allList: [],
ingList: [],
reprement: [],
alreadyList: [],
show: false,
showfz: false,
showgj: false,
showtk: false,
orderInfo: {},
loading: false,
initialValues: {
2024-06-24 17:59:49 +08:00
},
areaId:false
2024-05-08 23:18:30 +08:00
}
},
onShow() {
this.$store.dispatch('userInfo', this.$u).then(() => {
// 执行其他操作...
});
2024-06-24 17:59:49 +08:00
if(uni.getStorageSync('adminAreaid')){
this.areaId = uni.getStorageSync('adminAreaid')
this.orderList()
}
2024-05-08 23:18:30 +08:00
},
watch: {
curtitidx(newValue, oldValue) {
// 处理userId变化的逻辑
console.log('userId 发生变化', newValue, oldValue);
2024-05-13 18:03:20 +08:00
if (newValue == 0) {
this.swiperHeight = (this.allList.length * 440)
} else if (newValue == 1) {
this.swiperHeight = this.ingList.length * 440
} else if (newValue == 2) {
this.swiperHeight = this.reprement.length * 440
} else if (newValue == 3) {
this.swiperHeight = this.alreadyList.length * 440
2024-05-08 23:18:30 +08:00
}
}
},
computed: {
userId() {
return this.$store.getters.userId;
},
2024-06-21 18:03:21 +08:00
},
computed: {
2024-05-08 23:18:30 +08:00
},
methods: {
2024-06-21 18:03:21 +08:00
computedList(item) {
2024-06-24 17:59:49 +08:00
if(item.status==0||item.status==2){
const createTime = new Date(item.createTime);
const payTime = Date.now();
const timeDifference = Math.abs(createTime - payTime);
const hours = Math.floor(timeDifference / (1000 * 60 * 60));
const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
let result = '';
if (hours > 0) {
result += `${hours}小时`;
}
if (minutes > 0 || hours > 0) { // 显示分钟条件:有小时或者有分钟
result += `${minutes}`;
}
// result += `${seconds}秒`; // 始终显示秒
return result;
}else{
const createTime = new Date(item.createTime);
const payTime = new Date(item.returnTime);
const timeDifference = Math.abs(createTime - payTime);
const hours = Math.floor(timeDifference / (1000 * 60 * 60));
const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
let result = '';
if (hours > 0) {
result += `${hours}小时`;
}
if (minutes > 0 || hours > 0) { // 显示分钟条件:有小时或者有分钟
result += `${minutes}`;
}
// result += `${seconds}秒`; // 始终显示秒
return result;
}
2024-06-21 18:03:21 +08:00
},
toOrderDetail(id) {
2024-05-13 18:03:20 +08:00
uni.navigateTo({
2024-06-21 18:03:21 +08:00
url: '/pages_admin/order/order_detail?id=' + id
2024-05-13 18:03:20 +08:00
})
},
2024-06-21 18:03:21 +08:00
checkAndUpdate(key) {
clearTimeout(timerId);
timerId = setTimeout(() => {
let inputValue = parseFloat(this.orderInfo[key]);
// Get the initial value corresponding to the key
let initialValue = parseFloat(this.initialValues[key]);
// If input value exceeds the initial value, revert back to initial value
if (inputValue > initialValue) {
this.orderInfo[key] = initialValue;
}
}, 500);
// Convert input value to number
},
2024-05-13 18:03:20 +08:00
// 退款
backMoney() {
let data = {
orderNo: this.orderInfo.orderNo,
dispatchFee: this.orderInfo.dispatchFee,
manageFee: this.orderInfo.manageFee,
ridingFee: this.orderInfo.ridingFee,
appointmentFee: this.orderInfo.appointmentFee,
reason: this.orderInfo.reason
}
this.$u.put('/appVerify/order/refund', data).then((res) => {
2024-05-11 18:01:20 +08:00
if (res.code === 200) {
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
2024-05-13 18:03:20 +08:00
this.show = false
this.showgj = false
2024-06-21 18:03:21 +08:00
this.showtk = false
2024-05-13 18:03:20 +08:00
this.orderInfo = {}
if (this.curtitidx == 0) {
2024-05-11 18:01:20 +08:00
this.orderList()
2024-05-13 18:03:20 +08:00
} else if (this.curtitidx == 3) {
this.orderList3()
}
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
showtks(item) {
this.orderInfo = item
this.show = true
this.showtk = true
2024-06-21 18:03:21 +08:00
this.initialValues.dispatchFee = this.orderInfo.dispatchFee
this.initialValues.manageFee = this.orderInfo.manageFee
this.initialValues.ridingFee = this.orderInfo.ridingFee
this.initialValues.appointmentFee = this.orderInfo.appointmentFee
2024-05-13 18:03:20 +08:00
},
closetk() {
this.show = false
this.showtk = false
this.orderInfo = {}
},
// 改价
changeMoney() {
let data = {
orderNo: this.orderInfo.orderNo,
dispatchFee: this.orderInfo.dispatchFee,
manageFee: this.orderInfo.manageFee,
ridingFee: this.orderInfo.ridingFee,
appointmentFee: this.orderInfo.appointmentFee,
}
this.$u.put('/appVerify/order/editPrice', data).then((res) => {
if (res.code === 200) {
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
this.show = false
this.showgj = false
this.orderInfo = {}
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 2) {
this.orderList2()
}
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
showgjs(item) {
this.orderInfo = item
this.show = true
this.showgj = true
},
closegj() {
this.show = false
this.showgj = false
this.orderInfo = {}
},
// 还车
backDevice() {
this.$u.post('/appVerify/device/return?orderNo=' + this.orderInfo.orderNo + '&returnType=2').then((
2024-06-21 18:03:21 +08:00
res) => {
2024-05-13 18:03:20 +08:00
if (res.code === 200) {
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
this.show = false
this.showfz = false
this.orderInfo = {}
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 1) {
2024-05-11 18:01:20 +08:00
this.orderList1()
}
2024-05-13 18:03:20 +08:00
} else {
2024-05-11 18:01:20 +08:00
uni.showToast({
2024-05-13 18:03:20 +08:00
title: res.msg,
2024-05-11 18:01:20 +08:00
icon: 'none',
duration: 2000
});
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
2024-05-13 18:03:20 +08:00
closefz() {
this.show = false
this.showfz = false
this.orderInfo = {}
2024-05-11 18:01:20 +08:00
},
2024-05-13 18:03:20 +08:00
showfzs(item) {
this.orderInfo = item
this.show = true
this.showfz = true
2024-05-11 18:01:20 +08:00
},
orderList() {
2024-05-13 18:03:20 +08:00
let data = {
phonenumber: this.searchKeyword,
type: '1',
status: '',
startTime: this.firsTime,
endTime: this.lasTime,
2024-06-24 17:59:49 +08:00
areaId:this.areaId
2024-05-13 18:03:20 +08:00
2024-05-11 18:01:20 +08:00
}
2024-05-13 18:03:20 +08:00
this.loading = false
this.$u.get('/appVerify/order/list?', data).then((res) => {
2024-05-11 18:01:20 +08:00
if (res.code === 200) {
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
this.allList = res.rows
2024-05-13 18:03:20 +08:00
this.loading = true
this.swiperHeight = (this.allList.length * 440)
this.curtitidx = 0
2024-05-11 18:01:20 +08:00
// console.log(this.polyline);
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
orderList1() {
2024-05-13 18:03:20 +08:00
let data = {
phonenumber: this.searchKeyword,
type: '1',
statusList: '0,2',
startTime: this.firsTime,
endTime: this.lasTime,
2024-06-24 17:59:49 +08:00
areaId:this.areaId
2024-05-11 18:01:20 +08:00
}
2024-05-13 18:03:20 +08:00
this.loading = false
this.$u.get('/appVerify/order/list?', data).then((res) => {
2024-05-11 18:01:20 +08:00
if (res.code === 200) {
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
this.ingList = res.rows
2024-05-13 18:03:20 +08:00
this.loading = true
this.curtitidx = 1
2024-05-11 18:01:20 +08:00
// console.log(this.polyline);
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
orderList2() {
2024-05-13 18:03:20 +08:00
let data = {
phonenumber: this.searchKeyword,
type: '1',
statusList: '1,3',
startTime: this.firsTime,
endTime: this.lasTime,
2024-06-24 17:59:49 +08:00
areaId:this.areaId
2024-05-13 18:03:20 +08:00
2024-05-11 18:01:20 +08:00
}
2024-05-13 18:03:20 +08:00
this.loading = false
this.$u.get('/appVerify/order/list?', data).then((res) => {
2024-05-11 18:01:20 +08:00
if (res.code === 200) {
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
this.reprement = res.rows
2024-05-13 18:03:20 +08:00
this.loading = true
this.curtitidx = 2
2024-05-11 18:01:20 +08:00
// console.log(this.polyline);
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
orderList3() {
2024-05-13 18:03:20 +08:00
let data = {
phonenumber: this.searchKeyword,
type: '1',
status: '4',
startTime: this.firsTime,
endTime: this.lasTime,
2024-06-24 17:59:49 +08:00
areaId:this.areaId
2024-05-13 18:03:20 +08:00
2024-05-11 18:01:20 +08:00
}
2024-05-13 18:03:20 +08:00
this.loading = false
this.$u.get('/appVerify/order/list?', data).then((res) => {
2024-05-11 18:01:20 +08:00
if (res.code === 200) {
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
this.alreadyList = res.rows
console.log(this.alreadyList);
2024-05-13 18:03:20 +08:00
this.loading = true
this.curtitidx = 3
2024-05-11 18:01:20 +08:00
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
2024-05-13 18:03:20 +08:00
async changeidx(idx) {
if (idx == 0) {
this.orderList()
} else if (idx == 1) {
this.orderList1()
} else if (idx == 2) {
this.orderList2()
} else if (idx == 3) {
this.orderList3()
2024-05-11 18:01:20 +08:00
}
2024-05-08 23:18:30 +08:00
},
2024-05-13 18:03:20 +08:00
swiperchange(e) {
this.curtitidx = e.detail.current
console.log(e, 'eeeeeeeee');
2024-05-08 23:18:30 +08:00
},
confirm1(e) {
2024-05-13 18:03:20 +08:00
console.log(e, 'eeeeeeee');
this.firsTime = e.year + '-' + e.month + '-' + e.day
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 1) {
this.orderList1()
} else if (this.curtitidx == 2) {
this.orderList2()
} else if (this.curtitidx == 3) {
this.orderList3()
}
2024-05-08 23:18:30 +08:00
},
confirm2(e) {
2024-05-13 18:03:20 +08:00
this.lasTime = e.year + '-' + e.month + '-' + e.day
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 1) {
this.orderList1()
} else if (this.curtitidx == 2) {
this.orderList2()
} else if (this.curtitidx == 3) {
this.orderList3()
}
2024-05-08 23:18:30 +08:00
},
search() {
2024-05-13 18:03:20 +08:00
clearTimeout(timerId1);
timerId1 = setTimeout(() => {
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 1) {
this.orderList1()
} else if (this.curtitidx == 2) {
this.orderList2()
} else if (this.curtitidx == 3) {
this.orderList3()
}
2024-06-21 18:03:21 +08:00
2024-05-13 18:03:20 +08:00
}, 500);
// 根据关键字过滤 this.classlist
2024-06-21 18:03:21 +08:00
2024-05-08 23:18:30 +08:00
},
}
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.page {
width: 750rpx;
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
.tip_box {
position: fixed;
left: 72rpx;
top: 628rpx;
width: 610rpx;
// height: 282rpx;
background: #FFFFFF;
border-radius: 30rpx 30rpx 30rpx 30rpx;
z-index: 110;
padding-bottom: 100rpx;
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
.top {
padding: 52rpx 38rpx 42rpx 36rpx;
2024-05-13 18:03:20 +08:00
.ipt_box {
2024-05-09 17:05:51 +08:00
margin-top: 22rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
2024-05-13 18:03:20 +08:00
.text {
2024-05-09 17:05:51 +08:00
width: 96rpx;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
}
2024-05-13 18:03:20 +08:00
.ipt {
2024-05-09 17:05:51 +08:00
padding: 10rpx 18rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-left: 26rpx;
width: 420rpx;
height: 64rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
border: 2rpx solid #979797;
2024-05-13 18:03:20 +08:00
.input {
2024-05-09 17:05:51 +08:00
width: 80%;
}
}
}
2024-05-13 18:03:20 +08:00
.tip {
2024-05-08 23:18:30 +08:00
width: 100%;
text-align: center;
font-weight: 700;
font-size: 32rpx;
color: #3D3D3D;
}
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
.txt {
margin-top: 32rpx;
width: 100%;
text-align: center;
font-weight: 500;
font-size: 32rpx;
color: #3D3D3D;
}
}
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
.bot {
position: absolute;
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
width: 610rpx;
// border-top: 2rpx solid #D8D8D8;
display: flex;
flex-wrap: nowrap;
// height: 100%;
bottom: -20rpx;
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
.bot_left {
border-radius: 0rpx 0rpx 0rpx 30rpx;
width: 50%;
height: 86rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
font-size: 32rpx;
color: #3D3D3D;
background: #EEEEEE;
}
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
.bot_right {
2024-05-13 18:03:20 +08:00
border-radius: 0rpx 0rpx 30rpx 0rpx;
2024-05-08 23:18:30 +08:00
width: 50%;
height: 86rpx;
background: #4C97E7;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
// border-left: 2rpx solid #D8D8D8;
font-weight: 500;
font-size: 32rpx;
// color: #4C97E7;
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
}
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
}
}
2024-05-13 18:03:20 +08:00
.warp_box {
.swiper {
.swiper-item {
.card {
2024-05-08 23:18:30 +08:00
margin: 16rpx auto;
width: 750rpx;
background: #fff;
2024-05-13 18:03:20 +08:00
.btn_box {
2024-05-08 23:18:30 +08:00
display: flex;
flex-wrap: nowrap;
align-items: center;
width: 100%;
height: 96rpx;
2024-05-13 18:03:20 +08:00
.btn {
2024-05-08 23:18:30 +08:00
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 36rpx;
color: #3D3D3D;
width: 49%;
}
2024-05-13 18:03:20 +08:00
.btn_line {
2024-05-08 23:18:30 +08:00
width: 0rpx;
height: 51rpx;
border: 2rpx solid #4C97E7;
}
}
2024-05-13 18:03:20 +08:00
.order_info {
padding: 26rpx 30rpx;
2024-05-08 23:18:30 +08:00
display: flex;
flex-wrap: wrap;
2024-05-13 18:03:20 +08:00
.info_li {
2024-05-08 23:18:30 +08:00
display: flex;
flex-wrap: nowrap;
width: 100%;
font-weight: 400;
font-size: 28rpx;
color: #808080;
2024-05-13 18:03:20 +08:00
.half_info_li {
2024-05-08 23:18:30 +08:00
width: 50%;
font-weight: 400;
font-size: 28rpx;
color: #808080;
}
}
}
2024-05-13 18:03:20 +08:00
.line {
2024-05-08 23:18:30 +08:00
width: 750rpx;
height: 22rpx;
background: #F6F6F6;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
2024-05-13 18:03:20 +08:00
.lines {
2024-05-08 23:18:30 +08:00
width: 750rpx;
height: 2rpx;
background: #D8D8D8;
// border: 2rpx solid #D8D8D8;
}
2024-05-13 18:03:20 +08:00
.top_info {
2024-05-08 23:18:30 +08:00
padding: 24rpx 32rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
2024-05-13 18:03:20 +08:00
2024-05-11 18:01:20 +08:00
.top_info_left {
2024-05-13 18:03:20 +08:00
width: 70%;
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 显示省略号 */
2024-05-08 23:18:30 +08:00
}
2024-05-13 18:03:20 +08:00
.top_info_right {
2024-05-08 23:18:30 +08:00
display: flex;
flex-wrap: nowrap;
align-items: center;
margin-left: auto;
2024-05-13 18:03:20 +08:00
.yuan {
2024-05-08 23:18:30 +08:00
margin-right: 12rpx;
border-radius: 50%;
width: 14rpx;
height: 14rpx;
background: #4C97E7;
}
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
font-weight: 400;
font-size: 28rpx;
color: #4C97E7;
}
}
}
}
}
}
2024-05-13 18:03:20 +08:00
.tap {
2024-05-08 23:18:30 +08:00
margin-top: 24rpx;
width: 750rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-around;
2024-05-13 18:03:20 +08:00
.tap_cont {
2024-05-08 23:18:30 +08:00
text-align: center;
padding-bottom: 15rpx;
width: 100rpx;
font-weight: 500;
font-size: 32rpx;
color: #3D3D3D;
2024-05-13 18:03:20 +08:00
border-bottom: 6rpx solid #fff;
2024-05-08 23:18:30 +08:00
}
2024-05-13 18:03:20 +08:00
.act1 {
border-bottom: 6rpx solid #4C97E7;
2024-05-08 23:18:30 +08:00
color: #4C97E7;
}
}
2024-05-13 18:03:20 +08:00
2024-05-08 23:18:30 +08:00
.top_box {
display: flex;
flex-wrap: nowrap;
align-items: center;
padding: 28rpx 30rpx;
margin: 20rpx auto;
width: 672rpx;
height: 100rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
border-radius: 10rpx 10rpx 10rpx 10rpx;
.left_text {
width: 25%;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
}
.timebox {
width: 75%;
display: flex;
flex-wrap: nowrap;
align-items: center;
margin-left: 34rpx;
.left_time {
text-align: center;
margin-right: 6rpx;
height: 50rpx;
width: 45%;
border: 2rpx solid #ccc;
border-radius: 12rpx;
font-weight: 400;
font-size: 32rpx;
color: #979797;
}
.right_time {
text-align: center;
margin-left: 6rpx;
height: 50rpx;
width: 45%;
border: 2rpx solid #ccc;
border-radius: 12rpx;
font-weight: 400;
font-size: 32rpx;
color: #979797;
}
}
}
}
</style>