This commit is contained in:
许允枞 2025-02-26 18:08:08 +08:00
parent 2ba476888d
commit b13a34a3ab
15 changed files with 2327 additions and 229 deletions

381
components/down-select.vue Normal file
View File

@ -0,0 +1,381 @@
<template>
<view class='layout-column'>
<view id="parent" style="width:fit-content;">
<slot></slot>
</view>
<view
:style="'width:'+slotW+';max-height: '+getListContentHei+'rpx;z-index: 9999;position: absolute;margin-top:'+slotH+';'+(isShow ? '' : 'display:none;')"
:class="(dataList.length > 0 ? 'data-box-shadow ' : 'data-box ') + animate">
<block v-if="dataList.length > 0">
<view class="data-box-scroll"
:style="'height:'+dataList.length*(itemHeight-1)+'rpx;max-height: '+max*(itemHeight-1)+'rpx;'">
<text v-for="(item,index) in dataList" :key="item[identifier]"
:class="'layout-row less-center list-item '+(item.enable === false ? '' : 'active')"
:style="'color:'+(item.enable === false ? '#dedede' : (checkedIndex.indexOf(index) >= 0 ? itemSelectColor : itemColor))+';font-size:'+itemFontsize+'rpx;'"
@click="handleListItem(index, item)">{{item[showKey]}}</text>
</view>
<view class="layout-row opera-btns less-center" v-if="mode == 'multiple'">
<view class="opera-cancel layout-row center" @click='handelCancel'>取消</view>
<view class="opera-sure layout-row center" @click='handelSure'>确定</view>
</view>
</block>
<view v-else :style="'width:'+slotW+';'" class='status-text'>暂无数据</view>
</view>
<view class="mask" v-show="isShow" @click="handelCancel"></view>
</view>
</template>
<script>
export default {
name: "down-select",
props: {
//
showKey: {
type: String,
default: '',
},
mode: {
type: String,
default: 'single', //multiple
// default: 'multiple'
},
dataList: {
type: Array,
default: []
},
//
checkedDataList: {
type: Array,
default: []
},
//
max: {
type: Number,
default: 4
},
//itemrpx
itemHeight: {
type: Number,
default: 80
},
//v-forkey,
identifier: {
type: String,
default: ''
},
itemSelectColor: {
type: String,
default: '#00aaff'
},
itemColor: {
type: String,
default: 'black'
},
itemFontsize: {
type: Number,
default: 30
}
},
computed: {
getListContentHei() {
let len = this.dataList.length
let signleH = len < this.max ? this.itemHeight * len : this.itemHeight * this.max
if (this.mode == 'single') {
return len <= 0 ? this.itemHeight : signleH
} else {
return len <= 0 ? this.itemHeight : (signleH + this.itemHeight)
}
}
},
watch: {
dataList: {
handler: function(newVal, oldVal) {
if (this.checkedDataList.length >= 0 && this.identifier) {
this.checkedIndex = []
this.checkedDataList.forEach(ele => {
let index = newVal.findIndex(ele1 => ele[this.identifier] === ele1[this
.identifier])
if (index >= 0) {
this.checkedIndex.push(index)
}
})
}
},
immediate: true, //
deep: true //
},
checkedDataList: {
handler: function(newVal, oldVal) {
if (newVal.length >= 0 && this.identifier) {
this.checkedIndex = []
newVal.forEach(ele => {
let index = this.dataList.findIndex(ele1 => ele[this.identifier] === ele1[this
.identifier])
if (index >= 0) {
this.checkedIndex.push(index)
}
})
}
},
immediate: true, //
deep: true //
}
},
mounted() {
this.$nextTick(() => {
uni.createSelectorQuery().in(this).select('#parent').boundingClientRect(res => {
if (res.width) {
this.slotW = `${res.width}px`
this.slotH = `${res.height+5}px`
}
}).exec()
})
},
data() {
return {
slotW: '0px',
slotH: '0px',
isShow: false,
checkedIndex: [],
animate: '',
//
checkedDels: []
};
},
methods: {
open() {
if (this.checkedDataList.length >= 0 && this.identifier) {
this.checkedIndex = []
this.checkedDataList.forEach(ele => {
let index = this.dataList.findIndex(ele1 => ele[this.identifier] === ele1[this
.identifier])
if (index >= 0) {
this.checkedIndex.push(index)
}
})
}
this.isShow = true
this.animate = 'show-animate'
},
close() {
this.animate = 'hide-animate'
this.checkedIndex = []
this.checkedDels = []
this.isShow = false
},
handleListItem(index, obj) {
if(obj.enable === false){
return
}
if (this.mode === 'single') {
this.checkedIndex = []
this.checkedIndex.push(index)
this.handelSure()
} else {
let sindex = this.checkedIndex.indexOf(index)
if (sindex >= 0) {
if (this.identifier) {
//
let contain = this.checkedDataList.filter(ele => ele[this.identifier] === this.dataList[index][
this.identifier
])
if (contain.length > 0) {
//
let contain1 = this.checkedDels.filter(ele => ele[this.identifier] === contain[0][this
.identifier
])
if (contain1.length <= 0) {
this.checkedDels.push(contain[0])
}
}
}
this.checkedIndex.splice(sindex, 1);
} else {
if (this.identifier) {
let contain2 = this.checkedDels.filter(ele => ele[this.identifier] === this.dataList[index][
this.identifier
])
if (contain2.length > 0) {
let tempIndex = this.checkedDels.findIndex(ele => ele[this.identifier] === this.dataList[
index][this.identifier])
if (tempIndex >= 0) {
this.checkedDels.splice(tempIndex, 1)
}
}
}
this.checkedIndex.push(index)
}
}
},
handelCancel() {
this.close()
this.$emit('cancelDimss', '')
},
handelSure() {
let results = []
if (this.checkedIndex.length <= 0) {
uni.showToast({
title: '请选择至少一项',
icon: 'none'
});
return
}
this.checkedIndex.forEach(ele => {
if (this.dataList[ele]) {
results.push(this.dataList[ele])
}
})
//
this.checkedIndex = []
this.$emit('resultBack', results, this.checkedDels)
this.close()
}
}
}
</script>
<style scoped>
.active {}
.active:active {
opacity: 0.6;
}
.layout-row {
display: flex;
flex-direction: row;
}
.layout-column {
display: flex;
flex-direction: column;
}
/* 整体方向居中 */
.center {
align-items: center;
justify-content: center;
}
/* 主轴方向居中 */
.main-center {
justify-content: center;
}
/* 侧轴方向居中 */
.less-center {
align-items: center;
}
.data-box-scroll {
width: 100%;
overflow-y: scroll;
}
.data-box-scroll::-webkit-scrollbar {
display: none
}
.data-box {
background: white;
border-radius: 8rpx;
box-shadow: 0px 0px 3px 1px rgba(0, 0, 0, 0.1);
z-index: 9999;
}
.data-box-shadow {
background: white;
border-radius: 8rpx;
box-shadow: 0px 0px 3px 1px rgba(0, 0, 0, 0.1);
z-index: 9999;
}
.list-item {
width: 100%;
height: 80rpx;
margin-left: 20rpx;
margin-right: 20rpx;
border-bottom: 1rpx solid #D8DFEC;
text-align: right;
}
.opera-btns {
width: 100%;
height: 80rpx;
justify-content: flex-end;
}
.opera-cancel {
width: 100rpx;
height: 50rpx;
background-color: white;
box-shadow: 0px 0px 3px 1px rgba(0, 0, 0, 0.1);
border-radius: 5rpx;
font-size: 26rpx;
}
.opera-sure {
width: 100rpx;
height: 50rpx;
background-color: #58a2e4;
box-shadow: 0px 0px 3px 1px rgba(0, 0, 0, 0.1);
border-radius: 5rpx;
font-size: 26rpx;
color: white;
margin-right: 30rpx;
margin-left: 30rpx;
}
.status-text {
text-align: center;
font-size: 28rpx;
font-weight: 600;
color: #c2c2c2;
padding-top: 20rpx;
padding-bottom: 20rpx;
}
.mask {
position: fixed;
background: transparent;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
.show-animate {
animation-name: open;
animation-duration: 1s;
animation-iteration-count: 1;
}
@keyframes open {
0% {
height: 0rpx;
}
100% {
height: 100%;
}
}
.hide-animate {
animation-name: close;
animation-duration: 1s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}
@keyframes close {
0% {
height: 100%;
}
100% {
height: 0rpx;
}
}
</style>

View File

@ -148,6 +148,13 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/index/neworderStatistic",
"style": {
"navigationBarTitleText": "订单统计",
"navigationStyle": "custom"
}
},
{
"path": "pages/index/addStaff",
"style": {
@ -204,6 +211,13 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/statistics/business",
"style": {
"navigationBarTitleText": "业务统计二级页",
"navigationStyle": "custom"
}
},
{
"path": "pages/staff/staff",
"style": {

View File

@ -61,36 +61,36 @@
{{ driverLicenseTypeArrStr != null ? this.driverLicenseTypeArrStr : '请选择驾照类型' }} >
</view>
</view>
<view class="d_b" v-if="!userId">
<view class="d_b">
<view class="">岗位</view>
<view class="" @click="showRole = true">
{{ roleName != null ? this.roleName : '请选择岗位' }} >
</view>
</view>
<view class="d_b" @click="goFile">
<view class="d_b" @click="goFile" v-if="userId">
<view class="">附件</view>
<view class="lan_">查看附件
<image src="/static/imgs/add.png" mode=""></image>
</view>
</view>
<!-- <u-upload-->
<!-- ref="uploadRef"-->
<!-- :fileList="fileList1"-->
<!-- @afterRead="afterRead"-->
<!-- @delete="deletePic"-->
<!-- name="1"-->
<!-- multiple-->
<!-- :maxCount="10"-->
<!-- v-show="fileList1.length > 0"-->
<!-- >-->
<!-- </u-upload>-->
<!-- <view class="hui_box" v-if="fileList1.length == 0">-->
<!-- <image src="/static/imgs/wod.png" mode=""></image>-->
<!-- <view class="">-->
<!-- <view class="big_">附件格式 jpg/png</view>-->
<!-- <view class="sm_">100KB</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <u-upload-->
<!-- ref="uploadRef"-->
<!-- :fileList="fileList1"-->
<!-- @afterRead="afterRead"-->
<!-- @delete="deletePic"-->
<!-- name="1"-->
<!-- multiple-->
<!-- :maxCount="10"-->
<!-- v-show="fileList1.length > 0"-->
<!-- >-->
<!-- </u-upload>-->
<!-- <view class="hui_box" v-if="fileList1.length == 0">-->
<!-- <image src="/static/imgs/wod.png" mode=""></image>-->
<!-- <view class="">-->
<!-- <view class="big_">附件格式 jpg/png</view>-->
<!-- <view class="sm_">100KB</view>-->
<!-- </view>-->
<!-- </view>-->
<view class="anniu" @click="submit">
@ -103,10 +103,6 @@
@confirm="chooseEducation" @cancel="showEducation = false"
keyName="label"></u-picker>
<u-picker :show="showRole" ref="uPicker" :columns="[roles]"
@confirm="chooseRole" @cancel="showRole = false"
keyName="name"></u-picker>
<qianziyu-select
:show="showDriveType"
type="checkbox"
@ -144,6 +140,22 @@
mode="date"
return-type='string'
></u-datetime-picker>
<!-- <u-picker :show="showRole" ref="uPicker" :columns="[roles]"-->
<!-- @confirm="chooseRole" @cancel="showRole = false"-->
<!-- keyName="name"></u-picker>-->
<qianziyu-select
:show="showRole"
type="checkbox"
name="name"
:dataLists="roles"
:showSearch=false
@cancel="showRole = false"
:checkboxData="staff.roleIds"
@submit="chooseRole()"
popupTitle='汇报对象选择'
@update:checkboxData="staff.roleIds = $event"
>
</qianziyu-select>
</view>
</template>
@ -162,6 +174,7 @@ export default {
joinDate: null,
probationPeriod: null,
socialSecurityBuyDate: null,
roleIds: []
},
fileList1: [],
selectJoinDate: new Date().toString(),
@ -229,6 +242,7 @@ export default {
})
},
submit() {
this.staff.roleIds = this.staff.roleIds.map(item => item.id)
//
if (this.userId) {
this.update()
@ -260,10 +274,18 @@ export default {
method: 'put',
data: data
}).then(res => {
let resp = request({
url: '/system/permission/assign-user-role',
method: 'post',
data: {
userId: this.userId,
roleIds: this.staff.roleIds
}
})
uni.showToast({
title: "编辑成功"
})
this.getInfoByUserId()
uni.navigateBack()
})
},
async add() {
@ -275,7 +297,7 @@ export default {
let data = {
nickname: this.staff.nickname,
mobile: this.staff.mobile,
username: this.staff.nickname,
username: this.staff.mobile,
status: 0,
userType: '01',
roleId: this.staff.roleId,
@ -294,14 +316,13 @@ export default {
data: data
})
if (res.code == 200) {
let roleIds = []
roleIds.push(this.staff.roleId)
console.log('角色', data)
let resp = await request({
url: '/system/permission/assign-user-role',
method: 'post',
data: {
userId: res.data,
roleIds: roleIds
roleIds: this.staff.roleIds
}
})
uni.showToast({
@ -309,6 +330,7 @@ export default {
})
this.show = false
this.getindex()
uni.navigateBack()
}
},
validData() {
@ -319,7 +341,7 @@ export default {
})
return false
}
if (!this.staff.roleId && !this.userId) {
if (!this.staff.roleIds && !this.userId) {
uni.showToast({
title: '请选择岗位',
icon: 'none'
@ -372,16 +394,21 @@ export default {
this.driverLicenseTypeArr.push(temp)
})
}
if (this?.staff?.fileList) {
this.fileList1 = []
this.staff.fileList.forEach((item) => {
const temp = {
name: item.name,
url: item.url.startsWith("http") ? item.url : baseImageUrl + '/' + item.url
}
this.fileList1.push(temp)
})
console.log('tupian', this.fileList1)
if (this?.staff?.roleIds) {
console.log('this.staff.roleIds', this.staff.roleIds)
this.staff.roleIds = this.staff.roleIds.map(roleId => {
return this.roles.find(role => role.id === roleId);
});
this.roleName = this.staff.roleIds.map(item => item.name).join(',')
console.log(this.staff.roleIds)
// this.fileList1 = []
// this.staff.fileList.forEach((item) => {
// const temp = {
// name: item.name,
// url: item.url.startsWith("http") ? item.url : baseImageUrl + '/' + item.url
// }
// this.fileList1.push(temp)
// })
}
},
getEducation() {
@ -402,10 +429,8 @@ export default {
this.staff.educational = e.value[0].label
this.showEducation = false
},
chooseRole(e) {
console.log(e)
this.staff.roleId = e.value[0].id
this.roleName = e.value[0].name
chooseRole() {
this.roleName = this.staff.roleIds.map(item => item.name).join(',')
this.showRole = false
},
@ -430,7 +455,7 @@ export default {
url: '/pages/manage/deviceManage?type=staff&folderId=' + this.staff.folderId
})
})
}else {
} else {
uni.navigateTo({
url: '/pages/manage/deviceManage?type=staff&folderId=' + this.staff.folderId
})

View File

@ -1,180 +1,283 @@
<template>
<view class="">
<headersVue :titles="titles"><u-icon name="arrow-left" color="#fff" size="18"></u-icon></headersVue>
<view class="content">
<view class="top_">请选择工作内容 <u-icon style="margin-left: 10px;" name="arrow-down" size="18"></u-icon> </view>
<view class="list_">
<view class="list_title">
<view class="list_ds">
<view class="" style="margin-right: 50px;">排名</view>
<view class="">员工</view>
</view>
<view class="">服务台次</view>
</view>
<view class="list_box" v-for="(item,index) in 10" :key="index">
<view class="list_box_top">
<view class="pm_"> {{index + 1}} </view>
<view class="list_ds">
<view class="tx_">
<image src="/static/img/touxiang.png" mode=""></image>
</view>
<view class="">
<view class="">王一</view>
<view class="num_hui">13812345678</view>
</view>
</view>
<view class=""> 5000 </view>
</view>
<view class="list_box_bottom">
<view class="list_ds">
<view class="text_">外检</view>
<view class="num_">200</view>
</view>
<view class="list_ds">
<view class="text_">安检</view>
<view class="num_">200</view>
</view>
<view class="list_ds">
<view class="text_">其他</view>
<view class="num_">200</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="">
<headersVue :titles="titles">
<u-icon name="arrow-left" color="#fff" size="18"></u-icon>
</headersVue>
<view class="content">
<!-- 顶部选择区域 -->
<view class="top_">
<view class="select-container" @click="showDropdown">
<view class="select-text">
{{ queryStr != null ? queryStr : '请选择工作内容' }}
</view>
<!-- 下拉箭头 -->
<u-icon
style="margin-left: 10rpx;"
name="arrow-down"
size="18"
color="#8D90A6"
></u-icon>
</view>
<!-- 清除按钮 -->
<u-icon
v-if="queryStr"
name="close-circle"
color="#8D90A6"
size="18"
@click="clearSelection"
></u-icon>
</view>
<!-- 列表区域 -->
<view class="list_">
<view class="list_title">
<view class="list_ds">
<view style="margin-right: 50px;">排名</view>
<view>员工</view>
</view>
<view>服务台次</view>
</view>
<view class="list_box" v-for="(item, index) in List" :key="index">
<view class="list_box_top">
<view class="pm_">{{ index + 1 }}</view>
<view class="list_ds">
<view class="tx_">
<image
v-if="item.avatar"
style="border-radius: 50%"
:src="baseImageUrl + '/' + item.avatar"
mode=""
></image>
<image src="/static/imgs/touxiang.png" v-else mode=""></image>
</view>
<view>
<view>{{ item.nickname }}</view>
<view class="num_hui">{{ item.mobile }}</view>
</view>
</view>
<view>{{ item.orderCount }}</view>
</view>
<view class="list_box_bottom">
<view class="list_ds">
<view class="text_">外检</view>
<view class="num_">{{ item.waijianCount }}</view>
</view>
<view class="list_ds">
<view class="text_">安检</view>
<view class="num_">{{ item.anjianCount }}</view>
</view>
<view class="list_ds">
<view class="text_">其他</view>
<view class="num_">{{ item.otherCount }}</view>
</view>
</view>
</view>
</view>
</view>
<!-- 选择器 -->
<u-picker
:show="isShowScreen"
:columns="[columns]"
@cancel="handleCancel"
keyName="projectName"
@confirm="submitScreen"
></u-picker>
</view>
</template>
<script>
import headersVue from '../../components/header/headers.vue';
import headersVue from '../../components/header/headers.vue';
import request from "@/utils/request";
import config from "config";
export default {
data() {
return {
titles: "员工统计",
msg: "1",
List: [],
show: false,
status: 'loading',
}
},
components: {
headersVue
},
methods: {
goManage(num) {
if (num == 1) {
uni.navigateTo({
url: '/pages/index/staffManagement'
})
}
if (num == 2) {
uni.navigateTo({
url: '/pages/index/deviceManage'
})
}
},
}
}
export default {
data() {
return {
titles: "员工统计",
List: [],
selectList: [],
useSelectList: [],
show: false,
status: 'loading',
baseImageUrl: config.baseImageUrl,
isShowScreen: false,
columns: [],
queryParams: {},
queryStr: null,
};
},
components: {
headersVue,
},
onLoad() {
this.getStaffCount();
this.getInspectionProject();
},
methods: {
//
getStaffCount() {
request({
url: '/partnerOwn/partner/getStaffCount',
method: 'post',
data: this.queryParams,
}).then((res) => {
this.$nextTick(() => {
this.List = res.data;
});
});
},
//
getInspectionProject() {
request({
url: '/inspection/dl-inspection-project/page',
method: 'get',
params: {
pageNo: 1,
pageSize: 10000,
},
}).then((res) => {
this.columns = res.data.records;
});
},
//
showDropdown() {
this.isShowScreen = true;
},
//
submitScreen(e) {
this.isShowScreen = false;
this.queryParams.id = e.value[0].id;
this.queryStr = e.value[0].projectName;
this.getStaffCount();
},
//
handleCancel() {
this.isShowScreen = false;
},
//
clearSelection() {
this.queryParams.id = null;
this.queryStr = null;
this.getStaffCount();
},
},
};
</script>
<style scoped lang="scss">
.content {
background: #F7F8FC;
width: 100%;
// height: 100vh;
box-sizing: border-box;
// padding: 30rpx;
padding-top: 200rpx;
}
.content {
background: #f7f8fc;
width: 100%;
padding-top: 200rpx;
}
.top_ {
width: 100%;
height: 104rpx;
background: #FFFFFF;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 30rpx;
}
.top_ {
width: 100%;
height: 104rpx;
background: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 30rpx;
border-bottom: 1rpx solid #f5f5f5;
.list_ {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
}
.select-container {
display: flex;
align-items: center;
flex: 1; //
}
.list_title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
color: #101A3E;
box-sizing: border-box;
padding: 0rpx 30rpx;
margin-bottom: 20rpx;
}
.select-text {
font-size: 28rpx;
color: #101a3e;
}
}
.list_ds {
display: flex;
align-items: center;
}
.list_box {
width: 100%;
// height: 230rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin-bottom: 30rpx;
}
.list_ {
width: 100%;
box-sizing: border-box;
padding: 30rpx;
}
.list_box_top {
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 50rpx;
border-bottom: 2rpx solid #F5F5F5;
}
.list_box_bottom{
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx 50rpx;
}
.tx_{
width: 90rpx;
height: 90rpx;
margin-right: 5px;
image{
width: 100%;
height: 100%;
}
}
.num_hui{
font-size: 24rpx;
color: #8D90A6;
}
.text_{
font-size: 28rpx;
color: #8D90A6;
}
.num_{
font-size: 28rpx;
color: #101A3E;
}
.pm_{
width: 40rpx;
height: 40rpx;
background: #327DFB;
overflow: hidden;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 28rpx;
.list_title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
color: #101a3e;
box-sizing: border-box;
padding: 0 30rpx;
margin-bottom: 20rpx;
}
}
.list_ds {
display: flex;
align-items: center;
}
.list_box {
width: 100%;
background: #ffffff;
border-radius: 8rpx;
margin-bottom: 30rpx;
}
.list_box_top {
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 50rpx;
border-bottom: 2rpx solid #f5f5f5;
}
.list_box_bottom {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx 50rpx;
}
.tx_ {
width: 90rpx;
height: 90rpx;
margin-right: 5px;
image {
width: 100%;
height: 100%;
}
}
.num_hui {
font-size: 24rpx;
color: #8d90a6;
}
.text_ {
font-size: 28rpx;
color: #8d90a6;
}
.num_ {
font-size: 28rpx;
color: #101a3e;
}
.pm_ {
width: 40rpx;
height: 40rpx;
background: #327dfb;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 28rpx;
}
</style>

View File

@ -24,6 +24,7 @@
<view class="d_s">
<view class="icon1" @click="goNotice()">
<image src="/static/imgs/xiaoxi.png" mode=""></image>
<view class="msg-num" v-if="noReadNum>0">{{ noReadNum }}</view>
</view>
<view class="icon1" @click="showUserDetail">
<image src="/static/imgs/gengduo.png" mode=""></image>
@ -32,7 +33,7 @@
</view>
</view>
<view class="three_">
<view class="three_" @click="goordercount">
<view class="three_box1">
<view class="">当日订单</view>
<view class="num_">{{ threenum.todayOrderNum }}</view>
@ -56,7 +57,7 @@
<view class="">订单管理</view>
</view>
<view class="jg_ys">
<image src="/static/imgs/jg2.png" mode=""></image>
<image src="/static/imgs/jg2.png" mode="" @click="gobusiness"></image>
<view class="">业务统计</view>
</view>
<view class="jg_ys">
@ -94,6 +95,16 @@
<view class="">使用说明</view>
</view>
</view>
<view class="jg_bt" style="" v-if="show">
<view class="jg_ys1" @click="goemployees()">
<image src="/static/imgs/jg6.png" mode=""></image>
<view class="">员工统计</view>
</view>
<view class="jg_ys1" @click="goneworderStatistic()">
<image src="/static/imgs/jg7.png" mode=""></image>
<view class="">当日订单统计</view>
</view>
</view>
</view>
<view class="hang_"></view>
<view class="list_">
@ -235,6 +246,11 @@ export default {
url: '/pages/xiaoxi/notice'
})
},
goordercount(){
uni.navigateTo({
url: '/pages/index/neworderStatistic'
})
},
goback() {
uni.navigateBack()
},
@ -288,6 +304,21 @@ export default {
url: '/pages/Tollannouncement/Tollannouncement'
})
},
goemployees() {
uni.navigateTo({
url: '/pages/index/countEmployees'
})
},
goneworderStatistic() {
uni.navigateTo({
url: '/pages/index/orderStatistics'
})
},
gobusiness() {
uni.navigateTo({
url: '/pages/statistics/business'
})
},
gettel(num) {
const value = num.buyPhoneNum
uni.makePhoneCall({
@ -528,9 +559,24 @@ image {
}
.icon1 {
position: relative;
width: 56rpx;
height: 56rpx;
margin-left: 30rpx;
.msg-num {
position: absolute;
right: -15rpx;
color: white;
background: #d74a43;
width: 35rpx;
height: 35rpx;
line-height: 35rpx;
text-align: center;
font-weight: 800;
font-size: 11px;
border-radius: 50%;
top: -15rpx;
}
}
.three_ {

View File

@ -0,0 +1,651 @@
<template>
<view class="content">
<headersVue :titles="titles">
<u-icon name="arrow-left" color="#fff" size="18"></u-icon>
</headersVue>
<view class="top_">
<view class="t_left" @click="isShowPop = true">全部订单
<u-icon name="arrow-down-fill" color="#327DFB" size="14"></u-icon>
</view>
<view class="" style="display:flex;" @click="cleanSelectTime" v-if="queryParams.startTime">
清除时间
<u-icon
name="close-circle"
size="24"
color="#327DFB"
style="margin-left: 10rpx"
></u-icon>
</view>
</view>
<view class="container" v-if="tableData">
<view class="box_" v-for="(records, date) in tableData" :key="date">
<view class="title_" @click="show = true">{{ formatDateChinese(date) }}
<u-icon name="arrow-down" size="14"></u-icon>
</view>
<view class="box_cont">
<view class="box_hang" v-for="(item, index) in records" :key="item.id">
<view class="d_s">
<view class="num_">{{ index + 1 }}</view>
<view class="name_">{{ item.carNum }}</view>
<view class="icon_" v-if="item.carModel">{{ item.carModel }}</view>
</view>
<view class="d_b">
<view class="d_s">
<view class="h_">业务来源</view>
<view class="n_">{{ item.customerSource }}</view>
</view>
<view class="d_s">
<view class="h_">检测状态</view>
<view class="n_">{{ item.status }}</view>
</view>
<view class="d_s">
<view class="h_">支付方式</view>
<view class="n_">{{ item.pay == '未支付' ? item.pay : getPayType(item.payType) }}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="container" v-else style="margin: 430rpx 0">
<u-empty
mode="order"
>
</u-empty>
</view>
<u-popup round="55" :show="isShowPop" @close="closePop" @open="openPop" style="z-index: 10070; position: relative;">
<view class="popup-content">
<view class="popup-header">
<text>选择筛选项</text>
<view style="display: flex;justify-content: space-between" @click="clearSelection">
<u-icon
name="close-circle"
size="18"
color="#327DFB"
></u-icon>
<text style="color:#327DFB;">清除筛选项</text>
</view>
</view>
<u-search placeholder="请输入车辆品牌或车牌号" v-model="queryParams.carModelOrCarYear" @custom="search"
@search="search"></u-search>
<scroll-view scroll-y="true" class="scroll_view_style">
<view class="popup-body">
<view style="display: flex;justify-content: space-between">
<!-- 客户来源选择 -->
<view class="filter-section">
<text>客户来源</text>
<view class="options" @click="handleClick">
<text>
{{ queryParams.customerSource || '请选择客户来源' }}
</text>
<u-icon
v-if="queryParams.customerSource"
name="close-circle"
size="24"
color="#327DFB"
></u-icon>
<u-icon
v-else
name="arrow-down"
size="14"
color="#327DFB"
></u-icon>
</view>
</view>
<!-- 车型选择 -->
<view class="filter-section">
<text>车型</text>
<view class="options" @click="handleGoodsClick">
<text>
{{ goodsName || '请选择车型' }}
</text>
<u-icon
v-if="queryParams.goods"
name="close-circle"
size="24"
color="#327DFB"
></u-icon>
<u-icon
v-else
name="arrow-down"
size="14"
color="#327DFB"
></u-icon>
</view>
</view>
</view>
<!-- 车龄选择 -->
<view class="filter-section">
<text>车龄选择</text>
<u-number-box v-model="queryParams.carYear" :min="0" :max="100"></u-number-box>
</view>
<!-- 支付方式选择 -->
<view class="filter-section">
<text>支付方式</text>
<view class="options">
<text
class="options_content"
v-for="(item, index) in payTypes"
:key="index"
@click="selectPayType(item.value)"
:class="{ selected: queryParams.payType === item.value }"
>
{{ item.label }}
</text>
</view>
</view>
<!-- 检测状态选择 -->
<view class="filter-section">
<text>检测状态</text>
<view class="options">
<text
class="options_content"
v-for="(item, index) in inspectionStatus"
:key="index"
@click="selectInspectionStatus(item.value)"
:class="{ selected: queryParams.chooseStatus === item.value }"
>
{{ item.label }}
</text>
</view>
</view>
</view>
</scroll-view>
<view class="popup-footer">
<u-button @click="closePop" style="background: #F7F8FC;color: black">取消</u-button>
<u-button @click="submitPop">确定</u-button>
</view>
</view>
</u-popup>
<u-picker
:show="isShowCustomer"
:columns="[customerSource]"
keyName="label"
closeOnClickOverlay
@cancel="isShowCustomer = false"
@close="isShowCustomer = false"
@confirm="handleCustomerSourceConfirm"
:overlay-style="{ zIndex: '10080' }"
style="z-index: 10072"
></u-picker>
<u-picker
:show="isShowGoods"
:columns="[goodsList]"
keyName="label"
closeOnClickOverlay
@cancel="isShowGoods = false"
@close="isShowGoods = false"
@confirm="handleGoodsConfirm"
:overlay-style="{ zIndex: '10080' }"
style="z-index: 10072"
></u-picker>
<u-datetime-picker
:show="show"
v-model="selectTime"
mode="date"
@close="show = false"
@cancel="show = false"
closeOnClickOverlay
@confirm="confirmTime"
></u-datetime-picker>
</view>
</template>
<script>
import headersVue from '../../components/header/headers.vue';
import request from "@/utils/request";
import {formatDate, formatDateChinese, formatDateTimeToMinute, getDictDataByType} from "@/utils/utils";
export default {
data() {
return {
titles: "订单统计",
msg: "1",
List: [],
show: false,
status: 'loading',
columns: [
['选项', '选项', '选项']
],
queryParams: {
queryTime: null,
pageNum: 1,
pageSize: 10,
chooseStatus: "1",
payType: "",
startTime: null,
endTime: null,
carModelOrCarYear: null,
customerSource: null,
goods: null,
carYear: 0,
},
loading: false, //
tableData: {},
pages: 0,
isShowPop: false,
isShowCustomer: false,
payTypes: [],
inspectionStatus: [
{
label: "全部",
value: "1",
},
{
label: "检测中",
value: "2",
},
{
label: "已完成",
value: "3",
},
],
selectedPayType: null, //
selectedInspectionStatus: null, //
customerSource: [],
selectedCustomerSource: null, //
selectTime: new Date().toString(),
goodsList: [],
isShowGoods: false,
goodsName: null
}
},
onReachBottom() { //
if (!this.loading && this.queryParams.pageNum < this.pages) {
this.queryParams.pageNum += 1;
this.getTableData(true);
} else {
uni.showToast({
title: '没有下一页数据',
icon: 'none'
})
}
},
components: {
headersVue
},
onReady() {
this.getTableData();
this.getDictData();
this.getCustomerSource();
// this.disabledScroll()
},
methods: {
formatDateChinese,
getTableData(isLoadMore = false) {
this.loading = true; //
request({
url: '/partnerOwn/partner/getOrderByDate',
method: 'get',
params: this.queryParams
}).then(res => {
this.pages = res.data.pages
let newData = res.data.records || [];
if (isLoadMore) {
newData = newData.concat(this.extractAllEntries(this.tableData))
this.tableData = this.groupByDate(newData); //
} else {
this.tableData = null
if (newData.length !== 0) {
this.tableData = newData; //
this.tableData = this.groupByDate(this.tableData)
}
}
this.loading = false; //
}).catch(err => {
console.error('获取订单数据失败', err);
this.loading = false; //
});
},
getPayType(type) {
if (!this.payTypes || this.payTypes.length === 0) {
this.getDictData()
}
if (type) {
const index = this.payTypes.findIndex(item => item.value === type)
if (index !== -1) {
return this.payTypes[index].label
}
}
},
async getDictData() {
if (!this.payTypes || this.payTypes.length === 0) {
this.payTypes = [
{
label: "全部",
value: "",
}
]
this.payTypes = this.payTypes.concat(await getDictDataByType("pay_type"))
}
},
groupByDate(records) {
return Object.entries(records.reduce((acc, item) => {
const dateKey = item.createTime.split(" ")[0]; // "yyyy-MM-dd"
if (!acc[dateKey]) {
acc[dateKey] = [];
}
acc[dateKey].push(item);
return acc;
}, {}))
.sort(([a], [b]) => b.localeCompare(a)) // dateKey
.reduce((sortedAcc, [key, value]) => {
sortedAcc[key] = value;
return sortedAcc;
}, {});
},
extractAllEntries(data) {
return Object.values(data).flat(); //
},
closePop() {
this.isShowPop = false;
this.queryParams.payType = "";
this.queryParams.chooseStatus = "1";
this.queryParams.carModelOrCarYear = null;
},
submitPop() {
this.queryParams.pageNum = 1;
this.tableData = null
this.getTableData();
this.isShowPop = false;
},
openPop() {
this.isShowPop = true;
},
selectPayType(value) {
this.queryParams.payType = value;
},
selectInspectionStatus(value) {
this.queryParams.chooseStatus = value;
},
async getCustomerSource() {
let res = await request({
url: '/partnerOwn/partner/getCustomerSource',
method: 'get',
})
this.customerSource = res.data
//
let resx = await request({
url: '/system/inspectionGoods/partnerGoodsListCol',
method: 'get',
})
this.goodsList = resx.data.goodsList
},
handleCustomerSourceConfirm(e) {
this.queryParams.customerSource = e.value[0].value; //
this.isShowCustomer = false; //
},
handleGoodsConfirm(e) {
this.queryParams.goods = e.value[0].value; //
this.goodsName = e.value[0].label; //
this.isShowGoods = false; //
},
search() {
this.getTableData();
this.isShowPop = false;
},
clearCustomerSource() {
this.$nextTick(() => {
this.queryParams.customerSource = null; //
})
},
handleClick() {
if (this.queryParams.customerSource) {
this.clearCustomerSource();
} else {
this.isShowCustomer = true;
}
},
handleGoodsClick() {
if (this.queryParams.goods) {
this.queryParams.goods = null;
this.goodsName = null
} else {
this.isShowGoods = true;
}
},
confirmTime(e) {
const time = formatDate(e.value)
this.queryParams.startTime = time
this.queryParams.endTime = time
this.getTableData()
this.show = false
},
cleanSelectTime() {
this.queryParams.startTime = null
this.queryParams.endTime = null
this.getTableData()
},
clearSelection() {
this.queryParams = {
queryTime: null,
pageNum: 1,
pageSize: 10,
chooseStatus: "1",
payType: "",
startTime: null,
endTime: null,
carModelOrCarYear: null,
customerSource: null,
goods: null,
carYear: 0,
}
this.getTableData()
this.isShowPop = false
},
// disabledScroll(){
// const container = document.querySelector('.content'); content.scrollTop = 0;
// console.log('container',container)
// },
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
box-sizing: border-box;
padding-top: 200rpx;
background: #f4f5f6;
height: 100vh;
}
.container {
box-sizing: border-box;
background: #f4f5f6;
}
.t_left {
width: 200rpx;
border: 2px solid #327DFB;
background: #e3ecfb;
color: #327DFB;
font-size: 28rpx;
box-sizing: border-box;
padding: 5px 10px;
border-radius: 50px;
display: flex;
align-items: center;
justify-content: center;
margin: 30rpx;
}
.title_ {
display: flex;
align-items: center;
font-weight: 400;
font-size: 32rpx;
color: #101A3E;
padding-left: 15rpx;
}
.box_ {
margin-bottom: 30rpx;
}
.box_cont {
box-sizing: border-box;
padding: 30rpx;
border-radius: 8px;
background: #fff;
width: 100%;
margin-top: 30rpx;
}
.d_s {
display: flex;
align-items: center;
}
.d_b {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
}
.num_ {
width: 36rpx;
height: 36rpx;
background: #327DFB;
color: #fff;
display: flex;
align-items: center;
border-radius: 50%;
justify-content: center;
margin-right: 10px;
}
.name_ {
margin-right: 10px;
font-size: 32rpx;
color: #101A3E;
}
.icon_ {
background: #e3ecfb;
color: #327DFB;
font-size: 28rpx;
box-sizing: border-box;
padding: 5rpx 20rpx;
border-radius: 50px;
display: flex;
align-items: center;
justify-content: center;
}
.h_ {
font-size: 28rpx;
color: #8D90A6;
}
.n_ {
font-size: 28rpx;
color: #101A3E;
display: inline-block;
max-width: 3em; /* 约等于4个汉字的宽度 */
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.box_hang {
box-sizing: border-box;
padding-bottom: 20rpx;
border-bottom: 2rpx solid #F5F5F5;
margin-bottom: 20rpx;
}
.popup-content {
padding: 20rpx;
background: white;
border-radius: 20rpx;
//height: 80vh;
}
.popup-header {
font-size: 32rpx;
color: #101A3E;
margin-bottom: 40rpx;
display: flex;
justify-content: space-between;
}
.popup-body {
font-size: 28rpx;
color: #101A3E;
}
.filter-section {
margin-top: 30rpx;
}
.filter-section text {
display: block;
margin-bottom: 10rpx;
}
.options {
display: flex;
flex-wrap: wrap;
align-items: center;
//justify-content: space-between;
margin-top: 30rpx;
}
.options text {
margin-right: 20rpx;
margin-bottom: 10rpx;
}
.popup-footer {
display: flex;
justify-content: space-between;
margin-top: 60rpx;
margin-bottom: 30rpx;
}
.popup-footer button {
padding: 10rpx 20rpx;
margin: 0 10rpx;
border-radius: 5px;
background-color: #327DFB;
color: #fff;
border: none;
}
.options_content {
background: #F7F8FC;
border-radius: 15rpx;
width: 210rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
border: 2rpx solid transparent;
margin-top: 10rpx;
transition: all 0.3s ease;
&.selected {
border-color: #327DFB;
background-color: rgba(50, 125, 251, 0.1);
color: #327DFB;
}
}
.filter-section .options u-icon {
margin-left: 10rpx;
}
.top_ {
display: flex;
justify-content: space-between;
align-items: center;
//position: fixed;
//background: coral;
width: 100%;
//margin-bottom: 1rpx;
}
</style>

View File

@ -39,7 +39,8 @@
<input type="text" v-model="item.dealUserName" placeholder="请选择检测人员">
</view>
</view>
<u-picker :show="item.show" :columns="columns" @confirm="confirms(item, $event)" @cancel="cancels(item)" :title="'选择'+item.projectName+'的检测人员'"
<u-picker :show="item.show" :columns="columns" @confirm="confirms(item, $event)" @cancel="cancels(item)"
:title="'选择'+item.projectName+'的检测人员'"
:key="index"
keyName="nickname"></u-picker>
<view class="xb_" v-if="index != selectProject.length - 1 "></view>
@ -203,6 +204,7 @@ export default {
display: flex;
flex-wrap: wrap;
}
.xixi {
font-size: 12px;
color: #0D2E8D;

View File

@ -48,20 +48,31 @@
<uni-icons type="right" color="#999999" size="16"></uni-icons>
</view>
</view>
</view>
<view class="ian-box">
<view class="on-input" @click="goWord()">
<view class="on-input" @click="goWorkReport()">
<view class="dix">
<view class="d-icon">
<image src="../../static/detection/zhaq.png" mode=""></image>
</view>
<view class="aa">word</view>
<view class="aa">工作汇报</view>
</view>
<view class="">
<uni-icons type="right" color="#999999" size="16"></uni-icons>
</view>
</view>
</view>
<!-- <view class="ian-box">-->
<!-- <view class="on-input" @click="goWord()">-->
<!-- <view class="dix">-->
<!-- <view class="d-icon">-->
<!-- <image src="../../static/detection/zhaq.png" mode=""></image>-->
<!-- </view>-->
<!-- <view class="aa">word</view>-->
<!-- </view>-->
<!-- <view class="">-->
<!-- <uni-icons type="right" color="#999999" size="16"></uni-icons>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<view class="ian-box">
<!-- <view class="on-input">
<view class="dix">
@ -195,6 +206,11 @@ export default {
url: "/pages/staff/goRoyalty"
})
},
goWorkReport() {
uni.navigateTo({
url: "/pages/manage/workReport/reportList"
})
},
goWord() {
request({
url: '/system/info/exportWord',

View File

@ -10,7 +10,10 @@
<uni-icons type="search" color="#BCBCBC" size="22"></uni-icons>
<input type="text" v-model="carNum" placeholder="搜索车牌号.....">
</view>
<view class="sou" @click="getList()">搜索</view>
<view class="icon1" @click="goNotice()">
<image src="/static/imgs/staffxiaoxi.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
<view class="msg-num" v-if="noReadNum>0">{{ noReadNum }}</view>
</view>
</view>
<view class="tap">
<scroll-view scroll-x="true" style="width: 100%;">
@ -140,6 +143,7 @@ export default {
msg: '1',
carNum: '',
pageNum: 1,//
noReadNum: 1,
pageSize: 20,//
totalPages: 0,//
// tapList: [
@ -198,6 +202,7 @@ export default {
onLoad() {
this.$startSocketConnect(uni.getStorageSync('userId'))
this.msgInfo()
this.getWarnCount()
},
onShow() {
this.getList()
@ -234,6 +239,21 @@ export default {
this.countMap = new Map(Object.entries(res.data))
})
},
getWarnCount() {
request({
url: '/warnMsg/warnMsg/getCount',
method: 'get',
}).then(res => {
if (res.data) {
this.noReadNum = res.data
}
})
},
goNotice() {
uni.navigateTo({
url: '/pages/xiaoxi/notice?type=staff'
})
},
confirms(e) {
this.takingData.workNodeId = e.value[0].value
this.show = false
@ -661,4 +681,24 @@ export default {
border-radius: 20rpx; /* 椭圆效果 */
white-space: nowrap; /* 确保文本不换行 */
}
.icon1 {
position: relative;
width: 56rpx;
height: 56rpx;
//margin-left: 30rpx;
.msg-num {
position: absolute;
right: -15rpx;
color: white;
background: #d74a43;
width: 35rpx;
height: 35rpx;
line-height: 35rpx;
text-align: center;
font-weight: 800;
font-size: 11px;
border-radius: 50%;
top: -15rpx;
}
}
</style>

View File

@ -0,0 +1,813 @@
<template>
<view class="content">
<headersVue :titles="titles">
<u-icon name="arrow-left" color="#fff" size="18"></u-icon>
</headersVue>
<view class="container">
<view class="title_">检测数量统计</view>
<view class="box_">
<uni-datetime-picker v-model="ranges" type="daterange" @maskClick="maskClick"/>
<view class="d_b"
style="border-top: 1px solid #F5F5F5; margin-top: 30rpx;box-sizing: border-box;padding-top: 30rpx;">
<view class="three_" @click="goOrderList">
<view class="text_">订单数量</view>
<view class="">{{ data2.allNum || 0 }}</view>
</view>
<view class="three_">
<view class="text_">完成数量</view>
<view class="">{{ data2.ywcNum || 0 }}</view>
</view>
<view class="three_">
<view class="text_">检测中数量</view>
<view class="">{{ data2.jxzNum || 0 }}</view>
</view>
</view>
</view>
<view class="title_">营业额统计</view>
<view class="box_">
<uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick"/>
<view class="d_b"
style="border-top: 1px solid #F5F5F5; margin-top: 30rpx;box-sizing: border-box;padding-top: 30rpx;">
<view class="four_">
<view class="text_">公示价格</view>
<view class="">{{ data1.gsAmount || 0 }}</view>
</view>
<view class="four_">
<view class="text_">应收款</view>
<view class="">{{ data1.ysAmount || 0 }}</view>
</view>
<view class="four_">
<view class="text_">已收款</view>
<view class="">{{ data1.yjsAmount || 0 }}</view>
</view>
<view class="four_">
<view class="text_">待收款</view>
<view class="">{{ data1.ysAmount - data1.yjsAmount || 0 }}</view>
</view>
</view>
</view>
<view class="title_">客户来源统计</view>
<view class="box_" v-if="data3.length > 0">
<view class="box_top">
<view class="l_">客户来源</view>
<view class="n_">数量</view>
<view class="r_">公示金额</view>
</view>
<view class="box_cont" v-for="(item,index) in data3">
<view class="hang_">
<view class="l_">
<view :class="'jt_' + (index % 4)">{{ item.remark || '' }}</view>
</view>
<view class="n_">{{ item.theNum || '' }}</view>
<view class="r_">{{ item.theAmount || '' }}</view>
</view>
</view>
</view>
<view class="box_" v-else>
暂无数据
</view>
<view class="title_d">检测车型统计
<view class="sm_" @click="goxiangqing(2)">更多 ></view>
</view>
<view class="box_">
<view class="d_b" v-if="data4.length > 0">
<view class="four_t" v-for="(item,index) in data4">
<view class="text_">{{ item.goodsTitle || '' }}</view>
<view class="">{{ item.theNum || '' }}</view>
</view>
</view>
<view class="d_b" v-else>
暂无数据
</view>
</view>
<view class="title_d">检测类型统计
<view class="sm_" @click="goxiangqing(4)">更多 ></view>
</view>
<view class="box_">
<view class="d_b" style="display: flex; flex-wrap: wrap;" v-if="skuList.length > 0">
<view class="three_" v-for="(skuData) in skuList">
<view class="text_">{{ skuData.skuName }}</view>
<view class=""> {{ skuData.orderCount || 0 }}</view>
</view>
</view>
<view class="d_b" v-else>
暂无数据
</view>
</view>
<view class="title_d">代收款
<view class="sm_" @click="goxiangqing(3)">更多 ></view>
</view>
<view class="box_" v-if="data5.length == 0">暂无数据</view>
<view class="sys" v-for="(item) in data5" v-else>
<view class="t-title">{{ item.theName || '' }}</view>
<view class="t-num">{{ item.theAmount || '' }}</view>
</view>
<view class="title_">成交金额已收款</view>
<view class="box_">
<qiun-data-charts type="area" :opts="opts" :ontouch='true' :chartData="chartData"/>
</view>
<view class="title_">检测数量</view>
<view class="box_">
<qiun-data-charts type="area" :opts="opts2" :chartData="chartData1"/>
</view>
<view class="title_">已收款金额</view>
<view class="box_">
<qiun-data-charts type="line" :opts="opts1" :chartData="chartData2"/>
</view>
</view>
<u-datetime-picker :show="show" v-model="value1" mode="date"></u-datetime-picker>
</view>
</template>
<script>
import headersVue from '../../components/header/headers.vue';
import request from "@/utils/request";
export default {
data() {
return {
data1: '',
data2: '',
data3: [],
data4: '',
data5: '',
range: ['2023-9-28', '2023-10-7'],
ranges: ['2023-9-28', '2023-10-7'],
//
skuList: [],
unit: 'week',
unit1: 'week',
unit2: 'week',
titles: "业务统计",
value1: Number(new Date()),
List: [],
show: false,
status: 'loading',
chartData: {},
chartData1: {},
chartData2: {},
// config-ucharts.js ['area'] opts opts
opts: {
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
"#ea7ccc"
],
padding: [15, 15, 0, 15],
enableScroll: false,
legend: {},
xAxis: {
disableGrid: true,
labelCount: 4, //
},
yAxis: {
gridType: "dash",
dashLength: 2
},
extra: {
area: {
type: "curve",
opacity: 0.2,
addLine: true,
width: 2,
gradient: true,
activeType: "hollow"
}
}
},
opts1: {
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
"#ea7ccc"
],
padding: [15, 10, 0, 15],
enableScroll: false,
legend: {},
xAxis: {
disableGrid: true,
labelCount: 3, //
},
yAxis: {
gridType: "dash",
dashLength: 2
},
extra: {
line: {
type: "straight",
width: 2,
activeType: "hollow"
}
}
},
opts2: {
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
"#ea7ccc"
],
padding: [15, 15, 0, 15],
enableScroll: false,
legend: {},
xAxis: {
disableGrid: true,
labelCount: 1, //
},
yAxis: {
gridType: "dash",
dashLength: 4
},
extra: {
area: {
type: "curve",
opacity: 0.2,
addLine: true,
width: 2,
gradient: true,
activeType: "hollow"
}
}
},
}
},
components: {
headersVue
},
mounted() {
// this.getServerData();
},
watch: {
range(newval) {
this.getfive()
},
ranges(newval) {
this.getfive()
},
},
onLoad() {
this.gettime()
this.partnerId = uni.getStorageSync('partnerId')
// this.getServerData();
this.getServerData1();
this.getServerData2();
this.getServerData3();
this.chartLineInspectionAmount()
this.chartLineInspectionNum()
this.getInspectionSku()
// this.sanxiang()
this.getfive()
},
methods: {
getServerData() {
//
setTimeout(() => {
//
let res = {
categories: ["2018", "2019", "2020", "2021", "2022", "2023"],
series: [{
name: "近7天",
data: [35, 8, 25, 37, 4, 20]
},
],
xAxis: {
disableGrid: true, // ()
scrollShow: true, //
scrollColor: '#08B66D',
itemCount: 6, // x
fontColor: '#8C8C8C',
axisLineColor: "#828282",
gridColor: "#828282",
// x
rotateLabel: true
},
};
let res1 = {
categories: ["2018", "2019", "2020", "2021", "2022", "2023"],
series: [{
name: "总数量",
data: [35, 8, 25, 37, 4, 20]
},
{
name: "合格数",
data: [100, 80, 95, 150, 112, 132]
}
]
};
let res2 = {
categories: ["2018", "2019", "2020", "2021", "2022", "2023"],
series: [{
name: "小型汽车",
data: [35, 8, 25, 37, 4, 20]
},
{
name: "中型汽车",
data: [70, 40, 65, 100, 44, 68]
},
{
name: "大型汽车",
data: [100, 80, 95, 150, 112, 132]
}
]
};
// this.chartData = JSON.parse(JSON.stringify(res));
// this.chartData1 = JSON.parse(JSON.stringify(res1));
// this.chartData2 = JSON.parse(JSON.stringify(res2));
}, 500);
},
goCustomerDetail(remark) {
uni.navigateTo({
url: '/pages/statistics/statislist?id=1&remark=' + remark
})
},
gettime() {
//
var now = new Date();
//
var year = now.getFullYear();
//
var month = now.getMonth() + 1; // 0 1
if (month < 10) {
var month = "0" + month
}
//
var date = now.getDate();
//
var currentTime = year + '-' + month + '-' + date
this.range[0] = currentTime
this.range[1] = currentTime
this.ranges[0] = currentTime
this.ranges[1] = currentTime
},
//
async getfive() {
let data1 = {
startTime: this.range[0],
endTime: this.range[1]
}
let res1 = await request({
url: '/partnerOwn/partner/staticsTable1',
method: 'get',
params: data1
})
this.data1 = res1.data
// 2
let data2 = {
startTime: this.ranges[0],
endTime: this.ranges[1]
}
let res2 = await request({
url: '/partnerOwn/partner/staticsTable2',
method: 'get',
params: data2
})
this.data2 = res2.data
// 3
let data3 = {
startTime: '',
endTime: ''
}
let res3 = await request({
url: '/partnerOwn/partner/staticsTable3',
method: 'get',
params: data3
})
this.data3 = res3.data
// 4
let data4 = {
startTime: '',
endTime: ''
}
let res4 = await request({
url: '/partnerOwn/partner/staticsTable4',
method: 'get',
params: data4
})
this.data4 = res4.data
// 5
let data5 = {
startTime: '',
endTime: ''
}
let res5 = await request({
url: '/partnerOwn/partner/staticsTable5',
method: 'get',
params: data5
})
this.data5 = res5.data
},
//
goxiangqing(id) {
uni.navigateTo({
url: '/pages/statistics/statislist?id=' + id
})
},
goOrderList() {
uni.navigateTo({
url: '/pages/index/ordermanage'
})
},
//
getInspectionSku() {
let data = {
// partnerId: this.partnerId,
// unit: this.unit,
}
request({
url: '/partnerOwn/partner/queryInspectionSkuList',
method: 'get',
// params: data
}).then((res) => {
this.skuList = res.data
})
},
maskClick(e) {
},
// 线
async chartLineInspectionAmount() {
let data = {
partnerId: this.partnerId,
unit: this.unit,
}
let rex = await request({
url: '/partnerOwn/partner/chartLineInspectionAmount',
method: 'get',
params: data
})
let res = rex.data
this.chartData = JSON.parse(JSON.stringify(res));
this.opts.xAxis.itemCount = res.categories.length //x
},
// 线
async chartLineInspectionNum() {
let data = {
partnerId: this.partnerId,
unit: this.unit,
}
let rex = await request({
url: '/partnerOwn/partner/chartLineInspectionNum',
method: 'get',
params: data
})
let res = rex.data
this.chartData1 = JSON.parse(JSON.stringify(res));
},
gbindex(index, unit) {
this.qhindex = index
this.unit = unit
this.getServerData1()
},
gbindex1(index, unit) {
this.qhindex1 = index
this.unit1 = unit
this.getServerData2()
},
gbindex2(index, unit) {
this.qhindex2 = index
this.unit2 = unit
this.getServerData3()
},
getback() {
uni.navigateBack()
},
xinxuanze(name) {
this.name = name
this.xling = false
this.getServerData1()
},
async sanxiang() {
let res = await request({
url: '/partnerOwn/partner/statisticsInfo?partnerId=' + this.partnerId,
method: 'get',
})
let nums = {
orderAmount: Math.trunc(res.data.orderAmount / 100),
orderNum: res.data.orderNum,
todayOrderAmount: res.data.todayOrderAmount / 100,
todayOrderNum: res.data.todayOrderNum,
workedNum: res.data.workedNum,
workingNum: res.data.workingNum
}
this.threenum = nums
},
async getstatisticsTop() {
let res = await request({
url: '/appInspection/order/statisticsTop',
method: 'get',
})
// this.chartData.series[0].data = res.data.list
},
async getstatisticsMid() {
let res = await request({
url: '/appInspection/order/statisticsMid',
method: 'get',
})
this.carlist = res.data
},
async getgetPartnerList() {
let data = {
partnerName: this.searchValue
}
let res = await request({
url: '/appInspection/order/getPartnerList',
method: 'get',
params: data
})
this.qubu = res.data
},
async getstatisticsZXT() {
let data = {
partnerId: this.partnerId,
type: this.value
}
let res = await request({
url: '/appInspection/order/statisticsZXT',
method: 'get',
params: data
})
},
async getstatisticsOrder() {
let res = await request({
url: '/appInspection/order/statisticsOrder',
method: 'get',
})
this.phb = res.data
},
// 123123
closexl(e) {
this.xling = false
},
openxl(e) {
},
//
async getServerData1() {
let data = {
partnerId: this.partnerId,
unit: this.unit,
}
let rex = await request({
url: '/partnerOwn/partner/chartInfoAmount',
method: 'get',
params: data
})
let res = rex.data
this.chartData2 = JSON.parse(JSON.stringify(res));
this.opts1.xAxis.itemCount = res.categories.length
},
//
async getServerData2() {
let data = {
partnerId: this.partnerId,
unit: this.unit1,
}
let rex = await request({
url: '/partnerOwn/partner/chartInfoNum',
method: 'get',
params: data
})
let res = rex.data
this.chartData2 = JSON.parse(JSON.stringify(res));
},
//
async getServerData3() {
let data = {
partnerId: this.partnerId,
unit: this.unit2,
}
let rex = await request({
url: '/partnerOwn/partner/chartInfoRatio',
method: 'get',
params: data
})
let res = rex.data
this.chartData3 = JSON.parse(JSON.stringify(res));
},
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
box-sizing: border-box;
padding-top: 200rpx;
background: #f4f5f6;
height: 100vh;
}
.container {
box-sizing: border-box;
padding: 30rpx;
background: #f4f5f6;
}
.title_ {
font-size: 32rpx;
color: #101A3E;
margin: 30rpx 0px;
}
.title_d {
font-size: 32rpx;
color: #101A3E;
margin: 30rpx 0px;
display: flex;
justify-content: space-between;
}
.box_ {
width: 100%;
box-sizing: border-box;
padding: 10px;
background: #FFFFFF;
border-radius: 12rpx;
}
.box_cont {
box-sizing: border-box;
padding: 20rpx;
background: #F7F8FC;
border-radius: 0rpx 0rpx 12rpx 12rpx;
}
.sm_ {
font-size: 24rpx;
color: #8D90A6;
}
.hang_ {
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 15rpx 0px;
margin: 15rpx 0rpx;
border-bottom: 1px solid #E3ECFB;
font-size: 32rpx;
color: #101A3E;
}
.box_top {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24rpx;
color: #101A3E;
box-sizing: border-box;
padding: 20rpx;
background: #F7F8FC;
border-radius: 12rpx 12rpx 0rpx 0rpx;
}
.d_b {
display: flex;
align-items: center;
justify-content: space-between;
}
.d_s {
display: flex;
align-items: center;
}
.icon_ {
width: 38rpx;
height: 38rpx;
image {
width: 100%;
height: 100%;
}
}
.three_ {
width: 196rpx;
height: 116rpx;
background: #F7F8FC;
text-align: center;
font-size: 24rpx;
color: #101A3E;
margin-bottom: 10rpx;
}
.three_k {
width: 196rpx;
height: 116rpx;
}
.four_ {
width: 142rpx;
height: 116rpx;
background: #F7F8FC;
text-align: center;
font-size: 24rpx;
color: #101A3E;
}
.four_t {
width: 142rpx;
height: 190rpx;
box-sizing: border-box;
padding: 15rpx;
background: #F7F8FC;
text-align: center;
font-size: 24rpx;
color: #101A3E;
}
.text_ {
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.l_ {
width: 33%;
}
.n_ {
width: 33%;
text-align: center;
}
.r_ {
width: 33%;
text-align: right;
}
.jt_0 {
width: 144rpx;
height: 48rpx;
background: #f6f0e5;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #101A3E;
border-radius: 8px;
}
.jt_1 {
width: 144rpx;
height: 48rpx;
background: #e6e6f9;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #101A3E;
border-radius: 8px;
}
.jt_2 {
width: 144rpx;
height: 48rpx;
background: #e2ebfb;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #101A3E;
border-radius: 8px;
}
.jt_3 {
width: 144rpx;
height: 48rpx;
background: #e4eff1;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #101A3E;
border-radius: 8px;
}
.charts-box {
width: 100%;
height: 452rpx;
}
</style>

View File

@ -1,15 +1,8 @@
<template>
<view class="content">
<view class="c-top">
<view class="" @click="getback()">
<uni-icons type="left" size="18"></uni-icons>
</view>
<view class="c-title" v-if="id == 1">客户来源统计</view>
<view class="c-title" v-if="id == 2">检测车型统计</view>
<view class="c-title" v-if="id == 3">代收款</view>
<view class="c-title" v-if="id == 4">检测类型统计</view>
<view class=""></view>
</view>
<headersVue :titles="titles" style="position: static !important;">
<u-icon name="arrow-left" color="#fff" size="18"></u-icon>
</headersVue>
<view class="ail">
<view class="ahhh">
<uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick"/>
@ -117,14 +110,17 @@
<script>
import config from '@/config'
import request from '../../utils/request';
import headersVue from "@/components/header/headers.vue";
export default {
components: {headersVue},
data() {
return {
id: 1,
datas: [],
remark: '未知类别',
range: ['2023-9-28', '2023-10-7'],
titles:''
}
},
@ -139,6 +135,9 @@ export default {
if (this.id == 3) {
this.getthree()
}
if (this.id == 4) {
this.getfour()
}
},
},
onLoad(option) {
@ -147,15 +146,19 @@ export default {
if (this.id == 1) {
this.remark = option.remark
this.getone()
this.titles = '客户来源统计'
}
if (this.id == 2) {
this.gettwo()
this.titles = '检测车型统计'
}
if (this.id == 3) {
this.getthree()
this.titles = '代收款'
}
if (this.id == 4) {
this.getfour()
this.titles = '检测类型统计'
}
},
onShow() {
@ -254,7 +257,7 @@ export default {
.content {
width: 100%;
height: calc(100vh);
background-color: #F6F6F6;
background-color: #F7F8FC;
box-sizing: border-box;
// padding-top: 45px;
}

View File

@ -42,7 +42,7 @@
<!-- 底部 -->
<view style="width: 100%; height: 50px;"></view>
<tabBar :msg="msg "></tabBar>
<tabBar :msg="msg " v-if="showTabBar"></tabBar>
</view>
</template>
@ -79,6 +79,7 @@ export default {
pageSize: 20,//
totalPages: 0,//
baseImageUrl: this.$baseImageUrl,
showTabBar:true,
}
},
components: {
@ -101,6 +102,9 @@ export default {
this.getlistindex()
this.getIfSend()
}
if (data.type && data.type === 'staff') {
this.showTabBar = false
}
},
methods: {
setIndex(num) {

BIN
static/imgs/clone.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 B

BIN
static/imgs/rq.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1018 B

BIN
static/imgs/staffxiaoxi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB