This commit is contained in:
xyc 2025-07-29 10:39:45 +08:00
parent a7a159f8b8
commit cdc69de721
2 changed files with 83 additions and 30 deletions

View File

@ -1,40 +1,31 @@
<!-- 订单管理 -->
<template>
<view class="content">
<!-- <view style="width: 100%; height: 55px;"></view> -->
<!-- <view
style="background: linear-gradient(180deg, #054DF3 0%, #55A3FF 100%);color: white;padding-top: var(--status-bar-height);">
<view style="padding:20rpx 70rpx;font-size: 40rpx;font-weight: 800;">{{loginTitle}}</view>
<view class="top-heder">
<view class="icon1" @click="goNotice()">
<image src="/static/imgs/xiaoxi.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
<view class="msg-num" v-show="noReadNum>0">{{ noReadNum }}</view>
</view>
</view>
</view> -->
<staff-header :loginTitle="loginTitle" :showRoleNames="false" :noReadNum="noReadNum"></staff-header>
<view class="work-stat-card">
<view class="work-stat-item">
<view class="label">
<text>🗓 本日工单</text>
</view>
<view class="value">{{ todayCount }}</view>
</view>
<view class="divider"></view>
<view class="work-stat-item">
<view class="label">
<text>📅 本月工单</text>
</view>
<view class="value">{{ monthCount }}</view>
</view>
</view>
<view class="t-input" style="margin: 20rpx auto;">
<u-search v-model="carNum" @custom="search()" @search="search()" clearabled
placeholder="搜索车牌号....."></u-search>
</view>
<!-- <view class="tap">
<scroll-view scroll-x="true" style="width: 100%;">
<view style="display: flex; align-items: center; white-space: nowrap;">
<view class="tap-box" v-for="(item, index) in newTapList" :key="index" @click="tapqh(index,item)">
<view>
<view class="xhuihui" :class="{'xzhei': tapindex == index}"
style="white-space: nowrap;margin-right: 0.5rem">
{{ item.text }}
</view>
<view class="gang" v-if="tapindex == index"></view>
</view>
</view>
</view>
</scroll-view>
</view> -->
<view>
<view>
<u-sticky bgColor="#fff">
<u-tabs :inactiveStyle="{ fontSize: '16px' ,color: '#333333'}"
:activeStyle="{ fontSize: '16px' ,color: '#333333'}" :list="newTapList" keyName="text"
@ -319,6 +310,8 @@
workNodeId: null,
id: null
},
todayCount: 0,
monthCount: 0,
beginButtonShow: ['1', '3', '4'],
cancelButtonShow: ['2'],
meetCarButtonShow: ['6'],
@ -373,6 +366,8 @@
this.getLocation()
const this_ = this
this_.getWarnCount()
this.getStatisticsCount('day')
this.getStatisticsCount('month')
this.timer = setInterval(function() {
this_.getWarnCount()
}, 10000);
@ -537,6 +532,25 @@
this.infoDatas = []
this.getList()
},
async getStatisticsCount(unit) {
await request({
url: '/system/info/getBusinessCountByType',
method: 'get',
params: {
unit: unit
}
}).then(res => {
if (unit == 'day') {
this.todayCount = res.data[1]
} else if (unit == 'week') {
this.weekCount = res.data[1]
} else if (unit == 'month') {
this.monthCount = res.data[1]
} else if (unit == 'year') {
this.yearCount = res.data[1]
}
})
},
async getCount() {
await request({
url: '/system/info/getBusinessCountByType?partnerId=' + this.partnerId,
@ -544,6 +558,9 @@
}).then(res => {
this.countMap = new Map(Object.entries(res.data))
for (let i = 0; i < this.newTapList.length; i++) {
if (i == 0 || i== 2) {
continue
}
this.newTapList[i].badge.value = res.data[this.newTapList[i].value]
}
})
@ -1668,4 +1685,38 @@
}
}
}
.work-stat-card {
display: flex;
justify-content: space-between;
background-color: #ffffff;
margin: 24rpx;
padding: 30rpx;
border-radius: 20rpx;
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.06);
}
.work-stat-item {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
}
.label {
font-size: 26rpx;
color: #888;
margin-bottom: 10rpx;
}
.value {
font-size: 40rpx;
font-weight: bold;
color: #333;
}
.divider {
width: 1rpx;
background-color: #eee;
margin: 0 20rpx;
}
</style>

View File

@ -408,7 +408,7 @@
hge: false,
roleSelect: '',
orImages: false,
isShowClient: true,
isShowClient: false,
show: false,
xling: false,
leadManList: [],
@ -479,9 +479,11 @@
}
})
this.roleType = option.type
if (option.type == 'staff') {
if (option.type == 'staff' || option.type == 'business') {
const res = await ifHasRoleByDictType("inspection_detail_view")
this.isShowClient = res
} else {
this.isShowClient = true
}
//
this.timer = setInterval(this.getindex, 120000);