This commit is contained in:
tx 2024-10-25 18:05:34 +08:00
parent 9e91716712
commit 788fdb8360
5 changed files with 233 additions and 125 deletions

View File

@ -59,6 +59,18 @@
</view>
</view>
<view class="line"></view>
<view class="order_li">
<view class="txt2" v-if="item.deliveryMethod==1">
取车方式自行前往门店
</view>
<view class="txt2" v-if="item.deliveryMethod==2">
取车方式免费送车上门
</view>
<view class="txt2" v-if="item.deliveryMethod==3">
取车方式收费送车上门
</view>
</view>
<view class="order_li">
<view class="txt2">
取车时间{{item.pickupTime}}
@ -84,7 +96,7 @@
</view>
<view class="order_li">
<view class="txt2">
车方式{{returnType(item.returnMethod) }}
车方式{{returnType(item.returnMethod) }}
</view>
</view>
@ -98,7 +110,7 @@
<view class="price">
{{item.payFee}}
</view>
<view class="btn" v-if="item.status==7" @click.stop="backcar(item)">
<view class="btn" v-if="item.status==7||item.status==4" @click.stop="backcar(item)">
确认还车
</view>
</view>

View File

@ -382,6 +382,7 @@
</view>
</view>
</view>
<view class="" v-if="orderInfo.status==1||orderInfo.status==2||orderInfo.status==3">
<view class="bot_btn" v-if="orderInfo.deliveryOrder.status!=3&&orderInfo.deliveryOrder">
<view class="btn" @click="getOrder()" v-if="orderInfo.deliveryOrder.status==0">
立即接单
@ -393,7 +394,9 @@
配送完成
</view>
</view>
<view class="bot_btn" v-if="orderInfo.status==7">
</view>
<view class="bot_btn" v-if="orderInfo.status==7||orderInfo.status==4">
<view class="btn" @click="backcar()">
确认还车

View File

@ -32,7 +32,7 @@
</view>
</view>
</view>
<view class="tit_box" >
<view class="tit_box">
<view class="tit_line"></view>
经营概况
</view>
@ -55,29 +55,43 @@
<view class="info_boxs">
<view class="info_li">
<view class="tit">
1359.00
{{info.todayIncome}}
</view>
<view class="txt">
今日订单营收
</view>
<view class="txt">
较昨日 <span>500.00</span> <image src="https://lxnapi.ccttiot.com/bike/img/static/uL4sBdN3Pbvn5tQvhwtk" mode=""></image>
较昨日
<span>{{ formatIncome(info.comparedYesterdayIncome) }}</span>
<!-- 如果是负数显示对应的图片 -->
<image v-if="info.comparedYesterdayIncome < 0"
src="https://lxnapi.ccttiot.com/bike/img/static/uL4sBdN3Pbvn5tQvhwtk" mode=""></image>
<!-- 如果是正数显示对应的图片 -->
<image v-else src="https://lxnapi.ccttiot.com/bike/img/static/ugghyGkhTlc3xr0nle2a" mode="">
</image>
</view>
</view>
<view class="info_li">
<view class="tit">
1359.00
{{info.todayIncome}}
</view>
<view class="txt">
今日订单数
</view>
<view class="txt">
较昨日 <span>40</span> <image src="https://lxnapi.ccttiot.com/bike/img/static/ugghyGkhTlc3xr0nle2a" mode=""></image>
较昨日
<span>{{ formatIncome(info.comparedYesterdayOrderNum) }}</span>
<!-- 如果是负数显示对应的图片 -->
<image v-if="info.comparedYesterdayOrderNum < 0"
src="https://lxnapi.ccttiot.com/bike/img/static/uL4sBdN3Pbvn5tQvhwtk" mode=""></image>
<!-- 如果是正数显示对应的图片 -->
<image v-else src="https://lxnapi.ccttiot.com/bike/img/static/ugghyGkhTlc3xr0nle2a" mode="">
</image>
</view>
</view>
</view>
</view>
<view class="tits" v-if="AccountInfo.userType==02">
<view class="tits" >
车辆统计
</view>
<view class="info_cont">
@ -86,25 +100,25 @@
车辆总数
</view>
<view class="bot">
390
{{info.deviceVO.total}}
</view>
</view>
<view class="line"></view>
<view class="li">
<view class="top">
车辆总数
空闲中
</view>
<view class="bot">
390
{{info.deviceVO.idle}}
</view>
</view>
<view class="line"></view>
<view class="li">
<view class="top">
车辆总数
出租中
</view>
<view class="bot">
390
{{info.deviceVO.rent}}
</view>
</view>
</view>
@ -112,14 +126,20 @@
更多功能
</view>
<view class="feature" v-if="AccountInfo.userType==03">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u3J6GbXvEvdTtebETjfH" mode="" @click="topage(0)"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uahBs1ruuAha5PHiiTp9" mode="" @click="topage(1)"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/u5yEuqhkS7785kZRiQqC" mode="" @click="topage(2)"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/u3J6GbXvEvdTtebETjfH" mode="" @click="topage(0)">
</image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uahBs1ruuAha5PHiiTp9" mode="" @click="topage(1)">
</image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/u5yEuqhkS7785kZRiQqC" mode="" @click="topage(2)">
</image>
</view>
<view class="feature" v-if="AccountInfo.userType==02">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u3J6GbXvEvdTtebETjfH" mode="" @click="topages(0)"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/ufE1T9RDOm7OmhLgTzXi" mode="" @click="topages(1)"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/u5yEuqhkS7785kZRiQqC" mode="" @click="topages(2)"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/u3J6GbXvEvdTtebETjfH" mode="" @click="topages(0)">
</image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/ufE1T9RDOm7OmhLgTzXi" mode="" @click="topages(1)">
</image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/u5yEuqhkS7785kZRiQqC" mode="" @click="topages(2)">
</image>
</view>
<u-picker mode="time" v-model="time1" :params="params" @confirm="confirm1"
:default-time='pickertime'></u-picker>
@ -151,8 +171,8 @@
chartday: [], //
chartData1: [], //
chartData2: [120, 90, 150, 80, 130, 110, 160],
info:{},
AccountInfo:{},
info: {},
AccountInfo: {},
time1: false,
time2: false,
lasTime: '',
@ -169,13 +189,36 @@
}
},
onLoad() {
this.generateMockData()
// this.generateMockData()
// this.generateMockData();
//
const currentDate = new Date();
//
const oneWeekAgoDate = new Date();
oneWeekAgoDate.setDate(currentDate.getDate() - 7);
// 'YYYY-MM-DD'
const formatDate = (date) => {
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
};
// this.firstTime this.lastTime
this.firsTime = formatDate(oneWeekAgoDate);
this.lasTime = formatDate(currentDate);
console.log(this.firstTime); //
console.log(this.lastTime); //
},
computed: {
},
onShow() {
this.$refs.canvas1.init(this.initChart)
this.getIndexInfo()
this.getAccountInfo()
},
@ -184,24 +227,33 @@
},
methods: {
topages(num ){
if(this.AccountInfo.userId){
if(num==0){
formatIncome(value) {
if (value > 0) {
//
return `+${value}`;
} else {
//
return value;
}
},
topages(num) {
if (this.AccountInfo.userId) {
if (num == 0) {
uni.navigateTo({
url:'/page_Operator/deviceMgmt'
url: '/page_Operator/deviceMgmt'
})
}else if(num==1){
} else if (num == 1) {
uni.navigateTo({
url:'/page_Operator/CarModel'
url: '/page_Operator/CarModel'
})
}else if(num==2){
} else if (num == 2) {
uni.navigateTo({
url:'/page_Operator/order'
url: '/page_Operator/order'
})
}
}else{
} else {
uni.navigateTo({
url:'/pages/login/login'
url: '/pages/login/login'
})
}
@ -212,13 +264,13 @@
})
},
getAccountInfo(){
getAccountInfo() {
this.$u.get(`appAdmin/myAccountInfo`).then((res) => {
if (res.code === 200) {
this.AccountInfo=res.data
if(this.AccountInfo.userType=='04'){
this.AccountInfo = res.data
if (this.AccountInfo.userType == '04') {
uni.redirectTo({
url:'/page_Delivery/orerList'
url: '/page_Delivery/orerList'
})
}
} else {
@ -230,18 +282,18 @@
}
});
},
topage(num){
if(num==0){
topage(num) {
if (num == 0) {
uni.navigateTo({
url:'/page_Merchant/deviceMgmt'
url: '/page_Merchant/deviceMgmt'
})
}else if(num==1){
} else if (num == 1) {
uni.navigateTo({
url:'/page_Merchant/StoreManagement'
url: '/page_Merchant/StoreManagement'
})
}else if(num==2){
} else if (num == 2) {
uni.navigateTo({
url:'/page_Merchant/order'
url: '/page_Merchant/order'
})
}
},
@ -263,11 +315,15 @@
},
getIndexInfo(){
this.$u.get(`appAdmin/index`).then((res) => {
getIndexInfo() {
let data = {
startTime: this.firsTime,
endTime: this.lasTime
}
this.$u.get(`appAdmin/index?`, data).then((res) => {
if (res.code === 200) {
this.info=res.data
this.info = res.data
this.generateMockData()
} else {
uni.showToast({
title: res.msg,
@ -279,19 +335,28 @@
},
generateMockData() {
// 7
let days = 7
let today = new Date()
for (let i = 0; i < days; i++) {
let day = new Date(today)
day.setDate(today.getDate() - (days - i - 1))
let month = day.getMonth() + 1
let date = day.getDate()
this.chartday.push(`${month}-${date}`)
this.chartday = [];
this.chartData1 = [];
this.chartData2 = [];
// 2035
let temp = (Math.random() * 15 + 20).toFixed(2)
this.chartData1.push(temp)
// incomeVoList chartday, chartData1, chartData2
if (this.info && this.info.incomeVoList) {
this.info.incomeVoList.forEach(item => {
// day, orderFee, orderNum
const day = new Date(item.day);
const month = day.getMonth() + 1;
const date = day.getDate();
// MM-DD
this.chartday.push(`${month}-${date}`);
// orderFee ()
this.chartData1.push(item.orderFee);
// orderNum ()
this.chartData2.push(item.orderNum);
});
}
this.$refs.canvas1.init(this.initChart)
},
initChart(canvas, width, height, canvasDpr) {
let that = this
@ -460,7 +525,8 @@
.page {
width: 100%;
padding-bottom: 200rpx;
.info_cont{
.info_cont {
display: flex;
flex-wrap: nowrap;
align-items: center;
@ -471,51 +537,63 @@
// height: 172rpx;
padding: 40rpx 0rpx;
background: #FFFFFF;
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42,130,228,0.1);
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
border-radius: 24rpx 24rpx 24rpx 24rpx;
.li{
.li {
width: 110rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
.top{
.top {
width: 100%;
text-align: center;
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
}
.bot{
.bot {
width: 100%;
text-align: center;
font-weight: 600;
font-size: 40rpx;
color: #3D3D3D;
}
}
.line{
.line {
width: 2rpx;
height: 74rpx;
background: #C7C7C7;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
}
.feature{
.feature {
margin: 0 auto;
margin-top: 24rpx;
width: 658rpx;
padding: 30rpx 40rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
image{
image {
margin-right: 66rpx;
width: 96rpx;
height: 98rpx;
}
}
.tits{
.tits {
margin-top: 40rpx;
margin-left: 44rpx;
font-weight: 600;
font-size: 36rpx;
color: #3D3D3D;
}
.info_box {
margin: 0 auto;
padding: 30rpx 22rpx;
@ -524,6 +602,7 @@
background: #FFFFFF;
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
border-radius: 24rpx 24rpx 24rpx 24rpx;
.top_box {
display: flex;
@ -587,7 +666,7 @@
}
.info_boxs{
.info_boxs {
margin-top: 26rpx;
width: 636rpx;
padding: 24rpx 0;
@ -595,23 +674,26 @@
border-radius: 24rpx 24rpx 24rpx 24rpx;
display: flex;
flex-wrap: nowrap;
.info_li:first-child{
.info_li:first-child {
border-right: 1rpx solid #D8D8D8;
}
.info_li{
.info_li {
padding: 0 40rpx;
display: flex;
flex-wrap: wrap;
width: 50%;
.tit{
.tit {
text-align: left;
width: 100%;
font-weight: 600;
font-size: 24rpx;
color: #3D3D3D;
}
.txt{
.txt {
margin-top: 10rpx;
width: 100%;
display: flex;
@ -619,31 +701,37 @@
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
span{
span {
font-size: 600;
}
image{
image {
width: 32rpx;
height: 32rpx;
}
}
}
}
.log_box{
.log_box {
display: flex;
flex-wrap: nowrap;
justify-content: space-around;
.log_li{
.log_li {
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
image{
image {
margin-right: 8rpx;
width: 76rpx;
height:18rpx ;
height: 18rpx;
}
}
}
.echarts {
width: 650rpx;
height: 500rpx;

View File

@ -641,10 +641,15 @@
async ceshi() {
this.$u.get("/getInfo").then((res) => {
console.log('进入跳转',res);
if(res.data.deptId){
uni.navigateTo({
url: '/pages/index/index'
})
}else{
this.showpart=true
}
});
},
}

View File

@ -150,7 +150,7 @@
});
setTimeout(()=>{
uni.navigateTo({
url:'/pages_withdraw/addcode'
url:'/pages_withdraw/addcode?id='+this.checkInfo.userChannelId
})
},1100)
}else{