|
@@ -5,6 +5,7 @@ import moment from 'moment';
|
|
|
import '@/manageCenter/financialManage/distribute/public.less';
|
|
|
import { Button, Spin, DatePicker, Radio, message } from 'antd';
|
|
|
import { getToday, ShowModal } from '@/tools';
|
|
|
+import ShowModalDiv from "@/showModal.jsx";
|
|
|
import './index.less';
|
|
|
|
|
|
import ReactEcharts from 'echarts-for-react/lib/core';
|
|
@@ -28,12 +29,42 @@ const Statistics = React.createClass({
|
|
|
releaseDate: getToday(1),
|
|
|
info: {},
|
|
|
data: {},
|
|
|
+ htmlMenus: [],
|
|
|
}
|
|
|
},
|
|
|
|
|
|
componentWillMount() {
|
|
|
this.loadData();
|
|
|
this.getData();
|
|
|
+ this.mainMenu();
|
|
|
+ },
|
|
|
+
|
|
|
+ mainMenu() {
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/selectNavList",
|
|
|
+ data: {},
|
|
|
+ success: function (data) {
|
|
|
+ if (!data.data) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let menu = data.data;
|
|
|
+ this.setState({
|
|
|
+ htmlMenus: menu,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(
|
|
|
+ function (data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
},
|
|
|
|
|
|
loadData() {
|
|
@@ -105,21 +136,34 @@ const Statistics = React.createClass({
|
|
|
this.loadData();
|
|
|
},
|
|
|
|
|
|
-
|
|
|
+ getNewUrl(url, cd) {
|
|
|
+ const { htmlMenus = [] } = this.state
|
|
|
+ let id = ''
|
|
|
+ htmlMenus.map(function (item) {
|
|
|
+ if (item.url == url) {
|
|
|
+ id = item.id;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return `${url}?rid=${id}#${cd}`
|
|
|
+ },
|
|
|
|
|
|
render() {
|
|
|
const { status, info, data } = this.state
|
|
|
const list = [
|
|
|
- { color: "#99FFFF", title: "全部签单客户数:", sum: info.signSum, tit: "签单客户数", number: info.rangeSignSum, url: "/admin/customer.html?rid=a691e23c-d4bd-4346-b67e-8887a84a3637#companySign" },
|
|
|
- { color: "#FFFFCC", title: "全部私有客户数:", sum: info.privateSum, tit: "私有客户数", number: info.rangePrivateSum, url: "" },
|
|
|
- { color: "#FFCCCC", title: "全部渠道数:", sum: info.channelSum, tit: "私有渠道数", number: info.rangeChannelSum, url: "" },
|
|
|
+ { color: "#99FFFF", title: "全部签单客户数:", sum: info.signSum, tit: "签单客户数", number: info.rangeSignSum, url: this.getNewUrl("/admin/customer.html", "companySign") },
|
|
|
+ { color: "#FFFFCC", title: "全部私有客户数:", sum: info.privateSum, tit: "私有客户数", number: info.rangePrivateSum, url: this.getNewUrl("/admin/customer.html", "companyIntention") },
|
|
|
+ { color: "#FFCCCC", title: "全部渠道数:", sum: info.channelSum, tit: "私有渠道数", number: info.rangeChannelSum, url: this.getNewUrl("/admin/channelList.html", "channelunit") },
|
|
|
{ color: "#99CCFF", title: "全部公出数:", sum: info.publicReleaseSum, tit: "公出企业数", number: info.rangePublicReleaseSum, url: "" },
|
|
|
- { color: "#99FFCC", title: "全部跟进客户数:", sum: info.followSum, tit: "跟进客户数", number: info.rangeFollowSum, url: "" },
|
|
|
- { color: "#CC99CC", title: "全部订单数:", sum: info.orderSum, tit: "订单数", number: info.rangeOrderSum, url: "" },
|
|
|
- { color: "#99CCCC", title: "全部应收款:", sum: info.receivables, tit: "应收款", number: info.rangeReceivables },
|
|
|
+ { color: "#99FFCC", title: "全部跟进客户数:", sum: info.followSum, tit: "跟进客户数", number: info.rangeFollowSum, url: this.getNewUrl("/admin/customer.html", "followUpSummaryOrdinary") },
|
|
|
+ { color: "#CC99CC", title: "全部订单数:", sum: info.orderSum, tit: "订单数", number: info.rangeOrderSum, url: this.getNewUrl("/admin/order.html", "billing") },
|
|
|
+ { color: "#99CCCC", title: "全部应收款:", sum: info.receivables, tit: "应收款", number: info.rangeReceivables, url: this.getNewUrl("/admin/order.html", "press") },
|
|
|
{
|
|
|
- color: "#FFCC99", title: "待紧急处理事项", sum: "", tit: "签单客户数", number: "",
|
|
|
- list: [{ key: "被驳回订单:", value: info.rejectSum }, { key: "待变更订单:", value: info.changeSum }, { key: "待核对订单:", value: info.projectCheckSum }, { key: "暂停项目:", value: info.projectStopSum },]
|
|
|
+ color: "#FFCC99", title: "待紧急处理事项",
|
|
|
+ list: [
|
|
|
+ { key: "被驳回订单:", value: info.rejectSum, url: this.getNewUrl("/admin/order.html", "reject") },
|
|
|
+ { key: "待变更订单:", value: info.changeSum, url: this.getNewUrl("/admin/order.html", "contractChangeYxy") },
|
|
|
+ { key: "待核对专利:", value: info.projectCheckSum, url: this.getNewUrl("/admin/project.html", "businessManagement") },
|
|
|
+ { key: "暂停项目:", value: info.projectStopSum, url: this.getNewUrl("/admin/order.html", "mysuspend") },]
|
|
|
},
|
|
|
]
|
|
|
const option = {
|
|
@@ -154,41 +198,43 @@ const Statistics = React.createClass({
|
|
|
yAxis: {
|
|
|
type: 'value'
|
|
|
},
|
|
|
+ color: ['#99FFFF', '#cccca3', '#FFCCCC', '#99CCFF', '#99FFCC', '#CC99CC'],
|
|
|
series: [
|
|
|
{
|
|
|
name: '签单客户数',
|
|
|
type: 'line',
|
|
|
- data: data.signList
|
|
|
+ data: data.signList,
|
|
|
},
|
|
|
{
|
|
|
name: '私有客户数',
|
|
|
type: 'line',
|
|
|
- data: data.privateList
|
|
|
+ data: data.privateList,
|
|
|
},
|
|
|
{
|
|
|
name: '私有渠道数',
|
|
|
type: 'line',
|
|
|
- data: data.channelList
|
|
|
+ data: data.channelList,
|
|
|
},
|
|
|
{
|
|
|
name: '公出企业数',
|
|
|
type: 'line',
|
|
|
- data: data.publicReleaseList
|
|
|
+ data: data.publicReleaseList,
|
|
|
},
|
|
|
{
|
|
|
name: '跟进客户数',
|
|
|
type: 'line',
|
|
|
- data: data.userFollowList
|
|
|
+ data: data.userFollowList,
|
|
|
},
|
|
|
{
|
|
|
name: '订单数',
|
|
|
type: 'line',
|
|
|
- data: data.orderList
|
|
|
+ data: data.orderList,
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
return (
|
|
|
<div className="user-content">
|
|
|
+ <ShowModalDiv ShowModal={this.state.showModal} seeInfo={() => { this.props.handlekey("normal") }} />
|
|
|
<div className="content-title" style={{ marginBottom: 10 }}>
|
|
|
<span style={{ fontWeight: 900, fontSize: 16 }}>数据统计</span>
|
|
|
</div>
|
|
@@ -248,6 +294,7 @@ const Statistics = React.createClass({
|
|
|
<div className='plitem' style={{ background: item.color }} key={index}>
|
|
|
<div className='plititle'>
|
|
|
<span style={{ fontWeight: item.title == "待紧急处理事项" && "bold" }}>{item.title}</span>
|
|
|
+ {/* <span className='plisum'>{item.sum}</span> */}
|
|
|
<a href={globalConfig.context + item.url}>
|
|
|
<span className='plisum'>{item.sum}</span>
|
|
|
</a>
|
|
@@ -259,13 +306,15 @@ const Statistics = React.createClass({
|
|
|
item.list.map((t, i) =>
|
|
|
<div key={i}>
|
|
|
<span>{t.key}</span>
|
|
|
- <span style={{ textDecoration: "underline", color: "#0000FF" }}>{t.value}</span>
|
|
|
+ <a href={globalConfig.context + t.url}>
|
|
|
+ <span style={{ textDecoration: "underline", color: "#0000FF" }}>{t.value}</span>
|
|
|
+ </a>
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
</div>
|
|
|
: <div className='count'>
|
|
|
- <div className='plinum'>{item.number}</div>
|
|
|
+ <a href={globalConfig.context + item.url}><div className='plinum'>{item.number}</div></a>
|
|
|
<div className='plitit'>{item.tit}</div>
|
|
|
</div>
|
|
|
}
|