dengzhiguo 6 years ago
parent
commit
f7de15b3bb

+ 19 - 0
js/component/manageCenter/customer/content.jsx

@@ -249,6 +249,25 @@ class Content extends Component {
                     });
                 });
                 break;
+            /*拜访记录统计*/
+           //客户营销日统计
+           case 'diurnalStatistics':
+                require.ensure([], () => {
+                    const DiurnalStatistics = require('./customerMarketing/diurnalStatistics').default;
+                    this.setState({
+                        component: <DiurnalStatistics ApiUrl={''}/>                      
+                    });
+                });
+                break;  
+            //客户营销时段统计
+            case 'timeStatistics':
+                require.ensure([], () => {
+                    const TimeStatistics = require('./customerMarketing/timeStatistics').default;
+                    this.setState({
+                        component: <TimeStatistics ApiUrl={''}/>                      
+                    });
+                });
+                break;
             /*意向客户*/
             //个人意向客户
            	case 'personalIntention':

+ 595 - 0
js/component/manageCenter/customer/customerMarketing/diurnalStatistics.jsx

@@ -0,0 +1,595 @@
+import React from 'react';
+import { Select, Spin, Input, Table, Button ,DatePicker, Form  , Tabs , Switch,message} from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import './report.less';
+import DiurnalStatisticsOne from './diurnalStatisticsOne.jsx';
+import { post } from '../../../dataDic.js';
+const TabPane = Tabs.TabPane;
+
+const DiurnalStatistics = React.createClass({
+	loadData(totalArr) {
+		let total=totalArr;
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/report/sales/marketingStatistics",
+			data: {
+				type:'1',
+				depId:this.state.superId,//部门机构
+			},
+			success: function(data) {
+				let thedata = data.data;
+				let theArr = [];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+					thedata = {};
+				} else {
+					thedata.map(function(item, index) {
+						let nub=index+1;
+						theArr.push({
+							key: index,
+							theNumber:false,
+							nub:nub,
+							id: item.id,
+							departmentId:item.departmentId,//部门ID
+							departmentName:item.departmentName,//部门名称
+							departmentManagerName:item.departmentManagerName,//部门负责人名称
+							departmentNumber:item.departmentNumber, //部门人数
+							privateCustomersCount:item.privateCustomersCount,// 部门客户数
+							dailyTelNo:item.values.daily.TelNo,//日电话量
+							dailyVisitNo:item.values.daily.VisitNo,//日外拜量
+							dailyFollowNo:item.values.daily.FollowNo,//日营销总量
+							dailyAVG:item.values.daily.AVG,//日人均营销量
+							weekTelNo:item.values.week.TelNo,//周电话量
+							weekFollowNo:item.values.week.FollowNo,//周总量
+							weekVisitNo:item.values.week.VisitNo,//周外拜量
+							monthsTelNo:item.values.months.TelNo,//月电话量
+							monthsFollowNo:item.values.months.FollowNo,//月总量
+							monthsVisitNo:item.values.months.VisitNo,//月外拜量
+							annualTelNo:item.values.annual.TelNo,//年电话量
+							annualFollowNo:item.values.annual.FollowNo,//年总量
+							annualVisitNo:item.values.annual.VisitNo,//年外拜量
+						})
+					})
+				}
+				if(theArr.length){
+					theArr.push(
+						{
+							key:9999999,
+							theNumber:true,
+							departmentName:'合计',							
+							departmentNumber:total.departmentNumber, //部门人数
+							privateCustomersCount:total.privateCustomersCount,// 部门客户数
+							dailyTelNo:total.dailyTelNo,//日电话量
+							dailyVisitNo:total.dailyVisitNo,//日外拜量
+							dailyFollowNo:total.dailyFollowNo,//日营销总量
+							dailyAVG:total.dailyAVG,//日人均营销量
+							weekTelNo:total.weeklyTelNo,//周电话量
+							weekFollowNo:total.weeklyFollowNo,//周总量
+							weekVisitNo:total.weeklyVisitNo,//周外拜量
+							monthsTelNo:total.monthTelNo,//月电话量
+							monthsFollowNo:total.monthFollowNo,//月总量
+							monthsVisitNo:total.monthVisitNo,//月外拜量
+							annualTelNo:total.yearTelNo,//年电话量
+							annualFollowNo:total.yearFollowNo,//年总量
+							annualVisitNo:total.yearVisitNo,//年外拜量
+						}
+					)
+				}
+				this.setState({
+					dataSource: theArr,
+				})
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	totalData() {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/report/sales/countMarketingStatistics",
+			data: {
+				type:'1',
+				depId:this.state.superId,//部门机构
+			},
+			success: function(data) {
+				let thedata = data.data;
+				let theArr = [];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+					thedata = {};
+				} 
+				this.loadData(thedata)
+				this.selectSuperId();
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	//时间选择
+    selTime(value,index){
+    	this.setState({
+    		Dtime:value,
+    		selTime:index
+    	})
+    },
+    //获取上级组织
+    selectSuperId() {  
+    	this.state.data = []
+         $.ajax({
+                method: "post",
+                dataType: "json",
+                crossDomain: false,
+                url: globalConfig.context + "/api/admin/organization/selectSuperId",
+                data:{
+                  
+                },
+                success: function (data) {                	  
+                		let theArr = [];
+                		let theId=[];//用于保存上级组织的ID和名称
+					    let thedata=data.data;
+					    if (!thedata) {
+		                    if (data.error && data.error.length) {
+		                        message.warning(data.error[0].message);
+		                    };	
+		                    thedata = {}; 
+		              };   
+					    var contactIds=[];
+				        for(var i=0;i<data.data.length;i++){
+		                    let theData = data.data[i];
+		                    theArr.push(
+		                        <Select.Option value={theData.id} key={theData.id}>{theData.name}</Select.Option>
+		                    );
+		                    theId.push(
+		                        [theData.id,theData.name]
+		                    );
+		                };
+						this.setState({	
+							SuperArr:thedata,
+		                    contactsOption: theArr, 
+		                    theId: theId, 
+		                    orderStatusOptions:data.data,
+	                    });
+	                    
+					}.bind(this),
+				}).always(function () {
+				this.setState({
+	                loading: false
+	            });
+	        }.bind(this));
+	},
+	//判断浏览器类型
+	getExplorer() {
+		var explorer = window.navigator.userAgent;
+		//ie 
+		if(explorer.indexOf("MSIE") >= 0) {
+			return 'ie';
+		}
+		//firefox 
+		else if(explorer.indexOf("Firefox") >= 0) {
+			return 'Firefox';
+		}
+		//Chrome
+		else if(explorer.indexOf("Chrome") >= 0) {
+			return 'Chrome';
+		}
+		//Opera
+		else if(explorer.indexOf("Opera") >= 0) {
+			return 'Opera';
+		}
+		//Safari
+		else if(explorer.indexOf("Safari") >= 0) {
+			return 'Safari';
+		}
+	},
+    //导出为exel表格
+	tabExel() {
+		var table = document.querySelector('#daochu');
+		var idTmr;
+		//debugger;
+		//整个表格拷贝到EXCEL中
+		if(this.getExplorer() == 'ie') {
+			var curTbl = document.getElementById(tableid);
+			var oXL = new ActiveXObject("Excel.Application");
+			//创建AX对象excel 
+			var oWB = oXL.Workbooks.Add();
+			//获取workbook对象 
+			var xlsheet = oWB.Worksheets(1);
+			//激活当前sheet 
+			var sel = document.body.createTextRange();
+			sel.moveToElementText(curTbl);
+			//把表格中的内容移到TextRange中 
+			sel.select();
+			//全选TextRange中内容 
+			sel.execCommand("Copy");
+			//复制TextRange中内容  
+			xlsheet.Paste();
+			//粘贴到活动的EXCEL中       
+			oXL.Visible = true;
+			//设置excel可见属性
+			try {
+				var fname = oXL.Application.GetSaveAsFilename("Excel.xls", "Excel Spreadsheets (*.xls), *.xls");
+			} catch(e) {
+				print("Nested catch caught " + e);
+			} finally {
+				oWB.SaveAs(fname);
+
+				oWB.Close(savechanges = false);
+				//xls.visible = false;
+				oXL.Quit();
+				oXL = null;
+				//结束excel进程,退出完成
+				//window.setInterval("Cleanup();",1);
+				idTmr = window.setInterval("Cleanup();", 1);
+			}
+		} else {
+			console.log(table);
+			this.tableToExcel(table,this.getExplorer());
+		}
+		function Cleanup() {
+			window.clearInterval(idTmr);
+			CollectGarbage();
+		}
+	},
+	tableToExcel(table,name) {
+		var uri = 'data:application/vnd.ms-excel;base64,',
+			template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
+			base64 = function(s) {
+				return window.btoa(unescape(encodeURIComponent(s)))
+			},
+			format = function(s, c) {
+				return s.replace(/{(\w+)}/g,
+					function(m, p) {
+						return c[p];
+					})
+			}
+			console.log(table.nodeType);
+			if(!table.nodeType) table = document.getElementById(table);
+			console.log(table);
+			var ctx = {
+				worksheet: name || 'Worksheet',
+				table: table.innerHTML
+			};
+			window.location.href = uri + base64(format(template, ctx))
+	},
+	getInitialState() {
+		return {
+			selectedRowKeys: [],
+			selectedRows: [],
+			loading: false,
+			visible: false,
+			showDesc: false,
+			timeState:false,
+			Dtime:undefined,
+			selTime:'',
+			columns: [
+			{
+				title: '序号',
+				dataIndex: 'nub',
+				width:50,
+				key: 'nub',
+				fixed:false,
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:0
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},
+			{
+				title: '部门',
+				dataIndex: 'departmentName',
+				key: 'departmentName',
+				width:200,
+				fixed:false,
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text&&text.length>6?<span title={text}>{text.substr(0,6)+'…'}</span>:text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:3
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			}, {
+				title: '总经理',
+				width:100,
+				fixed:false,
+				dataIndex: 'departmentManagerName',
+				key: 'departmentManagerName',
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:0
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},
+			{
+				title: '部门人数',
+				width:100,
+				fixed:false,
+				dataIndex: 'departmentNumber',
+				key: 'departmentNumber',
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:1
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},
+			{
+				title: '部门客户数',
+				width:100,
+				fixed:false,
+				dataIndex: 'privateCustomersCount',
+				key: 'privateCustomersCount',
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:1
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},
+			{			
+				title: '今日营销',
+				children: [
+					{
+						title: '营销总量',
+						width:100,
+						dataIndex: 'dailyFollowNo',
+						key: 'nudailyFollowNom',
+						sorter: (a, b) => a.dailyFollowNo - b.dailyFollowNo,
+						sortOrder:'ascend'
+					},{
+						title: '电话量',
+						width:80,
+						dataIndex: 'dailyTelNo',
+						key: 'dailyTelNo',
+						sorter: (a, b) => a.dailyTelNo - b.dailyTelNo,
+					},{
+						title: '外拜量',
+						width:80,
+						dataIndex: 'dailyVisitNo',
+						key: 'dailyVisitNo',
+						sorter: (a, b) => a.dailyVisitNo - b.dailyVisitNo,
+					},{
+						title: '人均营销量',
+						width:110,
+						dataIndex: 'dailyAVG',
+						key: 'dailyAVG',
+						sorter: (a, b) => a.dailyAVG - b.dailyAVG,
+					}
+				],
+			}, 
+			{   
+				title: '周营销累计',
+				children: [
+					{
+						title: '周营销总量',
+						width:110,
+						dataIndex: 'weekFollowNo',
+						key: 'weekFollowNo',
+						sorter: (a, b) => a.weekFollowNo - b.weekFollowNo,
+					},{
+						title: '电话量',
+						width:80,
+						dataIndex: 'weekTelNo',
+						key: 'weekTelNo',
+						sorter: (a, b) => a.weekTelNo - b.weekTelNo,
+					},{
+						title: '外拜量',
+						width:80,
+						dataIndex: 'weekVisitNo',
+						key: 'weekVisitNo',
+						sorter: (a, b) => a.weekVisitNo - b.weekVisitNo,
+					}
+				],
+			},{
+				title: '月营销累计',
+				children: [
+					{
+						title: '月营销总量',
+						width:110,
+						dataIndex: 'monthsFollowNo',
+						key: 'monthsFollowNo',
+						sorter: (a, b) => a.monthsFollowNo - b.monthsFollowNo,
+					},{
+						title: '电话量',
+						width:80,
+						dataIndex: 'monthsTelNo',
+						key: 'monthsTelNo',
+						sorter: (a, b) => a.monthsTelNo - b.monthsTelNo,
+					},{
+						title: '外拜量',
+						width:80,
+						dataIndex: 'monthsVisitNo',
+						key: 'monthsVisitNo',
+						sorter: (a, b) => a.monthsVisitNo - b.monthsVisitNo,
+					}
+				],
+			},{
+				title: '年营销累计',
+				children: [
+					{
+						title: '年营销总量',
+						width:110,
+						dataIndex: 'annualFollowNo',
+						key: 'annualFollowNo',
+						sorter: (a, b) => a.annualFollowNo - b.annualFollowNo,
+					},{
+						title: '电话量',
+						width:80,
+						dataIndex: 'annualTelNo',
+						key: 'annualTelNo',
+						sorter: (a, b) => a.annualTelNo - b.annualTelNo,
+					},{
+						title: '外拜量',
+						width:80,
+						dataIndex: 'annualVisitNo',
+						key: 'annualVisitNo',
+						sorter: (a, b) => a.annualVisitNo - b.annualVisitNo,
+					}
+				],
+			}
+			],
+			dataSource: [],
+		};
+	},
+	search() {
+		this.totalData()
+	},
+	reset() {
+		this.state.superId = undefined;//部门机构清零
+		this.totalData()
+		this.setState({
+			order:"false"
+		})
+	},
+	//重构排序
+	tabChange(pagination,filter,sorter){
+		console.log(pagination)
+		console.log(sorter)
+	},
+	componentWillMount() {
+		//this.loadData();
+		this.totalData();
+		let times=new Date();
+		let nowTime=times.getFullYear()+'年'+(times.getMonth()+1)+'月'+times.getDate()+'日';
+		this.setState({
+			Nowtime:nowTime
+		})
+	},
+	render() {
+		let departmentArr = this.state.departmentArr || [];
+		return(
+			<div className='set-content'>
+				<p style={{fontSize:'20px',marginBottom:'10px'}}>客户营销统计表(部门)</p>
+				<div className="clearfix">
+					<span style={{fontSize:'16px'}}>部门机构 : </span>
+					<Select placeholder="选择部门"
+                            style={{ width:'200px',marginRight:'10px' }}
+                            value={this.state.superId}
+                            onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">
+                            {this.state.contactsOption}
+		          	</Select>
+		          	<Button type="primary" onClick={this.tabExel} >导出到表格</Button>
+                  	<Button type="primary" onClick={this.search} style={{marginLeft:'10px',marginRight:'10px'}}>搜索</Button>
+	                <Button onClick={this.reset}>重置</Button>
+				</div>
+				<div id='daochu'>
+					<div className="surfaceTitle">
+						<span className="nowtime">{this.state.timeState?this.state.txtTime:this.state.Nowtime}</span>
+						<span>客户营销统计表(部门)</span>
+						<span>(每日17:00统计当天数据)</span>
+					</div>
+					<div className="patent-table" id='daochu'>
+						<div className="scroll">
+		                    <Spin spinning={this.state.loading}>
+		                        <Table columns={this.state.columns}
+		                            dataSource={this.state.dataSource}
+		                            //scroll={{ x: 600,y:500}}
+		                            bordered
+		                            onChange={this.tabChange}
+		                            pagination={false}
+		                            />
+		                    </Spin>
+		                </div>
+		            </div>
+	            </div>
+			</div>
+		)
+	}
+});
+
+
+
+const Tablees=Form.create()(React.createClass({
+	//详情tab切换数据处理
+	callbacks(e) {
+		this.setState({
+			callnubs: e,
+		})
+		if(e == '1') {
+			
+		}
+		if(e == '2') {
+			
+		}
+		
+	},
+	getInitialState() {
+		return {
+			callnubs: "1",
+		}
+	},
+	render() {
+		return(
+			<div className="clearfix" style={{marginTop:'0px',marginLeft:'10px'}}>
+			    <Tabs onChange={this.callbacks} type="card" activeKey={this.state.callnubs} style={{paddingLeft:'15px',paddingRight:'15px',marginRight:'20px'}}>
+			         <TabPane tab="客户营销统计表(部门)" key="1" >
+			         	<DiurnalStatistics />
+			         </TabPane>
+					 <TabPane tab="客户营销统计表(员工)" key="2">
+					 	<DiurnalStatisticsOne />
+					 </TabPane>
+			    </Tabs>
+			</div>
+		);
+	}
+}));
+export default Tablees;

+ 539 - 0
js/component/manageCenter/customer/customerMarketing/diurnalStatisticsOne.jsx

@@ -0,0 +1,539 @@
+import React from 'react';
+import { Select, Spin, Input, Table, Button ,DatePicker} from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import './report.less';
+import { post } from '../../../dataDic.js';
+
+const DiurnalStatisticsOne = React.createClass({
+	loadData(totalArr) {
+		let total=totalArr;
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/report/sales/marketingStatistics",
+			data: {
+				type:'0',
+				depId:this.state.superId,//部门机构
+			},
+			success: function(data) {
+				let thedata = data.data;
+				let theArr = [];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+					thedata = {};
+				} else {
+					thedata.map(function(item, index) {
+						let nub=index+1;
+						theArr.push({
+							key: index,
+							theNumber:false,
+							nub:nub,
+							id: item.id,
+							name:item.name,//员工姓名
+							departmentId:item.departmentId,//部门ID
+							departmentName:item.departmentName,//部门名称
+							departmentManagerName:item.departmentManagerName,//部门负责人名称
+							roleName:item.roleName, //职位权限
+							privateCustomersCount:item.privateCustomersCount,// 部门客户数
+							dailyTelNo:item.values.daily.TelNo,//日电话量
+							dailyVisitNo:item.values.daily.VisitNo,//日外拜量
+							dailyFollowNo:item.values.daily.FollowNo,//日营销总量
+							dailyAVG:item.values.daily.AVG,//日人均营销量
+							weekTelNo:item.values.week.TelNo,//周电话量
+							weekFollowNo:item.values.week.FollowNo,//周总量
+							weekVisitNo:item.values.week.VisitNo,//周外拜量
+							monthsTelNo:item.values.months.TelNo,//月电话量
+							monthsFollowNo:item.values.months.FollowNo,//月总量
+							monthsVisitNo:item.values.months.VisitNo,//月外拜量
+							annualTelNo:item.values.annual.TelNo,//年电话量
+							annualFollowNo:item.values.annual.FollowNo,//年总量
+							annualVisitNo:item.values.annual.VisitNo,//年外拜量
+						})
+					})
+				}
+				if(theArr.length){
+					theArr.push(
+						{
+							key:9999999,
+							theNumber:true,
+							name:'合计',
+							privateCustomersCount:total.privateCustomersCount,// 私有客户数
+							dailyTelNo:total.dailyTelNo,//日电话量
+							dailyVisitNo:total.dailyVisitNo,//日外拜量
+							dailyFollowNo:total.dailyFollowNo,//日营销总量
+							dailyAVG:total.dailyAVG,//日人均营销量
+							weekTelNo:total.weeklyTelNo,//周电话量
+							weekFollowNo:total.weeklyFollowNo,//周总量
+							weekVisitNo:total.weeklyVisitNo,//周外拜量
+							monthsTelNo:total.monthTelNo,//月电话量
+							monthsFollowNo:total.monthFollowNo,//月总量
+							monthsVisitNo:total.monthVisitNo,//月外拜量
+							annualTelNo:total.yearTelNo,//年电话量
+							annualFollowNo:total.yearFollowNo,//年总量
+							annualVisitNo:total.yearVisitNo,//年外拜量
+						}
+					)
+				}
+				this.setState({
+					dataSource: theArr,
+				})
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	totalData() {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/report/sales/countMarketingStatistics",
+			data: {
+				type:'0',
+				depId:this.state.superId,//部门机构
+			},
+			success: function(data) {
+				let thedata = data.data;
+				let theArr = [];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+					thedata = {};
+				} 
+				this.loadData(thedata);
+				this.selectSuperId();
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	//时间选择
+    selTime(value,index){
+    	this.setState({
+    		Dtime:value,
+    		selTime:index
+    	})
+    },
+    //获取上级组织
+    selectSuperId() {  
+    	this.state.data = []
+         $.ajax({
+                method: "post",
+                dataType: "json",
+                crossDomain: false,
+                url: globalConfig.context + "/api/admin/organization/selectSuperId",
+                data:{
+                  
+                },
+                success: function (data) {                	  
+                		let theArr = [];
+                		let theId=[];//用于保存上级组织的ID和名称
+					    let thedata=data.data;
+					    if (!thedata) {
+		                    if (data.error && data.error.length) {
+		                        message.warning(data.error[0].message);
+		                    };	
+		                    thedata = {}; 
+		              };   
+					    var contactIds=[];
+				        for(var i=0;i<data.data.length;i++){
+		                    let theData = data.data[i];
+		                    theArr.push(
+		                        <Select.Option value={theData.id} key={theData.id}>{theData.name}</Select.Option>
+		                    );
+		                    theId.push(
+		                        [theData.id,theData.name]
+		                    );
+		                };
+						this.setState({	
+							SuperArr:thedata,
+		                    contactsOption: theArr, 
+		                    theId: theId, 
+		                    orderStatusOptions:data.data,
+	                    });
+	                    
+					}.bind(this),
+				}).always(function () {
+				this.setState({
+	                loading: false
+	            });
+	        }.bind(this));
+	},
+	//判断浏览器类型
+	getExplorer() {
+		var explorer = window.navigator.userAgent;
+		//ie 
+		if(explorer.indexOf("MSIE") >= 0) {
+			return 'ie';
+		}
+		//firefox 
+		else if(explorer.indexOf("Firefox") >= 0) {
+			return 'Firefox';
+		}
+		//Chrome
+		else if(explorer.indexOf("Chrome") >= 0) {
+			return 'Chrome';
+		}
+		//Opera
+		else if(explorer.indexOf("Opera") >= 0) {
+			return 'Opera';
+		}
+		//Safari
+		else if(explorer.indexOf("Safari") >= 0) {
+			return 'Safari';
+		}
+	},
+    //导出为exel表格
+	tabExel() {
+		var table = document.querySelector('#daochu');
+		var idTmr;
+		//debugger;
+		//整个表格拷贝到EXCEL中
+		if(this.getExplorer() == 'ie') {
+			var curTbl = document.getElementById(tableid);
+			var oXL = new ActiveXObject("Excel.Application");
+			//创建AX对象excel 
+			var oWB = oXL.Workbooks.Add();
+			//获取workbook对象 
+			var xlsheet = oWB.Worksheets(1);
+			//激活当前sheet 
+			var sel = document.body.createTextRange();
+			sel.moveToElementText(curTbl);
+			//把表格中的内容移到TextRange中 
+			sel.select();
+			//全选TextRange中内容 
+			sel.execCommand("Copy");
+			//复制TextRange中内容  
+			xlsheet.Paste();
+			//粘贴到活动的EXCEL中       
+			oXL.Visible = true;
+			//设置excel可见属性
+			try {
+				var fname = oXL.Application.GetSaveAsFilename("Excel.xls", "Excel Spreadsheets (*.xls), *.xls");
+			} catch(e) {
+				print("Nested catch caught " + e);
+			} finally {
+				oWB.SaveAs(fname);
+
+				oWB.Close(savechanges = false);
+				//xls.visible = false;
+				oXL.Quit();
+				oXL = null;
+				//结束excel进程,退出完成
+				//window.setInterval("Cleanup();",1);
+				idTmr = window.setInterval("Cleanup();", 1);
+			}
+		} else {
+			console.log(table);
+			this.tableToExcel(table,this.getExplorer());
+		}
+		function Cleanup() {
+			window.clearInterval(idTmr);
+			CollectGarbage();
+		}
+	},
+	tableToExcel(table,name) {
+		var uri = 'data:application/vnd.ms-excel;base64,',
+			template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
+			base64 = function(s) {
+				return window.btoa(unescape(encodeURIComponent(s)))
+			},
+			format = function(s, c) {
+				return s.replace(/{(\w+)}/g,
+					function(m, p) {
+						return c[p];
+					})
+			}
+			console.log(table.nodeType);
+			if(!table.nodeType) table = document.getElementById(table);
+			console.log(table);
+			var ctx = {
+				worksheet: name || 'Worksheet',
+				table: table.innerHTML
+			};
+			window.location.href = uri + base64(format(template, ctx))
+	},
+	getInitialState() {
+		return {
+			selectedRowKeys: [],
+			selectedRows: [],
+			loading: false,
+			visible: false,
+			showDesc: false,
+			timeState:false,
+			Dtime:undefined,
+			selTime:'',
+			columns: [
+			{
+				title: '序号',
+				dataIndex: 'nub',
+				width:50,
+				key: 'nub',
+				fixed:false,
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:0
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},{
+				title: '姓名',
+				width:100,
+				fixed:false,
+				dataIndex: 'name',
+				key: 'name',
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:4
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},
+			{
+				title: '部门',
+				dataIndex: 'departmentName',
+				key: 'departmentName',
+				width:100,
+				fixed:false,
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text&&text.length>6?<span title={text}>{text.substr(0,6)+'…'}</span>:text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:0
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},{
+				title: '职位',
+				width:100,
+				fixed:false,
+				dataIndex: 'roleName',
+				key: 'roleName',
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:0
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			}, 
+			{
+				title: '私有客户数',
+				width:100,
+				fixed:false,
+				dataIndex: 'privateCustomersCount',
+				key: 'privateCustomersCount',
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:1
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},{			
+				title: '今日营销',
+				children: [
+					{
+						title: '营销总量',
+						width:100,
+						dataIndex: 'dailyFollowNo',
+						key: 'nudailyFollowNom',
+						sorter: (a, b) => a.dailyFollowNo - b.dailyFollowNo,
+						sorterOrder:'ascend'
+					},{
+						title: '电话量',
+						width:80,
+						dataIndex: 'dailyTelNo',
+						key: 'dailyTelNo',
+						sorter: (a, b) => a.dailyTelNo - b.dailyTelNo,
+					},{
+						title: '外拜量',
+						width:80,
+						dataIndex: 'dailyVisitNo',
+						key: 'dailyVisitNo',
+						sorter: (a, b) => a.dailyVisitNo - b.dailyVisitNo,
+					}
+				],
+			}, 
+			{   
+				title: '周营销累计',
+				children: [
+					{
+						title: '周营销总量',
+						width:110,
+						dataIndex: 'weekFollowNo',
+						key: 'weekFollowNo',
+						sorter: (a, b) => a.weekFollowNo - b.weekFollowNo,
+					},{
+						title: '电话量',
+						width:80,
+						dataIndex: 'weekTelNo',
+						key: 'weekTelNo',
+						sorter: (a, b) => a.weekTelNo - b.weekTelNo,
+					},{
+						title: '外拜量',
+						width:80,
+						dataIndex: 'weekVisitNo',
+						key: 'weekVisitNo',
+						sorter: (a, b) => a.weekVisitNo - b.weekVisitNo,
+					}
+				],
+			},{
+				title: '月营销累计',
+				children: [
+					{
+						title: '月营销总量',
+						width:110,
+						dataIndex: 'monthsFollowNo',
+						key: 'monthsFollowNo',
+						sorter: (a, b) => a.monthsFollowNo - b.monthsFollowNo,
+					},{
+						title: '电话量',
+						width:80,
+						dataIndex: 'monthsTelNo',
+						key: 'monthsTelNo',
+						sorter: (a, b) => a.monthsTelNo - b.monthsTelNo,
+					},{
+						title: '外拜量',
+						width:80,
+						dataIndex: 'monthsVisitNo',
+						key: 'monthsVisitNo',
+						sorter: (a, b) => a.monthsVisitNo - b.monthsVisitNo,
+					}
+				],
+			},{
+				title: '年营销累计',
+				children: [
+					{
+						title: '年营销总量',
+						width:110,
+						dataIndex: 'annualFollowNo',
+						key: 'annualFollowNo',
+						sorter: (a, b) => a.annualFollowNo - b.annualFollowNo,
+					},{
+						title: '电话量',
+						width:80,
+						dataIndex: 'annualTelNo',
+						key: 'annualTelNo',
+						sorter: (a, b) => a.annualTelNo - b.annualTelNo,
+					},{
+						title: '外拜量',
+						width:80,
+						dataIndex: 'annualVisitNo',
+						key: 'annualVisitNo',
+						sorter: (a, b) => a.annualVisitNo - b.annualVisitNo,
+					}
+				],
+			}
+			],
+			dataSource: [],
+		};
+	},
+	search() {
+		this.totalData()
+	},
+	reset() {
+		this.state.superId = undefined;//部门机构清零
+		this.totalData();
+	},
+	componentWillMount() {
+		this.totalData();
+		let times=new Date();
+		let nowTime=times.getFullYear()+'年'+(times.getMonth()+1)+'月'+times.getDate()+'日';
+		this.setState({
+			Nowtime:nowTime
+		})
+	},
+	render() {
+		let departmentArr = this.state.departmentArr || [];
+		return(
+			<div className='set-content'>
+				<p style={{fontSize:'20px',marginBottom:'10px'}}>客户营销统计表(员工)</p>
+				<div className="clearfix">
+					<span style={{fontSize:'16px'}}>部门机构 : </span>
+					<Select placeholder="选择部门"
+                            style={{ width:'200px',marginRight:'10px' }}
+                            value={this.state.superId}
+                            onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">
+                            {this.state.contactsOption}
+		          	</Select>
+		          	<Button type="primary" onClick={this.tabExel} >导出到表格</Button>
+                  	<Button type="primary" onClick={this.search} style={{marginLeft:'10px',marginRight:'10px'}}>搜索</Button>
+	                <Button onClick={this.reset}>重置</Button>
+				</div>
+				<div id='daochu'>
+					<div className="surfaceTitle">
+						<span className="nowtime">{this.state.timeState?this.state.txtTime:this.state.Nowtime}</span>
+						<span>客户营销统计表(员工)</span>
+						<span>(每日17:00统计当天数据)</span>
+					</div>
+					<div className="patent-table">
+						<div className="scroll">
+		                    <Spin spinning={this.state.loading}>
+		                        <Table columns={this.state.columns}
+		                            dataSource={this.state.dataSource}
+		                            
+		                            bordered
+		                            pagination={false}
+		                            />
+		                    </Spin>
+		                </div>
+		            </div>
+	            </div>
+			</div>
+		)
+	}
+});
+
+export default DiurnalStatisticsOne;

+ 19 - 0
js/component/manageCenter/customer/customerMarketing/report.less

@@ -0,0 +1,19 @@
+.set-content {
+    background: #fff;
+    padding: 20px;
+    .clearfix{
+        clear:both
+    }
+    .ant-table-thead > tr > th[rowspan],.ant-table-bordered .ant-table-thead > tr > th,.ant-table-bordered .ant-table-thead > tr > th, .ant-table-bordered .ant-table-tbody > tr > td{
+        text-align: center;
+    }
+    .surfaceTitle{
+        font-size: 18px;
+        text-align: center;
+        margin-bottom: 5px;
+    }
+    .surfaceTitle .nowtime{
+        margin-left: 20px;
+        margin-right: 20px;
+    }
+}

+ 530 - 0
js/component/manageCenter/customer/customerMarketing/timeStatistics.jsx

@@ -0,0 +1,530 @@
+import React from 'react';
+import { Select, Spin, Input, Table, Button ,message,DatePicker} from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import './report.less';
+import { post } from '../../../dataDic.js';
+
+const TimeStatistics = React.createClass({
+	loadData(totalArr,pageNo) {
+		if(this.state.selTime){
+			var newTime=this.state.selTime;
+			var timeArr=newTime.split('-');
+			var txtTime=timeArr[0]+'年'+timeArr[1]+'月'+timeArr[2]+'日';
+			this.setState({
+				timeState:true,
+				txtTime:txtTime,
+			})
+		}
+		let total=totalArr;
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/report/sales/personal",
+			data: {
+				pNo: pageNo || 1,
+                pSize: 10,
+				date:this.state.selTime?(this.state.selTime+' '+'00:00:00'):'',
+				depName:this.state.departmentSearch,
+				name:this.state.uesrNameSearch,
+			},
+			success: function(data) {
+				let thedata = data.data;
+				let theArr = [];
+				if(!data.data) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+					thedata = {};
+				} else {
+					thedata.map(function(item, index) {
+						var yTime=new Date(item.enrollTime).toLocaleDateString();
+						let nub=index+1;
+						theArr.push({
+							key: index,
+							theNumber:false,
+							nub:nub,
+							id: item.id,
+							name:item.name, //姓名
+							departmentName:item.departmentName,//部门
+							position:item.position, //职务
+							enrollTime:yTime,// 入职时间
+							dailyOrderCount:item.values.daily.orderCount,//日签单业绩
+							dailyOrderAmount:item.values.daily.orderAmount,//日签单业绩
+							weeklyOrderCount:item.values.weekly.orderCount,//周签单业绩
+							weeklyOrderAmount:item.values.weekly.orderAmount,//周签单业绩
+							monthlyOrderCount:item.values.monthly.orderCount,//月签单业绩
+							monthlyOrderAmount:item.values.monthly.orderAmount,//月签单业绩
+							quarterlyOrderCount:item.values.quarterly.orderCount,//季签单业绩
+							quarterlyOrderAmount:item.values.quarterly.orderAmount,//季签单业绩
+							annuallyOrderCount:item.values.annually.orderCount,//年签单业绩
+							annuallyOrderAmount:item.values.annually.orderAmount,//年签单业绩
+						})
+					})
+					this.state.pagination.current =pageNo;
+					this.state.pagination.total=total.totalRecordCount+Math.floor(total.totalRecordCount/10);
+				};
+				if(!data.data.length){
+					this.state.pagination.total=0;
+				};
+				if(theArr.length){
+					theArr.push(
+							{
+								key:9999999,
+								theNumber:true,
+								nub:data.data.length+1,
+								name:'',
+								position:'', //职务
+								enrollTime:'',// 入职时间
+								departmentName:'合计',
+								dailyOrderCount:total.dailyTotalCount,//日签单业绩
+								dailyOrderAmount:total.dailyTotalAmount,//日签单业绩
+								weeklyOrderCount:total.weeklyTotalCount,//周签单业绩
+								weeklyOrderAmount:total.weeklyTotalAmount,//周签单业绩
+								monthlyOrderCount:total.monthlyTotalCount,//月签单业绩
+								monthlyOrderAmount:total.monthlyTotalAmount,//月签单业绩
+								quarterlyOrderCount:total.quarterlyTotalCount,//季签单业绩
+								quarterlyOrderAmount:total.quarterlyTotalAmount,//季签单业绩
+								annuallyOrderCount:total.annuallyTotalCount,//年签单业绩
+								annuallyOrderAmount:total.annuallyTotalAmount,//年签单业绩
+							}
+						)
+					}
+				this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination,
+				})
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	totalData(page) {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/report/sales/total",
+			data: {
+				date:this.state.selTime?(this.state.selTime+' '+'00:00:00'):'',
+				depName:this.state.departmentSearch,
+				name:this.state.uesrNameSearch,
+			},
+			success: function(data) {
+				let thedata = data.data;
+				let theArr = [];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+					thedata = {};
+				} 
+				this.loadData(thedata,page)
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	departmentList() {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "post",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/organization/selectSuperId",
+			data: {
+
+			},
+			success: function(data) {
+				let thedata = data.data;
+				let theArr = [];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+					thedata = {};
+				} else {
+					thedata.map(function(item, index) {
+						theArr.push({
+							key: index,
+							name: item.name,
+							id: item.id,
+							depNo: item.depNo
+						})
+					})
+				}
+				this.setState({
+					departmentArr: theArr,
+				})
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	getInitialState() {
+		return {
+			selectedRowKeys: [],
+			selectedRows: [],
+			loading: false,
+			visible: false,
+			showDesc: false,
+			timeState:false,
+			pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 11,
+                showQuickJumper: true,
+                pageSize: 11,
+                onChange: function (page) {
+                    this.totalData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+			columns: [
+			{
+				title: '序号',
+				dataIndex: 'nub',
+				width:50,
+				fixed:true,
+				key: 'nub',
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:1
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},
+			{
+				title: '姓名',
+				dataIndex: 'name',
+				width:100,
+				fixed:true,
+				key: 'name',
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:0
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},{
+				title: '部门',
+				dataIndex: 'departmentName',
+				width:100,
+				fixed:true,
+				key: 'departmentName',
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text&&text.length>6?<span title={text}>{text.substr(0,6)+'…'}</span>:text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:4
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			}, 
+			{
+				title: '职务',
+				dataIndex: 'position',
+				key: 'position',
+				fixed:true,
+				width:100,
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:0
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},{
+				title: '入职时间',
+				width:100,
+				fixed:true,
+				dataIndex: 'enrollTime',
+				key: 'enrollTime',
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:0
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			},{
+				title: '当日营销客户数',
+				children: [
+					{
+						title: '总数',
+						dataIndex: 'num',
+						width:70,
+						key: 'num',
+						sorter: (a, b) => a.num - b.num,
+					},{
+						title: '新增',
+						dataIndex: 'age2',
+						width:70,
+						key: 'age2',
+						sorter: (a, b) => a.age - b.age,
+					},{
+						title: '回访',
+						width:70,
+						dataIndex: 'age3',
+						key: 'age3',
+						sorter: (a, b) => a.age - b.age,
+					},{
+						title: '有效',
+						width:70,
+						dataIndex: 'age4',
+						key: 'age4',
+						sorter: (a, b) => a.age - b.age,
+					},
+				],
+			}, {
+				title: '当日营销方式',
+				children: [
+					{
+						title: '总数',
+						width:70,
+						dataIndex: 'age11',
+						key: 'age11',
+						sorter: (a, b) => a.age - b.age,
+					},{
+						title: '电话',
+						width:70,
+						dataIndex: 'age22',
+						key: 'age22',
+						sorter: (a, b) => a.age - b.age,
+					},{
+						title: '外拜',
+						width:70,
+						dataIndex: 'age33',
+						key: 'age33',
+						sorter: (a, b) => a.age - b.age,
+					},{
+						title: '邮件',
+						width:70,
+						dataIndex: 'age44',
+						key: 'age44',
+						sorter: (a, b) => a.age - b.age,
+					},{
+						title: '微信',
+						width:70,
+						dataIndex: 'age55',
+						key: 'age55',
+						sorter: (a, b) => a.age - b.age,
+					}
+				],
+			},
+			{
+				title: '本日签单业绩',
+				children: [
+					{
+						title: '数量',
+						width:70,
+						dataIndex: 'dailyOrderCount',
+						key: 'dailyOrderCount',
+						sorter: (a, b) => a.dailyOrderCount - b.dailyOrderCount,
+					},{
+						title: '金额',
+						width:70,
+						dataIndex: 'dailyOrderAmount',
+						key: 'dailyOrderAmount',
+						sorter: (a, b) => a.dailyOrderAmount - b.dailyOrderAmount,
+					}
+				],
+			},{
+				title: '本周签单业绩',
+				children: [
+					{
+						title: '数量',
+						width:70,
+						dataIndex: 'weeklyOrderCount',
+						key: 'weeklyOrderCount',
+						sorter: (a, b) => a.weeklyOrderCount - b.weeklyOrderCount,
+					},{
+						title: '金额',
+						width:70,
+						dataIndex: 'weeklyOrderAmount',
+						key: 'weeklyOrderAmount',
+						sorter: (a, b) => a.weeklyOrderAmount - b.weeklyOrderAmount,
+					}
+				],
+			},{
+				title: '本月签单业绩',
+				children: [
+					{
+						title: '数量',
+						width:70,
+						dataIndex: 'monthlyOrderCount',
+						key: 'monthlyOrderCount',
+						sorter: (a, b) => a.monthlyOrderCount - b.monthlyOrderCount,
+					},{
+						title: '金额',
+						width:70,
+						dataIndex: 'monthlyOrderAmount',
+						key: 'monthlyOrderAmount',
+						sorter: (a, b) => a.monthlyOrderAmount - b.monthlyOrderAmount,
+					}
+				],
+			},{
+				title: '本季签单业绩',
+				children: [
+					{
+						title: '数量',
+						width:70,
+						dataIndex: 'quarterlyOrderCount',
+						key: 'quarterlyOrderCount',
+						sorter: (a, b) => a.quarterlyOrderCount - b.quarterlyOrderCount,
+					},{
+						title: '金额',
+						width:70,
+						dataIndex: 'quarterlyOrderAmount',
+						key: 'quarterlyOrderAmount',
+						sorter: (a, b) => a.quarterlyOrderAmount - b.quarterlyOrderAmount,
+					}
+				],
+			},{
+				title: '本年签单业绩',
+				children: [
+					{
+						title: '数量',
+						width:70,
+						dataIndex: 'annuallyOrderCount',
+						key: 'annuallyOrderCount',
+						sorter: (a, b) => a.annuallyOrderCount - b.annuallyOrderCount,
+					},{
+						title: '金额',
+						width:70,
+						dataIndex: 'annuallyOrderAmount',
+						key: 'annuallyOrderAmount',
+						sorter: (a, b) => a.annuallyOrderAmount - b.annuallyOrderAmount,
+					}
+				],
+			}
+			],
+			dataSource: [],
+		};
+	},
+	search() {
+		this.totalData()
+	},
+	reset() {
+		this.state.departmentSearch = undefined;
+		this.state.postSearch = undefined;
+		this.state.uesrNameSearch = '';
+		this.state.Dtime = undefined;
+		this.state.selTime='';
+		this.state.timeState=false;
+		this.totalData();
+	},
+	//时间选择
+    selTime(value,index){
+    	this.setState({
+    		Dtime:value,
+    		selTime:index
+    	})
+    },
+	componentWillMount() {
+		this.departmentList();
+		this.totalData();
+		let times=new Date();
+		let nowTime=times.getFullYear()+'年'+(times.getMonth()+1)+'月'+times.getDate()+'日';
+		this.setState({
+			Nowtime:nowTime
+		})
+	},
+	render() {
+		let departmentArr = this.state.departmentArr || [];
+		return(
+			<div className='set-content'>
+				<span style={{fontSize:'20px'}}>个人业绩统计报表</span>
+				<div className="clearfix">
+					<Select placeholder="部门机构"
+                        style={{ width: 150 ,marginRight:'10px',marginTop:'10px',marginBottom:'10px'}}
+                        value={this.state.departmentSearch}
+                        onChange={(e) => { this.setState({ departmentSearch: e }) }}>
+                        {
+                            departmentArr.map(function (item) {
+                                return <Select.Option key={item.name} >{item.name}</Select.Option>
+                            })
+                        }
+                  	</Select>
+                  	<Input  value={this.state.uesrNameSearch} placeholder="用户姓名" style={{width:'150px',marginRight:'5px'}}
+                  			onChange={(e)=>{this.setState({uesrNameSearch:e.target.value})}} />
+                  	<span style={{fontSize:'16px'}}>选择日期 : </span>
+					<DatePicker onChange={this.selTime} value={this.state.Dtime}/>
+                  	<Button type="primary" onClick={this.search} style={{marginLeft:'10px',marginRight:'10px'}}>搜索</Button>
+	                <Button onClick={this.reset}>重置</Button>
+				</div>
+				<div className="surfaceTitle">
+					<span className="nowtime">{this.state.timeState?this.state.txtTime:this.state.Nowtime}</span>
+					<span>个人营销业绩统计表</span>
+					<span>(每日17:00统计当天数据)</span>
+				</div>
+				<div className="patent-table">
+					<div className="scroll">
+	                    <Spin spinning={this.state.loading}>
+	                        <Table columns={this.state.columns}
+	                            dataSource={this.state.dataSource}
+	                            bordered
+	                            scroll={{x:1780}}
+	                            pagination={this.state.pagination}
+	                            />
+	                    </Spin>
+	                </div>
+	            </div>
+			</div>
+		)
+	}
+});
+
+export default TimeStatistics;

+ 0 - 0
js/component/manageCenter/customer/report/personalReportOne.jsx


+ 5 - 3
js/component/manageCenter/servicesManage/projectOrder/projectManagement/projectManageDetaile.jsx

@@ -1426,15 +1426,17 @@ const MySettlementDetaile = Form.create()(React.createClass({
 					                    	<span>{this.state.deletedSign==2?'锁定':'未锁定'}</span>
 			                    	</FormItem>
 			                    	<div className='clearfix'>
-							        	{this.state.taskStatus<1?<FormItem
+							        	{this.state.taskStatus<1?
+							        	<FormItem
 								            labelCol={{ span: 4 }}
 								            wrapperCol={{ span: 16 }}
 								            label="任务说明" >
 								                <Input type="textarea" placeholder="请输入订单留言" rows={4}  value={this.state.taskComment} 
 									    				onChange={(e)=>{this.setState({taskComment:e.target.value})}}/>			                      
 								        </FormItem>:
-								        <FormItem className="half-item"
-				                            {...formItemLayout}
+								        <FormItem 
+				                            labelCol={{ span: 4 }}
+								            wrapperCol={{ span: 16 }}
 				                            label="任务说明" >
 					                    	<span>{this.state.taskComment}</span>
 				                    	</FormItem>}