|
@@ -1,28 +1,32 @@
|
|
import React from 'react';
|
|
import React from 'react';
|
|
-import { Select, Spin, Input, Table, Button } from 'antd';
|
|
|
|
|
|
+import { Select, Spin, Input, Table, Button ,message} from 'antd';
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
import $ from 'jquery/src/ajax';
|
|
import $ from 'jquery/src/ajax';
|
|
import './report.less';
|
|
import './report.less';
|
|
import { post } from '../../../dataDic.js';
|
|
import { post } from '../../../dataDic.js';
|
|
|
|
|
|
const PersonalReport = React.createClass({
|
|
const PersonalReport = React.createClass({
|
|
- loadData(totalArr) {
|
|
|
|
- let total=totalArr.data[0] ;
|
|
|
|
|
|
+ loadData(totalArr,pageNo) {
|
|
|
|
+// console.log(totalArr);
|
|
|
|
+ let total=totalArr.data[0];
|
|
this.setState({
|
|
this.setState({
|
|
loading: true
|
|
loading: true
|
|
});
|
|
});
|
|
|
|
+// console.log(pageNo)
|
|
$.ajax({
|
|
$.ajax({
|
|
method: "post",
|
|
method: "post",
|
|
dataType: "json",
|
|
dataType: "json",
|
|
crossDomain: false,
|
|
crossDomain: false,
|
|
- url: globalConfig.context + "/api/admin/organization/selectSuperId",
|
|
|
|
|
|
+ url: globalConfig.context + "/api/admin/order/listPublicOrder",
|
|
data: {
|
|
data: {
|
|
-
|
|
|
|
|
|
+ pageNo: pageNo || 1,
|
|
|
|
+ pageSize: this.state.pagination.pageSize,
|
|
},
|
|
},
|
|
success: function(data) {
|
|
success: function(data) {
|
|
- let thedata = data.data;
|
|
|
|
|
|
+// console.log(data)
|
|
|
|
+ let thedata = data.data.list;
|
|
let theArr = [];
|
|
let theArr = [];
|
|
- if(!thedata) {
|
|
|
|
|
|
+ if(!data.data) {
|
|
if(data.error && data.error.length) {
|
|
if(data.error && data.error.length) {
|
|
message.warning(data.error[0].message);
|
|
message.warning(data.error[0].message);
|
|
};
|
|
};
|
|
@@ -64,11 +68,18 @@ const PersonalReport = React.createClass({
|
|
annuallyOrderAmount:nub,//年签单业绩
|
|
annuallyOrderAmount:nub,//年签单业绩
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
+ this.state.pagination.current = data.data.pageNo;
|
|
|
|
+ this.state.pagination.total = data.data.totalCount;
|
|
}
|
|
}
|
|
|
|
+// if(!data.data.length){
|
|
|
|
+// this.state.pagination.current=0
|
|
|
|
+// this.state.pagination.total=0
|
|
|
|
+// }
|
|
theArr.push(
|
|
theArr.push(
|
|
{
|
|
{
|
|
key:9999999,
|
|
key:9999999,
|
|
theNumber:true,
|
|
theNumber:true,
|
|
|
|
+ nub:11,
|
|
name:'合计',
|
|
name:'合计',
|
|
dailyOrderCount:total.dailyTotalCount,//日签单业绩
|
|
dailyOrderCount:total.dailyTotalCount,//日签单业绩
|
|
dailyOrderAmount:total.dailyTotalAmount,//日签单业绩
|
|
dailyOrderAmount:total.dailyTotalAmount,//日签单业绩
|
|
@@ -82,8 +93,11 @@ const PersonalReport = React.createClass({
|
|
annuallyOrderAmount:total.annuallyTotalAmount,//年签单业绩
|
|
annuallyOrderAmount:total.annuallyTotalAmount,//年签单业绩
|
|
}
|
|
}
|
|
)
|
|
)
|
|
|
|
+ console.log(theArr)
|
|
this.setState({
|
|
this.setState({
|
|
- dataSource: theArr,
|
|
|
|
|
|
+ pageNo:pageNo,
|
|
|
|
+ dataSource: theArr,
|
|
|
|
+ pagination: this.state.pagination,
|
|
})
|
|
})
|
|
}.bind(this),
|
|
}.bind(this),
|
|
}).always(function() {
|
|
}).always(function() {
|
|
@@ -92,7 +106,8 @@ const PersonalReport = React.createClass({
|
|
});
|
|
});
|
|
}.bind(this));
|
|
}.bind(this));
|
|
},
|
|
},
|
|
- totalData() {
|
|
|
|
|
|
+ totalData(page) {
|
|
|
|
+ console.log(page)
|
|
this.setState({
|
|
this.setState({
|
|
loading: true
|
|
loading: true
|
|
});
|
|
});
|
|
@@ -117,7 +132,10 @@ const PersonalReport = React.createClass({
|
|
};
|
|
};
|
|
thedata = {};
|
|
thedata = {};
|
|
}
|
|
}
|
|
- this.loadData(thedata)
|
|
|
|
|
|
+ this.loadData(thedata,page)
|
|
|
|
+ this.setState({
|
|
|
|
+ totals:thedata[0]
|
|
|
|
+ })
|
|
}.bind(this),
|
|
}.bind(this),
|
|
}).always(function() {
|
|
}).always(function() {
|
|
this.setState({
|
|
this.setState({
|
|
@@ -172,10 +190,24 @@ const PersonalReport = React.createClass({
|
|
loading: false,
|
|
loading: false,
|
|
visible: false,
|
|
visible: false,
|
|
showDesc: false,
|
|
showDesc: false,
|
|
|
|
+ pagination: {
|
|
|
|
+ defaultCurrent: 1,
|
|
|
|
+ defaultPageSize: 10,
|
|
|
|
+ showQuickJumper: true,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ onChange: function (page) {
|
|
|
|
+ this.totalData(page);
|
|
|
|
+ }.bind(this),
|
|
|
|
+ showTotal: function (total) {
|
|
|
|
+ return '共' + total + '条数据';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
columns: [
|
|
columns: [
|
|
{
|
|
{
|
|
title: '序号',
|
|
title: '序号',
|
|
dataIndex: 'nub',
|
|
dataIndex: 'nub',
|
|
|
|
+ width:50,
|
|
|
|
+ fixed:true,
|
|
key: 'nub',
|
|
key: 'nub',
|
|
render:(text,record)=>{
|
|
render:(text,record)=>{
|
|
if(!record.theNumber){
|
|
if(!record.theNumber){
|
|
@@ -195,6 +227,8 @@ const PersonalReport = React.createClass({
|
|
{
|
|
{
|
|
title: '姓名',
|
|
title: '姓名',
|
|
dataIndex: 'name',
|
|
dataIndex: 'name',
|
|
|
|
+ width:100,
|
|
|
|
+ fixed:true,
|
|
key: 'name',
|
|
key: 'name',
|
|
render:(text,record)=>{
|
|
render:(text,record)=>{
|
|
if(!record.theNumber){
|
|
if(!record.theNumber){
|
|
@@ -213,6 +247,7 @@ const PersonalReport = React.createClass({
|
|
},{
|
|
},{
|
|
title: '部门',
|
|
title: '部门',
|
|
dataIndex: 'departmentName',
|
|
dataIndex: 'departmentName',
|
|
|
|
+ width:100,
|
|
key: 'departmentName',
|
|
key: 'departmentName',
|
|
render:(text,record)=>{
|
|
render:(text,record)=>{
|
|
if(!record.theNumber){
|
|
if(!record.theNumber){
|
|
@@ -233,6 +268,7 @@ const PersonalReport = React.createClass({
|
|
title: '职务',
|
|
title: '职务',
|
|
dataIndex: 'position',
|
|
dataIndex: 'position',
|
|
key: 'position',
|
|
key: 'position',
|
|
|
|
+ width:100,
|
|
render:(text,record)=>{
|
|
render:(text,record)=>{
|
|
if(!record.theNumber){
|
|
if(!record.theNumber){
|
|
return text
|
|
return text
|
|
@@ -249,6 +285,7 @@ const PersonalReport = React.createClass({
|
|
}
|
|
}
|
|
},{
|
|
},{
|
|
title: '入职时间',
|
|
title: '入职时间',
|
|
|
|
+ width:100,
|
|
dataIndex: 'enrollTime',
|
|
dataIndex: 'enrollTime',
|
|
key: 'enrollTime',
|
|
key: 'enrollTime',
|
|
render:(text,record)=>{
|
|
render:(text,record)=>{
|
|
@@ -271,20 +308,24 @@ const PersonalReport = React.createClass({
|
|
{
|
|
{
|
|
title: '总数',
|
|
title: '总数',
|
|
dataIndex: 'num',
|
|
dataIndex: 'num',
|
|
|
|
+ width:70,
|
|
key: 'num',
|
|
key: 'num',
|
|
sorter: (a, b) => a.num - b.num,
|
|
sorter: (a, b) => a.num - b.num,
|
|
},{
|
|
},{
|
|
title: '新增',
|
|
title: '新增',
|
|
dataIndex: 'age2',
|
|
dataIndex: 'age2',
|
|
|
|
+ width:70,
|
|
key: 'age2',
|
|
key: 'age2',
|
|
sorter: (a, b) => a.age - b.age,
|
|
sorter: (a, b) => a.age - b.age,
|
|
},{
|
|
},{
|
|
title: '回访',
|
|
title: '回访',
|
|
|
|
+ width:70,
|
|
dataIndex: 'age3',
|
|
dataIndex: 'age3',
|
|
key: 'age3',
|
|
key: 'age3',
|
|
sorter: (a, b) => a.age - b.age,
|
|
sorter: (a, b) => a.age - b.age,
|
|
},{
|
|
},{
|
|
title: '有效',
|
|
title: '有效',
|
|
|
|
+ width:70,
|
|
dataIndex: 'age4',
|
|
dataIndex: 'age4',
|
|
key: 'age4',
|
|
key: 'age4',
|
|
sorter: (a, b) => a.age - b.age,
|
|
sorter: (a, b) => a.age - b.age,
|
|
@@ -295,26 +336,31 @@ const PersonalReport = React.createClass({
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
title: '总数',
|
|
title: '总数',
|
|
|
|
+ width:70,
|
|
dataIndex: 'age11',
|
|
dataIndex: 'age11',
|
|
key: 'age11',
|
|
key: 'age11',
|
|
sorter: (a, b) => a.age - b.age,
|
|
sorter: (a, b) => a.age - b.age,
|
|
},{
|
|
},{
|
|
title: '电话',
|
|
title: '电话',
|
|
|
|
+ width:70,
|
|
dataIndex: 'age22',
|
|
dataIndex: 'age22',
|
|
key: 'age22',
|
|
key: 'age22',
|
|
sorter: (a, b) => a.age - b.age,
|
|
sorter: (a, b) => a.age - b.age,
|
|
},{
|
|
},{
|
|
title: '外拜',
|
|
title: '外拜',
|
|
|
|
+ width:70,
|
|
dataIndex: 'age33',
|
|
dataIndex: 'age33',
|
|
key: 'age33',
|
|
key: 'age33',
|
|
sorter: (a, b) => a.age - b.age,
|
|
sorter: (a, b) => a.age - b.age,
|
|
},{
|
|
},{
|
|
title: '邮件',
|
|
title: '邮件',
|
|
|
|
+ width:70,
|
|
dataIndex: 'age44',
|
|
dataIndex: 'age44',
|
|
key: 'age44',
|
|
key: 'age44',
|
|
sorter: (a, b) => a.age - b.age,
|
|
sorter: (a, b) => a.age - b.age,
|
|
},{
|
|
},{
|
|
title: '微信',
|
|
title: '微信',
|
|
|
|
+ width:70,
|
|
dataIndex: 'age55',
|
|
dataIndex: 'age55',
|
|
key: 'age55',
|
|
key: 'age55',
|
|
sorter: (a, b) => a.age - b.age,
|
|
sorter: (a, b) => a.age - b.age,
|
|
@@ -326,11 +372,13 @@ const PersonalReport = React.createClass({
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
title: '数量',
|
|
title: '数量',
|
|
|
|
+ width:70,
|
|
dataIndex: 'dailyOrderCount',
|
|
dataIndex: 'dailyOrderCount',
|
|
key: 'dailyOrderCount',
|
|
key: 'dailyOrderCount',
|
|
sorter: (a, b) => a.dailyOrderCount - b.dailyOrderCount,
|
|
sorter: (a, b) => a.dailyOrderCount - b.dailyOrderCount,
|
|
},{
|
|
},{
|
|
title: '金额',
|
|
title: '金额',
|
|
|
|
+ width:70,
|
|
dataIndex: 'dailyOrderAmount',
|
|
dataIndex: 'dailyOrderAmount',
|
|
key: 'dailyOrderAmount',
|
|
key: 'dailyOrderAmount',
|
|
sorter: (a, b) => a.dailyOrderAmount - b.dailyOrderAmount,
|
|
sorter: (a, b) => a.dailyOrderAmount - b.dailyOrderAmount,
|
|
@@ -341,11 +389,13 @@ const PersonalReport = React.createClass({
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
title: '数量',
|
|
title: '数量',
|
|
|
|
+ width:70,
|
|
dataIndex: 'weeklyOrderCount',
|
|
dataIndex: 'weeklyOrderCount',
|
|
key: 'weeklyOrderCount',
|
|
key: 'weeklyOrderCount',
|
|
sorter: (a, b) => a.weeklyOrderCount - b.weeklyOrderCount,
|
|
sorter: (a, b) => a.weeklyOrderCount - b.weeklyOrderCount,
|
|
},{
|
|
},{
|
|
title: '金额',
|
|
title: '金额',
|
|
|
|
+ width:70,
|
|
dataIndex: 'weeklyOrderAmount',
|
|
dataIndex: 'weeklyOrderAmount',
|
|
key: 'weeklyOrderAmount',
|
|
key: 'weeklyOrderAmount',
|
|
sorter: (a, b) => a.weeklyOrderAmount - b.weeklyOrderAmount,
|
|
sorter: (a, b) => a.weeklyOrderAmount - b.weeklyOrderAmount,
|
|
@@ -356,11 +406,13 @@ const PersonalReport = React.createClass({
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
title: '数量',
|
|
title: '数量',
|
|
|
|
+ width:70,
|
|
dataIndex: 'monthlyOrderCount',
|
|
dataIndex: 'monthlyOrderCount',
|
|
key: 'monthlyOrderCount',
|
|
key: 'monthlyOrderCount',
|
|
sorter: (a, b) => a.monthlyOrderCount - b.monthlyOrderCount,
|
|
sorter: (a, b) => a.monthlyOrderCount - b.monthlyOrderCount,
|
|
},{
|
|
},{
|
|
title: '金额',
|
|
title: '金额',
|
|
|
|
+ width:70,
|
|
dataIndex: 'monthlyOrderAmount',
|
|
dataIndex: 'monthlyOrderAmount',
|
|
key: 'monthlyOrderAmount',
|
|
key: 'monthlyOrderAmount',
|
|
sorter: (a, b) => a.monthlyOrderAmount - b.monthlyOrderAmount,
|
|
sorter: (a, b) => a.monthlyOrderAmount - b.monthlyOrderAmount,
|
|
@@ -371,11 +423,13 @@ const PersonalReport = React.createClass({
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
title: '数量',
|
|
title: '数量',
|
|
|
|
+ width:70,
|
|
dataIndex: 'quarterlyOrderCount',
|
|
dataIndex: 'quarterlyOrderCount',
|
|
key: 'quarterlyOrderCount',
|
|
key: 'quarterlyOrderCount',
|
|
sorter: (a, b) => a.quarterlyOrderCount - b.quarterlyOrderCount,
|
|
sorter: (a, b) => a.quarterlyOrderCount - b.quarterlyOrderCount,
|
|
},{
|
|
},{
|
|
title: '金额',
|
|
title: '金额',
|
|
|
|
+ width:70,
|
|
dataIndex: 'quarterlyOrderAmount',
|
|
dataIndex: 'quarterlyOrderAmount',
|
|
key: 'quarterlyOrderAmount',
|
|
key: 'quarterlyOrderAmount',
|
|
sorter: (a, b) => a.quarterlyOrderAmount - b.quarterlyOrderAmount,
|
|
sorter: (a, b) => a.quarterlyOrderAmount - b.quarterlyOrderAmount,
|
|
@@ -386,11 +440,13 @@ const PersonalReport = React.createClass({
|
|
children: [
|
|
children: [
|
|
{
|
|
{
|
|
title: '数量',
|
|
title: '数量',
|
|
|
|
+ width:70,
|
|
dataIndex: 'annuallyOrderCount',
|
|
dataIndex: 'annuallyOrderCount',
|
|
key: 'annuallyOrderCount',
|
|
key: 'annuallyOrderCount',
|
|
sorter: (a, b) => a.annuallyOrderCount - b.annuallyOrderCount,
|
|
sorter: (a, b) => a.annuallyOrderCount - b.annuallyOrderCount,
|
|
},{
|
|
},{
|
|
title: '金额',
|
|
title: '金额',
|
|
|
|
+ width:70,
|
|
dataIndex: 'annuallyOrderAmount',
|
|
dataIndex: 'annuallyOrderAmount',
|
|
key: 'annuallyOrderAmount',
|
|
key: 'annuallyOrderAmount',
|
|
sorter: (a, b) => a.annuallyOrderAmount - b.annuallyOrderAmount,
|
|
sorter: (a, b) => a.annuallyOrderAmount - b.annuallyOrderAmount,
|
|
@@ -451,7 +507,6 @@ const PersonalReport = React.createClass({
|
|
<Button onClick={this.reset}>重置</Button>
|
|
<Button onClick={this.reset}>重置</Button>
|
|
</div>
|
|
</div>
|
|
<div className="surfaceTitle">
|
|
<div className="surfaceTitle">
|
|
- <span>湖南科德公司</span>
|
|
|
|
<span className="nowtime">{this.state.Nowtime}</span>
|
|
<span className="nowtime">{this.state.Nowtime}</span>
|
|
<span>个人营销业绩统计表</span>
|
|
<span>个人营销业绩统计表</span>
|
|
</div>
|
|
</div>
|
|
@@ -461,7 +516,8 @@ const PersonalReport = React.createClass({
|
|
<Table columns={this.state.columns}
|
|
<Table columns={this.state.columns}
|
|
dataSource={this.state.dataSource}
|
|
dataSource={this.state.dataSource}
|
|
bordered
|
|
bordered
|
|
- pagination={false}
|
|
|
|
|
|
+ scroll={{x:1780}}
|
|
|
|
+ pagination={this.state.pagination}
|
|
/>
|
|
/>
|
|
</Spin>
|
|
</Spin>
|
|
</div>
|
|
</div>
|