Browse Source

打卡统计

HW 3 years ago
parent
commit
f58d36ba2b

+ 0 - 1
js/component/manageCenter/customer/NEW/intentionCustomer/channel.jsx

@@ -551,7 +551,6 @@ class Channel extends Component{
 
     closeDesc(){
         this.setState({
-            categoryArr:[],
             followData:'',
             visitModul:false
         })

+ 1 - 1
js/component/manageCenter/customer/NEW/intentionCustomer/followDetail.jsx

@@ -434,7 +434,7 @@ const FollowDetail = React.createClass({
                       this.setState({ contactType: e.target.value });
                     }}
                   >
-                    <Radio value={0}>外出</Radio>
+                    {/*<Radio value={0}>外出</Radio>*/}
                     <Radio value={1}>电话</Radio>
                     <Radio value={2}>QQ</Radio>
                     <Radio value={3}>微信</Radio>

+ 197 - 52
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/visitDetail.jsx

@@ -1,7 +1,7 @@
 import React from 'react'
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
-import {Modal,Form,layout,Radio,Button,Input,Spin,Table,Select,Popconfirm,message} from 'antd';
+import {Modal, Form, layout, Radio, Button, Input, Spin, Table, Select, Popconfirm, message, Tag, Tooltip} from 'antd';
 import {intentionalService,newFollow,customerStatus} from '@/dataDic.js';
 import {getCompanyIntention,getContactType,getfllowSituation,getcustomerStatue} from '@/tools.js';
 const FormItem =Form.Item;
@@ -13,8 +13,51 @@ const VisitDetail = React.createClass({
 			visitModul:false,
 			loading:false,
 			data:[],
+			publicReleaseLog:[],
+			followDtails:{},
+			intentionPublicReleaseLog:[
+				{
+					title: '操作状态',
+					dataIndex: 'status',
+					key: 'status',
+					render: (text) => (
+						text === 0 ? <Tag color="#F00">驳回</Tag> :
+							text === 1 ? <Tag color="#58a3ff">发起</Tag> :
+								text === 2 ? <Tag color="#87d068">通过</Tag> : null
+					)
+				},
+				{
+					title: '操作人',
+					dataIndex: 'aname',
+					key: 'aname',
+				},
+				{
+					title: '操作时间',
+					dataIndex: 'createTimes',
+					key: 'createTimes',
+				},
+				{
+					title: '备注',
+					width:120,
+					dataIndex: 'remarks',
+					key: 'remarks',
+					render: (text) => {
+						return (
+							<Tooltip placement="topLeft" title={text}>
+								<div style={{
+									maxWidth:'120px',
+									overflow:'hidden',
+									textOverflow: "ellipsis",
+									whiteSpace:'nowrap',
+								}}>{text}</div>
+							</Tooltip>
+						)
+					}
+				},
+			],
 			//业务意向列表
-			intentionList: [{
+			intentionList: [
+				{
 					title: '业务名称',
 					dataIndex: 'businessGlossoryId',
 					width:120,
@@ -58,9 +101,9 @@ const VisitDetail = React.createClass({
 					key: 'followSituation',
 					render: (text, record, index) => {
 						return <div>
-									
+
                              			 <span>{getfllowSituation(text)}</span>
-                              		 
+
 								</div>
 					}
 				}, {
@@ -80,9 +123,9 @@ const VisitDetail = React.createClass({
 					key: 'remarks',
 					render: (text, record, index) => {
 						return <div>
-									
+
 	                           		  <span title={text}>{text&&text.length>8?text.substr(0,8)+'…':text}</span>
-		                             
+
 	                            </div>
 					}
 				// }, {
@@ -125,7 +168,7 @@ const VisitDetail = React.createClass({
 			})
 		}
 	},
-	//进入修改拜访记录  
+	//进入修改拜访记录
 	visitModify(e) {
 		this.setState({
 			visitModul: true,
@@ -244,7 +287,7 @@ const VisitDetail = React.createClass({
 			visitModul: false
 		});
 	},
-	
+
 	//详情保存
 	visitSubmit(e){
 		e.preventDefault();
@@ -314,12 +357,68 @@ const VisitDetail = React.createClass({
 			data: this.state.data
 		})
 	},
+	getFollowDtails(e) {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			url: globalConfig.context + '/api/admin/release/followDtails',
+			data: {
+				id: e,
+			},
+			success: function(data) {
+				if(data.error.length === 0){
+					this.setState({
+						followDtails:data.data || {}
+					})
+				}else{
+					message.warning(data.error[0].message)
+				}
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	getListPublicReleaseLog(e) {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			url: globalConfig.context + '/api/admin/release/listPublicReleaseLog',
+			data: {
+				ufid: e,
+			},
+			success: function(data) {
+				if(data.error.length === 0){
+					this.setState({
+						publicReleaseLog:data.data || []
+					})
+				}else{
+					message.warning(data.error[0].message)
+				}
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
 	componentWillReceiveProps(nextProps) {
         if (nextProps.visitModul && nextProps.followData.followId) {
             this.setState({
 				visitModul: true,
 				loading: true,
 			})
+			if(nextProps.followData.contactType === "0"){
+				this.getListPublicReleaseLog(nextProps.followData.followId);
+				this.getFollowDtails(nextProps.followData.followId);
+			}
 			this.visitModify(nextProps.followData.followId)
         };
     },
@@ -338,59 +437,105 @@ const VisitDetail = React.createClass({
 			          width='1000px'
 			          visible={this.state.visitModul}
 			          onOk={this.visitOk}
-					  onCancel={this.visitCancel}							          							          
-			        >				    
+					  onCancel={this.visitCancel}
+			        >
 					    <Form layout="horizontal" id="demand-form" onSubmit={this.visitSubmit}>
 			    			<Spin spinning={this.state.loading}>
 			    			   	<div className="clearfix">
-			    			   		<FormItem 
-			                            labelCol={{ span:4 }}
-										wrapperCol={{ span: 20 }}
-			                            label="跟进方式" >
-						                <span>{this.state.contactType}</span>
-					                </FormItem>
-					                <div className="clearfix">
-						               	{!followData.readOnly&&<FormItem className="half-item"
-				                            {...formItemLayout}
-				                             label="当前联系人"
-				                             >
-						                    <span>{this.state.contacts}</span>
-						                </FormItem>}
-						                <FormItem className="half-item"
-				                            {...formItemLayout}
-				                             label="跟进时间"
-				                             >
-						                	<span>{this.state.followTime}</span>
-						                </FormItem>
-						                {!followData.readOnly&&<FormItem className="half-item"
-				                            {...formItemLayout}
-				                             label="联系电话"
-				                             >
-						                	<span>{this.state.contactMobile}</span>
-						                </FormItem>}
-					                </div>
-					                <div className="clearfix">
-					                	<FormItem
-					                        labelCol={{ span: 4 }}
-							                wrapperCol={{ span: 16 }}
-					                        label="跟进备注" >
-					                           	{
-					                              <span>{this.state.result}</span>
-					                            }
-					                    </FormItem>
-					                </div>
+									{
+										!(this.state.contactType === '外出' && Object.keys(this.state.followDtails).length > 0) ?
+											<div>
+												<FormItem
+													labelCol={{ span:4 }}
+													wrapperCol={{ span: 20 }}
+													label="跟进方式" >
+													<span>{this.state.contactType}</span>
+												</FormItem>
+												<div className="clearfix">
+													{!followData.readOnly&&<FormItem className="half-item"
+																					 {...formItemLayout}
+																					 label="当前联系人"
+													>
+														<span>{this.state.contacts}</span>
+													</FormItem>}
+													<FormItem className="half-item"
+															  {...formItemLayout}
+															  label="跟进时间"
+													>
+														<span>{this.state.followTime}</span>
+													</FormItem>
+													{!followData.readOnly&&<FormItem className="half-item"
+																					 {...formItemLayout}
+																					 label="联系电话"
+													>
+														<span>{this.state.contactMobile}</span>
+													</FormItem>}
+												</div>
+												<div className="clearfix">
+													<FormItem
+														labelCol={{ span: 4 }}
+														wrapperCol={{ span: 16 }}
+														label="跟进备注" >
+														{
+															<span>{this.state.result}</span>
+														}
+													</FormItem>
+												</div>
+											</div> : null
+									}
+									{this.state.contactType === '外出' && Object.keys(this.state.followDtails).length > 0 ? <div>
+										<div className="clearfix">
+											<FormItem
+												labelCol={{ span: 4 }}
+												wrapperCol={{ span: 16 }}
+												label="公出企业" >
+												<span>{this.state.followDtails.nickname}</span>
+											</FormItem>
+											<FormItem
+												labelCol={{ span: 4 }}
+												wrapperCol={{ span: 16 }}
+												label="公出时间" >
+												<span>{this.state.followDtails.releaseStarts + '~' + this.state.followDtails.releaseEnds}</span>
+											</FormItem>
+											<FormItem
+												labelCol={{ span: 4 }}
+												wrapperCol={{ span: 16 }}
+												label="公出地点" >
+												<span>{this.state.followDtails.userName}</span>
+											</FormItem>
+											<FormItem
+												labelCol={{ span: 4 }}
+												wrapperCol={{ span: 16 }}
+												label="审核情况" >
+												<span>
+													{
+														this.state.followDtails.status === 0 ? <Tag color="#F00">驳回</Tag> :
+															this.state.followDtails.status === 1 ? <Tag color="#58a3ff">审核中</Tag> :
+																this.state.followDtails.status === 2 ? <Tag color="#87d068">通过</Tag> : null}
+												</span>
+											</FormItem>
+										</div>
+										<div className="clearfix">
+											<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>打卡日志</div>
+											<Table
+												pagination={false}
+												columns={this.state.intentionPublicReleaseLog}
+												dataSource={this.state.publicReleaseLog}
+											/>
+										</div>
+									</div> : null}
 					                <div className="clearfix">
 					                 	<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向</div>
 					                 	<div className="clearfix" >
 		                    			    <Spin spinning={this.state.loading}>
-										      <Table 
+										      <Table
 										         rowKey={record => record.id}
 								            	 pagination={false}
-								            	 columns={this.state.intentionList} 
+								            	 columns={this.state.intentionList}
 								            	 dataSource={this.state.data}
 								            	 />
-										    </Spin> 
-										</div>	 
+										    </Spin>
+										</div>
 					                </div>
 			    			   	</div>
 			    			   	{!followData.readOnly&&<FormItem wrapperCol={{ span: 12, offset: 6 }}>
@@ -400,7 +545,7 @@ const VisitDetail = React.createClass({
 					   		</Spin>
 					    </Form>
 				</Modal> : <div/>}
-				<BusName 
+				<BusName
 					businessId={this.state.businessId}
 					busModul={this.state.busModul}
 					closeBus={this.closeBus}
@@ -410,4 +555,4 @@ const VisitDetail = React.createClass({
 		)
 	}
 })
-export default VisitDetail;
+export default VisitDetail;

+ 31 - 0
js/component/manageCenter/customer/NEW/query/queryCutomer.jsx

@@ -140,6 +140,37 @@ const QueryCustomer = React.createClass({
           title: "客户名称",
           dataIndex: "name",
           key: "name",
+          render: (text, record, index) => {
+            return (
+                record.channel=== 1 ? <span>
+                  <div style={{
+                    background:'#ef7207',
+                    color:'#FFF',
+                    padding: '1px 7px',
+                    borderRadius:'5px',
+                    fontSize:'12px',
+                    display: 'inline-block',
+                    marginRight:'10px'
+                  }}>
+						渠道
+					</div>
+                  {text}
+                </span> : text
+            )
+          }
+        },
+        {
+          title: "共享类型",
+          dataIndex: "shareType",
+          key: "shareType",
+          //0-私有 1-公共 2 签单
+          render: (text) => {
+            return (
+                text === '0' ? '私有':
+                    text === '1' ? '公共':
+                        text === '2' ? '签单': ''
+            )
+          }
         },
         {
           title: "地区",

+ 1 - 1
js/component/manageCenter/customer/NEW/signCustomer/followDetail.jsx

@@ -355,7 +355,7 @@ const FollowDetail = React.createClass({
                       this.setState({ contactType: e.target.value });
                     }}
                   >
-                    <Radio value={0}>外出</Radio>
+                    {/*<Radio value={0}>外出</Radio>*/}
                     <Radio value={1}>电话</Radio>
                     <Radio value={2}>QQ</Radio>
                     <Radio value={3}>微信</Radio>

+ 157 - 15
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/visitDetail.jsx

@@ -1,7 +1,7 @@
 import React from 'react'
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
-import {Modal,Form,layout,Radio,Button,Input,Spin,Table,Select,Popconfirm,message} from 'antd';
+import {Modal, Form, layout, Radio, Button, Input, Spin, Table, Select, Popconfirm, message, Tag, Tooltip} from 'antd';
 import {intentionalService,newFollow,customerStatus} from '@/dataDic.js';
 import {getCompanyIntention,getfllowSituation,getcustomerStatue,getContactType} from '@/tools.js';
 const FormItem =Form.Item;
@@ -12,6 +12,48 @@ const VisitDetail = React.createClass({
 			visitModul:false,
 			loading:false,
 			data:[],
+			publicReleaseLog:[],
+			followDtails:{},
+			intentionPublicReleaseLog:[
+				{
+					title: '操作状态',
+					dataIndex: 'status',
+					key: 'status',
+					render: (text) => (
+						text === 0 ? <Tag color="#F00">驳回</Tag> :
+							text === 1 ? <Tag color="#58a3ff">发起</Tag> :
+								text === 2 ? <Tag color="#87d068">通过</Tag> : null
+					)
+				},
+				{
+					title: '操作人',
+					dataIndex: 'aname',
+					key: 'aname',
+				},
+				{
+					title: '操作时间',
+					dataIndex: 'createTimes',
+					key: 'createTimes',
+				},
+				{
+					title: '备注',
+					width:120,
+					dataIndex: 'remarks',
+					key: 'remarks',
+					render: (text) => {
+						return (
+							<Tooltip placement="topLeft" title={text}>
+								<div style={{
+									maxWidth:'120px',
+									overflow:'hidden',
+									textOverflow: "ellipsis",
+									whiteSpace:'nowrap',
+								}}>{text}</div>
+							</Tooltip>
+						)
+					}
+				},
+			],
 			//业务意向列表
 			intentionList:[
 				{
@@ -33,7 +75,7 @@ const VisitDetail = React.createClass({
 					key: 'followSituation',
 					render: (text, record, index) => {
 						return <div>
-									
+
 	                               <span>{getfllowSituation(text)}</span>
                                </div>
 					}
@@ -44,7 +86,7 @@ const VisitDetail = React.createClass({
 					key: 'customerStatus',
 					render: (text, record, index) => {
 						return <div>
-									
+
 	                                <span>{getcustomerStatue(text)}</span>
                                </div>
 					}
@@ -56,14 +98,14 @@ const VisitDetail = React.createClass({
 					render: (text, record, index) => {
 						return <div>
 	                           		  <span title={text}>{text&&text.length>8?text.substr(0,8)+'…':text}</span>
-	                           		 
+
 	                             </div>
 					}
 				}
 			],
 		}
 	},
-	//进入修改拜访记录  
+	//进入修改拜访记录
 	visitModify(e) {
 		this.setState({
 			visitModul: true,
@@ -183,7 +225,7 @@ const VisitDetail = React.createClass({
 			visitModul: false
 		});
 	},
-	
+
 	//详情保存
 	visitSubmit(e){
 		e.preventDefault();
@@ -243,12 +285,68 @@ const VisitDetail = React.createClass({
 		}.bind(this));
 
 	},
+	getFollowDtails(e) {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			url: globalConfig.context + '/api/admin/release/followDtails',
+			data: {
+				id: e,
+			},
+			success: function(data) {
+				if(data.error.length === 0){
+					this.setState({
+						followDtails:data.data || {}
+					})
+				}else{
+					message.warning(data.error[0].message)
+				}
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
+	getListPublicReleaseLog(e) {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "get",
+			dataType: "json",
+			url: globalConfig.context + '/api/admin/release/listPublicReleaseLog',
+			data: {
+				ufid: e,
+			},
+			success: function(data) {
+				if(data.error.length === 0){
+					this.setState({
+						publicReleaseLog:data.data || []
+					})
+				}else{
+					message.warning(data.error[0].message)
+				}
+			}.bind(this),
+		}).always(function() {
+			this.setState({
+				loading: false
+			});
+		}.bind(this));
+	},
 	componentWillReceiveProps(nextProps) {
         if (nextProps.visitModul && nextProps.followData.followId) {
             this.setState({
 				visitModul: true,
 				loading: true,
 			})
+			if(nextProps.followData.contactType === "0"){
+				this.getListPublicReleaseLog(nextProps.followData.followId);
+				this.getFollowDtails(nextProps.followData.followId);
+			}
 			this.visitModify(nextProps.followData.followId)
         };
     },
@@ -260,19 +358,21 @@ const VisitDetail = React.createClass({
 		const followData= this.props.followData || []
 		return(
 			<div>
-				<Modal	
+				<Modal
 				      className="customeDetails"
 				      footer=''
 			          title="客户跟进详情"
 			          width='1000px'
 			          visible={this.state.visitModul}
 			          onOk={this.visitOk}
-					  onCancel={this.visitCancel}							          							          
-			        >				    
+					  onCancel={this.visitCancel}
+			        >
 					    <Form layout="horizontal" id="demand-form" onSubmit={this.visitSubmit}>
 			    			<Spin spinning={this.state.loading}>
 			    			   	<div className="clearfix">
-			    			   		<FormItem 
+									{!(this.state.contactType === '外出' && Object.keys(this.state.followDtails).length > 0) ?
+									<div>
+			    			   		<FormItem
 			                            labelCol={{ span:4 }}
 										wrapperCol={{ span: 20 }}
 			                            label="跟进方式" >
@@ -308,6 +408,48 @@ const VisitDetail = React.createClass({
 					                            }
 					                    </FormItem>
 					                </div>
+									</div>: null}
+									{this.state.contactType === '外出' && Object.keys(this.state.followDtails).length > 0 ? <div>
+										<div className="clearfix">
+											<FormItem
+												labelCol={{ span: 4 }}
+												wrapperCol={{ span: 16 }}
+												label="公出企业" >
+												<span>{this.state.followDtails.nickname}</span>
+											</FormItem>
+											<FormItem
+												labelCol={{ span: 4 }}
+												wrapperCol={{ span: 16 }}
+												label="公出时间" >
+												<span>{this.state.followDtails.releaseStarts + '~' + this.state.followDtails.releaseEnds}</span>
+											</FormItem>
+											<FormItem
+												labelCol={{ span: 4 }}
+												wrapperCol={{ span: 16 }}
+												label="公出地点" >
+												<span>{this.state.followDtails.userName}</span>
+											</FormItem>
+											<FormItem
+												labelCol={{ span: 4 }}
+												wrapperCol={{ span: 16 }}
+												label="审核情况" >
+												<span>
+													{
+														this.state.followDtails.status === 0 ? <Tag color="#F00">驳回</Tag> :
+															this.state.followDtails.status === 1 ? <Tag color="#58a3ff">审核中</Tag> :
+																this.state.followDtails.status === 2 ? <Tag color="#87d068">通过</Tag> : null}
+												</span>
+											</FormItem>
+										</div>
+										<div className="clearfix">
+											<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>打卡日志</div>
+											<Table
+												pagination={false}
+												columns={this.state.intentionPublicReleaseLog}
+												dataSource={this.state.publicReleaseLog}
+											/>
+										</div>
+									</div> : null}
 					                <div className="clearfix">
 					                 	<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向</div>
 					                 	<div className="clearfix" >
@@ -316,11 +458,11 @@ const VisitDetail = React.createClass({
 												 size="middle"
 										         rowKey={record => record.id}
 								            	 pagination={false}
-								            	 columns={this.state.intentionList} 
+								            	 columns={this.state.intentionList}
 								            	 dataSource={this.state.data}
 								            	 />
-										    </Spin> 
-										</div>	 
+										    </Spin>
+										</div>
 					                </div>
 			    			   	</div>
 			    			   	{!followData.readOnly&&<FormItem wrapperCol={{ span: 12, offset: 6 }}>
@@ -329,9 +471,9 @@ const VisitDetail = React.createClass({
 					   			</FormItem>}
 					   		</Spin>
 					    </Form>
-				</Modal> 
+				</Modal>
 			</div>
 		)
 	}
 })
-export default VisitDetail;
+export default VisitDetail;

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

@@ -558,6 +558,15 @@ class Content extends Component {
                     });
                 });
                 break;
+            //公出统计
+            case 'publicStatistics':
+                require.ensure([], () => {
+                    const PublicStatistics = require('./publicStatistics/index').default;
+                    this.setState({
+                        component: <PublicStatistics/>
+                    });
+                });
+                break;
             //单位公共客户
             case 'organizationPublicCustomer':
                 require.ensure([], () => {

+ 448 - 0
js/component/manageCenter/customer/publicStatistics/detailedList.jsx

@@ -0,0 +1,448 @@
+import React,{ Component } from 'react';
+import {AutoComplete, Button, DatePicker, Input, message, Modal, Select, Spin, Table, Tabs, Tag} from "antd";
+import {ShowModal,} from "@/tools";
+import {ChooseList} from "../../order/orderNew/chooseList";
+import $ from "jquery/src/ajax";
+import './index.less';
+import moment from "moment";
+
+const {TabPane} = Tabs;
+const { RangePicker } = DatePicker;
+
+class DetailedList extends Component{
+    constructor(props) {
+        super(props);
+        this.state={
+            pageNo:1,
+            loading:false,
+            changeList:[],
+            columns: [
+                {
+                    title: "编号",
+                    dataIndex: "key",
+                    key: "key",
+                },
+                {
+                    title: "客户名称",
+                    dataIndex: "nickname",
+                    key: "nickname",
+                },
+                {
+                    title: "公出申请人",
+                    dataIndex: "aname",
+                    key: "aname",
+                },
+                {
+                    title: "公出时间",
+                    dataIndex: "releaseStarts",
+                    key: "releaseStarts",
+                    render: (text, record) => (
+                        text+'至'+record.releaseEnds
+                    )
+                },
+                {
+                    title: "公出时长(时)",
+                    dataIndex: "duration",
+                    key: "duration",
+                },
+                {
+                    title: "审核状态",
+                    dataIndex: "status",
+                    key: "status",
+                    render: (text) => (
+                        text === '0' ? <Tag color="#F00">驳回</Tag> :
+                            text === '1' ? <Tag color="#58a3ff">审核中</Tag> :
+                                text === '2' ? <Tag color="#87d068">通过</Tag> : null
+                    )
+                },
+            ],
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function(page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function(total) {
+                    return "共" + total + "条数据";
+                }
+            },
+            dataSource: [],
+
+            releaseDate:[],
+            status:props.status,
+            theTypes:props.aid,
+            theCustomerTypes:undefined,
+        }
+        this.loadData = this.loadData.bind(this);
+        this.resetAll = this.resetAll.bind(this);
+        this.changeList = this.changeList.bind(this);
+        this.selectSuperId = this.selectSuperId.bind(this);
+        this.supervisor = this.supervisor.bind(this);
+        this.httpChange = this.httpChange.bind(this);
+        this.blurChange = this.blurChange.bind(this);
+        this.selectAuto = this.selectAuto.bind(this);
+        this.getCustomer = this.getCustomer.bind(this);
+        this.selectCustomerAuto = this.selectCustomerAuto.bind(this);
+        this.httpCustomerChange = this.httpCustomerChange.bind(this);
+        this.blurCustomerChange = this.blurCustomerChange.bind(this);
+    }
+
+    //获取上级组织
+    selectSuperId() {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/organization/selectSuperId",
+            data:{},
+            success: function (data) {
+                let theArr = [];
+                if (data.error && data.error.length === 0) {
+                    for(let 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>
+                        );
+                    };
+                    this.setState({
+                        contactsOption: theArr,
+                    });
+                }else{
+                    message.warning(data.error[0].message);
+                }
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    }
+
+    changeList(arr) {
+        const newArr = [];
+        this.state.columns.forEach(item => {
+            arr.forEach(val => {
+                if (val === item.title) {
+                    newArr.push(item);
+                }
+            });
+        });
+        this.setState({
+            changeList: newArr
+        });
+    }
+
+    loadData(pageNo) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/release//publicReleaseDtails",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                releaseStart:this.state.releaseDate[0] || undefined,
+                releaseEnd:this.state.releaseDate[1] || undefined,
+                aid:this.state.theTypes,
+                uid:this.state.theCustomerTypes,
+                status:this.state.status
+            },
+            success: function(data) {
+                ShowModal(this);
+                let theArr = [];
+                if (data.error && data.error.length === 0) {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        thisdata.key=(data.data.pageNo - 1) * data.data.pageSize + i + 1;
+                        theArr.push(thisdata);
+                    }
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
+                    if (data.data && data.data.list && !data.data.list.length) {
+                        this.state.pagination.current = 0;
+                        this.state.pagination.total = 0;
+                    }
+                    this.setState({
+                        dataSource: theArr,
+                        pagination: this.state.pagination,
+                        pageNo:data.data.pageNo
+                    });
+                }else{
+                    message.warning(data.error[0].message);
+                }
+            }.bind(this)
+        }).always(
+            function() {
+                this.setState({
+                    loading: false
+                });
+            }.bind(this)
+        );
+    }
+
+    resetAll() {
+        this.setState({
+            releaseDate:[],
+            theTypes:undefined,
+            theCustomerTypes:undefined,
+            status:this.props.status,
+            auto:'',
+            customer:''
+        },()=>{
+            this.loadData();
+        })
+    }
+
+    supervisor(e) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/customer/listAdminByName",
+            data: {
+                adminName: e,
+            },
+            success: function (data) {
+                if (data.error && data.error.length === 0) {
+                    this.setState({
+                        customerArr: data.data,
+                    });
+                }else{
+                    message.warning(data.error[0].message);
+                }
+            }.bind(this),
+        }).always(
+            function () {
+
+            }.bind(this)
+        );
+    }
+
+    httpChange(e) {
+        if (e.length >= 1) {
+            this.supervisor(e);
+        }
+        this.setState({
+            auto: e,
+        });
+    }
+
+    selectAuto(value, options) {
+        this.setState({
+            auto: value,
+        });
+    }
+
+    httpCustomerChange(e) {
+        if (e.length >= 1) {
+            this.getCustomer(e);
+        }
+        this.setState({
+            customer: e,
+        });
+    }
+
+    selectCustomerAuto(value, options) {
+        this.setState({
+            customer: value,
+        });
+    }
+
+    getCustomer(e) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/customer/getUserByName",
+            data: {
+                name: e,
+            },
+            success: function (data) {
+                if (data.error && data.error.length === 0) {
+                    this.setState({
+                        customerList: data.data,
+                    });
+                }else{
+                    message.warning(data.error[0].message);
+                }
+            }.bind(this),
+        }).always(
+            function () {
+
+            }.bind(this)
+        );
+    }
+
+    blurCustomerChange(e) {
+        let theType = "";
+        let contactLists = this.state.customerList || [];
+        if (e) {
+            contactLists.map(function (item) {
+                if (item.name == e.toString()) {
+                    theType = item.id;
+                }
+            });
+        }
+        this.setState({
+            theCustomerTypes: theType,
+        });
+    }
+
+    blurChange(e) {
+        let theType = "";
+        let contactLists = this.state.customerArr || [];
+        if (e) {
+            contactLists.map(function (item) {
+                if (item.name == e.toString()) {
+                    theType = item.id;
+                }
+            });
+        }
+        this.setState({
+            theTypes: theType,
+        });
+    }
+
+    componentWillMount() {
+        this.loadData();
+        this.selectSuperId();
+    }
+
+    render() {
+        const dataSources = this.state.customerArr || [];
+        const options = dataSources.map((group) => (
+            <Select.Option key={group.id} value={group.name}>
+                {group.name}
+            </Select.Option>
+        ));
+        const customerList = this.state.customerList || [];
+        const customerOptions = customerList.map((group) => (
+            <Select.Option key={group.id} value={group.name}>
+                {group.name}
+            </Select.Option>
+        ));
+        return (
+            <Modal
+                maskClosable={false}
+                visible={this.props.visible}
+                onOk={this.props.onCancel}
+                onCancel={this.props.onCancel}
+                width='1200px'
+                title='公出详细列表'
+                footer=''
+                className="admin-desc-content">
+                        <div className="user-content">
+                            <Tabs defaultActiveKey="1" className="test">
+                                <TabPane tab="搜索" key="1">
+                                    <div className="user-search" style={{
+                                        marginTop:'10px',
+                                        marginLeft:'10px',
+                                        marginRight:'10px'
+                                    }}>
+                                       <span style={{ marginRight: "10px" }}>
+                                            <AutoComplete
+                                                className="certain-category-search"
+                                                dropdownClassName="certain-category-search-dropdown"
+                                                dropdownMatchSelectWidth={false}
+                                                dropdownStyle={{ width: 120 }}
+                                                style={{ width: "120px" }}
+                                                dataSource={customerOptions}
+                                                placeholder='输入客户名称'
+                                                value={this.state.customer}
+                                                onChange={this.httpCustomerChange}
+                                                filterOption={true}
+                                                onBlur={this.blurCustomerChange}
+                                                onSelect={this.selectCustomerAuto}
+                                            >
+                                                <Input />
+                                            </AutoComplete>
+                                        </span>
+                                        <span style={{ marginRight: "10px" }}>
+                                            <Select
+                                                placeholder="请选择审核状态"
+                                                style={{ width:200,marginLeft:10}}
+                                                value={this.state.status}
+                                                onChange={(e) => { this.setState({ status: e }) }}>
+                                                <Select.Option value={0} >驳回</Select.Option>
+                                                <Select.Option value={1} >发起</Select.Option>
+                                                <Select.Option value={2} >通过</Select.Option>
+                                            </Select>
+                                        </span>
+                                        <span style={{ marginRight: "10px" }}>
+                                            <AutoComplete
+                                                className="certain-category-search"
+                                                dropdownClassName="certain-category-search-dropdown"
+                                                dropdownMatchSelectWidth={false}
+                                                dropdownStyle={{ width: 120 }}
+                                                style={{ width: "120px" }}
+                                                dataSource={options}
+                                                placeholder='输入公出申请人'
+                                                value={this.state.auto}
+                                                onChange={this.httpChange}
+                                                filterOption={true}
+                                                onBlur={this.blurChange}
+                                                onSelect={this.selectAuto}
+                                            >
+                                                <Input />
+                                            </AutoComplete>
+                                        </span>
+                                        <span style={{ marginRight: "10px" }}>
+                                            <span style={{marginRight:'10px',marginBottom:'10px'}}>公出时间 :</span>
+                                            <RangePicker
+                                                style={{marginRight:'10px',marginBottom:'10px'}}
+                                                value={[
+                                                    this.state.releaseDate[0]
+                                                        ? moment(this.state.releaseDate[0])
+                                                        : null,
+                                                    this.state.releaseDate[1]
+                                                        ? moment(this.state.releaseDate[1])
+                                                        : null,
+                                                ]}
+                                                onChange={(data, dataString) => {
+                                                    this.setState({ releaseDate: dataString });
+                                                }}
+                                            />
+                                        </span>
+                                        <Button type="primary" onClick={()=>{
+                                            this.loadData();
+                                        }} style={{marginRight:'10px',marginBottom:'10px'}}>搜索</Button>
+                                        <Button onClick={this.resetAll} style={{marginRight:'10px',marginBottom:'10px'}}>重置</Button>
+                                    </div>
+                                </TabPane>
+                                <TabPane tab="更改表格显示数据" key="2">
+                                    <div style={{ marginLeft: 10 }}>
+                                        <ChooseList
+                                            columns={this.state.columns}
+                                            changeFn={this.changeList}
+                                            changeList={this.state.changeList}
+                                            top={55}
+                                            margin={11}
+                                        />
+                                    </div>
+                                </TabPane>
+                            </Tabs>
+                            <div className="patent-table">
+                                <Spin spinning={this.state.loading}>
+                                    <Table
+                                        bordered
+                                        size="middle"
+                                        scroll={{ x: 800, y: 0 }}
+                                        columns={
+                                            this.state.changeList.length > 0
+                                                ? this.state.changeList
+                                                : this.state.columns
+                                        }
+                                        dataSource={this.state.dataSource}
+                                        pagination={this.state.pagination}
+                                    />
+                                </Spin>
+                            </div>
+                        </div>
+            </Modal>
+        )
+    }
+}
+
+export default DetailedList;

+ 419 - 0
js/component/manageCenter/customer/publicStatistics/index.jsx

@@ -0,0 +1,419 @@
+import React,{ Component } from 'react';
+import {AutoComplete, Button, DatePicker, Input, message, Select, Spin, Table, Tabs} from "antd";
+import {
+    ShowModal,
+} from "@/tools";
+import {ChooseList} from "../../order/orderNew/chooseList";
+import $ from "jquery/src/ajax";
+import './index.less';
+import moment from "moment";
+
+import DetailedList from './detailedList';
+
+const {TabPane} = Tabs;
+const { RangePicker } = DatePicker;
+
+class ProjecCount extends Component{
+    constructor(props) {
+        super(props);
+        this.state={
+            pageNo:1,
+            loading:false,
+            changeList:[],
+            columns: [
+                {
+                    title: "编号",
+                    dataIndex: "key",
+                    key: "key",
+                },
+                {
+                    title: "公出人员",
+                    dataIndex: "name",
+                    key: "name",
+                },
+                {
+                    title: "公出次数",
+                    dataIndex: "tg",
+                    key: "tg",
+                    className: 'projectTable',
+                    onCellClick :(record, event)=>{
+                        event.stopPropagation();
+                        this.setState({
+                            status:2,
+                            visible:true,
+                            aid:record.aid
+                        })
+                    }
+                },
+                {
+                    title: "总时长(时)",
+                    dataIndex: "duration",
+                    key: "duration",
+                    className: 'projectTable',
+                    onCellClick :(record, event)=>{
+                        event.stopPropagation();
+                        this.setState({
+                            status:2,
+                            visible:true,
+                            aid:record.aid
+                        })
+                    }
+                },
+                {
+                    title: "未审核次数",
+                    dataIndex: "wsh",
+                    key: "wsh",
+                    className: 'projectTable',
+                    onCellClick :(record, event)=>{
+                        event.stopPropagation();
+                        this.setState({
+                            status:1,
+                            visible:true,
+                            aid:record.aid
+                        })
+                    }
+                },
+                {
+                    title: "驳回次数",
+                    dataIndex: "bh",
+                    key: "bh",
+                    className: 'projectTable',
+                    onCellClick :(record, event)=>{
+                        event.stopPropagation();
+                        this.setState({
+                            status:0,
+                            visible:true,
+                            aid:record.aid
+                        })
+                    }
+                },
+            ],
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function(page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function(total) {
+                    return "共" + total + "条数据";
+                }
+            },
+            dataSource: [],
+
+            releaseDate:[],
+            createReleaseDate:[],
+            superId:undefined,
+        }
+        this.loadData = this.loadData.bind(this);
+        this.resetAll = this.resetAll.bind(this);
+        this.changeList = this.changeList.bind(this);
+        this.selectSuperId = this.selectSuperId.bind(this);
+        this.supervisor = this.supervisor.bind(this);
+        this.httpChange = this.httpChange.bind(this);
+        this.blurChange = this.blurChange.bind(this);
+        this.selectAuto = this.selectAuto.bind(this);
+    }
+
+    //获取上级组织
+    selectSuperId() {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/organization/selectSuperId",
+            data:{},
+            success: function (data) {
+                let theArr = [];
+                if (data.error && data.error.length === 0) {
+                    for(let 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>
+                        );
+                    };
+                    this.setState({
+                        contactsOption: theArr,
+                    });
+                }else{
+                    message.warning(data.error[0].message);
+                }
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    }
+
+    changeList(arr) {
+        const newArr = [];
+        this.state.columns.forEach(item => {
+            arr.forEach(val => {
+                if (val === item.title) {
+                    newArr.push(item);
+                }
+            });
+        });
+        this.setState({
+            changeList: newArr
+        });
+    }
+
+    loadData(pageNo) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/release/publicReleaseStatistics",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                clockStart:this.state.releaseDate[0] || undefined,
+                clockEnd:this.state.releaseDate[1] || undefined,
+                createStart:this.state.createReleaseDate[0] || undefined,
+                createEnd:this.state.createReleaseDate[1] || undefined,
+                depId:this.state.superId || undefined,
+                aid:this.state.theTypes
+            },
+            success: function(data) {
+                ShowModal(this);
+                let theArr = [];
+                if (data.error && data.error.length === 0) {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        thisdata.key=(data.data.pageNo - 1) * data.data.pageSize + i + 1;
+                        theArr.push(thisdata);
+                    }
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
+                    if (data.data && data.data.list && !data.data.list.length) {
+                        this.state.pagination.current = 0;
+                        this.state.pagination.total = 0;
+                    }
+                    this.setState({
+                        dataSource: theArr,
+                        pagination: this.state.pagination,
+                        pageNo:data.data.pageNo
+                    });
+                }else{
+                    message.warning(data.error[0].message);
+                }
+            }.bind(this)
+        }).always(
+            function() {
+                this.setState({
+                    loading: false
+                });
+            }.bind(this)
+        );
+    }
+
+    resetAll() {
+        this.setState({
+            releaseDate:[],
+            createReleaseDate:[],
+            superId:undefined,
+            theTypes:undefined,
+            auto:''
+        },()=>{
+            this.loadData();
+        })
+    }
+
+    supervisor(e) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/customer/listAdminByName",
+            data: {
+                adminName: e,
+            },
+            success: function (data) {
+                let thedata = data.data;
+                if (!thedata) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    }
+                    thedata = {};
+                }
+                this.setState({
+                    customerArr: thedata,
+                });
+            }.bind(this),
+        }).always(
+            function () {
+
+            }.bind(this)
+        );
+    }
+
+    httpChange(e) {
+        if (e.length >= 1) {
+            this.supervisor(e);
+        }
+        this.setState({
+            auto: e,
+        });
+    }
+
+    selectAuto(value, options) {
+        this.setState({
+            auto: value,
+        });
+    }
+
+    blurChange(e) {
+        let theType = "";
+        let contactLists = this.state.customerArr || [];
+        if (e) {
+            contactLists.map(function (item) {
+                if (item.name == e.toString()) {
+                    theType = item.id;
+                }
+            });
+        }
+        this.setState({
+            theTypes: theType,
+        });
+    }
+
+    componentWillMount() {
+        this.loadData();
+        this.selectSuperId();
+    }
+
+    render() {
+        const dataSources = this.state.customerArr || [];
+        const options = dataSources.map((group) => (
+            <Select.Option key={group.id} value={group.name}>
+                {group.name}
+            </Select.Option>
+        ));
+        return (
+            <div className="user-content">
+                <div className="content-title">
+                    <span>
+                        公出统计
+                    </span>
+                </div>
+                <Tabs defaultActiveKey="1" className="test">
+                    <TabPane tab="搜索" key="1">
+                        <div className="user-search" style={{
+                            marginTop:'10px',
+                            marginLeft:'10px',
+                            marginRight:'10px'
+                        }}>
+                           <span style={{ marginRight: "10px" }}>
+                                <Select
+                                    placeholder="请选择部门"
+                                    style={{ width:200,marginLeft:10}}
+                                    value={this.state.superId}
+                                    onChange={(e) => { this.setState({ superId: e }) }}
+                                    notFoundContent="未获取到上级组织列表">
+                                    {this.state.contactsOption}
+                                </Select>
+                            </span>
+                            <span style={{ marginRight: "10px" }}>
+                                <AutoComplete
+                                    className="certain-category-search"
+                                    dropdownClassName="certain-category-search-dropdown"
+                                    dropdownMatchSelectWidth={false}
+                                    dropdownStyle={{ width: 120 }}
+                                    style={{ width: "120px" }}
+                                    dataSource={options}
+                                    placeholder='输入公出申请人'
+                                    value={this.state.auto}
+                                    onChange={this.httpChange}
+                                    filterOption={true}
+                                    onBlur={this.blurChange}
+                                    onSelect={this.selectAuto}
+                                >
+                                    <Input />
+                                </AutoComplete>
+                            </span>
+                            <span style={{ marginRight: "10px" }}>
+                                <span style={{marginRight:'10px',marginBottom:'10px'}}>打卡时间 :</span>
+                                <RangePicker
+                                    style={{marginRight:'10px',marginBottom:'10px'}}
+                                    value={[
+                                        this.state.releaseDate[0]
+                                            ? moment(this.state.releaseDate[0])
+                                            : null,
+                                        this.state.releaseDate[1]
+                                            ? moment(this.state.releaseDate[1])
+                                            : null,
+                                    ]}
+                                    onChange={(data, dataString) => {
+                                        this.setState({ releaseDate: dataString });
+                                    }}
+                                />
+                            </span>
+                            <span style={{ marginRight: "10px" }}>
+                                <span style={{marginRight:'10px',marginBottom:'10px'}}>创建时间 :</span>
+                                <RangePicker
+                                    style={{marginRight:'10px',marginBottom:'10px'}}
+                                    value={[
+                                        this.state.createReleaseDate[0]
+                                            ? moment(this.state.createReleaseDate[0])
+                                            : null,
+                                        this.state.createReleaseDate[1]
+                                            ? moment(this.state.createReleaseDate[1])
+                                            : null,
+                                    ]}
+                                    onChange={(data, dataString) => {
+                                        this.setState({ createReleaseDate: dataString });
+                                    }}
+                                />
+                            </span>
+                            <Button type="primary" onClick={()=>{
+                                this.loadData();
+                            }} style={{marginRight:'10px',marginBottom:'10px'}}>搜索</Button>
+                            <Button onClick={this.resetAll} style={{marginRight:'10px',marginBottom:'10px'}}>重置</Button>
+                        </div>
+                    </TabPane>
+                    <TabPane tab="更改表格显示数据" key="2">
+                        <div style={{ marginLeft: 10 }}>
+                            <ChooseList
+                                columns={this.state.columns}
+                                changeFn={this.changeList}
+                                changeList={this.state.changeList}
+                                top={55}
+                                margin={11}
+                            />
+                        </div>
+                    </TabPane>
+                </Tabs>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table
+                            bordered
+                            size="middle"
+                            scroll={{ x: 800, y: 0 }}
+                            columns={
+                                this.state.changeList.length > 0
+                                    ? this.state.changeList
+                                    : this.state.columns
+                            }
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination}
+                        />
+                    </Spin>
+                </div>
+                {this.state.visible ? <DetailedList
+                    status={this.state.status}
+                    visible={this.state.visible}
+                    aid={this.state.aid}
+                    onCancel={()=>{
+                    this.setState({
+                        visible:false
+                    })
+                }}/> : null}
+            </div>
+        )
+    }
+}
+
+export default ProjecCount;

+ 7 - 0
js/component/manageCenter/customer/publicStatistics/index.less

@@ -0,0 +1,7 @@
+.projectTable{
+  cursor: pointer;
+}
+
+.projectTable:hover{
+  background: #71a7e885 !important;
+}

+ 1 - 1
js/component/manageCenter/project/task/myTask.jsx

@@ -3558,7 +3558,7 @@ const Task = React.createClass({
           showDesc={this.state.assignVisible}
           closeDesc={this.closeAssign.bind(this)}
           fenpaiData={8}
-          type={this.state.flag ? 4 : 3}
+          type={this.state.flag ? 4 : (this.props.isZxs ? 3  : 1) }
           roleName={this.state.nub}
           requestMethod={'post'}
           flag={this.state.flag}