dengzhiguo 6 years ago
parent
commit
3712c9911b

+ 5 - 5
js/component/manageCenter/customer/customerMarketing/diurnalStatistics.jsx

@@ -17,7 +17,7 @@ const DiurnalStatistics = React.createClass({
 			method: "get",
 			dataType: "json",
 			crossDomain: false,
-			url: globalConfig.context + "/api/admin/report/sales/marketingStatistics",
+			url: globalConfig.context + "/open/api/admin/report/sales/marketingStatistics",
 			data: {
 				type:'1',
 				depId:this.state.superId,//部门机构
@@ -53,7 +53,7 @@ const DiurnalStatistics = React.createClass({
 							weekVisitNo:item.weeklyVisitNo,//周外拜量
 							monthsTelNo:item.monthTelNo,//月电话量
 							monthsFollowNo:item.monthFollowNo,//月总量
-							monthsVisitNo:item.monshVisitNo,//月外拜量
+							monthsVisitNo:item.monthVisitNo,//月外拜量
 							annualTelNo:item.yearTelNo,//年电话量
 							annualFollowNo:item.yearFollowNo,//年总量
 							annualVisitNo:item.yearVisitNo,//年外拜量
@@ -102,7 +102,7 @@ const DiurnalStatistics = React.createClass({
 			method: "get",
 			dataType: "json",
 			crossDomain: false,
-			url: globalConfig.context + "/api/admin/report/sales/countMarketingStatistics",
+			url: globalConfig.context + "/open/api/admin/report/sales/countMarketingStatistics",
 			data: {
 				type:'1',
 				depId:this.state.superId,//部门机构
@@ -535,8 +535,8 @@ const DiurnalStatistics = React.createClass({
 				</div>
 				<div id='daochu'>
 					<div className="surfaceTitle">
-						<span className="nowtime">{this.state.timeState?this.state.txtTime:this.state.Nowtime}</span>
-						<span>客户营销统计表(部门)</span>
+						<span className="nowtime" style={{fontWeight:'bold'}}>{this.state.timeState?this.state.txtTime:this.state.Nowtime}</span>
+						<span style={{fontWeight:'bold'}}>客户营销统计表(部门)</span>
 					</div>
 					<div className="patent-table" id='daochu'>
 						<div className="scroll">

+ 5 - 5
js/component/manageCenter/customer/customerMarketing/diurnalStatisticsOne.jsx

@@ -15,7 +15,7 @@ const DiurnalStatisticsOne = React.createClass({
 			method: "get",
 			dataType: "json",
 			crossDomain: false,
-			url: globalConfig.context + "/api/admin/report/sales/marketingStatistics",
+			url: globalConfig.context + "/open/api/admin/report/sales/marketingStatistics",
 			data: {
 				type:'0',
 				depId:this.state.superId,//部门机构
@@ -51,7 +51,7 @@ const DiurnalStatisticsOne = React.createClass({
 							weekVisitNo:item.weeklyVisitNo,//周外拜量
 							monthsTelNo:item.monthTelNo,//月电话量
 							monthsFollowNo:item.monthFollowNo,//月总量
-							monthsVisitNo:item.monshVisitNo,//月外拜量
+							monthsVisitNo:item.monthVisitNo,//月外拜量
 							annualTelNo:item.yearTelNo,//年电话量
 							annualFollowNo:item.yearFollowNo,//年总量
 							annualVisitNo:item.yearVisitNo,//年外拜量
@@ -99,7 +99,7 @@ const DiurnalStatisticsOne = React.createClass({
 			method: "get",
 			dataType: "json",
 			crossDomain: false,
-			url: globalConfig.context + "/api/admin/report/sales/countMarketingStatistics",
+			url: globalConfig.context + "/open/api/admin/report/sales/countMarketingStatistics",
 			data: {
 				type:'0',
 				depId:this.state.superId,//部门机构
@@ -515,8 +515,8 @@ const DiurnalStatisticsOne = React.createClass({
 				</div>
 				<div id='daochu1'>
 					<div className="surfaceTitle">
-						<span className="nowtime">{this.state.timeState?this.state.txtTime:this.state.Nowtime}</span>
-						<span>客户营销统计表(员工)</span>
+						<span className="nowtime" style={{fontWeight:'bold'}}>{this.state.timeState?this.state.txtTime:this.state.Nowtime}</span>
+						<span style={{fontWeight:'bold'}}>客户营销统计表(员工)</span>
 					</div>
 					<div className="patent-table">
 						<div className="scroll">

+ 22 - 32
js/component/manageCenter/customer/customerMarketing/timeStatistics.jsx

@@ -18,7 +18,7 @@ const DiurnalStatistics = React.createClass({
 			method: "get",
 			dataType: "json",
 			crossDomain: false,
-			url: globalConfig.context + "/api/admin/report/sales/marketingStatistics",
+			url: globalConfig.context + "/open/api/admin/report/sales/sometimeMarketingStatistics",
 			data: {
 				type:'1',
 				timeType:this.state.releaseDate[0]?4:timeTypes,
@@ -46,21 +46,11 @@ const DiurnalStatistics = React.createClass({
 							departmentId:item.departmentId,//部门ID
 							departmentName:item.departmentName,//部门名称
 							departmentManagerName:item.departmentManagerName,//部门负责人名称
-							departmentNumber:item.departmentNumber, //部门人数
-							privateCustomersCount:item.privateCustomersCount,// 部门客户数
-							dailyTelNo:item.dayTelNo,//日电话量
-							dailyVisitNo:item.dayVisitNo,//日外拜量
-							dailyFollowNo:item.dayFollowNo,//日营销总量
-							dailyAVG:parseFloat(item.dayAVG).toFixed(2),//日人均营销量
-							weekTelNo:item.weeklyTelNo,//周电话量
-							weekFollowNo:item.weeklyFollowNo,//周总量
-							weekVisitNo:item.weeklyVisitNo,//周外拜量
-							monthsTelNo:item.monthTelNo,//月电话量
-							monthsFollowNo:item.monthFollowNo,//月总量
-							monthsVisitNo:item.monshVisitNo,//月外拜量
-							annualTelNo:item.yearTelNo,//年电话量
-							annualFollowNo:item.yearFollowNo,//年总量
-							annualVisitNo:item.yearVisitNo,//年外拜量
+							roleName:item.roleName, //角色职位
+							countVisitNo:item.countVisitNo,//拜访量
+							countTelNo:item.countTelNo,//电话量
+							countFollowNo:item.countFollowNo,//总量
+							dayAVG:parseFloat(item.dayAVG).toFixed(2),//营销日均量
 						})
 					})
 				}
@@ -106,12 +96,12 @@ const DiurnalStatistics = React.createClass({
 			method: "get",
 			dataType: "json",
 			crossDomain: false,
-			url: globalConfig.context + "/api/admin/report/sales/countMarketingStatistics",
+			url: globalConfig.context + "/open/api/admin/report/sales/countMarketingStatistics",
 			data: {
 				type:'1',
 				timeType:this.state.releaseDate[0]?4:timeTypes,
-				startDate: this.state.releaseDate[0]?(this.state.releaseDate[0]+' '+'00:00:00'):'',
-				endDate: this.state.releaseDate[1]?(this.state.releaseDate[1]+' '+'00:00:00'):'',
+				startDate: this.state.releaseDate[0]?(this.state.releaseDate[0]+' '+'00:00:00'):null,
+				endDate: this.state.releaseDate[1]?(this.state.releaseDate[1]+' '+'00:00:00'):null,
 				depId:this.state.superId,//部门机构
 			},
 			success: function(data) {
@@ -352,9 +342,9 @@ const DiurnalStatistics = React.createClass({
 			{
 				title: '营销总量',
 				fixed:false,
-				dataIndex: 'departmentNumber',
-				key: 'departmentNumber',
-				sorter: (a, b) => a.departmentNumber - b.departmentNumber,
+				dataIndex: 'countFollowNo',
+				key: 'countFollowNo',
+				sorter: (a, b) => a.countFollowNo - b.countFollowNo,
 				render:(text,record)=>{
 				     if(!record.theNumber){
 				     	return text
@@ -373,9 +363,9 @@ const DiurnalStatistics = React.createClass({
 			{
 				title: '电话量',
 				fixed:false,
-				dataIndex: 'privateCustomersCount',
-				key: 'privateCustomersCount',
-				sorter: (a, b) => a.privateCustomersCount - b.privateCustomersCount,
+				dataIndex: 'countTelNo',
+				key: 'countTelNo',
+				sorter: (a, b) => a.countTelNo - b.countTelNo,
 				render:(text,record)=>{
 				     if(!record.theNumber){
 				     	return text
@@ -394,9 +384,9 @@ const DiurnalStatistics = React.createClass({
 			{
 				title: '外拜量',
 				fixed:false,
-				dataIndex: 'dailyFollowNo',
-				key: 'dailyFollowNo',
-				sorter: (a, b) => a.dailyFollowNo - b.dailyFollowNo,
+				dataIndex: 'countVisitNo',
+				key: 'countVisitNo',
+				sorter: (a, b) => a.countVisitNo - b.countVisitNo,
 				render:(text,record)=>{
 				     if(!record.theNumber){
 				     	return text
@@ -415,9 +405,9 @@ const DiurnalStatistics = React.createClass({
 			{
 				title: '营销日均量',
 				fixed:false,
-				dataIndex: 'dailyAVG',
-				key: 'dailyAVG',
-				sorter: (a, b) => a.dailyAVG - b.dailyAVG,
+				dataIndex: 'dayAVG',
+				key: 'dayAVG',
+				sorter: (a, b) => a.dayAVG - b.dayAVG,
 				render:(text,record)=>{
 				     if(!record.theNumber){
 				     	return text
@@ -475,7 +465,7 @@ const DiurnalStatistics = React.createClass({
 	},
 	componentWillMount() {
 		//this.loadData();
-		this.totalData();
+		this.totalData(0);
 		let times=new Date();
 		let nowTime=times.getFullYear()+'年'+(times.getMonth()+1)+'月'+times.getDate()+'日';
 		this.setState({

+ 73 - 117
js/component/manageCenter/customer/customerMarketing/timeStatisticsOne.jsx

@@ -15,7 +15,7 @@ const DiurnalStatisticsOne = React.createClass({
 			method: "get",
 			dataType: "json",
 			crossDomain: false,
-			url: globalConfig.context + "/api/admin/report/sales/marketingStatistics",
+			url: globalConfig.context + "/open/api/admin/report/sales/sometimeMarketingStatistics",
 			data: {
 				type:'0',
 				timeType:this.state.releaseDate[0]?4:timeTypes,
@@ -44,20 +44,10 @@ const DiurnalStatisticsOne = React.createClass({
 							departmentName:item.departmentName,//部门名称
 							departmentManagerName:item.departmentManagerName,//部门负责人名称
 							roleName:item.roleName, //职位权限
-							privateCustomersCount:item.privateCustomersCount,// 部门客户数
-							dailyTelNo:item.dayTelNo,//日电话量
-							dailyVisitNo:item.dayVisitNo,//日外拜量
-							dailyFollowNo:item.dayFollowNo,//日营销总量
-							dailyAVG:parseFloat(item.dayAVG).toFixed(2),//日人均营销量
-							weekTelNo:item.weeklyTelNo,//周电话量
-							weekFollowNo:item.weeklyFollowNo,//周总量
-							weekVisitNo:item.weeklyVisitNo,//周外拜量
-							monthsTelNo:item.monthTelNo,//月电话量
-							monthsFollowNo:item.monthFollowNo,//月总量
-							monthsVisitNo:item.monshVisitNo,//月外拜量
-							annualTelNo:item.yearTelNo,//年电话量
-							annualFollowNo:item.yearFollowNo,//年总量
-							annualVisitNo:item.yearVisitNo,//年外拜量
+							countVisitNo:item.countVisitNo,//拜访量
+							countTelNo:item.countTelNo,//电话量
+							countFollowNo:item.countFollowNo,//总量
+							dayAVG:parseFloat(item.dayAVG).toFixed(2),//营销日均量
 						})
 					})
 				}
@@ -102,7 +92,7 @@ const DiurnalStatisticsOne = React.createClass({
 			method: "get",
 			dataType: "json",
 			crossDomain: false,
-			url: globalConfig.context + "/api/admin/report/sales/countMarketingStatistics",
+			url: globalConfig.context + "/open/api/admin/report/sales/countMarketingStatistics",
 			data: {
 				type:'0',
 				timeType:this.state.releaseDate[0]?4:timeTypes,
@@ -308,7 +298,6 @@ const DiurnalStatisticsOne = React.createClass({
 				}
 			},{
 				title: '姓名',
-				width:100,
 				fixed:false,
 				dataIndex: 'name',
 				key: 'name',
@@ -331,7 +320,6 @@ const DiurnalStatisticsOne = React.createClass({
 				title: '部门',
 				dataIndex: 'departmentName',
 				key: 'departmentName',
-				width:100,
 				fixed:false,
 				render:(text,record)=>{
 				     if(!record.theNumber){
@@ -349,7 +337,6 @@ const DiurnalStatisticsOne = React.createClass({
 				}
 			},{
 				title: '职位',
-				width:100,
 				fixed:false,
 				dataIndex: 'roleName',
 				key: 'roleName',
@@ -369,11 +356,11 @@ const DiurnalStatisticsOne = React.createClass({
 				}
 			}, 
 			{
-				title: '私有客户数',
-				width:100,
+				title: '营销总量',
 				fixed:false,
-				dataIndex: 'privateCustomersCount',
-				key: 'privateCustomersCount',
+				dataIndex: 'countFollowNo',
+				key: 'countFollowNo',
+				sorter: (a, b) => a.countFollowNo - b.countFollowNo,
 				render:(text,record)=>{
 				     if(!record.theNumber){
 				     	return text
@@ -388,100 +375,69 @@ const DiurnalStatisticsOne = React.createClass({
 				     }
 				     
 				}
-			},{			
-				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,
-					}
-				],
+			{
+				title: '电话量',
+				fixed:false,
+				dataIndex: 'countTelNo',
+				key: 'countTelNo',
+				sorter: (a, b) => a.countTelNo - b.countTelNo,
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:1
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			}, 
+			{
+				title: '外拜量',
+				fixed:false,
+				dataIndex: 'countVisitNo',
+				key: 'countVisitNo',
+				sorter: (a, b) => a.countVisitNo - b.countVisitNo,
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:1
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
+			}, 
+			{
+				title: '营销日均量',
+				fixed:false,
+				dataIndex: 'dayAVG',
+				key: 'dayAVG',
+				sorter: (a, b) => a.dayAVG - b.dayAVG,
+				render:(text,record)=>{
+				     if(!record.theNumber){
+				     	return text
+				     }else{
+				     	return {
+				     		children: text,
+      						props: {
+      							colSpan:1
+      						},
+				     	}
+				     	
+				     }
+				     
+				}
 			}
 			],
 			dataSource: [],
@@ -515,7 +471,7 @@ const DiurnalStatisticsOne = React.createClass({
 		this.totalData(3);
 	},
 	componentWillMount() {
-		this.totalData();
+		this.totalData(0);
 		let times=new Date();
 		let nowTime=times.getFullYear()+'年'+(times.getMonth()+1)+'月'+times.getDate()+'日';
 		this.setState({