liting2017 7 yıl önce
ebeveyn
işleme
5c42cd4c2e

+ 2 - 17
js/component/manageCenter/customer/content.jsx

@@ -29,14 +29,7 @@ class Content extends Component {
                     });
                 });
                 break;           
-            case 'publicCustomer': 
-                require.ensure([], () => {
-                    const PublicCustomer = require('./customerData/publicCustomer').default;
-                    this.setState({
-                        component:<PublicCustomer />,                                             
-                    });
-                });
-                break;
+           
             case 'companyCustomer':
                 require.ensure([], () => {
 	                const CompanyCustomer = require('./customerData/companyCustomer').default;
@@ -53,15 +46,7 @@ class Content extends Component {
                       
                     });
                 });
-                break;           
-            case 'publicindividualCustomer': 
-                require.ensure([], () => {
-                    const PublicindividualCustomer = require('./individualCustomer/publicindividualCustomer').default;
-                    this.setState({
-                        component:<PublicindividualCustomer />,                                             
-                    });
-                });
-                break;
+                break;          
             case 'queryCustomer':
                 require.ensure([], () => {
 	                const QueryCustomer = require('./individualCustomer/queryCustomer').default;

Dosya farkı çok büyük olduğundan ihmal edildi
+ 3000 - 12
js/component/manageCenter/customer/customerData/companyCustomer.jsx


+ 3 - 9
js/component/manageCenter/customer/customerData/myClient.jsx

@@ -1181,7 +1181,7 @@ const MyClient = Form.create()(React.createClass({
                 	companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
                 	dataInformation:thisData,
                 	ProvinceCity:ProvinceCityArr,
-                	industry:String(thisData.industry)?String(thisData.industry):undefined,
+                	industry:String(thisData.industry)=='null'?undefined:String(thisData.industry),
                 });    
             }.bind(this),
         }).always(function () {
@@ -1242,7 +1242,7 @@ const MyClient = Form.create()(React.createClass({
     },
    	detailsModalOk(e) {
   	  this.setState({ modal5Visible:true });//需要一个请求数据
-  	  this.loadInformation(e.id)
+  	  this.loadInformation(e.id);
 	  this.httpAccount(e.id); 
 	  this.loadBfVisit();  
 	  this.BusinessList();
@@ -2007,13 +2007,7 @@ const MyClient = Form.create()(React.createClass({
 			                <RangePicker
 		                        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 }); }} /> 
-					                <Select placeholder="客户类型" style={{ width: 100 }}
-		                            value={this.state.typeSearch }
-		                            onChange={(e) => { this.setState({ typeSearch : e }) }}>
-		                            <Select.Option value="0" >个人客户</Select.Option>
-		                            <Select.Option value="1" >单位客户</Select.Option>	                           
-		                   		</Select>     
+		                        onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />    
 	                        <Select placeholder="客户状态"
 	                            style={{ width: 100 }}
 	                            value={this.state.statusSearch}

+ 41 - 87
js/component/manageCenter/customer/customerData/myClientDesc.jsx

@@ -1,79 +1,23 @@
 import React from 'react';
-import { Tabs, Table, Icon, Tooltip, Modal, message, AutoComplete, Spin, DatePicker,Upload, Input, InputNumber, Select,TimePicker, Button, Radio, Form, Cascader, Tag, Switch } from 'antd';
+import { Icon,  Modal, message,  Spin, Input, Select, Button, Form } from 'antd';
 import './myClient.less';
 import ajax from 'jquery/src/ajax/xhr.js';
-import moment from 'moment';
 import $ from 'jquery/src/ajax';
-import { areaSelect } from '../../../NewDicProvinceList';
-import { maturityList, innovationList, transferModeList,cityArr ,newFollow,customerStatus,intentionalService,tag} from '../../../dataDic';
-import { IndustryObject, getIndustryCategory } from '../../../DicIndustryList.js';
-import { beforeUploadFile, splitUrl, companySearch, getTransferMode, getAchievementCategory, getTechAuditStatus, getDemandType, getMaturity, getInnovation,beforeUpload, getBase64,getsex,getCompanyIntention,getcityArr,getfllowSituation,getcustomerStatue} from '../../../tools.js';
-import throttle from '../../../throttle.js';
-
-const PicturesWall = React.createClass({
-    getInitialState() {
-        return {
-            previewVisible: false,
-            previewImage: '',
-            fileList: [],
-        }
-    },
-    handleCancel() {
-        this.setState({ previewVisible: false })
-    },
-    handlePreview(file) {
-        this.setState({
-            previewImage: file.url || file.thumbUrl,
-            previewVisible: true,
-        });
-    },
-    handleChange(info) {
-        let fileList = info.fileList;
-        this.setState({ fileList });
-        this.props.fileList(fileList);
-    },
-    componentWillReceiveProps(nextProps) {
-        this.state.fileList = nextProps.pictureUrl;
-    },
-    render() {
-        const { previewVisible, previewImage, fileList } = this.state;
-        const uploadButton = (
-            <div>
-                <Icon type="plus" />
-                <div className="ant-upload-text">点击上传</div>
-            </div>
-        );
-        return (
-            <div className="clearfix">
-                <Upload
-                    action={globalConfig.context + "/api/admin/achievement/uploadPicture"}
-                    data={{ 'sign': this.props.pictureSign }}
-                    listType="picture-card"
-                    fileList={fileList}
-                    onPreview={this.handlePreview}
-                    onChange={this.handleChange} >
-                    {fileList.length >= 5 ? null : uploadButton}
-                </Upload>
-                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
-                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
-                </Modal>
-            </div>
-        );
-    }
-});
-
+import {socialAttribute} from '../../../dataDic.js';
 const AchievementDetailForm = Form.create()(React.createClass({
     getInitialState() {
         return {
             loading: false,
-            data: {},
-            tags: [],
-            technicalPictureUrl:[],
-            technicalPictureUrls:[],
+            data: {},           
         };
     },
 
     handleSubmit(e) {
+    	console.log(this.state.societyTag)
+    	if(this.state.societyTagt==undefined){
+    		message.warning('请填写社会属性!')
+    		return false;
+    	}
         e.preventDefault();
         this.props.form.validateFields((err, values) => {                                 
             if (!err) {
@@ -87,8 +31,9 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     url: globalConfig.context + '/api/admin/customer/addCustomer',
                     data: {
                         name: this.state.companyNamet, 
-                        contacts:this.state.content  ,
+                        contacts:this.state.content,
                         contactMobile: this.state.telnum,
+                        societyTag:this.state.societyTagt,
                         type:'1'
                     }
                 }).done(function (data) { 
@@ -119,28 +64,18 @@ const AchievementDetailForm = Form.create()(React.createClass({
     	}	
     },
     componentWillMount() {
-        this.state.therottleSearch = throttle(this.handleSearch, 1000, { leading: false }).bind(this);
-        if (this.props.data && this.props.data.id) {
-            this.loadData(this.props.data.id, this.props.detailApiUrl);
-        };  
+        this.state.companyNamet='';
+    	this.state.content='';
+    	this.state.telnum='';
+    	this.state.societyTagt=undefined;
     },
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
-            if (nextProps.data && nextProps.data.id) {
-                this.loadData(nextProps.data.id, nextProps.detailApiUrl);
-            };
-            this.state.data = {};
-            this.state.tags = [];
-            this.state.switchValue = false;
-            this.state.radios = false;
-            this.state.technicalPictureUrl = [];
-            this.state.coverImg = [];
-            this.state.textFileList = [];
-            this.state.techPlanFileList = [];
-            this.state.businessPlanFileList = [];
-            this.props.form.resetFields();
-            this.state.technicalPictureUrl = [];  
-            this.state.technicalPictureUrls = [];
+            this.state.companyNamet='';
+	    	this.state.content='';
+	    	this.state.telnum='';
+	    	this.state.societyTagt=undefined;
+            this.props.form.resetFields(); 
         };
     },
     
@@ -161,23 +96,42 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     	<FormItem className="half-item"
 	                            {...formItemLayout}
 	                            label="公司名称" >
-	                         <Input value={this.state.companyNamet}  onChange={(e) => { this.setState({ companyNamet: e.target.value }); }} required="required"/>        
+	                         <Input value={this.state.companyNamet} placeholder="公司名称" 
+	                              onChange={(e) => { this.setState({ companyNamet: e.target.value }); }} required="required"/>
 	                    </FormItem>
                     </div>
                     <div className="clearfix">
                     	<FormItem className="half-item"
 	                            {...formItemLayout}
 	                            label="联系人" >
-	                              <Input value={this.state.content}  onChange={(e) => { this.setState({ content: e.target.value }); }} required="required"/>  
+	                              <Input value={this.state.content}  placeholder="联系人"  
+	                                 onChange={(e) => { this.setState({ content: e.target.value }); }} required="required"/>
 	                    </FormItem>
                     </div>
                     <div className="clearfix">
                     	<FormItem className="half-item"
 	                            {...formItemLayout}
 	                            label="联系电话" >
-	                              <Input value={this.state.telnum}  onChange={(e) => { this.setState({ telnum: e.target.value }); }} required="required"/>
+	                              <Input value={this.state.telnum} placeholder="联系电话"  
+	                                    onChange={(e) => { this.setState({ telnum: e.target.value }); }} required="required"/>
 	                    </FormItem>
                     </div>
+                    <div className="clearfix">
+                    	<FormItem className="half-item" 
+                          {...formItemLayout}
+                           label="社会属性"
+                         > 
+	                    
+							    <Select placeholder="客户社会属性"  value={this.state.societyTagt} onChange={(e) => { this.setState({ societyTagt: e}); }}> 
+                                {
+                                    socialAttribute.map(function (item) {
+                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
+                                    })
+                                }
+                              </Select>
+                        
+                   		 </FormItem>
+                    </div>
                     <FormItem wrapperCol={{ span: 12, offset: 4 }}>
                         <Button className="set-submit" type="primary" htmlType="submit">保存</Button>  
                         {/*<Button className="set-submit" type="primary"  onClick={(e)=>{this.addContent();this.props.closeDesc}}>去完善</Button>*/}

+ 0 - 20
js/component/manageCenter/customer/customerData/publicCustomer.jsx

@@ -1,20 +0,0 @@
-import React from 'react';
-import { AutoComplete, Icon, Button, Input, InputNumber, Select, Spin, Table, message, Modal, Row, Col, DatePicker,Switch,Upload} from 'antd';
-import ajax from 'jquery/src/ajax/xhr.js';
-import $ from 'jquery/src/ajax';
-import moment from 'moment';
-import './myClient.less';
-import { orderStatusList,cityArr,customerStatus,intentionalService,newFollow} from '../../../dataDic.js';
-import { beforeUploadFile,getOrderStatus, getSearchUrl,getcustomerTyp,getcityArr,getcustomerStatue,getCompanyIntention,getfllowSituation,getsex} from '../../../tools.js';
-
-//查询功能和初始列表
-const PublicCustomer = React.createClass({	
-	render(){
-		return(
-			<div className="user-content">公共客户</div>
-		)
-	}
-	
- })
-
-export default PublicCustomer;

+ 1 - 55
js/component/manageCenter/customer/customerService/myBusiness.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Radio,Icon, Popconfirm,Button, AutoComplete ,Cascader,Input, Tabs,Select,Spin,Table, Switch, message, DatePicker, Modal, Upload,Form ,Row,Col,TimePicker} from 'antd';
+import { Radio,Icon, Popconfirm,Button, AutoComplete ,Input,Select,Spin,Table, Switch, message, DatePicker, Modal,Form ,Row,Col,TimePicker} from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -8,63 +8,9 @@ const OptGroup = AutoComplete.OptGroup;
 import './myClient.less';
 import { areaSelect} from '../../../NewDicProvinceList';
 const { Column, ColumnGroup } = Table;
-const TabPane = Tabs.TabPane;
 import {socialAttribute,newFollow,lvl, customerStatus,intentionalService} from '../../../dataDic.js';
 import {getcustomerStatue,getprovince,getCompanyIntention,getfllowSituation,getContactType } from '../../../tools.js';
 
-//图片组件
-const PicturesWall = React.createClass({
-    getInitialState() {
-        return {
-            previewVisible: false,
-            previewImage: '',
-            fileList: [],
-        }
-    },
-    handleCancel() {
-        this.setState({ previewVisible: false })
-    },
-    handlePreview(file) {
-        this.setState({
-            previewImage: file.url || file.thumbUrl,
-            previewVisible: true,
-        });
-    },
-    handleChange(info) {
-        let fileList = info.fileList;
-        this.setState({ fileList });
-        this.props.fileList(fileList);
-    },
-    componentWillReceiveProps(nextProps) {
-        this.state.fileList = nextProps.pictureUrl; 
-    },
-    render() {
-        const { previewVisible, previewImage, fileList } = this.state;
-        const uploadButton = (
-            <div>
-                <Icon type="plus" />
-                <div className="ant-upload-text">点击上传</div>
-            </div>
-        );
-        return (
-            <div style={{display:"inline-block"}}>
-                <Upload
-                    action={globalConfig.context + "/api/admin/customer/attachmentUpload"}
-                    data={{ 'sign': this.props.pictureSign }}
-                    listType="picture-card"
-                    fileList={fileList}
-                    onPreview={this.handlePreview}
-                    onChange={this.handleChange} >
-                    {fileList.length >= 1 ? null : uploadButton}
-                </Upload>
-                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
-                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
-                </Modal>
-            </div>
-        );
-    }
-});
-
 const MyBusiness = Form.create()(React.createClass({	
     loadData(pageNo, apiUrl) {
         this.state.data = [];

+ 700 - 9
js/component/manageCenter/customer/customerService/serviceQuery.jsx

@@ -1,12 +1,703 @@
 import React from 'react';
-import ReactDOM from 'react-dom';
-
-const ServiceQuery=React.createClass({
-	render(){
-		return(
-			<div className="user-content">敬请期待!</div>
-		)
-	}
-})
+import { Radio,Icon, Popconfirm,Button, AutoComplete ,Input,Select,Spin,Table, Switch, message, DatePicker, Modal,Form ,Row,Col,TimePicker} from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+const Option = AutoComplete.Option;
+const OptGroup = AutoComplete.OptGroup;
+import './myClient.less';
+import { areaSelect} from '../../../NewDicProvinceList';
+const { Column, ColumnGroup } = Table;
+import {socialAttribute,newFollow,lvl, customerStatus,intentionalService} from '../../../dataDic.js';
+import {getcustomerStatue,getprovince,getStatusFollow,getCompanyIntention,getfllowSituation,getContactType } from '../../../tools.js';
 
+const ServiceQuery= Form.create()(React.createClass({	
+    loadData(pageNo, apiUrl) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });      
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,          
+            url:globalConfig.context + '/api/admin/customer/listBusiness',
+            data: { 				
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,               
+                businessGlossoryId: this.state.businessIdS, //业务意向  
+                identifyName:this.state.identifyNameS,
+                followSituation:this.state.followSituationS,
+                customerStatus:this.state.customerStatusS,
+			    adminName: this.state.adminNameS,
+				startDate: this.state.releaseDate[0],
+                endDate: this.state.releaseDate[1],                
+            },
+            success: function (data) {            	
+                let theArr = []; 
+                if (data.error.length || data.data.list=="") {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };                   
+                } else {  
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];                        
+                        theArr.push({
+                            key: i,                           
+                            id: thisdata.id,                                                  
+                            businessId:thisdata.businessId,
+                            businessName:thisdata.businessName,
+                            identifyName:thisdata.identifyName,
+                            followSituation:thisdata.followSituation,
+                            customerStatus:thisdata.customerStatus,
+                            adminName:thisdata.adminName,
+                   			createTime:thisdata.createTime			                
+                        });
+                    };
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
+                };               
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },    
+  
+    getInitialState() {
+        return { 
+        	dataSources:[],
+        	customerName:[],
+        	orgCodeUrl:[],
+            companyLogoUrl:[],
+        	visible: false ,
+            searchMore: true,           
+            releaseDate: [],            
+            releaseDate: [],
+            selectedRowKeys: [],
+            selectedRowKey: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            paginations: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadVisit(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+	          businessFollowList: [               
+                {
+                    title: '跟进时间',
+                    dataIndex: 'followTime',
+                    key: 'followTime',                                        
+                }, {
+                    title: '营销员',
+                    dataIndex: 'adminName',
+                    key: 'adminName',
+                }, {
+                    title: '意向进度',
+                    dataIndex: 'followSituation',
+                    key: 'followSituation', 
+                    render:text=>{return getfllowSituation(text)}
+                }, {
+                    title: '客户状态',
+                    dataIndex: 'customerStatus',
+                    key: 'customerStatus',  
+                    render:text=>{return getcustomerStatue(text)}
+                }, 
+                {
+                    title: '拜访方式',
+                    dataIndex: 'contactType',
+                    key:'contactType',
+                    render:text=>{return getContactType(text)}
+                }, {
+                    title: '联系人',
+                    dataIndex: 'contacts',
+                    key: 'contacts',                    
+                }, 
+                {
+                    title: '联系电话',
+                    dataIndex: 'contactMobile',
+                    key:'contactMobile',                   
+                }, 
+               ],
+            columns: [               
+                {
+                    title: '业务名称',
+                    dataIndex: 'businessName',
+                    key: 'businessName',                                        
+                }, {
+                    title: '意向时间',
+                    dataIndex: 'createTime',
+                    key: 'createTime',
+                }, {
+                    title: '客户名称',
+                    dataIndex: 'identifyName',
+                    key: 'identifyName', 
+                }, {
+                    title: '营销员',
+                    dataIndex: 'adminName',
+                    key: 'adminName',                    
+                }, 
+                {
+                    title: '意向进度',
+                    dataIndex: 'followSituation',
+                    key:'followSituation',  
+                    render: text => { return getfllowSituation(text) }
+                },
+                 {
+                    title: '客户状态',
+                    dataIndex: 'customerStatus',
+                    key: 'customerStatus',
+                    render: text => { return getcustomerStatue(text) }
+                },
+            ],
+            dataSource: [],
+            searchTime: [,]
+        };
+    },    
+    componentWillMount() {                     
+         //意向服务
+        let intentionalArr = [];
+        newFollow.map(function (item) {
+            intentionalArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });   
+        //客户状态
+        let customerStatusArr = [];
+        customerStatus.map(function (item) {
+            customerStatusArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
+        this.state.intentionalOption = intentionalArr;
+        this.state.customerStatusArrOption = customerStatusArr;
+        this.loadData();        
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+    	this.state.businessIdS=undefined; //名称1   
+        this.state.identifyNameS='';        
+        this.state.followSituationS=undefined;
+        this.state.customerStatusS=undefined;
+        this.state.adminNameS='';
+	    this.state.releaseDate[0]=undefined;
+        this.state.releaseDate[1]=undefined;
+        this.loadData(); 
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
+    //查看基本详情基本信息
+    loadInformation(record){
+    	$.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/customer/toUpdateBusiness',
+            data: {
+                businessId: record
+            },
+            success: function (data) {
+                let thisData = data.data;                
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    thisData = {};
+                }; 
+                this.setState({
+                	uids:thisData.uid,
+                	dataInformation:thisData,
+                	followSituation:thisData.followSituation,
+                	businessGlossoryId:thisData.businessGlossoryId,
+                	customerStatus:thisData.customerStatus,
+                	remarks:thisData.remarks,	
+                });                  
+            }.bind(this),
+        }).always(function () {
+        	this.loadVisit();
+            this.setState({            	
+                loading: false
+            });
+        }.bind(this));       
+    },
+   	detailsModalOk(e) {
+  	  this.setState({ modal5Visible:true });//需要一个请求数据
+  	  this.loadInformation(e.businessId)
+    },
+    //点击消失函数
+	  detailsModal(e) {		
+	    this.setState({ 
+	    	modal5Visible:false
+	    });	 	   
+	  },
+	businessFollowOk(){
+		this.setState({ 
+	    	businessFollowModul:false
+	    });
+	},
+	businessFollowCancel(){
+		this.setState({ 
+	    	businessFollowModul:false
+	    });
+	},
+	//进入修改时
+	listFollowUp(e){
+			$.ajax({
+             method: "get",
+             dataType: "json",
+             crossDomain: false,
+             url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
+             data:{
+            	ufbId:e.ufbId
+             },
+             success: function (data) {                	  
+				       let thedata=data.data;
+				    if (!thedata) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };	
+                    thedata = {}; 
+            }; 
+					this.setState({
+						businessGlossoryId:thedata.businessGlossoryId,
+						followSituation:thedata.followSituation,
+						customerStatus:thedata.customerStatus,
+						followTime:thedata.followTime,
+						createTime:thedata.createTime,
+						identifyName:thedata.identifyName,
+						contactType:parseInt(thedata.contactType),
+						result:thedata.result,
+						remarks:thedata.remarks,
+						adminName:thedata.adminName,
+						contacts:thedata.contacts,
+						contactMobile:thedata.contactMobile,
+						ufbId:thedata.ufbId,
+						followId:thedata.followId,
+                    });
+				}.bind(this),
+			}).always(function () {
+            this.setState({
+            	ufbIds:e.ufbId,
+                loading: false
+            });
+       }.bind(this));   
+	},
+	//新建HTTP获取数据
+	addTime(){
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/customer/toAddBusinessAndFollow",
+            data:{
+            	
+            },
+            success: function (data) {                	  
+            		let theArr = [];
+				    let thedata=data.data;
+				    if (!thedata) {
+	                    if (data.error && data.error.length) {
+	                        message.warning(data.error[0].message);
+	                    };	
+	                    thedata = {}; 
+	              };   	
+					let creatMent=thedata.createTime.substr(10,9);
+ 				    let createYear=thedata.createTime.substr(0,10);
+					this.setState({	
+						createTime:thedata.createTime,
+						creatMent:creatMent,
+						createYear:createYear,
+						followTime:thedata.followTime,
+	                    adminName: thedata.adminName,
+                    });
+				}.bind(this),
+			}).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));  
+	},
+	//获取拜访详情ajax
+	loadVisit(pageNo) {
+        this.setState({
+            loading: true
+        });      
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,          
+            url:globalConfig.context + '/api/admin/customer/listFollowHistory',
+            data: {
+            	pageNo: pageNo || 1,
+                pageSize: this.state.paginations.pageSize,
+                uid: this.state.uids, //名称1
+                businessGlossoryId:this.state.businessGlossoryId,
+            },
+            success: function (data) {            	
+                let theArr = []; 
+                if (data.error.length || data.data.list=="") {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };                   
+                } else {  
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];                        
+                        theArr.push({
+                            followId:thisdata.followId,
+                            followTime:thisdata.followTime,
+                            identityName:thisdata.identityName, 
+                            contacts:thisdata.contacts,
+                            contactMobile:thisdata.contactMobile,
+                            result:thisdata.result,
+                            ufbId:thisdata.ufbId,
+                            adminName:thisdata.adminName,
+                            followSituation:thisdata.followSituation,
+                            customerStatus:thisdata.customerStatus,
+                            contactType:thisdata.contactType
+                        });
+                    };
+                    this.state.paginations.current = data.data.pageNo;
+                    this.state.paginations.total = data.data.totalCount;
+                };               
+                this.setState({
+                    visitArrList: theArr,
+                    paginations: this.state.paginations
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({	
+                loading: false
+            });
+        }.bind(this));
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            if (nextProps.data && nextProps.data.id) {
+                this.loadData(nextProps.data.id, nextProps.detailApiUrl);
+            };
+            this.state.data = {};
+            this.state.companyLogoUrl = [];
+            this.state.orgCodeUrl = []; 
+        };
+    },
+    tableRowClick(record, index) { 
+        this.state.RowData = record; 
+        this.detailsModalOk(record);
+        this.setState({
+        	selectedRowKeys:[],
+        	rowId:record.businessId,
+        })    
+    },
+    followRowClick(record, index) { 
+    	console.log(record)
+        this.state.RowData = record; 
+        this.listFollowUp(record);
+        this.setState({
+            businessFollowModul: true, 
+            selectedRowKeys:[],
+        });    
+    },
+    render() {
+    	const FormItem = Form.Item
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            },
+            onSelect: (recordt, selected, selectedRows) => {			   
+			    this.setState({
+			    	recordt:recordt.id
+			    })
+			},
+        };
+        const rowSelections = { 
+        	selectedRowKeys: this.state.selectedRowKey,
+            onChange: (selectedRowKey, selectedRow) => {
+                this.setState({
+                    selectedRow: selectedRow.slice(-1),
+                    selectedRowKey: selectedRowKey.slice(-1)
+                });                
+            },
+            onSelect: (records, selected, selectedRow) => {			   
+			    this.setState({
+			    	selectedRow: selectedRow.slice(-1),
+			    	records:records.id,			    	
+			    })			  
+			},
+			
+        };
+		
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;  	
+      	const { getFieldDecorator } = this.props.form;
+    	  const formItemLayout = {
+            labelCol: { span: 8 },
+            wrapperCol: { span: 14 },
+       };
+        const theInformation=this.state.dataInformation || {}
+      	const contactsOption="";    	        	
+        const formItemLayput = {
+            labelCol: { span: 10 },
+            wrapperCol: { span: 14 },
+        }; 
+        const businessIds=this.state.businessId||'';
+        const dataSources=this.state.customerArr || [];
+        const options = dataSources.map((group) =>
+				      <Option key={group.id} value={group.name}>{group.name}</Option>
+				     )
+        return (
+            <div className="user-content" >
+                <div className="content-title">                  
+                    <span>我的业务</span>
+                </div>
+                <div className="user-search">                    
+                    <Input placeholder="客户名称"
+                        value={this.state.identifyNameS}
+                        onChange={(e) => { this.setState({ identifyNameS: e.target.value }); }} />
+                    <Select placeholder="服务意向" value={this.state.businessIdS} onChange={(e) => {
+								        this.setState({businessIdS:e})}} style={{width:'150px'}}>
+	                      {
+	                        intentionalService.map(function (item) {
+	                            return <Select.Option key={item.value} >{item.key}</Select.Option>
+	                        })
+	                      }
+                    </Select>
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button> 
+	                <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
+                    <div className='clearfix' style={{marginTop:'5px'}}>
+	                  <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>                    			                  
+			                <RangePicker
+		                        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 }); }} />   
+	                        <Select placeholder="客户状态"
+	                            style={{ width: 150 }}
+	                            value={this.state.customerStatusS}
+	                            onChange={(e) => { this.setState({ customerStatusS: e }) }}>
+	                            {this.state.customerStatusArrOption}
+	                        </Select>
+	                        <Select placeholder="业务进度"
+	                            style={{ width: 150 }}
+	                            value={this.state.followSituationS}
+	                            onChange={(e) => { this.setState({ followSituationS: e }) }}>
+	                            {this.state.intentionalOption}
+	                        </Select>
+	                        <Input placeholder="营销员" style={{width:'150px'}}
+		                        value={this.state.adminNameS}
+		                        onChange={(e) => { this.setState({ adminNameS: e.target.value }); }} />
+				            </div>  
+		            </div>
+                </div>                                               
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}    
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick}
+                           />
+                    </Spin>
+                </div>            
+    			<Modal	
+				      className="customeDetails"				      
+			          title="我的业务意向详情"
+			          width='1000px'
+			          visible={this.state.modal5Visible}
+			          onOk={this.detailsModal}
+			          onCancel={this.detailsModal}
+			          footer=''
+			        >				    
+			        <Form horizontal onSubmit={this.newSubmit} id="demand-form">
+		                <Spin spinning={this.state.loading}>
+			               	<div className="clearfix">
+		                    	<FormItem className="half-item"
+				                   {...formItemLayout}
+				                    label="意向名称"
+			                        >
+			                        <span>{getCompanyIntention(theInformation.businessGlossoryId)}</span>
+			                    </FormItem>
+			                    <FormItem className="half-item"
+				                    {...formItemLayout}
+				                    label="意向时间"
+			                        >
+			                        <span>{theInformation.createTime}</span>
+			                    </FormItem>
+			                    <FormItem className="half-item"
+				                    {...formItemLayout}
+				                    label="客户名称"
+			                        >
+			                        <span>{theInformation.identifyName}</span>
+			                    </FormItem>
+			                    <FormItem className="half-item"
+				                   {...formItemLayout}
+				                    label="营销员"
+			                        >
+			                        <span>{theInformation.adminName}</span>
+			                    </FormItem>
+								<FormItem className="half-item" 
+		                           {...formItemLayout}
+		                           label="意向进度"
+	                               > 
+	                                <span>{getfllowSituation(theInformation.followSituation)}</span>    
+	                   		    </FormItem>
+				    			<FormItem className="half-item" 
+			                           {...formItemLayout}
+			                           label="客户状态"
+		                               > 
+                                    <span>{getcustomerStatue(theInformation.customerStatus)}</span>   
+	                   		    </FormItem>
+		                   		<div className="clearfix">
+		                   		    <FormItem
+				                        labelCol={{ span: 4 }}
+				                        wrapperCol={{ span: 16 }}
+				                        label="意向说明" >					                          
+				                        <span>{this.state.remarks}</span>   
+				                    </FormItem>
+				                </div>
+		                  </div>	
+		                  <div className="clearfix">
+		                  		<div style={{fontSize:'18px',marginLeft:'40px',marginBottom:'20px'}}>业务跟进</div>
+	                        	<div className="clearfix" style={{paddingLeft:'40px',paddingRight:'40px'}}>
+	                			    <Spin spinning={this.state.loading}>
+								      <Table 
+						            	 pagination={this.state.paginations}
+						            	 columns={this.state.businessFollowList} 
+						            	 dataSource={this.state.visitArrList}
+						            	 onRowClick={this.followRowClick}
+						            	 />
+								    </Spin> 
+								</div>	
+		                  </div>
+					    </Spin>
+					</Form>		
+				</Modal>
+			    
+    			<Modal	
+				      footer=''
+			          title="业务跟进详情"
+			          width='1000px'
+			          visible={this.state.businessFollowModul}
+			          onOk={this.businessFollowOk}
+					  onCancel={this.businessFollowCancel}							          							          
+			        >				    
+					    <div className="clearfix">
+			    			<Form horizontal id="demand-form" >
+			    			<Spin spinning={this.state.loading}>
+			    			   	<div className="clearfix">
+			    			   		<FormItem className="half-item"
+						                            {...formItemLayout}
+						                             label="意向名称"
+						                             >
+					    			    <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
+					    			</FormItem>
+			    			    	<FormItem className="half-item"
+				                            {...formItemLayout}
+				                             label="意向时间"
+				                             >
+			    			     		<span>{this.state.createTime}</span>
+			    			    	</FormItem>
+			    			    	<FormItem className="half-item"
+				                            {...formItemLayout}
+				                             label="客户名称"
+				                             >
+			    			     		<span>{this.state.identifyName}</span>
+			    			    	</FormItem>
+			    			     	<FormItem className="half-item"
+				                            {...formItemLayout}
+				                             label="营销员"
+				                             >
+			    			     		<span>{this.state.adminName}</span>
+			    			    	</FormItem>
+			    			   		<FormItem className="half-item" 
+			                           {...formItemLayout}
+			                           label="意向进度"
+		                               > 
+									    <span>{getfllowSituation(this.state.followSituation)}</span>   
+		                   		    </FormItem>
+					    			<FormItem className="half-item" 
+			                           {...formItemLayout}
+			                           label="客户状态"
+	                                   > 
+									    <span>{getcustomerStatue(this.state.customerStatus)}</span>                                  
+		                   		    </FormItem>
+		                   		    <div className="clearfix">
+			                   		    <FormItem
+					                        labelCol={{ span: 4 }}
+					                        wrapperCol={{ span: 16 }}
+					                        label="意向说明" >					                        
+					                        <span>{this.state.remarks}</span>   
+					                    </FormItem>
+					                </div>    
+		                   		    <div style={{fontSize:'18px',marginLeft:'30px'}}>拜访情况</div>
+				    			   		<FormItem className="half-item"
+				                            labelCol={{ span: 8 }}
+					                        wrapperCol={{ span: 16 }}
+				                            label="拜访方式" >
+							                  <span>{getContactType(parseInt(this.state.contactType))}</span>
+						                </FormItem> 
+			                   		    <FormItem className="half-item" 
+				                           {...formItemLayout}
+				                           label="当前联系人"
+			                               > 
+					                        <span>{this.state.contacts}</span>
+			                   		    </FormItem>
+						                <FormItem className="half-item"
+				                            {...formItemLayout}
+				                             label="拜访人"
+				                            >
+						                	<span>{this.state.adminName}</span>
+						                </FormItem>
+						                <FormItem className="half-item"
+				                            {...formItemLayout}
+				                            label="拜访时间" >			                                
+				                              <span>{this.state.followTime}</span>
+		            					</FormItem>
+					                	<FormItem
+					                        labelCol={{ span: 4 }}
+							                wrapperCol={{ span: 16 }}
+					                        label="拜访备注" >				                    
+					                   		<span>{this.state.result}</span>
+					                   </FormItem>
+			    			   	</div>
+					   		</Spin>
+					      </Form> 
+						</div>	                    
+    			</Modal>
+          </div >
+        );
+    }
+}));
 export default ServiceQuery;

+ 0 - 20
js/component/manageCenter/customer/individualCustomer/publicindividualCustomer.jsx

@@ -1,20 +0,0 @@
-import React from 'react';
-import { AutoComplete, Icon, Button, Input, InputNumber, Select, Spin, Table, message, Modal, Row, Col, DatePicker,Switch,Upload} from 'antd';
-import ajax from 'jquery/src/ajax/xhr.js';
-import $ from 'jquery/src/ajax';
-import moment from 'moment';
-import './myClient.less';
-import { orderStatusList,cityArr,customerStatus,intentionalService,newFollow} from '../../../dataDic.js';
-import { beforeUploadFile,getOrderStatus, getSearchUrl,getcustomerTyp,getcityArr,getcustomerStatue,getCompanyIntention,getfllowSituation,getsex} from '../../../tools.js';
-
-//查询功能和初始列表
-const PublicindividualCustomer = React.createClass({	
-	render(){
-		return(
-			<div className="user-content">敬请期待!</div>
-		)
-	}
-	
- })
-
-export default PublicindividualCustomer;

+ 4 - 10
js/component/manageCenter/customer/leftTab.jsx

@@ -11,8 +11,8 @@ const LeftTab = React.createClass({
             current: 'myClient', 
             subKey: 'sub1', 
             keyList: [
-                { key: 'sub1', value: ['myClient', 'publicCustomer','companyCustomer'] },
-                { key: 'sub2', value: ['individualCustomer', 'publicCustomer','queryCustomer'] },
+                { key: 'sub1', value: ['myClient','companyCustomer'] },
+                { key: 'sub2', value: ['individualCustomer','queryCustomer'] },
                 { key: 'sub3', value: ['myBusiness', 'serviceQuery'] },               
             ]
         };
@@ -48,10 +48,7 @@ const LeftTab = React.createClass({
 	            <SubMenu key="sub1" title={<span>单位客户</span>}>	            	
 		                <Menu.Item key="myClient">
 		                    我的单位客户
-		                </Menu.Item>               
-		                <Menu.Item key="publicCustomer">
-		                    公共单位客户
-		                </Menu.Item>		               
+		                </Menu.Item>                              
 		                <Menu.Item key="companyCustomer">
 		                    单位客户查询
 		                </Menu.Item>		           
@@ -59,10 +56,7 @@ const LeftTab = React.createClass({
 		        <SubMenu key="sub2" title={<span>个人客户</span>}>	            	
 		                <Menu.Item key="individualCustomer">
 		                    我的个人客户
-		                </Menu.Item>               
-		                <Menu.Item key="publicindividualCustomer">
-		                    公共个人客户
-		                </Menu.Item>		               
+		                </Menu.Item>               	               
 		                <Menu.Item key="queryCustomer">
 		                    个人客户查询
 		                </Menu.Item>		           

+ 39 - 12
js/component/tools.js

@@ -31,6 +31,7 @@ import {
     activityType,
     boutique,
     hot,
+    statuslist,
     customerTyp,
     cityArr,
     customerStatus,
@@ -47,6 +48,7 @@ import {
     Certification,
     currentMember,
     lvl,
+    socialAttribute,
 } from './dataDic.js';
 
 import { provinceList} from './NewDicProvinceList.js';
@@ -706,6 +708,18 @@ module.exports = {
             return theType;
         }
     },
+     //账户状态
+	getStatuslist: function (e) {
+         if (e) {
+            let theType = '';
+            statuslist.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
    
     //意向服务
 	getCompanyIntention: function (e) {
@@ -823,17 +837,17 @@ module.exports = {
     	let theType = '';
     	if (nub<=34) {
             provinceList.map(function (item) {
-                if (item.name == nub) {
-                    theType = item.id;
+                if (item.id == nub) {
+                    theType = item.name;
                 };
             });
             return theType;
      }else if(nub>34&&nub<=380){
         	provinceList.map(function (item) {
         		item.cityList.map(function (city) {
-	                if (city.name == nub) {
-	                    theType = city.id;
-	                 };
+	                if (item.id == nub) {
+                      theType = item.name;
+                   };
 	             });
            });
             return theType;
@@ -841,16 +855,16 @@ module.exports = {
         	provinceList.map(function (item) {
         		item.cityList.map(function (city) {
         			city.areaList.map(function (areas) {
-		                if (areas.name == nub) {
-		                    theType = areas.id;
-		                  };
-		                }); 
+		               if (item.id == nub) {
+                   		   theType = item.name;
+              			}; 
 		            });
-           });
-        return theType;
+          		 });
+	       		 return theType;
+	        })
         }
     },
-   //我的业务跟进状态contactType
+   //我的业务跟进状态
    getStatusFollow:function(e){
    		let theType = '';
    		if(e){
@@ -872,5 +886,18 @@ module.exports = {
             return theType;
         }
     
+	},
+	//社会属性
+   getSocialAttribute:function(e){
+   		 if (e) {
+            let theType = '';
+            socialAttribute.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    
 	}
 }