This commit is contained in:
Sliverber 2024-05-14 18:04:34 +08:00
parent 43d1a2b9cd
commit 79386c7a37
7 changed files with 727 additions and 269 deletions

View File

@ -20,7 +20,8 @@ const install = (Vue, vm) => {
// },
// });
Vue.prototype.$u.http.setConfig({
baseUrl: 'http://61.174.243.28:15861',
// baseUrl: 'http://61.174.243.28:15861',
baseUrl: 'http://192.168.2.6:8080',
// baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
loadingText: '努力加载中~',
loadingTime: 800,

View File

@ -9,36 +9,36 @@
应用入口
</view>
<view class="app_box">
<view class="cont">
<view class="cont" @click="topage(0)">
<image src="https://lxnapi.ccttiot.com/bike/img/static/unnmUkUif2eWNKFq9fdg" mode=""></image>
<view class="text">
运营数据
</view>
</view>
<view class="cont">
<view class="cont" @click="topage(1)">
<image src="https://lxnapi.ccttiot.com/bike/img/static/upJFJIIZ4hbSEuchNQi3" mode=""></image>
<view class="text">
收入对账
</view>
</view>
<view class="cont">
<view class="cont" @click="topage(2)">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uNfRjhtxYmMPKaX4DqTS" mode=""></image>
<view class="text">
设备管理
</view>
</view>
<view class="cont">
<view class="cont" @click="topage(3)">
<image src="https://lxnapi.ccttiot.com/bike/img/static/ugC3s7fvhckzJN9vqsHa" mode=""></image>
<view class="text">
用户管理
</view>
</view>
<view class="cont">
<!-- <view class="cont">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uM4rBBaXc7b3TmsqQTvz" mode=""></image>
<view class="text">
运营区域
</view>
</view>
</view> -->
</view>
</view>
@ -69,7 +69,25 @@
},
},
methods: {
topage(num){
if(num==0){
uni.navigateTo({
url:'/pages_admin/worke/worke_Operation'
})
}else if(num==1){
uni.navigateTo({
url:'/pages_admin/worke/worke_income'
})
}else if(num==2){
uni.navigateTo({
url:'/pages_admin/worke/woke_deviceMgmt'
})
}else if(num==3){
uni.navigateTo({
url:'/pages_admin/worke/worke_user'
})
}
}
}
}
</script>

View File

@ -12,24 +12,29 @@
</view>
<view class="stause_box">
<view class="stause_li">
设备状态 <view class="iconfont icon-xiangxia1"></view>
<view class="stause_li" @click="show=true">
{{tit}}
<view class="iconfont icon-xiangxia1"></view>
</view>
<view class="stause_li" style="margin-left: 30rpx;">
电量排序 <view class="iconfont icon-xiangxia1"></view>
<view class="stause_li" style="margin-left: 50rpx;" @click="showdsc=true">
{{sctit}} <view class="iconfont icon-xiangxia1"></view>
</view>
</view>
<template>
<view class="info_card" style="margin-top: 20rpx;">
<view class="info_tit">
<view class="tit_left">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uTuWiPEViwzaPPHAgjdN" mode=""></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uGY25CNyW7Vz0LJcOYtS" mode=""></image>
车牌号U-00122323
<view class="info_card" style="margin-top: 20rpx;" v-for="(item,index) in deviceList" :key="index" v-if="">
<view class="info_tit" style="margin-left: 36rpx;">
<view class="tit_left" v-if="stepindex==1">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uTuWiPEViwzaPPHAgjdN" mode=""
v-if="!isSelected(item.sn)" @click="selectItem(item.sn)"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uGY25CNyW7Vz0LJcOYtS" mode=""
v-if="isSelected(item.sn)" @click="deselectItem(item.sn)"></image>
</view>
<view class="tit_right">
<view class="yuan"></view>
待租
车牌号{{item.vehicleNum}}
<view class="tit_right" :style="{ color: getStatusColor(item) }">
<view class="yuan" :style="{ background: getStatusColor(item) }"></view>
{{status(item)}}
</view>
</view>
<view class="lines"></view>
@ -38,55 +43,56 @@
<view class="info_li">
<view class="half_infoli">
支付金额<span>0.00</span>
MAC<span>{{item.mac}}</span>
</view>
<view class="half_infoli">
已退款<span>0.00</span>
电量<span>{{item.remainingPower}}%</span>
</view>
</view>
<view class="info_li">
<view class="half_infoli">
手续费<span>0.00</span>
SN<span>{{item.sn}}</span>
</view>
<view class="half_infoli">
收入<span style="color:#4C97E7 ;">0.00</span>
型号<span>{{item.model}}</span>
</view>
</view>
</view>
</view>
</template>
<view class="bot_box">
<view class="step1" v-if="stepindex ==1">
<view class="step1" v-if="stepindex ==0">
<view class="step1_left">
设备总数<span>10</span>
设备总数<span>{{deviceList.length}}</span>
</view>
<view class="right_box">
<view class="right_box" @click="stepindex=1">
批量操作
</view>
</view>
<view class="step2">
<view class="top">
<view class="top_left">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uTuWiPEViwzaPPHAgjdN" mode=""></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uGY25CNyW7Vz0LJcOYtS" mode=""></image>
全选
<view class="top_left" @click="selectAll">
<image
:src="isAllSelected ? 'https://lxnapi.ccttiot.com/bike/img/static/uGY25CNyW7Vz0LJcOYtS' : 'https://lxnapi.ccttiot.com/bike/img/static/uTuWiPEViwzaPPHAgjdN'"
mode=""></image>
{{ isAllSelected ? '取消全选' : '全选' }}
</view>
<view class="top_right">
已选设备1
已选设备{{selectedItems.length}}
</view>
</view>
<view class="bot_btn">
<view class="btn">
<view class="btn" @click="closestep()">
取消
</view>
<!-- <view class="btn">
返仓
</view> -->
<view class="btn">
<view class="btn" @click="ban()">
车辆禁用
</view>
<view class="btn">
<view class="btn" @click="pick()">
车辆解禁
</view>
@ -94,6 +100,11 @@
</view>
</view>
</view>
<view class="bottom" style="width: 100%;height: 300rpx;">
</view>
<u-select v-model="show" :list="list" title='设备状态' @confirm="confirm"></u-select>
<u-select v-model="showdsc" :list="lists" title='剩余电量' @confirm="confirms"></u-select>
</view>
</template>
@ -105,9 +116,204 @@
bgc: {
backgroundColor: "#fff",
},
showdsc: false,
sctit: '从高到低',
scidx: 'desc',
show: false,
lists: [{
value: 'desc',
label: '从高到低'
},
{
value: 'asc',
label: '从低到高'
},
],
list: [{
value: '',
label: '全部'
},
{
value: '0',
label: '未上架'
},
{
value: '1',
label: '待租'
},
{
value: '2',
label: '预约中'
},
{
value: '3',
label: '骑行中'
},
{
value: '4',
label: '临时锁车'
},
{
value: '8',
label: '下线'
}
],
tit: '全部',
typeidx: '',
deviceList: [],
stepindex: 0,
selectedItems: [],
}
},
onLoad() {
this.getDevice()
},
computed: {
isAllSelected() {
if (this.selectedItems.length == this.deviceList.length) {
return true
} else {
return false
}
}
},
methods: {
ban(){
let data={
disableType:'disable',
sns:this.selectedItems.join(',')
}
this.$u.post(`/appVerify/device/disable?sns=`+data.sns+'&disableType=disable').then((res) => {
if (res.code == 200) {
this.closestep()
this.getDevice()
} else {
//
}
}).catch(error => {
//
});
},
pick(){
let data={
disableType:'enable',
sns:this.selectedItems.join(',')
}
this.$u.post(`/appVerify/device/disable?sns=`+data.sns+'&disableType=enable').then((res) => {
if (res.code == 200) {
this.closestep()
this.getDevice()
} else {
//
}
}).catch(error => {
//
});
},
confirms(e){
this.scidx = e[0].value
this.sctit = e[0].label
this.getDevice()
},
getStatusColor(item) {
if (item.onlineStatus == 0) {
// 线
return 'red';
} else if (item.status == 0 || item.status == 8) {
// 线
return 'gray';
} else {
//
// return 'blue';
}
},
closestep() {
this.selectedItems = []
this.stepindex = 0
},
isSelected(sn) {
return this.selectedItems.includes(sn);
},
selectItem(sn) {
this.selectedItems.push(sn);
// isAllSelected
console.log(this.selectedItems, '选择');
},
deselectItem(sn) {
this.selectedItems = this.selectedItems.filter(item => item !== sn);
// isAllSelected
console.log(this.selectedItems, '删除');
},
selectAll() {
if (this.selectedItems.length === this.deviceList.length) {
// All items are already selected, so deselect all
this.selectedItems = [];
} else {
// Select all items
this.selectedItems = this.deviceList.map(item => item.sn);
}
},
status(item) {
if (item.onlineStatus == 0) {
return '离线'
} else {
if (item.status == 0) {
return '未上架'
} else if (item.status == 1) {
return '待租'
} else if (item.status == 2) {
return '预约中'
} else if (item.status == 3) {
return '骑行中'
} else if (item.status == 4) {
return '临时锁车中'
} else if (item.status == 8) {
return '下线'
}
}
},
getDevice() {
let data = {
powerStart: '',
powerEnd: '',
sort:this.scidx,
status: this.typeidx
}
this.selectedItems = [];
this.$u.get(`/appVerify/allVehicleInfo?`, data).then((res) => {
if (res.code == 200) {
this.deviceList = res.data
} else {
//
}
}).catch(error => {
//
});
},
confirm(e) {
// console.log(e,'eeeeeeeeee');
this.typeidx = e[0].value
this.tit = e[0].label
this.getDevice()
// console.log(e);
// this.mode = e[0].label
// this.gettype()
},
changeidx(idx) {
this.curtitidx = idx
},
@ -122,6 +328,7 @@
.page {
width: 750rpx;
.info_card {
background: #FFFFFF;
@ -136,11 +343,13 @@
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
image {
width: 46rpx;
height: 46rpx;
}
}
.tit_right {
display: flex;
flex-wrap: nowrap;
@ -149,6 +358,7 @@
font-weight: 400;
font-size: 28rpx;
color: #4C97E7;
.yuan {
margin-right: 12rpx;
margin-top: 6rpx;
@ -193,6 +403,7 @@
span {
color: #3D3D3D;
}
.input {
width: 30%;
}
@ -200,6 +411,7 @@
}
}
}
.bot_box {
padding: 0 30rpx;
position: fixed;
@ -208,6 +420,7 @@
height: 232rpx;
background: #FFFFFF;
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 0, 0, 0.3);
.step2 {
padding: 42rpx 32rpx;
display: flex;
@ -216,15 +429,18 @@
// flex-wrap: nowrap;
width: 100%;
height: 100%;
.top {
width: 100%;
display: flex;
.top_left {
display: flex;
flex-wrap: nowrap;
font-weight: 400;
font-size: 36rpx;
color: #3D3D3D;
image {
width: 46rpx;
height: 46rpx;
@ -238,6 +454,7 @@
margin-left: auto;
}
}
.bot_btn {
display: flex;
@ -251,6 +468,7 @@
.btn:nth-child(4n) {
margin-right: 0;
}
.btn {
margin-right: 18rpx;
display: flex;
@ -267,20 +485,24 @@
}
}
}
.step1 {
display: flex;
align-items: center;
flex-wrap: nowrap;
width: 100%;
height: 100%;
.step1_left {
font-weight: 400;
font-size: 36rpx;
color: #3D3D3D;
span {
color: #4C97E7;
}
}
.right_box {
margin-left: auto;
display: flex;
@ -297,11 +519,13 @@
}
}
}
.stause_box {
background: #fff;
padding: 44rpx 30rpx;
display: flex;
flex-wrap: nowrap;
.stause_li {
display: flex;
flex-wrap: nowrap;
@ -309,12 +533,14 @@
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
.icon-xiangxia1 {
margin-left: 6rpx;
font-size: 20rpx;
}
}
}
.tap {
padding-top: 24rpx;
width: 750rpx;
@ -323,6 +549,7 @@
align-items: center;
justify-content: space-around;
background: #fff;
.tap_cont {
text-align: center;
padding-bottom: 15rpx;
@ -332,6 +559,7 @@
color: #3D3D3D;
border-bottom: 6rpx solid #fff;
}
.act1 {
border-bottom: 6rpx solid #4C97E7;
color: #4C97E7;

View File

@ -17,16 +17,16 @@
</view>
</view>
<view class="data_box">
<view class="data_cont act1">
<view class="data_cont " :class="cutidx==0?'act1':''" @click="changeTime(0)">
今日
</view>
<view class="data_cont">
<view class="data_cont" :class="cutidx==1?'act1':''" @click="changeTime(1)">
昨日
</view>
<view class="data_cont">
<view class="data_cont" :class="cutidx==2?'act1':''" @click="changeTime(2)">
本月
</view>
<view class="data_cont">
<view class="data_cont" :class="cutidx==3?'act1':''" @click="changeTime(3)">
上个月
</view>
</view>
@ -37,18 +37,18 @@
</view>
<view class="info">
<view class="info_li">
总营收 <span style="color: #4C97E7;">0.00</span>
总营收 <span style="color: #4C97E7;">{{info.income.totalIncome}}</span>
</view>
<view class="info_li">
累计待支付 <span style="color: #4C97E7;">0.00</span>
累计待支付 <span style="color: #4C97E7;">{{info.income.totalIncome}}</span>
</view>
</view>
<view class="info">
<view class="info_li">
已支付 <span style="color: #3D3D3D ;">0.00</span>
已支付 <span style="color: #3D3D3D ;">{{info.income.totalPaid}}</span>
</view>
<view class="info_li">
已退款 <span style="color: #3D3D3D ;">0.00</span>
已退款 <span style="color: #3D3D3D ;">{{info.income.totalRefund}}</span>
</view>
</view>
</view>
@ -66,49 +66,49 @@
<view class="cont_info">
<view class="info_li">
已支付2.00
已支付{{info.income.totalRidingFee}}
</view>
<view class="info_li">
已支付2.00
已支付{{info.income.totalRidingRefund}}
</view>
</view>
<view class="cont_info">
<view class="info_li">
已退款2.00
已退款{{info.income.totalDispatchFee}}
</view>
<view class="info_li">
已退款2.00
已退款{{info.income.totalDispatchRefund}}
</view>
</view>
<view class="cont_info">
<view class="info_li" style="color:#4C97E7 ;">
租赁
预约
</view>
<view class="info_li" style="color:#4C97E7 ;">
调度
管理
</view>
</view>
<view class="cont_info">
<view class="info_li">
已支付2.00
已支付{{info.income.totalAppointmentFee}}
</view>
<view class="info_li">
已支付2.00
已支付{{info.income.totalAppointmentRefund}}
</view>
</view>
<view class="cont_info">
<view class="info_li">
已退款2.00
已退款{{info.income.totalManageFee}}
</view>
<view class="info_li">
已退款2.00
已退款{{info.income.totalManageRefund}}
</view>
</view>
@ -121,7 +121,7 @@
<view class="info_box">
<view class="one_cont">
<view class="text">
0
{{info.order.ridingOrder}}
</view>
<view class="text">
新增行程订单
@ -129,7 +129,7 @@
</view>
<view class="one_cont">
<view class="text">
0
{{info.order.paidOrder}}
</view>
<view class="text">
已支付订单
@ -137,7 +137,7 @@
</view>
<view class="one_cont">
<view class="text">
0
{{info.order.refundOrder}}
</view>
<view class="text">
已退款订单
@ -145,7 +145,7 @@
</view>
<view class="one_cont">
<view class="text">
0
{{info.order.unpaidOrder}}
</view>
<view class="text">
待支付订单
@ -162,7 +162,7 @@
<view class="info_box">
<view class="one_cont">
<view class="text">
0
{{info.device.inOperationDevice}}
</view>
<view class="text">
运营中车辆
@ -170,7 +170,7 @@
</view>
<view class="one_cont">
<view class="text">
0
{{info.device.inOrderDevice}}
</view>
<view class="text">
有订单车辆
@ -178,7 +178,7 @@
</view>
<view class="one_cont">
<view class="text">
0
{{info.device.noOrderDevice}}
</view>
<view class="text">
无订单车辆
@ -196,7 +196,7 @@
<view class="info_box">
<view class="one_cont">
<view class="text">
0
{{info.user.totalUser}}
</view>
<view class="text">
用户总数
@ -204,7 +204,7 @@
</view>
<view class="one_cont">
<view class="text">
0
{{info.user.newUser}}
</view>
<view class="text">
新增用户
@ -212,7 +212,7 @@
</view>
<view class="one_cont">
<view class="text">
0
{{info.user.leaseUser}}
</view>
<view class="text">
租赁用户
@ -222,9 +222,9 @@
</view>
</view>
<u-picker mode="time" v-model="time1" :params="params" @confirm="confirm1"
:default-time='pickertime'></u-picker>
:default-time='firsTime'></u-picker>
<u-picker mode="time" v-model="time2" :params="params" @confirm="confirm2"
:default-time='pickertime'></u-picker>
:default-time='lasTime'></u-picker>
</view>
</template>
@ -237,8 +237,8 @@
},
time1: false,
time2: false,
lasTime: '00-00',
firsTime: '00-00',
lasTime: '',
firsTime: '',
params: {
year: true,
month: true,
@ -247,20 +247,85 @@
minute: false,
second: false
},
cutidx: 0,
info:{}
}
},
methods: {
confirm1(e) {
console.log(e, 'eeeeeeee');
this.firsTime = e.year + '-' + e.month + '-' + e.day
onLoad() {
let today = new Date();
//
// yyyy-MM-dd
this.firsTime = this.formatDate(today);
this.lasTime = this.formatDate(today);
this.operatingData()
},
methods:{
changeTime(num) {
if (num == 0) {
this.cutidx = num;
let today = new Date();
this.firsTime = this.formatDate(today);
this.lasTime = this.formatDate(today);
this.operatingData()
} else if (num == 1) {
this.cutidx = num;
let yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
this.firsTime = this.formatDate(yesterday);
this.lasTime = this.formatDate(new Date());
this.operatingData()
} else if (num == 2) {
this.cutidx = num;
let today = new Date();
let firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
this.firsTime = this.formatDate(firstDayOfMonth);
this.lasTime = this.formatDate(new Date());
this.operatingData()
} else if (num == 3) {
this.cutidx = num;
let today = new Date();
let firstDayOfLastMonth = new Date(today.getFullYear(), today.getMonth() - 1, 1);
let lastDayOfLastMonth = new Date(today.getFullYear(), today.getMonth(), 0);
this.firsTime = this.formatDate(firstDayOfLastMonth);
this.lasTime = this.formatDate(lastDayOfLastMonth);
this.operatingData()
}
},
formatDate(date) {
let year = date.getFullYear();
let month = String(date.getMonth() + 1).padStart(2, '0');
let day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
operatingData() {
let data = {
timeStart: this.firsTime,
timeEnd: this.lasTime,
}
this.$u.get('/appVerify/operatingData', data).then((res) => {
if (res.code === 200) {
// 线
this.info=res.data
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
confirm1(e) {
this.firsTime = e.year + '-' + e.month + '-' + e.day
this.cutidx=-1
},
confirm2(e) {
this.lasTime = e.year + '-' + e.month + '-' + e.day
this.cutidx=-1
},
}
}
</script>
<style lang="scss">
@ -270,12 +335,14 @@
.page {
width: 750rpx;
.lines {
width: 748rpx;
height: 22rpx;
background: #F6F6F6;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.cont_box {
padding: 14rpx 30rpx;
width: 750rpx;
@ -295,6 +362,7 @@
}
}
}
.card {
padding: 30rpx 30rpx;
background: #FFFFFF;
@ -318,12 +386,15 @@
font-size: 32rpx;
color: #3D3D3D;
}
.info_box {
display: flex;
flex-wrap: nowrap;
.one_cont {
display: flex;
flex-wrap: wrap;
.text {
margin-top: 12rpx;
text-align: center;

View File

@ -17,24 +17,20 @@
</view>
</view>
</view>
<view class="top_box" v-if="typeindex==1" style="margin-top: 20rpx;">
<view class="top_box" v-if="typeindex==2" style="margin-top: 20rpx;">
<view class="left_text">
车辆编号
</view>
<view class="sear_ipt">
<input type="text"
v-model="searchKeyword"
placeholder="请输入内容"
class="input"
placeholder-style="color:#C7CDD3"
@input="search()">
<input type="text" v-model="searchKeyword" placeholder="请输入内容" class="input"
placeholder-style="color:#C7CDD3" @input="search()">
</view>
</view>
<view class="data_box">
<view class="data_cont " :class="typeindex==0?'act1':''" @click="changeType(0)">
<view class="data_cont " :class="typeindex==1?'act1':''" @click="changeType(1)">
按日期
</view>
<view class="data_cont" :class="typeindex==1?'act1':''" @click="changeType(1)">
<view class="data_cont" :class="typeindex==2?'act1':''" @click="changeType(2)">
按车辆
</view>
@ -42,31 +38,32 @@
</view>
<view class="cont_box">
<view class="cont_box" v-if="typeindex==1">
<view class="cont_info">
<view class="info_li" style="color:#4C97E7 ;">
已支付0.00
已支付{{infoList.totalPayFee}}
</view>
<view class="info_li" style="color:#4C97E7 ;">
已退款0.00
已退款{{infoList.totalRefundFee}}
</view>
</view>
<view class="cont_info">
<view class="info_li" style="color:#4C97E7 ;">
手续费0.00
手续费{{infoList.totalServiceFee}}
</view>
<view class="info_li" style="color:#4C97E7 ;">
收入0.00
收入{{infoList.totalIncome}}
</view>
</view>
</view>
<view class="info_card" style="margin-top: 20rpx;">
<view class="info_card" style="margin-top: 20rpx;" v-for="(item,index) in infoList.reconciliationList"
:key="index" v-if="typeindex==1">
<view class="info_tit">
2024-04-28
{{item.day}}
</view>
<view class="lines"></view>
<view class="cont">
@ -74,31 +71,56 @@
<view class="info_li">
<view class="half_infoli">
支付金额<span>0.00</span>
支付金额<span> {{item.payFee}}</span>
</view>
<view class="half_infoli">
已退款<span>0.00</span>
已退款<span> {{item.refundFee}}</span>
</view>
</view>
<view class="info_li">
<view class="half_infoli">
手续费<span>0.00</span>
手续费<span>{{item.serviceFee}}</span>
</view>
<view class="half_infoli">
收入<span style="color:#4C97E7 ;">0.00</span>
收入<span style="color:#4C97E7 ;">{{item.income}}</span>
</view>
</view>
</view>
</view>
<view class="info_card" style="margin-top: 20rpx;" v-for="(item,index) in infoList.reconciliationList"
:key="index" v-if="typeindex==2">
<view class="info_tit">
{{item.sn}}
</view>
<view class="lines"></view>
<view class="cont">
<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>
<view class="info_li">
<view class="half_infoli">
支付金额<span> {{item.payFee}}</span>
</view>
<view class="half_infoli">
已退款<span> {{item.refundFee}}</span>
</view>
</view>
<view class="info_li">
<view class="half_infoli">
手续费<span>{{item.serviceFee}}</span>
</view>
<view class="half_infoli">
收入<span style="color:#4C97E7 ;">{{item.income}}</span>
</view>
</view>
</view>
</view>
<u-picker mode="time" v-model="time1" :params="params" @confirm="confirm1" :default-time="firsTime"></u-picker>
<u-picker mode="time" v-model="time2" :params="params" @confirm="confirm2" :default-time="lasTime"></u-picker>
</view>
</template>
<script>
let timerId;
export default {
data() {
return {
@ -107,8 +129,8 @@
},
time1: false,
time2: false,
lasTime: '00-00',
firsTime: '00-00',
lasTime: '',
firsTime: '',
params: {
year: true,
month: true,
@ -117,21 +139,116 @@
minute: false,
second: false
},
typeindex:0,
typeindex: 1,
infoList: [],
searchKeyword: ''
}
},
methods: {
confirm1(e) {
console.log(e, 'eeeeeeee');
this.firsTime = e.year + '-' + e.month + '-' + e.day
onLoad() {
let today = new Date();
//
let sevenDaysAgo = new Date(today.getTime() - 7 * 24 * 60 * 60 * 1000);
// yyyy-MM-dd
this.firsTime = this.formatDate(sevenDaysAgo);
this.lasTime = this.formatDate(today);
this.operatingData()
},
onReady() {
// this.firsTime = this.formatDate(sevenDaysAgo);
// this.lasTime = this.formatDate(today);
},
methods: {
search() {
clearTimeout(timerId);
timerId = setTimeout(() => {
this.operatingData()
}, 500);
},
formatDate(date) {
let year = date.getFullYear();
let month = String(date.getMonth() + 1).padStart(2, '0');
let day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
operatingData() {
let data = {
timeStart: this.firsTime,
timeEnd: this.lasTime,
type: this.typeindex,
sn: this.searchKeyword
}
this.$u.get('/appVerify/reconciliation', data).then((res) => {
if (res.code === 200) {
// 线
this.infoList = res.data
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
confirm1(e) {
this.firsTime = e.year + '-' + e.month + '-' + e.day;
//
let timeDiff = this.calculateTimeDifference(this.firsTime, this.lasTime);
if (timeDiff > 60) {
//
// uMessage.warning('60');
//
uni.showToast({
title: '选择时间区间需要小于60天',
icon: 'none',
duration: 2000
});
}else{
this.operatingData();
}
// firisttime
//
// this.operatingData();
},
calculateTimeDifference(startTime, endTime) {
let start = new Date(startTime).getTime();
let end = new Date(endTime).getTime();
let diff = Math.abs(end - start);
return Math.ceil(diff / (1000 * 60 * 60 * 24));
},
confirm2(e) {
this.lasTime = e.year + '-' + e.month + '-' + e.day
//
this.lasTime = e.year + '-' + e.month + '-' + e.day;
let timeDiff = this.calculateTimeDifference(this.firsTime, this.lasTime);
if (timeDiff > 60) {
uni.showToast({
title: '选择时间区间需要小于60天',
icon: 'none',
duration: 2000
});
//
// uMessage.warning('60');
//
return; //
}else{
this.operatingData();
}
// lasttime
//
//
},
changeType(num) {
this.typeindex = num
if (this.typeindex == 1) {
this.operatingData()
} else {
this.infoList = []
}
}
}
}
@ -144,12 +261,14 @@
.page {
width: 750rpx;
.lines {
width: 748rpx;
height: 22rpx;
background: #F6F6F6;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.info_card {
background: #FFFFFF;
@ -202,6 +321,7 @@
span {
color: #3D3D3D;
}
.input {
width: 30%;
}
@ -209,6 +329,7 @@
}
}
}
.cont_box {
padding: 14rpx 30rpx;
width: 750rpx;

View File

@ -30,12 +30,16 @@
<view class="info_card" style="margin-top: 20rpx;">
<view class="info_card" style="margin-top: 20rpx;" v-for="(item,index) in infoList" :key="index" @click="topage(item)">
<view class="info_tit">
13360338978
<view class="tit_right">
手机号<span>{{item.phonenumber}}</span>
<view class="tit_right" v-if="item.status==0">
<view class="yuan"></view>
待租
正常
</view>
<view class="tit_right" v-if="item.status==1" style="color: red;">
<view class="yuan" style="background: red;"></view>
停用
</view>
</view>
<view class="lines"></view>
@ -43,57 +47,67 @@
<view class="info_li">
<view class="half_infoli">
姓名<span>0.00</span>
押金<span>{{item.balance}}</span>
<!-- <view class="half_infoli">
</view>
<view class="half_infoli">
押金<span>0.00</span>
</view>
</view> -->
</view>
<view class="info_li">
最近一笔订单122323<span style="color:#4C97E7 ;">已完成</span>
<view class="txt">最近一笔订单{{item.latestOrder.orderNo}}</view>
<span style="color:#4C97E7 ;" v-if="item.latestOrder.status==0||item.latestOrder.status==2">进行中</span>
<span style="color:#4C97E7 ;" v-if="item.latestOrder.status==1||item.latestOrder.status==3">待支付</span>
<span style="color:#4C97E7 ;" v-if="item.latestOrder.status==4">已完成</span>
</view>
</view>
</view>
<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>
</view>
</template>
<script>
let timerId;
export default {
data() {
return {
bgc: {
backgroundColor: "#fff",
},
time1: false,
time2: false,
lasTime: '00-00',
firsTime: '00-00',
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
typeindex:0,
infoList:[],
searchKeyword:''
}
},
methods: {
confirm1(e) {
console.log(e, 'eeeeeeee');
this.firsTime = e.year + '-' + e.month + '-' + e.day
onShow() {
this.getuserList()
},
confirm2(e) {
this.lasTime = e.year + '-' + e.month + '-' + e.day
methods: {
topage(item){
uni.navigateTo({
url:'/pages_admin/worke/worke_user_detail?id='+item.userId
})
},
getuserList(){
let data ={
phonenumber:this.searchKeyword
}
this.$u.get('/appVerify/user/list?', data).then((res) => {
if (res.code === 200) {
// 线
this.infoList = res.rows
}
}).catch(error => {
});
},
search() {
clearTimeout(timerId);
timerId = setTimeout(() => {
this.getuserList()
}, 500);
},
changeType(num){
this.typeindex=num
@ -172,7 +186,14 @@
}
line-height: 48rpx;
.txt{
width: 70%;
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
}
.half_infoli {
display: flex;
flex-wrap: nowrap;
@ -201,7 +222,14 @@
margin-top: 8rpx;
display: flex;
flex-wrap: nowrap;
.txt{
width: 70%;
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
}
.info_li {
width: 50%;
font-weight: 400;

View File

@ -70,20 +70,11 @@
bgc: {
backgroundColor: "#fff",
},
time1: false,
time2: false,
lasTime: '00-00',
firsTime: '00-00',
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
typeindex:0,
}
},
onLoad(e) {
},
methods: {
confirm1(e) {