Browse Source

客户管理重构

liting2017 7 years ago
parent
commit
03b0b8a5ea
24 changed files with 7389 additions and 4129 deletions
  1. 101 96
      js/component/dataDic.js
  2. 0 766
      js/component/manageCenter/customer/companyCustomer.jsx
  3. 47 22
      js/component/manageCenter/customer/content.jsx
  4. 20 0
      js/component/manageCenter/customer/customerData/companyCustomer.jsx
  5. 2413 0
      js/component/manageCenter/customer/customerData/myClient.jsx
  6. 142 0
      js/component/manageCenter/customer/customerData/myClient.less
  7. 246 0
      js/component/manageCenter/customer/customerData/myClientDesc.jsx
  8. 20 0
      js/component/manageCenter/customer/customerData/publicCustomer.jsx
  9. 1441 0
      js/component/manageCenter/customer/customerService/myBusiness.jsx
  10. 182 0
      js/component/manageCenter/customer/customerService/myClient.less
  11. 12 0
      js/component/manageCenter/customer/customerService/serviceQuery.jsx
  12. 2278 0
      js/component/manageCenter/customer/individualCustomer/individualCustomer.jsx
  13. 4 1
      js/component/manageCenter/customer/myClient.less
  14. 5 5
      js/component/manageCenter/customer/myClientDesc.jsx
  15. 20 0
      js/component/manageCenter/customer/individualCustomer/publicindividualCustomer.jsx
  16. 20 0
      js/component/manageCenter/customer/individualCustomer/queryCustomer.jsx
  17. 51 17
      js/component/manageCenter/customer/leftTab.jsx
  18. 0 2505
      js/component/manageCenter/customer/myClient.jsx
  19. 0 370
      js/component/manageCenter/customer/publicCustomer.jsx
  20. 0 293
      js/component/manageCenter/customer/teamCustomer.jsx
  21. 121 11
      js/component/manageCenter/servicesManage/contract/contract.jsx
  22. 148 25
      js/component/manageCenter/servicesManage/contract/contractAdd.jsx
  23. 101 1
      js/component/tools.js
  24. 17 17
      template/template.html

+ 101 - 96
js/component/dataDic.js

@@ -954,6 +954,26 @@ module.exports = {
             key: "是"
         }
     ],
+    //是否函数
+    Whether:[
+        {
+            value: "0",
+            key: "否"
+        }, {
+            value: "1",
+            key: "是"
+        }
+    ],
+    //实名认证
+    Certification:[
+        {
+            value: "0",
+            key: "未认证"
+        }, {
+            value: "1",
+            key: "已认证"
+        }
+    ],
     //是否首页展示
     hot:[
         {
@@ -1000,42 +1020,6 @@ module.exports = {
             key: "无进度"
         },
     ],
-    //最新跟进反
-    newFollowOn:[
-   		{
-            value: "已发项目介绍资料",
-            key: "0"
-        }, {
-            value: "已约面谈",
-            key: "1"
-        },
-        {
-            value: "已发合同计划书",
-            key: "2"
-        }, {
-            value: "已报价",
-            key: "3"
-        },
-        {
-            value: "已发合同",
-            key: "4"
-        },
-        {
-            value: "已签合同",
-            key: "5"
-        }, {
-            value: "面谈中",
-            key: "6"
-        },
-        {
-            value: "已面签",
-            key: "7"
-        },
-        {
-            value: "无进度",
-            key: "8"
-        },
-    ],
      //客户状态
     customerStatus:[
         {
@@ -1058,30 +1042,7 @@ module.exports = {
             value: "5",
             key: "被拒绝客户"
         }
-    ],
-    //客户状态反
-    customerStatusOn:[
-        {
-            value: "新客户",
-            key: "0"
-        }, {
-            value: "意向客户",
-            key: "1"
-        },
-        {
-            value: "重点客户",
-            key: "2"
-        }, {
-            value: "面谈客户",
-            key: "3"
-        },{
-            value: "签单客户",
-            key: "4"
-        },{
-            value: "被拒绝客户",
-            key: "5"
-        }
-    ],        
+    ],     
     //意向服务
     intentionalService:[
         {
@@ -1128,36 +1089,7 @@ module.exports = {
             key: "系统集成"
         }
         
-    ],
-    //意向服务反
-    intentionalServiceOn:[
-        {
-            value: "发明专利",
-            key: "0"
-        }, {
-            value: "实用型新型专利",
-            key: "1"
-        },
-        {
-            value: "外观专利",
-            key: "2"
-        },
-        {
-            value: "软件著作权",
-            key: "3"
-        }, {
-            value: "知识产权贯标",
-            key: "4"
-        },
-        {
-            value: "高企认定",
-            key: "5"
-        },
-         {
-            value: "技术成果",
-            key: "6"
-        }
-    ],
+    ],   
     //客户标签
     tag:[
         {
@@ -1179,12 +1111,8 @@ module.exports = {
             key: "个人客户"
         }, {
             value: '1',
-            key: "机构单位"
-        },
-         {
-            value: '2',
-            key: "团体单位"
-        },
+            key: "单位客户"
+        }
        
     ], 
     //性别
@@ -1215,4 +1143,81 @@ module.exports = {
             key: "短信"
         },      
     ], 
+    //会员状态
+    currentMember:[
+        {
+            value: '0',
+            key: "普通用户"
+        }, {
+            value: '1',
+            key: "月付会员"
+        },
+        {
+            value: '2',
+            key: "年付会员"
+        },  
+        {
+            value: '3',
+            key: "已过期"
+        }, 
+    ], 
+    //会员等级
+    lvl:[
+        {
+            value: '0',
+            key: "普通用户"
+        }, {
+            value: '1',
+            key: "黄金会员"
+        },
+        {
+            value: '2',
+            key: "白金会员"
+        },  
+        {
+            value: '3',
+            key: "钻石会员"
+        }, 
+    ], 
+    //社会属性
+    socialAttribute:[
+        {
+            value: '0',
+            key: "社会企业"
+        }, {
+            value: '1',
+            key: "科研单位"
+        },
+        {
+            value: '2',
+            key: "高等院校"
+        },  
+        {
+            value: '3',
+            key: "科研专家"
+        },{
+            value: '4',
+            key: "科技大人"
+        }, {
+            value: '5',
+            key: "服务机构"
+        },
+        {
+            value: '6',
+            key: "政府部门"
+        },  
+        {
+            value: '7',
+            key: "商会"
+        },{
+            value: '8',
+            key: "协会"
+        },{
+            value: '9',
+            key: "其他组织"
+        }, {
+            value: '10',
+            key: "其他个人"
+        }
+    ], 
 };

+ 0 - 766
js/component/manageCenter/customer/companyCustomer.jsx

@@ -1,766 +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';
-const { Column, ColumnGroup } = Table;
-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({
-    loadData(pageNo, detailApiUrl) {    	
-        this.state.data = [];
-        this.setState({
-            loading: true
-        });        
-        $.ajax({
-            method: "post",
-            dataType: "json",
-            crossDomain: false,          
-            url:globalConfig.context +'/api/admin/customer/listCompanyCustomer',
-            data: {
-                pageNo: pageNo || 1,
-                pageSize: this.state.pagination.pageSize,               
-                companyName: this.state.companyNamet, //名称1                
-				customerType: this.state.customerTypet, //客户类型1
-              	locationProvince:this.state.locationProvincet,//地区
-				customerStatus:this.state.customerStatust,//客户状态1
-				contactName:this.state.contactNamet,//联系人姓名1							
-				contactTel:this.state.contactTelt,//联系人手机
-				companyIntention:this.state.companyIntentiont,//意向服务
-                followSituation:this.state.followSituationt,//最新跟进进度
-				//releaseDateStartDate: this.state.releaseDate[0],
-                //releaseDateEndDate: this.state.releaseDate[1],			
-            },
-            success: function (data) {            	
-                let theArr = [];
-                if (!data.data || !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,                                                  
-                            companyName:thisdata.companyName,//公司名称
-                            customerType:thisdata.customerType,
-                            _customerType:thisdata._customerType,//客户类型
-                            locationProvince:thisdata.locationProvince,//地区                        
-                            contactName:thisdata.contactName, //联系人姓名
-                            telNum:thisdata.telNum,//手机号
-                            _customerStatus:thisdata._customerStatus,//客户状态
-                            _companyIntention:thisdata._companyIntention,//意向服务
-                            _followSituation:thisdata._followSituation,//最新跟进
-                            customerStatus:thisdata.customerStatus,//客户状态
-                            companyIntention:thisdata.companyIntention,//意向服务
-                            followSituation:thisdata.followSituation,//最新跟进
-                            adminName:thisdata.adminName,     //跟进人          
-                            followDate:thisdata.followDate,                                                                                   
-                        });
-                    };
-                   
-                    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));
-    },    
-    //查看详情
-    Detailload(deletedIds){    	
-    	$.ajax({
-            method: "post",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + '/api/admin/customer/findAllCustomerDetails',
-            data: {
-                id: deletedIds
-            },
-            success: function (data) {
-                let thisData = data.data; 
-                let companyArr=[]; 	
-                let companyText=[];
-   				let companyString=thisData.companyIntention;				
-   				companyArr=companyString.split(",")    				
-   				for(var i=0;i<companyArr.length;i++){
-   					companyText+=getCompanyIntention(companyArr[i])+"-"
-   				}
-                if (!thisData) {
-                    if (data.error && data.error.length) {
-                        message.warning(data.error[0].message);
-                    };
-                    thisData = {};
-                };
-                this.setState({
-                	companyIntention:companyText,
-                    data: thisData,
-                   	followSituation:thisData.followSituation,
-		            		customerStatus:thisData.customerStatus,		            		
-                });                            
-            }.bind(this),
-        }).always(function () {
-            this.setState({           	
-                loading: false
-            });
-        }.bind(this));  
-    },
-    getInitialState() {
-        return {
-            searchMore: true,
-            searchType: 0,
-            validityPeriodDate: [],
-            releaseDate: [],
-            selectedRowKeys: [],
-            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 + '条数据';
-                }
-            },
-                contactInformation:[
-           			 {
-				  title: '姓名',
-				  dataIndex: 'contactName',
-				  key: 'contactName'
-						  
-					},{
-						  title: '性别',
-						  dataIndex: 'sex',
-						  key: 'sex',
-						  render: text => { return getsex(text); }
-					},
-					{
-						  title: '手机号码',
-						  dataIndex: 'telNum',
-						  key: 'telNum'	 
-					},{
-						  title: '座机号',
-						  dataIndex: 'mobile',
-						  key: 'mobile'	 
-					},{
-						  title: 'QQ号码',
-						  dataIndex: 'qq',
-						  key: 'qq'	 
-					},{
-						  title: '邮箱号',
-						  dataIndex: 'email',
-						  key: 'email'	 
-					},{
-						  title: '微信',
-						  dataIndex: 'wechat',
-						  key: 'wechat'	 
-					},{
-						  title: '部门',
-						  dataIndex: 'depatrment',
-						  key: 'depatrment'	 
-					},{
-						  title: '职位',
-						  dataIndex: 'customerPosition',
-						  key: 'customerPosition'	 
-					},
-                  ],
-            columns: [               
-                {
-                    title: '公司名称',
-                    dataIndex: 'companyName',
-                    key: 'companyName',
-                }, {
-                    title: '客户类型',
-                    dataIndex: '_customerType',
-                    key: '_customerType',
-                    //render: text => { return getcustomerTyp(text); }
-                }, {
-                    title: '地区',
-                    dataIndex: 'locationProvince',
-                    key: 'locationProvince',
-                    render: text => { return getcityArr(text); }
-                }, {
-                    title: '联系人姓名',
-                    dataIndex: 'contactName',
-                    key: 'contactName',                    
-                }, 
-                {
-                    title: '手机号',
-                    dataIndex: 'telNum',
-                    key:'telNum',                   
-                },
-                 {
-                    title: '客户状态',
-                    dataIndex: '_customerStatus',
-                    key: '_customerStatus',
-                  //render: text => { return getcustomerStatue(text) }
-                },
-                {
-                    title: '意向服务',
-                    dataIndex: '_companyIntention',
-                    key: '_companyIntention',
-                    //render: text => { return getCompanyIntention(text) }
-                },
-                 {
-                    title: '最新跟进',
-                    dataIndex: '_followSituation',
-                    key: '_followSituation',
-                    //render: text => { return getfllowSituation(text) }
-                },
-                 {
-                    title: '跟单人',
-                    dataIndex: 'adminName',
-                    key: 'adminName',
-                },
-                {
-                    title: '时间',
-                    dataIndex: 'followDate',
-                    key: 'followDate',
-                }
-            ],
-            dataSource: [],
-            searchTime: [],
-        };
-    },
-    componentWillMount() {
-        let theArr = [];
-        customerStatus.map(function (item) {
-            theArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });            
-               
-        let intentionalArr = [];
-        intentionalService.map(function (item) {
-            intentionalArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });   
-        let newArr = [];
-        newFollow.map(function (item) {
-            newArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });   
-				let auditArr = [];
-        cityArr.map(function (item) {
-            auditArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        }); 
-        this.state.customerStatuarr = theArr;               
-        this.state.intentionalOption = intentionalArr;
-        this.state.newOption = newArr;
-        this.state.auditStatusOption = auditArr;
-        
-        if (window.location.search) {
-            let theObj = getSearchUrl(window.location.search);
-            if (theObj.rid) {
-                theObj.id = theObj.rid;
-                if (theObj.rid != 'null') {
-                    this.tableRowClick(theObj);
-                };
-            };
-        };       
-        this.loadData();        
-    },
-    tableRowClick(record) {
-        this.state.RowData = record;
-        this.setok(record.id);       
-        this.setState({
-        	selectedRowKeys:[],
-        	hids:record.id
-        })
-    },
-    //点击消失函数
-	setModal3Visiblecancel(e) {
-	    this.setState({ 
-	    	modal3Visible:false
-	    });	   	    
-	},
-	setModal4Visiblecancel(e) {
-	    this.setState({ 
-	    	modal4Visible:false
-	    });	   	    
-	},
-   
-    closeDesc(e, s) {
-        this.state.showDesc = e;
-        if (s) {
-            this.loadData();
-        };
-    },
-    search() {
-        this.loadData();
-    },
-    reset() {
-    	this.state.companyNamet='';  
-    	this.state.customerTypet=undefined;
-        this.state.id = undefined;
-        this.state.shareTypet = undefined;
-        this.state.companyIntentiont  = undefined;
-        this.state.followSituationt  = undefined;
-        this.state.locationProvincet  = undefined;
-        this.state.customerStatust  = undefined;
-        this.state.contactNamet   = undefined;
-        this.state.contactTelt = undefined;
-        this.state.contactNamet = undefined;  
-        this.state.releaseDatet = [];
-        this.loadData(); 
-    },
-    searchSwitch() {
-        this.setState({
-            searchMore: !this.state.searchMore
-        });
-    },
-    //点击消失函数
-    setok(e) {
-		    this.setState({ 
-		    	 visible:true
-		    });	
-		    this.Detailload(e)			   
-		},
-	setcancel(e) {
-	    this.setState({ 
-	    	 visible:false
-	    });	   	    
-	},
-	setoks(index) {
-		this.setState({ 
-		    visible1:true
-		});			
-        this.setState({
-            loading: true
-        });       
-        $.ajax({
-                method: "post",
-                dataType: "json",
-                crossDomain: false,
-                url: globalConfig.context + "/api/admin/customer/findCustomerUserList",
-                data:{
-                	cid:this.state.hids
-                },
-                 success: function (data) {                	  
-                		let theArr = [];
-					    let thedata=data.data;
-					    for (let i = 0; i < data.data.length; i++) {
-	                        let thisdata = data.data[i];                       
-	                        theArr.push({
-	                        		id:thisdata.id,//联系人ID
-	                        		contactName:thisdata.name,//联系人姓名
-	                        		sex:thisdata.sex,//联系人性别
-	                        		mobile:thisdata.mobile,//座机号
-	                        		telNum:thisdata.telNum,//手机号
-	                        		email:thisdata.email,//邮箱
-	                        		qq:thisdata.qq,//qq
-	                        		wechat:thisdata.wechat,//微信号
-	                        		depatrment:thisdata.depatrment,//部门
-	                        		customerPosition:thisdata.customerPosition,//职位
-	                        });
-	                    };         
-						this.setState({
-		                    information: theArr,                    
-	                    });
-					}.bind(this),
-				}).always(function () {
-	            this.setState({
-	                loading: false
-	            });
-	        }.bind(this));
-		    
-	},
-	setcancels(e) {
-	    this.setState({ 
-	    	 visible1:false
-	    });	   	    
-	},
-	
-	setModal4VisibleOk(e) {		
-		this.setState({ modal4Visible:true });			  
-        this.state.data = [];
-        this.setState({
-            loading: true
-        });  
-        this.setState({
-            selectedRowKeys:this.state.selectedRowKeys,            
-        });              
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,          
-            url:globalConfig.context + '/api/admin/customer/listCustomerLog',
-            data: {
-                  customerId:this.state.record                 	
-            },
-            success: function (data) {            	
-                let theArr = [];
-                let theWomanID=[];
-                let theFollowID=[];
-                if (!data.data) {
-                    if (data.error && data.error.length) {
-                        message.warning(data.error[0].message);
-                    };                   
-                } else {  
-                		data.data.map(function (item,index) {	
-							theWomanID.push(data.data[index].contactId);					          
-						});	
-						data.data.map(function (item,index) {	
-							theFollowID.push(data.data[index].followId);					          
-						});
-                    for (let i = 0; i < data.data.length; i++) {
-                        let thisdata = data.data[i];
-                        theArr.push({
-                        		key:i,                            
-                                operatorName:thisdata.operatorName,//操作员姓名
-                                operatorType:thisdata.operatorType,//操作类型
-                                operatorTime:thisdata.operatorTime,//操作时间
-                                beforeCustomerStatus:thisdata.beforeCustomerStatus,//修改前客户状态
-                                afterCustomerStatus:thisdata.afterCustomerStatus,//修改后客户状态
-                                beforeCustomerIntention:thisdata.beforeCustomerIntention,//修改前客户意向
-                                afterCustomerIntention:thisdata.afterCustomerIntention,//修改后客户意向
-                                beforeFollowSituation:thisdata.beforeFollowSituation,//修改前跟进进度
-                                afterFollowSituation:thisdata.afterFollowSituation,//修改后跟进进度
-                                beforeAdminName:thisdata.beforeAdminName,//修改前跟进人
-                                afterAdminName:thisdata.afterAdminName,//修改后跟进人                                                                                                                                           
-                        });
-                    };                   
-                };               
-                this.setState({//导出数据
-                    journal: theArr, 
-                    theWomanID:theWomanID,
-                    theFollowID:theFollowID,
-                });
-            }.bind(this),
-        }).always(function () {
-            this.setState({
-                loading: false
-            });
-        }.bind(this));
-    }, 
-	
-	//点击查看跟进记录,点击最新跟进的第一个按钮(跟进状态)执行的函数,将会出现很多跟进列表
-	setModal3VisibleOk(e) {		
-		this.setState({ modal3Visible:true });			  
-        this.state.data = [];
-        this.setState({
-            loading: true
-        });       
-        this.setState({        	
-            selectedRowKeys:this.state.selectedRowKeys,            
-        });              
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,          
-            url:globalConfig.context + '/api/admin/customer/listAllFollowUpRecord',
-            data: {
-                  customerId:this.state.record                 	
-            },
-            success: function (data) {            	
-                let theArr = [];
-                let theWomanID=[];
-                let theFollowID=[];
-                if (!data.data) {
-                    if (data.error && data.error.length) {
-                        message.warning(data.error[0].message);
-                    };                   
-                } else {  
-                		data.data.map(function (item,index) {	
-							theWomanID.push(data.data[index].contactId);					          
-						});	
-						data.data.map(function (item,index) {	
-							theFollowID.push(data.data[index].followId);					          
-						});
-                    for (let i = 0; i < data.data.length; i++) {
-                        let thisdata = data.data[i];
-                        theArr.push({
-                        		key:i,
-                            _followDate:thisdata._followDate,//跟进时间
-                            adminName:thisdata.adminName,//跟进人   
-                            contactName:thisdata.contactName, //联系人姓名
-                            contactId:thisdata.contactId, //联系人ID
-                            contactInfo:thisdata.contactInfo,//联系信息
-                            _customerStatus:thisdata._customerStatus,//客户状态     
-                            _followSituation:thisdata._followSituation,//最新跟进
-                            followResult:thisdata.followResult,//跟进结果
-                            attachment:thisdata.attachment,//附件地址
-                        });
-                    };                   
-                };               
-                this.setState({//导出数据
-                    datahistory: theArr, 
-                    theWomanID:theWomanID,
-                    theFollowID:theFollowID,                    
-                });
-            }.bind(this),
-        }).always(function () {
-            this.setState({            	
-                loading: false
-            });
-        }.bind(this));
-    }, 
-    
-    render() {
-    	const theData = this.state.data || {}; 
-        const rowSelection = {        	
-            selectedRowKeys: this.state.selectedRowKeys,
-            onChange: (selectedRowKeys, selectedRows,e) => {
-                this.setState({
-                    selectedRows: selectedRows.slice(-1),                    
-                    selectedRowKeys:selectedRowKeys.slice(-1)
-                });                
-            }, 
-            onSelect: (record, selected, selectedRows) => {			   
-			    this.setState({
-			    	record:record.id
-			    })
-			},
-        };          
-        const hasSelected = this.state.selectedRowKeys.length > 0;
-        const { RangePicker } = DatePicker;
-        return (
-            <div className="user-content" >
-                <div className="content-title">                  
-                    <span>公司客户管理</span>                  
-                </div>
-                <div className="user-search">                    
-                    <Input placeholder="公司名称"
-                        value={this.state.companyNamet}
-                        onChange={(e) => { this.setState({ companyNamet: e.target.value }); }} /> 
-                    <Select placeholder="客户类型" style={{ width: 120 }}
-                            value={this.state.customerTypet }
-                            onChange={(e) => { this.setState({ customerTypet : e }) }}>
-                            <Select.Option value="0" >个人客户</Select.Option>
-                            <Select.Option value="1" >机构单位</Select.Option>
-                            <Select.Option value="2" >团体单位</Select.Option>
-                    </Select>     
-                    <Select placeholder="意向服务"
-                            style={{ width: 160 }}
-                            value={this.state.companyIntentiont}
-                            onChange={(e) => { this.setState({ companyIntentiont: e }) }}>
-                            {this.state.intentionalOption}
-                    </Select>
-                    <Select placeholder="跟进进度"
-                            style={{ width: 160 }}
-                            value={this.state.followSituationt}
-                            onChange={(e) => { this.setState({ followSituationt: e }) }}>
-                            {this.state.newOption}
-                    </Select>
-                    <Select placeholder="地区"
-                            style={{ width: 160 }}
-                            value={this.state.locationProvincet}
-                            onChange={(e) => { this.setState({ locationProvincet: e }) }}>
-                            {this.state.auditStatusOption}
-                    </Select>
-                    <Select placeholder="客户状态" style={{ width: 120 }}
-                            value={this.state.customerStatust}
-                            onChange={(e) => { this.setState({customerStatust: e }) }}>                           
-                            {this.state.customerStatuarr}
-                    </Select>
-                    <Button type="primary" onClick={this.search}>搜索</Button>
-                    <Button onClick={this.reset}>重置</Button>
-                    <Button onClick={this.setModal4VisibleOk} style={{marginRight:'10px'}}  disabled={!hasSelected}>查看日志</Button>
-                    <Button onClick={this.setModal3VisibleOk} style={{marginRight:'10px'}}  disabled={!hasSelected}>查看跟进记录</Button>
-                    <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
-                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>                    			                  
-		                <Input placeholder="联系人姓名" style={{width:'140px',marginRight:'10px'}}
-		                    value={this.state.contactNamet}
-		                    onChange={(e) => { this.setState({ contactNamet: e.target.value }); }} /> 
-		                <Input placeholder="手机号码" style={{width:'140px',marginRight:'10px'}}
-		                    value={this.state.contactTelt }
-		                    onChange={(e) => { this.setState({ contactTelt: e.target.value }); }} />                          
-                    </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 maskClosable={false} 
-                       visible={this.state.visible}
-                       onOk={this.setcancel} 
-                       onCancel={this.setcancel}
-                       width='800px'
-                       footer={null}
-                       title="客户详情"
-                       className="demand-order-content">
-                        <Spin spinning={this.state.loading}>                        	
-                            <Row style={{marginLeft:'100px'}}>
-                                <Col span={3}>客户类型:</Col>
-                                <Col span={6}>{theData._customerType}</Col>                               
-                            </Row>
-                            <Row style={{marginLeft:'100px'}}>
-                                <Col span={3}>录入时间:</Col>
-                                <Col span={6}>{theData.createTime}</Col>
-                                <Col span={3}>跟单人:</Col>
-                                <Col span={6}>{theData.adminName}</Col>
-                            </Row>
-                            <Row style={{marginLeft:'50px'}}>基本资料:</Row>
-                            <Row style={{marginLeft:'100px'}}>
-                                <Col span={3}>公司名称:</Col>
-                                <Col span={6}>{theData.companyName}</Col>
-                                <Col span={3}>公司行业:</Col>
-                                <Col span={6}>{theData.companyIndustry}</Col>
-                            </Row>
-                            <Row style={{marginLeft:'100px'}}>
-	                            <Col span={3}>意向服务:</Col>
-	                            <Col span={18}>{this.state.companyIntention}</Col>
-	                         </Row>
-                            <Row style={{marginLeft:'100px'}}>
-                                
-                                <Col span={3}>地区:</Col>
-                                <Col span={6}>{getcityArr(theData.locationProvince)}</Col>
-                            </Row>
-                            <Row style={{marginLeft:'100px'}}>
-                                <Col span={3}>最新跟进:</Col>
-                                <Col span={6}>{theData._followSituation}</Col>
-                                <Col span={3}>客户状态:</Col>
-                                <Col span={6}>{theData._customerStatus}</Col>
-                            </Row>
-                            <Row style={{marginLeft:'100px'}}>
-                                <Col span={3}>详细地址:</Col>                                
-                                <Col span={6}>{theData.address}</Col>
-                            </Row>
-                            <Row style={{marginLeft:'100px'}} >   
-                                <Col span={3}>备注:</Col>
-                                <Col span={18}>{theData.remarks}</Col>
-                            </Row>
-                                                       
-                        </Spin>
-               </Modal>
-                <Modal
-				      footer=''
-			          title="历史记录列表"
-			          width='800px'
-			          visible={this.state.modal3Visible}
-			          onOk={this.setModal3Visiblecancel}
-			          onCancel={this.setModal3Visiblecancel}							          							          
-			        >	
-			          <Spin spinning={this.state.loading}>	
-						    <Table dataSource={this.state.datahistory} >												    
-						      <Column
-						        title="时间"
-						        dataIndex="_followDate"
-						        key="_followDate"
-						      />
-						      <Column
-						        title="客户"
-						        dataIndex="contactName"
-						        key="contactName"						       						        							       
-						      />													    
-						    <Column
-						      title="跟进人"
-						      dataIndex="adminName"
-						      key="adminName"
-						    />
-						    <Column
-						      title="联系方式"
-						      dataIndex="contactInfo"
-						      key="contactInfo"
-						    />
-						    <Column
-						      title="最新跟进状态"
-						      dataIndex="_followSituation"
-						      key="_followSituation"
-						    />
-						   <Column
-						      title="跟进结果"
-						      dataIndex="followResult"
-						      key="followResult"							     									      
-							/>									  
-						</Table>
-			        </Spin>	
-				</Modal>
-				<Modal
-				      footer=''
-			          title="日志记录列表"
-			          width='1400px'
-			          visible={this.state.modal4Visible}
-			          onOk={this.setModal4Visiblecancel}
-			          onCancel={this.setModal4Visiblecancel}							          							          
-			        >	
-			          <Spin spinning={this.state.loading}>	
-						    <Table dataSource={this.state.journal} >												    
-						      <Column
-						        title="操作员姓名"
-						        dataIndex="operatorName"
-						        key="operatorName"
-						      />
-						      <Column
-						        title="操作类型"
-						        dataIndex="operatorType"
-						        key="operatorType"						       						        							       
-						      />													    
-						    <Column
-						      title="操作时间"
-						      dataIndex="operatorTime"
-						      key="operatorTime"
-						    />
-						    <Column
-						      title="修改前客户状态"
-						      dataIndex="beforeCustomerStatus"
-						      key="beforeCustomerStatus"
-						    />
-						    <Column
-						      title="修改后客户状态"
-						      dataIndex="afterCustomerStatus"
-						      key="afterCustomerStatus"
-						    />
-						   <Column
-						      title="修改前客户意向"
-						      dataIndex="beforeCustomerIntention"
-						      key="beforeCustomerIntention"							     									      
-							/>
-						    <Column
-						      title="修改后客户意向"
-						      dataIndex="afterCustomerIntention"
-						      key="afterCustomerIntention"							     									      
-							/>						   
-						    <Column
-						      title="修改前跟进进度"
-						      dataIndex="beforeFollowSituation"
-						      key="beforeFollowSituation"							     									      
-							/>
-						    <Column
-						      title="修改后跟进进度"
-						      dataIndex="afterFollowSituation"
-						      key="afterFollowSituation"							     									      
-							/>
-						     <Column
-						      title="修改前跟进人"
-						      dataIndex="beforeAdminName"
-						      key="beforeAdminName"							     									      
-							/>
-						    <Column
-						      title="修改后跟进人"
-						      dataIndex="afterAdminName"
-						      key="afterAdminName"							     									      
-							/>
-						</Table>
-			        </Spin>	
-				</Modal>
-            </div >
-        );
-    }
-});
-export default PublicCustomer;

+ 47 - 22
js/component/manageCenter/customer/content.jsx

@@ -1,10 +1,6 @@
 import React, { Component } from 'react';
 import '../content.less';
 import LeftTab from './leftTab';
-import TechAchievement from './myClient';
-import PublicCustomer from './publicCustomer';
-import CompanyCustomer from './companyCustomer';
-import Teamcustomer from './teamCustomer';
 
 
 class Content extends Component {
@@ -12,7 +8,7 @@ class Content extends Component {
         super();
         this.state = {
             loading: false,
-            component: 'div'
+            component: <div></div>,
         };
     }
     componentWillMount() {
@@ -26,40 +22,71 @@ class Content extends Component {
         switch (key) {          	
             case 'myClient':
                 require.ensure([], () => {
-                    const TechAchievement = require('./myClient').default;
+                    const MyClient = require('./customerData/myClient').default;
                     this.setState({
-                        component: TechAchievement ,                       
-                        detailApiUrl: '/api/admin/customer/findCustomerUserDetails'
+                        component: <MyClient />                      
+                      
                     });
                 });
                 break;           
-            case 'publicCustomer':
+            case 'publicCustomer': 
                 require.ensure([], () => {
-                    const publicCustomer = require('./publicCustomer').default;
+                    const PublicCustomer = require('./customerData/publicCustomer').default;
                     this.setState({
-                        component:publicCustomer,                        
-                        detailApiUrl: '/api/admin/customer/orgDetail'
+                        component:<PublicCustomer />,                                             
                     });
                 });
                 break;
             case 'companyCustomer':
                 require.ensure([], () => {
-	                const companyCustomer = require('./companyCustomer').default;
+	                const CompanyCustomer = require('./customerData/companyCustomer').default;
 	                this.setState({
-	                    component:companyCustomer,	                    
-	                    detailApiUrl: '/api/admin/customer/listCompanyCustomer'
+	                    component:<CompanyCustomer />,	                    	                  
 	                });
           	    });
           	    break;
-          	case 'teamCustomer':
+          	case 'individualCustomer':
                 require.ensure([], () => {
-	                const teamCustomer = require('./teamCustomer').default;
+                    const IndividualCustomer = require('./individualCustomer/individualCustomer').default;
+                    this.setState({
+                        component: <IndividualCustomer />                      
+                      
+                    });
+                });
+                break;           
+            case 'publicindividualCustomer': 
+                require.ensure([], () => {
+                    const PublicindividualCustomer = require('./individualCustomer/publicindividualCustomer').default;
+                    this.setState({
+                        component:<PublicindividualCustomer />,                                             
+                    });
+                });
+                break;
+            case 'queryCustomer':
+                require.ensure([], () => {
+	                const QueryCustomer = require('./individualCustomer/queryCustomer').default;
 	                this.setState({
-	                    component:teamCustomer,	                    
-	                    detailApiUrl: '/api/admin/customer/listTeamCustomer'
+	                    component:<QueryCustomer />,	                    	                  
 	                });
           	    });
           	    break;
+          	    
+      	    case 'myBusiness':
+            require.ensure([], () => {
+                const MyBusiness = require('./customerService/myBusiness').default;
+                this.setState({
+                    component:<MyBusiness />,	                                      
+                });
+      	    });
+      	    break;
+      	    case 'serviceQuery':
+            require.ensure([], () => {
+                const ServiceQuery = require('./customerService/serviceQuery').default;
+                this.setState({
+                    component:<ServiceQuery />,	                                      
+                });
+      	    });
+      	    break;
         };
         window.location.hash = key;
     }
@@ -68,9 +95,7 @@ class Content extends Component {
             <div className="manage-content">
                 <LeftTab handlekey={this.getKey.bind(this)} />
                 <div className="content-right">
-                    <this.state.component
-                        data-listApiUrl={this.state.listApiUrl}
-                        data-detailApiUrl={this.state.detailApiUrl} />
+                   {this.state.component}
                 </div>
             </div>
         )

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

@@ -0,0 +1,20 @@
+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';
+const { Column, ColumnGroup } = Table;
+import { newFollow} from '../../../dataDic.js';
+import { getsex} from '../../../tools.js';
+
+//查询功能和初始列表
+
+const PublicCustomer = React.createClass({
+   render(){
+		return(
+			<div className="user-content">客户查询</div>
+		)
+	}
+});
+export default PublicCustomer;

File diff suppressed because it is too large
+ 2413 - 0
js/component/manageCenter/customer/customerData/myClient.jsx


+ 142 - 0
js/component/manageCenter/customer/customerData/myClient.less

@@ -0,0 +1,142 @@
+.user-content {
+    background: #fff;
+    padding: 20px;
+    .content-title {
+        color: #333;
+        font-size: 16px;
+        overflow: hidden;
+    }
+    .user-search {
+        margin-bottom: 10px;
+        >input {
+            width: 140px;
+        }
+        >input,
+        >button,
+        .ant-select {
+            margin-right: 10px;
+            margin-top: 10px;
+        }
+        .ant-switch {
+            margin-left: 10px;
+        }
+        .search-more {
+            margin: 10px 0;
+            >span {
+                margin-right: 10px
+            }
+        }
+    }
+}
+.tabcolor .ant-table-thead > tr > th{background: none!important;}
+.avatar-uploader,
+.avatar-uploader-trigger,
+.avatar {
+    width: 150px;
+    height: 150px;
+}
+.modal-box-title{float: left;}
+.modal-box-detail{margin-left: 10px;vertical-align: top;float: left;margin-top: 0px;width: 160px!important;}
+.avatar-uploader-trigger {
+    display: table-cell;
+    vertical-align: middle;
+    font-size: 28px;
+    color: #999;
+}
+.avatar-uploader {
+    display: block;
+    padding: 1px;
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    img {
+        position: absolute;
+        top: -1px;
+        left: -1px;
+        height: 150px;
+    } //
+    float: left;
+    margin-right: 20px;
+}
+.patent-addNew {
+    float: right;
+    margin-left: 20px;
+    >* {
+        float: left;
+        margin-right: 20px;
+    }
+    .addButton {
+        background: #ea0862;
+        color: #fff;
+        border: none;
+        border-radius: 4px;
+        padding: 4px 10px;
+    }
+    .addButton:hover {
+        background: #ea0862;
+    }
+}
+.ant-modal-footer{text-align: left;}
+.ant-modal-footer button{width: 100px;margin-top: 15px;margin-bottom: 15px;}
+.ant-modal-footer button:first-child{margin-left: 80px;margin-right: 30px;}
+.ant-modal-title{font-size: 20px;}
+.saveBtn{margin-left: 190px;margin-right: 30px;margin-top: 20px;margin-bottom: 50px;}
+.ContactsList{float: right;margin-right: 100px;margin-bottom: 30px;margin-top: 10px;}
+.pictures .ant-row{display: inline-block;width: 550px;}
+#demand-form {
+    .half-item {
+        float: left;
+        width: 50%;
+        margin-bottom: 10px;
+    }
+    .item-title {
+        line-height: 30px;
+        font-size: 14px;
+        color: #666;
+    }
+    .form-title {
+        font-size: 16px;
+        color: #333;
+    }
+    .keyWord-tips {
+        >button {
+            vertical-align: middle;
+        }
+    }
+    .set-submit {
+        margin-right: 20px;
+    }
+    .demandDetailShow-upload {
+        .anticon-eye-o {
+            margin-left: -8px;
+        }
+        .anticon-delete {
+            display: none
+        }
+    }
+}
+
+.ant-modal-content {
+    .modal-submit {
+        margin-left: 20px;
+    }
+}
+
+.demand-order-content {
+    .ant-row {
+        margin-bottom: 20px;
+    }
+    .ant-input-number-handler-wrap {
+        display: none
+    }
+}
+.ant-table-thead {
+    .ant-table-selection-column {
+        .ant-checkbox-wrapper {
+            display: none;
+        }
+    }
+}
+
+

+ 246 - 0
js/component/manageCenter/customer/customerData/myClientDesc.jsx

@@ -0,0 +1,246 @@
+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 './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>
+        );
+    }
+});
+
+const AchievementDetailForm = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            loading: false,
+            data: {},
+            tags: [],
+            technicalPictureUrl:[],
+            technicalPictureUrls:[],
+        };
+    },
+
+    handleSubmit(e) {
+        e.preventDefault();
+        this.props.form.validateFields((err, values) => {                                 
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + '/api/admin/customer/addCustomer',
+                    data: {
+                        name: this.state.companyNamet, 
+                        contacts:this.state.content  ,
+                        contactMobile: this.state.telnum,
+                        type:'1'
+                    }
+                }).done(function (data) { 
+                    this.setState({
+                        loading: false
+                    });
+                    if (!data.error.length) {
+                        message.success('保存成功!');
+                        this.props.handleOk();
+                    } else {
+                        message.warning(data.error[0].message);
+                    }
+                }.bind(this));
+            }
+        });
+    },
+
+	//去完善
+    addContent(){
+    	let telnum=this.state.telnum;
+    	let companyName=this.state.companyNamet;
+    	let content=this.state.content;
+    	if(!telnum||!companyName||!content){
+    		message.warning('此3项都要填');
+    	}else{
+    		this.props.newmodal(true);
+    		this.props.closeDesc(false);
+    	}	
+    },
+    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);
+        };  
+    },
+    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 = [];
+        };
+    },
+    
+    render() {
+        const theData = this.state.data || {};
+        const { getFieldDecorator } = this.props.form;
+        const FormItem = Form.Item
+        const formItemLayout = {
+            labelCol: { span: 8 },
+            wrapperCol: { span: 14 },
+        };  
+
+        return (
+        <div>
+            <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
+                <Spin spinning={this.state.loading}>
+                    <div className="clearfix">
+                    	<FormItem className="half-item"
+	                            {...formItemLayout}
+	                            label="公司名称" >
+	                         <Input value={this.state.companyNamet}  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"/>  
+	                    </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"/>
+	                    </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>
+                        <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
+                    </FormItem> 
+                </Spin>
+            </Form >
+    	</div>
+        )
+    }
+}));
+
+const CustomerDetail = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            tabsKey: 1,
+            loading: false,           
+            dataSource: [],
+        };
+    },    
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+    },
+    handleOk(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false, true);
+    },
+    
+    componentWillReceiveProps(nextProps) {
+        if (!this.state.visible && nextProps.showDesc) {
+            this.state.tabsKey = "1";
+        };
+        this.state.visible = nextProps.showDesc; 
+    },
+    render() {
+        
+            return (
+                <div className="patent-desc">
+                    <Modal maskClosable={false} visible={this.state.visible}
+                        onOk={this.checkPatentProcess} onCancel={this.handleCancel}
+                        width='800px'
+                        title='新建客户'                       
+                        footer=''
+                        className="admin-desc-content">
+                        <Spin spinning={this.state.loading}>               
+                            <AchievementDetailForm
+                                data={this.props.data} 
+                                newmodal={this.props.newmodal}
+                                closeDesc={this.handleCancel}
+                                visible={this.state.visible}
+                                handleOk={this.handleOk} />
+                        </Spin>
+                    </Modal>
+                </div>
+            );        
+    },
+});
+
+
+export default CustomerDetail;

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

@@ -0,0 +1,20 @@
+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;

File diff suppressed because it is too large
+ 1441 - 0
js/component/manageCenter/customer/customerService/myBusiness.jsx


+ 182 - 0
js/component/manageCenter/customer/customerService/myClient.less

@@ -0,0 +1,182 @@
+.user-content {
+    background: #fff;
+    padding: 20px;
+    .content-title {
+        color: #333;
+        font-size: 16px;
+        overflow: hidden;
+    }
+    .user-search {
+        margin-bottom: 10px;
+        >input {
+            width: 140px;
+        }
+        >input,
+        >button,
+        .ant-select {
+            margin-right: 10px;
+            margin-top: 10px;
+        }
+        .ant-switch {
+            margin-left: 10px;
+        }
+        .search-more {
+            margin: 10px 0;
+            >span {
+                margin-right: 10px
+            }
+        }
+    }
+}
+.tabcolor .ant-table-thead > tr > th{background: none!important;}
+.avatar-uploader,
+.avatar-uploader-trigger,
+.avatar {
+    width: 150px;
+    height: 150px;
+}
+.modal-box-title{float: left;}
+.modal-box-detail{margin-left: 10px;vertical-align: top;float: left;margin-top: 0px;width: 160px!important;}
+.avatar-uploader-trigger {
+    display: table-cell;
+    vertical-align: middle;
+    font-size: 28px;
+    color: #999;
+}
+.avatar-uploader {
+    display: block;
+    padding: 1px;
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    img {
+        position: absolute;
+        top: -1px;
+        left: -1px;
+        height: 150px;
+    } //
+    float: left;
+    margin-right: 20px;
+}
+.patent-addNew {
+    float: right;
+    margin-left: 20px;
+    >* {
+        float: left;
+        margin-right: 20px;
+    }
+    .addButton {
+        background: #ea0862;
+        color: #fff;
+        border: none;
+        border-radius: 4px;
+        padding: 4px 10px;
+    }
+    .addButton:hover {
+        background: #ea0862;
+    }
+}
+.ant-modal-footer{text-align: left;}
+.ant-modal-footer button{width: 100px;margin-top: 15px;margin-bottom: 15px;}
+.ant-modal-footer button:first-child{margin-left: 80px;margin-right: 30px;}
+.ant-modal-title{font-size: 20px;}
+.saveBtn{margin-left: 190px;margin-right: 30px;margin-top: 20px;margin-bottom: 50px;}
+.ContactsList{float: right;margin-right: 100px;margin-bottom: 30px;margin-top: 10px;}
+.pictures .ant-row{display: inline-block;width: 550px;}
+#demand-form {
+    .half-item {
+        float: left;
+        width: 50%;
+        margin-bottom: 10px;
+    }
+    .item-title {
+        line-height: 30px;
+        font-size: 14px;
+        color: #666;
+    }
+    .form-title {
+        font-size: 16px;
+        color: #333;
+    }
+    .keyWord-tips {
+        >button {
+            vertical-align: middle;
+        }
+    }
+    .set-submit {
+        margin-right: 20px;
+    }
+    .demandDetailShow-upload {
+        .anticon-eye-o {
+            margin-left: -8px;
+        }
+        .anticon-delete {
+            display: none
+        }
+    }
+}
+
+.ant-modal-content {
+    .modal-submit {
+        margin-left: 20px;
+    }
+}
+
+.demand-order-content {
+    .ant-row {
+        margin-bottom: 20px;
+    }
+    .ant-input-number-handler-wrap {
+        display: none
+    }
+}
+.ant-table-thead {
+    .ant-table-selection-column {
+        .ant-checkbox-wrapper {
+            display: none;
+        }
+    }
+}
+.certain-category-search.ant-select-auto-complete .ant-input-affix-wrapper .ant-input-suffix {
+  right: 12px;
+}
+
+.certain-category-search-dropdown .ant-select-dropdown-menu-item-group-title {
+  color: #666;
+  font-weight: bold;
+}
+
+.certain-category-search-dropdown .ant-select-dropdown-menu-item-group {
+  border-bottom: 1px solid #F6F6F6;
+}
+
+.certain-category-search-dropdown .ant-select-dropdown-menu-item {
+  padding-left: 16px;
+}
+
+.certain-category-search-dropdown .ant-select-dropdown-menu-item.show-all {
+  text-align: center;
+  cursor: default;
+}
+
+.certain-category-search-dropdown .ant-select-dropdown-menu {
+  max-height: 300px;
+}
+
+.certain-search-item-count {
+ position: absolute;
+ color: #999;
+ right: 16px;
+}
+
+.certain-category-search.ant-select-focused .certain-category-icon {
+  color: #108ee9;
+}
+
+.certain-category-icon {
+  color: #6E6E6E;
+  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+  font-size: 16px;
+}
+

+ 12 - 0
js/component/manageCenter/customer/customerService/serviceQuery.jsx

@@ -0,0 +1,12 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+
+const ServiceQuery=React.createClass({
+	render(){
+		return(
+			<div className="user-content">456</div>
+		)
+	}
+})
+
+export default ServiceQuery;

File diff suppressed because it is too large
+ 2278 - 0
js/component/manageCenter/customer/individualCustomer/individualCustomer.jsx


+ 4 - 1
js/component/manageCenter/customer/myClient.less

@@ -77,7 +77,10 @@
         background: #ea0862;
     }
 }
-
+.ant-modal-footer{text-align: left;}
+.ant-modal-footer button{width: 100px;margin-top: 15px;margin-bottom: 15px;}
+.ant-modal-footer button:first-child{margin-left: 80px;margin-right: 30px;}
+.ant-modal-title{font-size: 20px;}
 #demand-form {
     .half-item {
         float: left;

+ 5 - 5
js/component/manageCenter/customer/myClientDesc.jsx

@@ -4,11 +4,11 @@ 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';
+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 AchievementDetailForm = Form.create()(React.createClass({

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

@@ -0,0 +1,20 @@
+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;

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

@@ -0,0 +1,20 @@
+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';
+const { Column, ColumnGroup } = Table;
+import { newFollow} from '../../../dataDic.js';
+import { getsex} from '../../../tools.js';
+
+//查询功能和初始列表
+
+const QueryCustomer = React.createClass({
+   render(){
+		return(
+			<div className="user-content">客户查询</div>
+		)
+	}
+});
+export default QueryCustomer;

+ 51 - 17
js/component/manageCenter/customer/leftTab.jsx

@@ -8,39 +8,73 @@ const MenuItemGroup = Menu.ItemGroup;
 const LeftTab = React.createClass({
     getInitialState() {
         return {
-            current: 'myClient'
+            current: 'myClient', 
+            subKey: 'sub1', 
+            keyList: [
+                { key: 'sub1', value: ['myClient', 'publicCustomer','companyCustomer'] },
+                { key: 'sub2', value: ['individualCustomer', 'publicCustomer','queryCustomer'] },
+                { key: 'sub3', value: ['myBusiness', 'serviceQuery'] },               
+            ]
         };
     },
-    handleClick(e) {
+     handleClick(e) {
         this.props.handlekey(e.key);
         this.setState({
             current: e.key,
         });
     },
     componentWillMount() {
+        const _me = this;
         if (window.location.hash) {
-            this.state.current = window.location.hash.substr(1);
+            let theKey = window.location.hash.substr(1);
+            this.state.keyList.map(function (item1) {
+                item1.value.map(function (item2) {
+                    if (theKey == item2) {
+                        _me.state.subKey = item1.key
+                    };
+                });
+            });
+            this.state.current = theKey;
         };
     },
     render() {
         return (
             <Menu onClick={this.handleClick}
                 selectedKeys={[this.state.current]}
+                defaultOpenKeys={[this.state.subKey]}
                 mode="vertical"
-                className="account-left" >
-                <Menu.Item key="myClient">
-                    我的客户
-                </Menu.Item>               
-                <Menu.Item key="publicCustomer">
-                    公共客户
-                </Menu.Item>
-                <Menu.Item key="teamCustomer">
-                    团队客户
-                </Menu.Item>
-                <Menu.Item key="companyCustomer">
-                    公司客户
-                </Menu.Item>
-                
+                className="account-left"
+                mode="inline" >
+	            <SubMenu key="sub1" title={<span>单位客户</span>}>	            	
+		                <Menu.Item key="myClient">
+		                    我的单位客户
+		                </Menu.Item>               
+		                <Menu.Item key="publicCustomer">
+		                    公共单位客户
+		                </Menu.Item>		               
+		                <Menu.Item key="companyCustomer">
+		                    单位客户查询
+		                </Menu.Item>		           
+		        </SubMenu> 
+		        <SubMenu key="sub2" title={<span>个人客户</span>}>	            	
+		                <Menu.Item key="individualCustomer">
+		                    我的个人客户
+		                </Menu.Item>               
+		                <Menu.Item key="publicindividualCustomer">
+		                    公共个人客户
+		                </Menu.Item>		               
+		                <Menu.Item key="queryCustomer">
+		                    个人客户查询
+		                </Menu.Item>		           
+		        </SubMenu>
+		        <SubMenu key="sub3" title={<span>客户业务</span>}>		            
+		                <Menu.Item key="myBusiness">
+		                    我的业务
+		                </Menu.Item>               
+		                <Menu.Item key="serviceQuery">
+		                    业务查询
+		                </Menu.Item>	               		           
+		        </SubMenu>   
             </Menu>
         );
     },

File diff suppressed because it is too large
+ 0 - 2505
js/component/manageCenter/customer/myClient.jsx


+ 0 - 370
js/component/manageCenter/customer/publicCustomer.jsx

@@ -1,370 +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({	
-    loadData(pageNo, detailApiUrl) {    	
-        this.state.data = [];
-        this.setState({
-            loading: true
-        });
-        $.ajax({
-            method: "post",
-            dataType: "json",
-            crossDomain: false,          
-            url:globalConfig.context +'/api/admin/customer/listPublicCustomer',
-            data: {
-                pageNo: pageNo || 1,
-                pageSize: this.state.pagination.pageSize,               
-                companyName: this.state.companyNamet, //名称1                
-				customerType: this.state.customerTypet, //客户类型1
-              	locationProvince:this.state.locationProvincet,//地区
-				customerStatus:this.state.customerStatust,//客户状态1
-				contactName:this.state.contactNamet,//联系人姓名1							
-				contactTel:this.state.contactTelt,//联系人手机
-				companyIntention:this.state.companyIntentiont,//意向服务
-                followSituation:this.state.followSituationt,//最新跟进进度
-				//releaseDateStartDate: this.state.releaseDate[0],
-                //releaseDateEndDate: this.state.releaseDate[1],			
-            },
-            success: function (data) {            	
-                let theArr = [];
-                if (!data.data || !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,                                                  
-                            companyName:thisdata.companyName,//公司名称
-                            customerType:thisdata.customerType,
-                            _customerType:thisdata._customerType,//客户类型
-                            locationProvince:thisdata.locationProvince,//地区                        
-                            contactName:thisdata.contactName, //联系人姓名
-                            telNum:thisdata.telNum,//手机号
-                            _customerStatus:thisdata._customerStatus,//客户状态
-                            _companyIntention:thisdata._companyIntention,//意向服务
-                            _followSituation:thisdata._followSituation,//最新跟进
-                            customerStatus:thisdata.customerStatus,//客户状态
-                            companyIntention:thisdata.companyIntention,//意向服务
-                            followSituation:thisdata.followSituation,//最新跟进
-                            adminName:thisdata.adminName,     //跟进人          
-                            followDate:thisdata.followDate,
-                            customerStatus:thisdata.customerStatus,//客户状态
-                            companyIntention:thisdata.companyIntention,//意向服务                                                      
-                        });
-                    };
-                    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));
-    }, 
-    //领取
-    handleSubmit (e) { 
-    	  let uids;   	  
-    	  let beforeCustomerStatus;
-    	  let beforeFollowSituation;
-    	  let beforeCustomerIntention;
-        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
-            let rowItem = this.state.selectedRows[idx];                          
-            if (rowItem.id) {
-                uids=rowItem.id;               
-                beforeCustomerStatus=rowItem.customerStatus;
-                beforeFollowSituation=rowItem.followSituation; 
-                beforeCustomerIntention=rowItem.companyIntention;
-            };            
-        }; 
-        this.setState({
-            selectedRowKeys:[],            
-        });
-        this.setState({
-            loading: true
-        });      
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + '/api/admin/customer/receivePublicCustomer',
-            data: {
-                id: uids,                
-                beforeCustomerIntention:beforeCustomerIntention,
-                beforeCustomerStatus:beforeCustomerStatus,
-                beforeFollowSituation:beforeFollowSituation,
-            }
-        }).done(function (data) {
-            this.setState({
-                loading: false
-            });
-            if (!data.error.length) {
-                message.success('领取成功!');
-                this.loadData()
-            } else {
-                message.warning(data.error[0].message);
-            };
-        }.bind(this));
-    },   
-    getInitialState() {
-        return {
-            searchMore: true,
-            searchType: 0,
-            validityPeriodDate: [],
-            releaseDate: [],
-            selectedRowKeys: [],
-            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 + '条数据';
-                }
-            },
-                contactInformation:[
-           			 {
-				  title: '姓名',
-				  dataIndex: 'contactName',
-				  key: 'contactName'
-						  
-					},{
-						  title: '性别',
-						  dataIndex: 'sex',
-						  key: 'sex',
-						  render: text => { return getsex(text); }
-					},
-					{
-						  title: '手机号码',
-						  dataIndex: 'telNum',
-						  key: 'telNum'	 
-					},{
-						  title: '座机号',
-						  dataIndex: 'mobile',
-						  key: 'mobile'	 
-					},{
-						  title: 'QQ号码',
-						  dataIndex: 'qq',
-						  key: 'qq'	 
-					},{
-						  title: '邮箱号',
-						  dataIndex: 'email',
-						  key: 'email'	 
-					},{
-						  title: '微信',
-						  dataIndex: 'wechat',
-						  key: 'wechat'	 
-					},{
-						  title: '部门',
-						  dataIndex: 'depatrment',
-						  key: 'depatrment'	 
-					},{
-						  title: '职位',
-						  dataIndex: 'customerPosition',
-						  key: 'customerPosition'	 
-					},
-                  ],
-            columns: [               
-                {
-                    title: '公司名称',
-                    dataIndex: 'companyName',
-                    key: 'companyName',
-                }, {
-                    title: '客户类型',
-                    dataIndex: '_customerType',
-                    key: '_customerType',
-                    //render: text => { return getcustomerTyp(text); }
-                }, {
-                    title: '地区',
-                    dataIndex: 'locationProvince',
-                    key: 'locationProvince',
-                    render: text => { return getcityArr(text); }
-                }, {
-                    title: '联系人姓名',
-                    dataIndex: 'contactName',
-                    key: 'contactName',                    
-                }, 
-                {
-                    title: '手机号',
-                    dataIndex: 'telNum',
-                    key:'telNum',                   
-                },
-                 {
-                    title: '客户状态',
-                    dataIndex: '_customerStatus',
-                    key: '_customerStatus',
-                  //render: text => { return getcustomerStatue(text) }
-                },
-                {
-                    title: '意向服务',
-                    dataIndex: '_companyIntention',
-                    key: '_companyIntention',
-                    //render: text => { return getCompanyIntention(text) }
-                },
-                 {
-                    title: '最新跟进',
-                    dataIndex: '_followSituation',
-                    key: '_followSituation',
-                    //render: text => { return getfllowSituation(text) }
-                },
-                 {
-                    title: '跟单人',
-                    dataIndex: 'adminName',
-                    key: 'adminName',
-                },
-                {
-                    title: '时间',
-                    dataIndex: 'followDate',
-                    key: 'followDate',
-                }
-            ],
-            dataSource: [],
-            searchTime: [],
-        };
-    },
-    componentWillMount() {
-        let theArr = [];
-        customerStatus.map(function (item) {
-            theArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });            
-               
-        let intentionalArr = [];
-        intentionalService.map(function (item) {
-            intentionalArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });   
-        let newArr = [];
-        newFollow.map(function (item) {
-            newArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });   
-				let auditArr = [];
-        cityArr.map(function (item) {
-            auditArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        }); 
-        this.state.customerStatuarr = theArr;               
-        this.state.intentionalOption = intentionalArr;
-        this.state.newOption = newArr;
-        this.state.auditStatusOption = auditArr;
-        
-        if (window.location.search) {
-            let theObj = getSearchUrl(window.location.search);
-            if (theObj.rid) {
-                theObj.id = theObj.rid;
-                if (theObj.rid != 'null') {
-                    this.tableRowClick(theObj);
-                };
-            };
-        };       
-        this.loadData();        
-    },
-    
-    closeDesc(e, s) {
-        this.state.showDesc = e;
-        if (s) {
-            this.loadData();
-        };
-    },
-    search() {
-        this.loadData();
-    },
-    reset() {
-    	this.state.companyNamet='';   
-        this.state.id = undefined;
-        this.state.customerTypet = undefined;
-        this.state.shareTypet = undefined;
-        this.state.companyIntentiont  = undefined;
-        this.state.followSituationt  = undefined;
-        this.state.locationProvincet  = undefined;
-        this.state.customerStatust  = undefined;
-        this.state.contactNamet  = undefined;
-        this.state.contactTelt = undefined;
-        this.state.contactNamet = undefined;  
-        this.state.releaseDatet = [];
-        this.loadData(); 
-    },
-    searchSwitch() {
-        this.setState({
-            searchMore: !this.state.searchMore
-        });
-    },
-    render() {
-    	  const theData = this.state.data || {}; 
-        const rowSelection = {
-            selectedRowKeys: this.state.selectedRowKeys,
-            onChange: (selectedRowKeys, selectedRows) => {
-                this.setState({
-                    selectedRows: selectedRows.slice(-1),
-                    selectedRowKeys: selectedRowKeys.slice(-1)
-                });
-            }
-        };
-        const hasSelected = this.state.selectedRowKeys.length > 0;
-        const { RangePicker } = DatePicker;
-        return (
-            <div className="user-content" >
-                <div className="content-title">                  
-                    <span>公共客户管理</span>                  
-                </div>
-                <div className="user-search">                    
-                    <Input placeholder="公司名称"
-                        value={this.state.companyNamet}
-                        onChange={(e) => { this.setState({ companyNamet: e.target.value }); }} /> 
-                    <Select placeholder="客户类型" style={{ width: 120 }}
-                            value={this.state.customerTypet }
-                            onChange={(e) => { this.setState({ customerTypet : e }) }}>
-                            <Select.Option value="0" >个人客户</Select.Option>
-                            <Select.Option value="1" >公司客户</Select.Option>
-                            <Select.Option value="2" >团体单位</Select.Option>
-                    </Select>                        
-                    <Select placeholder="地区"
-                            style={{ width: 160 }}
-                            value={this.state.locationProvincet}
-                            onChange={(e) => { this.setState({ locationProvincet: e }) }}>
-                            {this.state.auditStatusOption}
-                    </Select>                    
-                    <Button type="primary" onClick={this.search}>搜索</Button>
-                    <Button onClick={this.reset}>重置</Button> 
-                    <Button type="primary" onClick={this.handleSubmit} disabled={!hasSelected}>领取</Button>                                                                                             
-                </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}
-                            />
-                    </Spin>
-                </div>                
-            </div >
-        );
-    }
-});
-
-export default PublicCustomer;

+ 0 - 293
js/component/manageCenter/customer/teamCustomer.jsx

@@ -1,293 +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 Teamcustomer = React.createClass({
-     loadData(pageNo, detailApiUrl) {    	
-        this.state.data = [];
-        this.setState({
-            loading: true
-        });
-        $.ajax({
-            method: "post",
-            dataType: "json",
-            crossDomain: false,          
-            url:globalConfig.context +'/api/admin/customer/listTeamCustomer',
-            data: {
-                pageNo: pageNo || 1,
-                pageSize: this.state.pagination.pageSize,               
-                companyName: this.state.companyNamet, //名称1                
-				customerType: this.state.customerTypet, //客户类型1
-              	locationProvince:this.state.locationProvincet,//地区
-				customerStatus:this.state.customerStatust,//客户状态1
-				contactName:this.state.contactNamet,//联系人姓名1							
-				contactTel:this.state.contactTelt,//联系人手机
-				companyIntention:this.state.companyIntentiont,//意向服务
-                followSituation:this.state.followSituationt,//最新跟进进度
-				startDate: this.state.releaseDate[0],
-                endDate: this.state.releaseDate[1],	
-                adminName: this.state.adminNamet, //名称1  
-            },
-            success: function (data) {            	
-                let theArr = [];
-                if (!data.data || !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,                                                  
-                            companyName:thisdata.companyName,//公司名称
-                            customerType:thisdata.customerType,
-                            _customerType:thisdata._customerType,//客户类型
-                            locationProvince:thisdata.locationProvince,//地区                        
-                            contactName:thisdata.contactName, //联系人姓名
-                            telNum:thisdata.telNum,//手机号
-                            _customerStatus:thisdata._customerStatus,//客户状态
-                            _companyIntention:thisdata._companyIntention,//意向服务
-                            _followSituation:thisdata._followSituation,//最新跟进
-                            customerStatus:thisdata.customerStatus,//客户状态
-                            companyIntention:thisdata.companyIntention,//意向服务
-                            followSituation:thisdata.followSituation,//最新跟进
-                            adminName:thisdata.adminName,     //跟进人          
-                            followDate:thisdata.followDate,
-                            customerStatus:thisdata.customerStatus,//客户状态
-                            companyIntention:thisdata.companyIntention,//意向服务                             
-                        });
-                    };
-                   
-                    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 {
-            searchMore: true,
-            searchType: 0,
-            validityPeriodDate: [],
-            releaseDate: [],
-            selectedRowKeys: [],
-            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 + '条数据';
-                }
-            },              
-            columns: [               
-                {
-                    title: '公司名称',
-                    dataIndex: 'companyName',
-                    key: 'companyName',
-                }, {
-                    title: '客户类型',
-                    dataIndex: '_customerType',
-                    key: '_customerType',
-                    //render: text => { return getcustomerTyp(text); }
-                }, {
-                    title: '地区',
-                    dataIndex: 'locationProvince',
-                    key: 'locationProvince',
-                    render: text => { return getcityArr(text); }
-                }, {
-                    title: '联系人姓名',
-                    dataIndex: 'contactName',
-                    key: 'contactName',                    
-                }, 
-                {
-                    title: '手机号',
-                    dataIndex: 'telNum',
-                    key:'telNum',                   
-                },
-                 {
-                    title: '客户状态',
-                    dataIndex: '_customerStatus',
-                    key: '_customerStatus',
-                  //render: text => { return getcustomerStatue(text) }
-                },
-                {
-                    title: '意向服务',
-                    dataIndex: '_companyIntention',
-                    key: '_companyIntention',
-                    //render: text => { return getCompanyIntention(text) }
-                },
-                 {
-                    title: '最新跟进',
-                    dataIndex: '_followSituation',
-                    key: '_followSituation',
-                    //render: text => { return getfllowSituation(text) }
-                },
-                 {
-                    title: '跟单人',
-                    dataIndex: 'adminName',
-                    key: 'adminName',
-                },
-                {
-                    title: '时间',
-                    dataIndex: 'followDate',
-                    key: 'followDate',
-                }
-            ],
-            dataSource: [],
-            searchTime: [],
-        };
-    },
-    componentWillMount() {
-        let theArr = [];
-        customerStatus.map(function (item) {
-            theArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });            
-               
-        let intentionalArr = [];
-        intentionalService.map(function (item) {
-            intentionalArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });   
-        let newArr = [];
-        newFollow.map(function (item) {
-            newArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });   
-		let auditArr = [];
-        cityArr.map(function (item) {
-            auditArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        }); 
-        this.state.customerStatuarr = theArr;               
-        this.state.intentionalOption = intentionalArr;
-        this.state.newOption = newArr;
-        this.state.auditStatusOption = auditArr;    
-        
-        if (window.location.search) {
-            let theObj = getSearchUrl(window.location.search);
-            if (theObj.rid) {
-                theObj.id = theObj.rid;
-                if (theObj.rid != 'null') {
-                    this.tableRowClick(theObj);
-                };
-            };
-        };       
-        this.loadData();        
-    },    
-    closeDesc(e, s) {
-        this.state.showDesc = e;
-        if (s) {
-            this.loadData();
-        };
-    },
-    search() {
-        this.loadData();
-    },
-    reset() {
-      	this.state.customerTypet=undefined;
-      	this.state.companyNamet=''; 
-      	this.state.adminNamet='';
-        this.state.id = undefined;
-        this.state.shareTypet = undefined;
-        this.state.companyIntentiont  = undefined;
-        this.state.followSituationt  = undefined;
-        this.state.locationProvincet  = undefined;
-        this.state.customerStatust = undefined;
-        this.state.contactNamet   = undefined;
-        this.state.contactTelt = undefined;  
-        this.state.releaseDate = [];
-        this.loadData(); 
-    },
-    searchSwitch() {
-        this.setState({
-            searchMore: !this.state.searchMore
-        });
-    },
-    render() {
-    	  const theData = this.state.data || {}; 
-        const rowSelection = {
-            selectedRowKeys: this.state.selectedRowKeys,
-            onChange: (selectedRowKeys, selectedRows) => {
-                this.setState({
-                    selectedRows: selectedRows.slice(-1),
-                    selectedRowKeys: selectedRowKeys.slice(-1)
-                });
-            }
-        };
-        const hasSelected = this.state.selectedRowKeys.length > 0;
-        const { RangePicker } = DatePicker;
-        return (
-            <div className="user-content" >
-                <div className="content-title">                  
-                    <span>团队客户管理</span>                  
-                </div>
-                <div className="user-search">                    
-                    <Input placeholder="公司名称"
-                        value={this.state.companyNamet}
-                        onChange={(e) => { this.setState({ companyNamet: e.target.value }); }} /> 
-                    <Select placeholder="客户类型" style={{ width: 120 }}
-                            value={this.state.customerTypet }
-                            onChange={(e) => { this.setState({ customerTypet : e }) }}>
-                            <Select.Option value="0" >个人客户</Select.Option>
-                            <Select.Option value="1" >公司客户</Select.Option>
-                            <Select.Option value="2" >团体单位</Select.Option>
-                    </Select>                        
-                    <Select placeholder="地区"
-                            style={{ width: 160 }}
-                            value={this.state.locationProvincet}
-                            onChange={(e) => { this.setState({ locationProvincet: e }) }}>
-                            {this.state.auditStatusOption}
-                    </Select>  
-                    <Input placeholder="跟单人"
-                        value={this.state.adminNamet}
-                        onChange={(e) => { this.setState({ adminNamet: e.target.value }); }} /> 
-                    <span>发布时间 : </span>
-                    <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 }); }} />
-                    <Button type="primary" onClick={this.search} style={{marginLeft:'30px'}}>搜索</Button>
-                    <Button onClick={this.reset}>重置</Button>                     
-                </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}
-                           />
-                    </Spin>
-                </div>                           
-            </div >
-        );
-    }
-});
-export default Teamcustomer;

+ 121 - 11
js/component/manageCenter/servicesManage/contract/contract.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader, Switch, Modal } from 'antd';
+import { AutoComplete,Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader, Switch, Modal } from 'antd';
 import { contractStateList, contractTypeList } from '../../../dataDic.js';
 import { provinceSelect, getProvince } from '../../../NewDicProvinceList';
 import { companySearch, getContractState, getContractType, getSearchUrl } from '../../../tools.js';
@@ -7,7 +7,7 @@ import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import ContractAdd from './contractAdd.jsx';
 import ContractDetail from './contractDetail.jsx';
-
+const Option = AutoComplete.Option;
 import moment from 'moment';
 import './contract.less';
 
@@ -26,7 +26,7 @@ const Contract = React.createClass({
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
                 province: this.state.province ? this.state.province[0] : undefined,
-                uid: this.state.unitId,
+                uid: this.state.khId,
                 type: this.state.contractType,
                 status: this.state.contractState,
                 contractId: this.state.contractId,
@@ -367,6 +367,7 @@ const Contract = React.createClass({
         this.loadData();
     },
     reset() {
+    	this.state.names='';
         this.state.province = undefined;
         this.state.unitId = undefined;
         this.state.contractState = undefined;
@@ -376,6 +377,101 @@ const Contract = React.createClass({
         this.state.endDateFormattedDate = undefined;
         this.loadData();
     },
+    //客户名称初始加载
+	customerList(e){ 
+		$.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/customer/findCustomerByName",
+            data:{
+            	name:e
+            },
+            success: function (data) {                	  
+				       let thedata=data.data;
+				    if (!thedata) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };	
+                    thedata = {}; 
+               }; 
+               console.log(thedata)
+					this.setState({
+						customerArr:thedata,	
+                    });
+				}.bind(this),
+			}).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));  
+	},
+    //值改变时请求客户名称
+	httpChange(e){
+		this.setState({
+			names:e
+		})
+		if(e.length>=2){
+			this.customerList(e); 
+			return false;
+		}
+	},
+    //客户输入框失去焦点是判断客户是否存在
+	blurChange(e){
+		let theType='';
+		let contactLists=this.state.customerArr||[];
+			if (e) {
+            contactLists.map(function (item) {
+                if (item.name == e.toString()) {
+                    theType = item.id;
+                }
+           });     
+        }	
+		 if(!theType){
+		 	 theType='';
+			 return message.warning('当前客户名不存在') 
+		};
+		this.setState({
+			khId:theType
+		})
+	},
+	//获取联系人下拉框
+	getNewWoman(ids) { 
+		  console.log(ids);
+         $.ajax({
+                method: "get",
+                dataType: "json",
+                crossDomain: false,
+                url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
+                data:{
+                	uid:ids,
+                },
+                success: function (data) {                	  
+                		let theArr = [];
+								    let thedata=data.data;
+								    if (!thedata) {
+					                    if (data.error && data.error.length) {
+					                        message.warning(data.error[0].message);
+					                    };	
+					                    thedata = {}; 
+					               };   
+							      thedata.map(function (item,index) {	
+							          	theArr.push(<Select.Option value={index}>{item.name}</Select.Option>)						          
+				            });
+				           let telNum=thedata.telNum;
+				           
+						       this.setState({
+						       		 telNumArr:thedata,
+						       		 nub:thedata.telNum?thedata[0].telNum:'',
+		                   orderStatusOption: theArr, 
+	                 });
+					}.bind(this),
+				}).always(function () {
+	            this.setState({
+	                loading: false
+	            });
+	        }.bind(this));
+	},
     render() {
         const rowSelection = {
             selectedRowKeys: this.state.selectedRowKeys,
@@ -386,6 +482,10 @@ const Contract = React.createClass({
                 });
             }
         };
+        const dataSources=this.state.customerArr || [];
+        const options = dataSources.map((group) =>
+				      <Option key={group.id} value={group.name}>{group.name}</Option>
+				     );
         const hasSelected = this.state.selectedRowKeys.length > 0;
         return (
             <div className="foster-box">
@@ -409,14 +509,24 @@ const Contract = React.createClass({
                             showSearch
                             filterOption={companySearch}
                             onChange={(e) => { this.setState({ province: e }) }} />
-                        <Select placeholder="选择公司"
-                            style={{ width: 200 }}
-                            value={this.state.unitId}
-                            showSearch
-                            filterOption={companySearch}
-                            onChange={(e) => { this.setState({ unitId: e }) }}>
-                            {this.state.companyOption}
-                        </Select>
+                        <AutoComplete
+					        className="certain-category-search"
+					        dropdownClassName="certain-category-search-dropdown"
+					        dropdownMatchSelectWidth={false}
+					        dropdownStyle={{ width: '150px' }}
+					        size="large"
+					        style={{ width: '150px' }}
+					        dataSource={options}
+					        placeholder="输入名称"
+					        optionLabelProp="value" 
+					        onChange={this.httpChange}
+					        onSelect={this.autoChange}
+					        filterOption={true}
+					        onBlur={this.blurChange}
+					        value={this.state.names}
+						      >
+						    <Input />
+						</AutoComplete>
                         <Select placeholder="选择合同编号"
                             style={{ width: 120 }}
                             value={this.state.contractId}

+ 148 - 25
js/component/manageCenter/servicesManage/contract/contractAdd.jsx

@@ -1,10 +1,10 @@
 import React from 'react';
-import { Icon, Modal, Button, Form, message, Input, Spin, Select, Checkbox, InputNumber, DatePicker } from 'antd';
+import { Icon, Modal, Button, Form, message, AutoComplete,Input, Spin, Select, Checkbox, InputNumber, DatePicker } from 'antd';
 import './contract.less';
 import { companySearch } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
-
+const Option = AutoComplete.Option;
 const ContractAddFrom = Form.create()(React.createClass({
     getContactsList(theUid) {
         $.ajax({
@@ -116,7 +116,7 @@ const ContractAddFrom = Form.create()(React.createClass({
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
             if (!err) {
-                if (!(this.state.data.uid || values.uid) || !values.contacts) {
+                if (!(this.state.data.uid || this.state.khId) || !this.state.contacts) {
                     message.warning('请选择一个公司和联系人!');
                     return;
                 }
@@ -124,6 +124,14 @@ const ContractAddFrom = Form.create()(React.createClass({
                     message.warning('请至少选择一个申报项目!');
                     return;
                 };
+ 				let thed='';
+                let conts=this.state.contacts;
+                this.state.orderStatusOption.map(function(itam){
+                	if(itam.name==conts){
+                		thed=itam.ocbId
+                	}
+                	return thed;
+                })
                 this.props.spinState(true);
                 $.ajax({
                     method: "POST",
@@ -131,9 +139,9 @@ const ContractAddFrom = Form.create()(React.createClass({
                     crossDomain: false,
                     url: globalConfig.context + "/api/admin/contract/apply",
                     data: {
-                        "uid": this.state.data.uid || values.uid,
+                        "uid": this.state.data.uid || this.state.khId,
                         "id": this.state.data.id,
-                        "contacts": values.contacts, //联系人
+                        "contacts": thed, //联系人
                         "type": values.type, //合同类型
                         "depict": values.depict, // "合同描述",
                         "patentNum": this.state.patentCheck ? values.patentNum : 0,
@@ -165,6 +173,14 @@ const ContractAddFrom = Form.create()(React.createClass({
                     message.warning('请填写审核信息!');
                     return;
                 };
+                let thed='';
+                let conts=this.state.contacts;
+                this.state.orderStatusOption.map(function(itam){
+                	if(itam.name==conts){
+                		thed=itam.ocbId
+                	}
+                	return thed;
+                })
                 this.props.spinState(true);
                 $.ajax({
                     method: "POST",
@@ -172,9 +188,9 @@ const ContractAddFrom = Form.create()(React.createClass({
                     crossDomain: false,
                     url: globalConfig.context + "/api/admin/contract/submit",
                     data: {
-                        "uid": this.state.data.uid || values.uid,
+                        "uid": this.state.data.uid || this.state.khId,
                         "id": this.state.data.id,
-                        "contacts": values.contacts, //联系人
+                        "contacts": thed, //联系人
                         "type": values.type, //合同类型
                         "depict": values.depict, // "合同描述",
                         "patentNum": this.state.patentCheck ? values.patentNum : 0,
@@ -201,6 +217,107 @@ const ContractAddFrom = Form.create()(React.createClass({
             }
         });
     },
+    //客户名称初始加载
+	customerList(e){ 
+		$.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/customer/findCustomerByName",
+            data:{
+            	name: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 () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));  
+	},
+    //值改变时请求客户名称
+	httpChange(e){
+			if(e.length>=2){
+				this.customerList(e);
+				return;
+			}	 
+	},
+	
+    //客户输入框失去焦点是判断客户是否存在
+	blurChange(e){
+		let theType='';
+		let contactLists=this.state.customerArr||[];
+			if (e) {
+            contactLists.map(function (item) {
+                if (item.name == e.toString()) {
+                    theType = item.id;
+                }
+           });     
+    	}
+		if(!theType){
+		    return message.warning('当前客户名不存在')
+		};
+		this.setState({
+			khId:theType
+		})
+	},
+	//获取联系人下拉框
+	getNewWoman(ids) { 
+         $.ajax({
+                method: "get",
+                dataType: "json",
+                crossDomain: false,
+                url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
+                data:{
+                	uid:ids,
+                },
+                success: function (data) {                	  
+            		let theArr = [];
+							    let thedata=data.data;
+							    if (!thedata) {
+				                    if (data.error && data.error.length) {
+				                        message.warning(data.error[0].message);
+				                    };	
+				                    thedata = {}; 
+				               };   
+						      thedata.map(function (item) {	
+						          	theArr.push(<Select.Option value={item.id}>{item.name}</Select.Option>)
+						          	
+			           });
+				       this.setState({
+				       	  contacts:thedata[0].name,
+                          orderStatusOption: theArr, 
+	                 });
+					}.bind(this),
+				}).always(function () {
+	            this.setState({
+	                loading: false
+	            });
+	        }.bind(this));
+	},
+	//选择值时值匹配及联系人函数加载
+	autoChange(e){
+		let theType='';
+		let contactLists=this.state.customerArr||[];
+			if (e) {
+            contactLists.map(function (item) {
+                if (item.name == e.toString()) {
+                    theType = item.id;
+                }
+           });     
+       }			
+	   this.getNewWoman(theType) 	 
+	},
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -209,6 +326,10 @@ const ContractAddFrom = Form.create()(React.createClass({
             labelCol: { span: 6 },
             wrapperCol: { span: 14 },
         };
+        const dataSources=this.state.customerArr || [];
+        const options = dataSources.map((group) =>
+				      <Option key={group.id} value={group.name}>{group.name}</Option>
+				     );
         const _me = this;
         return (
             <Form horizontal onSubmit={this.handleSave} id="CopyrightDesc-form">
@@ -220,31 +341,33 @@ const ContractAddFrom = Form.create()(React.createClass({
                     </FormItem> : <FormItem className="half-item"
                         {...formItemLayout}
                         label="公司名称" >
-                            {getFieldDecorator('uid')(
-                                theData.uid ? <span>{theData.unitName}</span> : <Select
-                                    placeholder="请选择公司"
-                                    notFoundContent="未找到公司"
-                                    style={{ width: 260 }}
-                                    showSearch
-                                    filterOption={companySearch}
-                                    onSelect={(e, n) => { this.getContactsList(e); }}>
-                                    {this.props.companyOption}
-                                </Select>
-                            )}
+                            <AutoComplete
+						        className="certain-category-search"
+						        dropdownClassName="certain-category-search-dropdown"
+						        dropdownMatchSelectWidth={false}
+						        dropdownStyle={{ width: 300 }}
+						        size="large"
+						        style={{ width: '100%' }}
+						        dataSource={options}
+						        placeholder="输入名称"
+						        optionLabelProp="value"
+						        onChange={this.httpChange}
+						        onSelect={this.autoChange}
+						        filterOption={true}
+						        onBlur={this.blurChange}
+						      >
+						        <Input />
+						      </AutoComplete>
                         </FormItem>
                     }
                     <FormItem className="half-item"
                         {...formItemLayout}
                         label="联系人" >
-                        {getFieldDecorator('contacts', {
-                            initialValue: theData.contacts
-                        })(
-                            <Select placeholder="请选择联系人"
+                            <Select placeholder="请选择联系人" value={this.state.contacts} onChange={(e)=>{this.setState({contacts:e})}}
                                 style={{ width: 260 }}
                                 notFoundContent="未获取到联系人列表">
-                                {this.state.contactsOption}
-                            </Select>
-                            )}
+                                {this.state.orderStatusOption}
+                            </Select>           
                     </FormItem>
                     <FormItem className="half-item"
                         {...formItemLayout}

+ 101 - 1
js/component/tools.js

@@ -41,8 +41,15 @@ import {
     contact,
     intentionalServiceOn,
     newFollowOn,
-    customerStatusOn
+    customerStatusOn,
+    Whether,
+    Certification,
+    currentMember,
+    lvl,
 } from './dataDic.js';
+
+import { provinceList} from './NewDicProvinceList.js';
+
 module.exports = {
     splitUrl: function (string, i, url) {
         let theList = [];
@@ -794,4 +801,97 @@ module.exports = {
             return theType;
         }
     },
+    
+    //是否文字与数字转换
+     getWhether: function (e) {
+         if (e) {
+            let theType = '';
+            Whether.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+    //是否实名认证currentMember
+     getCertification: function (e) {
+         if (e) {
+            let theType = '';
+            Certification.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+    //会员状态
+    getCurrentMember: function (e) {
+         if (e) {
+            let theType = '';
+            currentMember.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+     //会员等级
+    getLvl: function (e) {
+         if (e) {
+            let theType = '';
+            lvl.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+    //省份转换
+    getprovince:function(e){
+    	let nub=parseInt(e);
+    	let theType = '';
+    	if (nub<=34) {
+            provinceList.map(function (item) {
+                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.id == nub) {
+	                    theType = city.name;
+	                 };
+	             });
+           });
+            return theType;
+        } else if(nub>380){
+        	provinceList.map(function (item) {
+        		item.cityList.map(function (city) {
+        			city.areaList.map(function (areas) {
+		                if (areas.id == nub) {
+		                    theType = areas.name;
+		                  };
+		                }); 
+		            });
+           });
+        return theType;
+        }
+    },
+   //我的业务跟进状态
+   getStatusFollow:function(e){
+   		let theType = '';
+   		if(e){
+   			theType ='跟进中'	;
+   		}else{
+   			theType ='停止跟进';
+   		}
+   		return theType;
+   }
+    
 }

+ 17 - 17
template/template.html

@@ -7,23 +7,23 @@
         <%= htmlWebpackPlugin.options.title %>
     </title>
     <script>
-//         window.userData = {
-//             mobile: "13600000000",
-//             nickname: "Lina",
-//             number: "80000",
-//             type: "0",
-//             email: "test@aft.com",
-//             createTime: "123456789000",
-//             lvl: "0"
-//         };
-//         window.adminData = {};
-//         window.globalConfig = {
-//             //context: "//aft.hnzhiming.com:8080/aft",
-//             context: "//127.0.0.1:8080/aft",
-//             staticHost: "//aft.hnzhiming.com",
-//             uploadPath: "/data/wwwroot/aft/upload",
-//             uploadPrivatePath: "/data/upload"
-//         };
+           window.userData = {
+               mobile: "13600000000",
+               nickname: "Lina",
+               number: "80000",
+               type: "0",
+               email: "test@aft.com",
+               createTime: "123456789000",
+               lvl: "0"
+           };
+           window.adminData = {};
+           window.globalConfig = {
+               //context: "//aft.hnzhiming.com:8080/aft",
+               context: "//127.0.0.1:8080/aft",
+               staticHost: "//aft.hnzhiming.com",
+               uploadPath: "/data/wwwroot/aft/upload",
+               uploadPrivatePath: "/data/upload"
+           };
     </script>
 </head>