589 lines
21 KiB
Vue
589 lines
21 KiB
Vue
<template>
|
||
<div class="dashboard-container">
|
||
|
||
|
||
<!-- <el-row :gutter="10" >
|
||
<el-col :xs="3" :sm="3" :md="3" :lg="3" :xl="3">
|
||
<el-card class="quick-link-box" shadow="hover">
|
||
<router-link to="/user/profile" class="quick-link-wrapper">
|
||
<i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3"></i>
|
||
<div class="quick-link-title">采购单</div>
|
||
</router-link>
|
||
</el-card>
|
||
</el-col>
|
||
<el-col :xs="3" :sm="3" :md="3" :lg="3" :xl="3">
|
||
<el-card class="quick-link-box" shadow="hover">
|
||
<router-link to="/user/profile" class="quick-link-wrapper">
|
||
<i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3"></i>
|
||
<div class="quick-link-title">入库单</div>
|
||
</router-link>
|
||
</el-card>
|
||
</el-col>
|
||
<el-col :xs="3" :sm="3" :md="3" :lg="3" :xl="3">
|
||
<el-card class="quick-link-box" shadow="hover">
|
||
<router-link to="/user/profile" class="quick-link-wrapper">
|
||
<i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3"></i>
|
||
<div class="quick-link-title">订单配货</div>
|
||
</router-link>
|
||
</el-card>
|
||
</el-col>
|
||
<el-col :xs="3" :sm="3" :md="3" :lg="3" :xl="3">
|
||
<el-card class="quick-link-box" shadow="hover">
|
||
<router-link to="/user/profile" class="quick-link-wrapper">
|
||
<i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3"></i>
|
||
<div class="quick-link-title">入库</div>
|
||
</router-link>
|
||
</el-card>
|
||
</el-col>
|
||
<el-col :xs="3" :sm="3" :md="3" :lg="3" :xl="3">
|
||
<el-card class="quick-link-box" shadow="hover">
|
||
<router-link to="/user/profile" class="quick-link-wrapper">
|
||
<i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3"></i>
|
||
<div class="quick-link-title">出库</div>
|
||
</router-link>
|
||
</el-card>
|
||
</el-col>
|
||
<el-col :xs="3" :sm="3" :md="3" :lg="3" :xl="3">
|
||
<el-card class="quick-link-box" shadow="hover">
|
||
<router-link to="/user/profile" class="quick-link-wrapper">
|
||
<i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3"></i>
|
||
<div class="quick-link-title">财务</div>
|
||
</router-link>
|
||
</el-card>
|
||
</el-col>
|
||
<el-col :xs="3" :sm="3" :md="3" :lg="3" :xl="3">
|
||
<el-card class="quick-link-box" shadow="hover">
|
||
<router-link to="/user/profile" class="quick-link-wrapper">
|
||
<i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3"></i>
|
||
<div class="quick-link-title">清关</div>
|
||
</router-link>
|
||
</el-card>
|
||
</el-col>
|
||
<el-col :xs="3" :sm="3" :md="3" :lg="3" :xl="3">
|
||
<el-card class="quick-link-box" shadow="hover">
|
||
<router-link to="/user/profile" class="quick-link-wrapper">
|
||
<i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3"></i>
|
||
<div class="quick-link-title">运输</div>
|
||
</router-link>
|
||
</el-card>
|
||
</el-col>
|
||
</el-row> -->
|
||
|
||
<el-row :gutter="10" >
|
||
<el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
|
||
|
||
<CardWithHeader header="当日开单统计" height="146px" >
|
||
<template v-slot:body>
|
||
<div class="h-overview">
|
||
<el-row>
|
||
<el-col :span="5">
|
||
<div class="count">
|
||
<span @click="goRouter('/')" style="color: blue;">
|
||
{{queryStatInfoMap?queryStatInfoMap.totalNum:0}}
|
||
<span style="color: gray;font-size: 14px;">票</span>
|
||
</span>
|
||
<!-- <span @click="goRouter('/')">
|
||
{{queryStatInfoMap?queryStatInfoMap.totalNum:0}} <span>当月</span>
|
||
</span> -->
|
||
</div>
|
||
<!-- <i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3;font-size: 25px;"></i> -->
|
||
<div class="title">当日票数</div>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<div class="count" style="color: red;">
|
||
<span @click="goRouter('/websites')"><span style="color: gray;font-size: 14px;">¥</span>{{queryStatInfoMap?queryStatInfoMap.totalFreight:0}}
|
||
</span>
|
||
</div>
|
||
<div class="title">总运费</div>
|
||
</el-col>
|
||
<el-col :span="4">
|
||
<div class="count">
|
||
<span @click="goRouter('/')">{{queryStatInfoMap?queryStatInfoMap.totalBillWeight:0}}
|
||
<span style="color: gray;font-size: 14px;">kg</span>
|
||
</span>
|
||
</div>
|
||
<!-- <i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3;font-size: 25px;"></i> -->
|
||
<div class="title">实际重量</div>
|
||
</el-col>
|
||
<el-col :span="4">
|
||
<div class="count">
|
||
<span @click="goRouter('/')">{{queryStatInfoMap?queryStatInfoMap.totalVolume:0}}
|
||
<span style="color: gray;font-size: 14px;">m³</span>
|
||
</span>
|
||
</div>
|
||
<!-- <i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3;font-size: 25px;"></i> -->
|
||
<div class="title">体积</div>
|
||
</el-col>
|
||
<el-col :span="4">
|
||
<div class="count">
|
||
<span @click="goRouter('/websites')">{{queryStatInfoMap?queryStatInfoMap.totalSettlementWeight:0}}</span>
|
||
<span style="color: gray;font-size: 14px;">kg</span>
|
||
</div>
|
||
<div class="title">结算重量</div>
|
||
</el-col>
|
||
|
||
<!-- <el-col :span="6">
|
||
<LineChart :chart-data="lineChartData" />
|
||
</el-col> -->
|
||
</el-row>
|
||
</div>
|
||
</template>
|
||
|
||
</CardWithHeader>
|
||
|
||
<CardWithHeader header="快捷方式" height="136px" >
|
||
<template v-slot:body>
|
||
<div style="display: flex;justify-content: flex-start;flex-flow:row wrap ">
|
||
<router-link class="quick-link-wrapper" v-for="(quickItem,index) in quickActionList" :key="index" :to="quickItem.path">
|
||
<div class="quick-link-title">{{ quickItem.title }}</div>
|
||
</router-link>
|
||
<!-- <el-button size="medium" type="text" style="color: #b12e29;font-weight: 500;text-decoration: underline;" plain v-for="(quickItem,index) in quickActionList" :key="index" @click="change(quickItem)"><span>{{ quickItem.title }}</span></el-button> -->
|
||
</div>
|
||
</template>
|
||
</CardWithHeader>
|
||
|
||
<!-- <CardWithHeader header="待办提醒" height="146px">
|
||
<template v-slot:body>
|
||
<QuickLink ></QuickLink>
|
||
</template>
|
||
</CardWithHeader> -->
|
||
|
||
|
||
|
||
<CardWithHeader header="回款提成统计" height="146px" >
|
||
<template v-slot:body>
|
||
<div class="h-overview">
|
||
<el-row>
|
||
<el-col :span="6">
|
||
<div class="count">
|
||
<span @click="goRouter('/')">0/0</span>
|
||
</div>
|
||
<!-- <i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3;font-size: 25px;"></i> -->
|
||
<div class="title">未回款:票数/金额</div>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<div class="count">
|
||
<span @click="goRouter('/')">0/0</span>
|
||
</div>
|
||
<!-- <i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3;font-size: 25px;"></i> -->
|
||
<div class="title">未开票:票数/金额</div>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<div class="count">
|
||
<span @click="goRouter('/')">0</span>
|
||
</div>
|
||
<!-- <i class="icon iconfont icon-RectangleCopy141" style="color:#2296f3;font-size: 25px;"></i> -->
|
||
<div class="title">当月计提</div>
|
||
</el-col>
|
||
</el-row>
|
||
</div>
|
||
</template>
|
||
|
||
</CardWithHeader>
|
||
|
||
<!-- <CardWithHeader header="日单量趋势(最近15天)" height="400px">
|
||
<template v-slot:body>
|
||
<LineChart :chart-data="lineChartData" />
|
||
</template>
|
||
</CardWithHeader> -->
|
||
|
||
<CardWithHeader header="日单量趋势(最近15天)" height="400px">
|
||
<template v-slot:body>
|
||
<LineOrderChart :chart-data="orderStateData" />
|
||
</template>
|
||
</CardWithHeader>
|
||
|
||
|
||
<!-- <CardWithHeader header="营业收入" style="margin-top: 20px; margin-bottom: 20px">
|
||
<template v-slot:body>
|
||
<v-charts
|
||
height="383px"
|
||
id="networkChart"
|
||
type="line"
|
||
:option="chartsOption['networkChart']"
|
||
:dataZoom="true"
|
||
/>
|
||
</template>
|
||
</CardWithHeader> -->
|
||
</el-col>
|
||
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
|
||
|
||
<el-card class="box-card" shadow="hover">
|
||
<div class="flex items-center" >
|
||
<!-- <div>
|
||
<el-avatar circle :size="64" :src="avatar" />
|
||
</div> -->
|
||
<!-- <div style="flex: 1;padding-left: 12px;box-sizing: border-box;"> -->
|
||
<div style="flex: 1;padding-left: 0px;box-sizing: border-box;">
|
||
<div class="head-title" >Hi,{{ownerSiteName}} {{nickName}},欢迎您!</div>
|
||
<!-- <div class="head-sub-title">有问题可直接联系客服。</div> -->
|
||
</div>
|
||
</div>
|
||
<!-- <div style="display:inline-flex;width:100%;margin-top:10px" >
|
||
<div style="width: 50%;">
|
||
<span style="font-size: 14px;">预估提成(元)</span>
|
||
<div style="margin-top: 10px;font-size: 13px;font-weight: 500;">
|
||
<span @click="goRouter('/websites')">¥5000.00</span>
|
||
</div>
|
||
</div>
|
||
<div style="width: 50%;">
|
||
<span style="font-size: 14px;">待回款(元)</span>
|
||
<div style="margin-top: 10px;font-size: 13px;font-weight: 500;">
|
||
<span @click="goRouter('/websites')">¥100000.00</span>
|
||
</div>
|
||
</div>
|
||
</div> -->
|
||
<!-- <div style="margin-top: 10px;" >
|
||
<el-button
|
||
:loading="loading"
|
||
size="medium"
|
||
type="primary"
|
||
style="width:30%;"
|
||
>
|
||
<span>立即充值</span>
|
||
</el-button>
|
||
</div> -->
|
||
|
||
</el-card>
|
||
|
||
<!-- <CardWithHeader header="财务概览" isLinearBg="true">
|
||
<template v-slot:body>
|
||
|
||
</template>
|
||
</CardWithHeader> -->
|
||
|
||
<!-- @click="goRouter(item.clickPath)" -->
|
||
|
||
<CardWithHeader header="最新消息">
|
||
<template v-slot:body>
|
||
<div class="xd-notice-list">
|
||
<div v-for="(item, index) in noticeList" :key="index" class="xd-home-notice-item">
|
||
<div class="xd-item-content" >
|
||
<div class="ele-text-secondary ele-elip notice-time" style="display: inline-flex;width: 100%;">
|
||
<div style="text-align: left;width: 70%">
|
||
<router-link :key="index" :to="item.clickPath">
|
||
<div >{{ item.noticeTitle }}</div>
|
||
</router-link>
|
||
</div>
|
||
<div style="text-align: left;width: 30%;font-size: 12px;color:gray;font-weight: 600;">{{ parseTime(item.createTime, '{y}-{m}-{d}') }} </div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
</CardWithHeader>
|
||
<CardWithHeader header="最新任务">
|
||
<template v-slot:body>
|
||
<div class="xd-notice-list">
|
||
|
||
</div>
|
||
</template>
|
||
</CardWithHeader>
|
||
<CardWithHeader header="最近开单">
|
||
<template v-slot:body>
|
||
<div class="xd-notice-list">
|
||
|
||
</div>
|
||
</template>
|
||
</CardWithHeader>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
|
||
|
||
const lineChartData = {
|
||
newVisitis: {
|
||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
||
actualData: [120, 82, 91, 154, 162, 140, 145]
|
||
},
|
||
messages: {
|
||
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
||
actualData: [180, 160, 151, 106, 145, 150, 130]
|
||
},
|
||
purchases: {
|
||
expectedData: [80, 100, 121, 104, 105, 90, 100],
|
||
actualData: [120, 90, 100, 138, 142, 130, 130]
|
||
},
|
||
shoppings: {
|
||
expectedData: [130, 140, 141, 142, 145, 150, 160],
|
||
actualData: [120, 82, 91, 154, 162, 140, 130]
|
||
}
|
||
}
|
||
import { GridLayout, GridItem } from 'vue-grid-layout'
|
||
import { listSimpleAction } from "@/api/system/sysActionStats";
|
||
import { getQueryStatInfoMap,getLatestMonthCreateOrderMapList } from "@/api/emis/emisWaybill";
|
||
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
|
||
import {getTopNoticeListByUserId,addReadTimes,getPublicNoticeList} from "@/api/system/notice";
|
||
|
||
import CardWithHeader from '@/components/CardWithHeader/index.vue';
|
||
import RaddarChart from './common/RaddarChart.vue';
|
||
import LineChart from './common/LineChart.vue';
|
||
import QuickLink from './common/QuickLink.vue';
|
||
import LineOrderChart from './common/LineOrderChart.vue';
|
||
|
||
import { mapGetters } from 'vuex'
|
||
export default {
|
||
name: 'Index',
|
||
components: {
|
||
CardWithHeader,
|
||
RaddarChart,
|
||
LineOrderChart,
|
||
LineChart,
|
||
QuickLink,
|
||
GridLayout,
|
||
GridItem
|
||
},
|
||
data() {
|
||
return {
|
||
loading: false,
|
||
noticeList:[],
|
||
orderStateData:{
|
||
xAxisData:[],
|
||
orderStateData:[]
|
||
},
|
||
lineChartData: lineChartData.newVisitis,
|
||
quickActionList:[],
|
||
queryStatInfoMap:null,
|
||
dateRange:[],
|
||
layout: [
|
||
{ x: 0, y: 0, w: 3, h: 2, i: '1', static: false },
|
||
{ x: 6, y: 0, w: 3, h: 2, i: '2', static: false },
|
||
],
|
||
|
||
}
|
||
},
|
||
computed: {
|
||
...mapGetters(['avatar', 'nickName','ownerSiteName']),
|
||
},
|
||
created() {
|
||
this.initUserNotice();
|
||
this.initQuickActionList();
|
||
this.initOrderStatData();
|
||
},
|
||
methods: {
|
||
initUserNotice() {
|
||
// 获取通知信息
|
||
getTopNoticeListByUserId().then(response => {
|
||
this.noticeList=response.rows;
|
||
});
|
||
},
|
||
|
||
initQuickActionList() {
|
||
let queryParams={
|
||
pageNum: 1,
|
||
pageSize: 12,
|
||
};
|
||
listSimpleAction(queryParams).then(response => {
|
||
this.quickActionList = response.rows;
|
||
});
|
||
},
|
||
|
||
// initOmsOrderState() {
|
||
|
||
|
||
// getOmsBillFeeStatInfo().then(response => {
|
||
// console.log("====>getOmsBillFeeStatInfo===>",response);
|
||
// if(response.data!=null){
|
||
// this.omsBillFeeState = response.data;
|
||
// }
|
||
|
||
// });
|
||
|
||
|
||
|
||
// },
|
||
initOrderStatData(){
|
||
|
||
// 查询统计
|
||
let qParam={
|
||
sendSiteCode:null,
|
||
params:{
|
||
sendSiteCode:null
|
||
}
|
||
}
|
||
|
||
if(this.$store.getters.ownerSiteCode!='88888'){
|
||
qParam.sendSiteCode=this.$store.getters.ownerSiteCode;
|
||
}
|
||
|
||
const end = new Date()
|
||
const start = new Date()
|
||
start.setHours(0,0,0,0)
|
||
end.setHours(23,59,59,0)
|
||
this.dateRange=[timeFormat(start), timeFormat(end)]
|
||
// let extQParam={...qParam};
|
||
let extQParam=this.addDateRange(qParam, this.dateRange,"sendDate");
|
||
|
||
getQueryStatInfoMap(extQParam).then(response => {
|
||
this.queryStatInfoMap = response.data;
|
||
});
|
||
|
||
|
||
|
||
getLatestMonthCreateOrderMapList().then(response => {
|
||
console.log("====>getLatestMonthCreateOrderMapList===>",response);
|
||
|
||
let xData=[];
|
||
let yData=[];
|
||
// 做数据转换
|
||
response.data.forEach(item => {
|
||
xData.push(item.createDay);
|
||
yData.push(item.totalNum);
|
||
});
|
||
|
||
this.orderStateData.xAxisData=[...xData];
|
||
this.orderStateData.orderStateData=[...yData];
|
||
console.log("====>this.orderStateData===>",this.orderStateData);
|
||
|
||
});
|
||
|
||
},
|
||
goRouterPath(clickPath) {
|
||
// 跳转预警详情页面
|
||
this.$router.push({
|
||
path: clickPath,
|
||
query: {
|
||
},
|
||
});
|
||
},
|
||
ishttp(url) {
|
||
return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1
|
||
},
|
||
change(val) {
|
||
const path = val.path;
|
||
if(this.ishttp(val.path)) {
|
||
// http(s):// 路径新窗口打开
|
||
const pindex = path.indexOf("http");
|
||
window.open(path.substr(pindex, path.length), "_blank");
|
||
} else {
|
||
this.$router.push(val.path)
|
||
}
|
||
this.search = ''
|
||
this.options = []
|
||
this.$nextTick(() => {
|
||
this.show = false
|
||
})
|
||
this.initQuickActionList();
|
||
},
|
||
|
||
layoutUpdatedEvent(newLayout) {
|
||
this.layout = newLayout;
|
||
},
|
||
moveEvent(){
|
||
|
||
},
|
||
movedEvent(){
|
||
|
||
},
|
||
cardLayOut(){
|
||
|
||
}
|
||
},
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.h-overview {
|
||
text-align: center;
|
||
|
||
.title {
|
||
margin-top: 10px;
|
||
font-size: 14px;
|
||
color: var(--el-text-color-regular);
|
||
}
|
||
|
||
.count {
|
||
margin-top: 10px;
|
||
span {
|
||
font-size: 20px;
|
||
color: #000;
|
||
font-weight: 500;
|
||
line-height: 32px;
|
||
cursor: pointer;
|
||
}
|
||
}
|
||
}
|
||
|
||
.xd-home-notice-item {
|
||
padding: 10px 8px;
|
||
font-size: 13px;
|
||
}
|
||
|
||
|
||
.chart-wrapper {
|
||
background: #fff;
|
||
padding: 16px 16px 0;
|
||
margin-bottom: 32px;
|
||
}
|
||
|
||
.h-systemInfo {
|
||
margin-left: 18px;
|
||
height: 216px;
|
||
}
|
||
@-moz-document url-prefix() {
|
||
.h-systemInfo {
|
||
height: auto;
|
||
}
|
||
}
|
||
|
||
.system-label {
|
||
font-weight: 400 !important;
|
||
font-size: 14px !important;
|
||
color: #1f2329;
|
||
}
|
||
|
||
.system-content {
|
||
font-size: 13px !important;
|
||
}
|
||
|
||
.monitor-tags {
|
||
position: absolute;
|
||
top: -10px;
|
||
left: 20px;
|
||
|
||
.el-tag {
|
||
margin-right: 10px;
|
||
margin-bottom: 10px;
|
||
}
|
||
}
|
||
|
||
.right-count {
|
||
flex-shrink: 0;
|
||
text-align: right;
|
||
white-space: nowrap;
|
||
|
||
.count-item {
|
||
display: inline-block;
|
||
margin: 0 4px 0 24px;
|
||
|
||
.el-tag{
|
||
width: 26px;
|
||
height: 26px;
|
||
border-radius: 50%;
|
||
}
|
||
|
||
.header{
|
||
display: flex;
|
||
align-items: center;
|
||
margin-bottom: 4px;
|
||
font-size: 14px;
|
||
font-weight: 800;
|
||
|
||
.title{
|
||
margin-left: 8px;
|
||
}
|
||
}
|
||
.num{
|
||
font-weight: normal;
|
||
text-align: center;
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
</style>
|