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
page_Merchant
pages
pages_withdraw

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

@ -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>
@ -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,6 +227,15 @@
},
methods: {
formatIncome(value) {
if (value > 0) {
//
return `+${value}`;
} else {
//
return value;
}
},
topages(num) {
if (this.AccountInfo.userId) {
if (num == 0) {
@ -264,10 +316,14 @@
},
getIndexInfo() {
this.$u.get(`appAdmin/index`).then((res) => {
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.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,6 +525,7 @@
.page {
width: 100%;
padding-bottom: 200rpx;
.info_cont {
display: flex;
flex-wrap: nowrap;
@ -473,22 +539,30 @@
background: #FFFFFF;
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
border-radius: 24rpx 24rpx 24rpx 24rpx;
.li {
width: 110rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
.top {
width: 100%;
text-align: center;
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
}
.bot {
width: 100%;
text-align: center;
font-weight: 600;
font-size: 40rpx;
color: #3D3D3D;
}
}
.line {
width: 2rpx;
height: 74rpx;
@ -496,6 +570,7 @@
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
}
.feature {
margin: 0 auto;
margin-top: 24rpx;
@ -503,12 +578,14 @@
padding: 30rpx 40rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
image {
margin-right: 66rpx;
width: 96rpx;
height: 98rpx;
}
}
.tits {
margin-top: 40rpx;
margin-left: 44rpx;
@ -516,6 +593,7 @@
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;
@ -595,9 +674,11 @@
border-radius: 24rpx 24rpx 24rpx 24rpx;
display: flex;
flex-wrap: nowrap;
.info_li:first-child {
border-right: 1rpx solid #D8D8D8;
}
.info_li {
padding: 0 40rpx;
display: flex;
@ -611,6 +692,7 @@
font-size: 24rpx;
color: #3D3D3D;
}
.txt {
margin-top: 10rpx;
width: 100%;
@ -619,9 +701,11 @@
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
span {
font-size: 600;
}
image {
width: 32rpx;
height: 32rpx;
@ -629,14 +713,17 @@
}
}
}
.log_box {
display: flex;
flex-wrap: nowrap;
justify-content: space-around;
.log_li {
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
image {
margin-right: 8rpx;
width: 76rpx;
@ -644,6 +731,7 @@
}
}
}
.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{