liting2017 před 7 roky
rodič
revize
7283994f9d

+ 4 - 0
js/component/dataDic.js

@@ -1042,6 +1042,10 @@ module.exports = {
             value: "5",
             key: "被拒绝客户"
         }
+        ,{
+            value: "6",
+            key: "停止跟进"
+        },
     ],     
     //意向服务
     intentionalService:[

+ 249 - 100
js/component/manageCenter/customer/customerData/myClient.jsx

@@ -117,8 +117,8 @@ const MyClient = Form.create()(React.createClass({
                 pageSize: this.state.pagination.pageSize,               
                 type: this.state.typeSearch, //名称1   
                 name:this.state.nameSearch,
-                province:this.state.addressSearch?this.state.addressSearch[0].value:this.state.provinceSearch,  
-                city: this.state.addressSearch?this.state.addressSearch[1].value:'',
+                province:this.state.addressSearch?this.state.addressSearch[0]:this.state.provinceSearch,  
+                city: this.state.addressSearch?this.state.addressSearch[1]:'',
                 //area: this.state.addressSearch?this.state.addressSearch[2].value:'',
                 status:this.state.statusSearch,
                 industry:this.state.industrySearch,
@@ -157,7 +157,7 @@ const MyClient = Form.create()(React.createClass({
                             international:thisdata.international,
                             listed:thisdata.listed,
                             highTechZone:thisdata.highTechZone,
-                            locationProvince:thisdata.province+'-'+thisdata.city+'-'+thisdata.area                        						                
+                            locationProvince:thisdata.province?thisdata.province+'-'+thisdata.city||''+'-'+thisdata.area :'--'                       						                
                         });
                     };
                     this.state.pagination.current = data.data.pageNo;
@@ -229,19 +229,20 @@ const MyClient = Form.create()(React.createClass({
             //业务意向列表
             intentionList:[{
 					  title: '高新',
-					  dataIndex: 'name',
+					  dataIndex: 'id',
+					  key:'id',
 					  render: (text, record, index) => {
-	                  return  <Select value={record.name}  onChange={(e) => { record.name=e; this.setState({ data: this.state.data }); }}>
+	                  return  <Select value={record.id}  onChange={(e) => { record.id=e; this.setState({ data: this.state.data }); }}>
                                     <Select.Option value="0" >否</Select.Option>
 		                            <Select.Option value="1" >是</Select.Option>	    
                               </Select>
                          }      
 				},{
 					  title: '最新进度',
-					  dataIndex: 'mobile2',
-					  key: 'mobile2',
+					  dataIndex: 'businessGlossoryId',
+					  key: 'businessGlossoryId',
 					  render: (text, record, index) => {
-	                  return  <Select  value={record.mobile2}  onChange={(e) => { record.mobile2 = e; this.setState({ data: this.state.data }); }}>
+	                  return  <Select  value={record.businessGlossoryId}  onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
                                     {
                                         newFollow.map(function (item) {
                                             return <Select.Option key={item.value} >{item.key}</Select.Option>
@@ -251,10 +252,10 @@ const MyClient = Form.create()(React.createClass({
                     }
 				},{
 					  title: '最新状态',
-					  dataIndex: 'mobile3',
-					  key: 'mobile3',
+					  dataIndex: 'followSituation',
+					  key: 'followSituation',
 					  render: (text, record, index) => {
-	                  return  <Select value={record.mobile3}  onChange={(e) => { record.mobile3 = e; this.setState({ data: this.state.data }); }}>
+	                  return  <Select value={record.followSituation}  onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
                                     {
                                         customerStatus.map(function (item) {
                                             return <Select.Option key={item.value} >{item.key}</Select.Option>
@@ -264,11 +265,11 @@ const MyClient = Form.create()(React.createClass({
                       }
 				},{
 					  title: '跟进说明',
-					  dataIndex: 'mobile4',
-					  key: 'mobile4',
+					  dataIndex: 'remarks',
+					  key: 'remarks',
 					  render: (text, record, index) => {
-					  return <Input value={record.mobile4} 
-	                             onChange={(e) => { record.mobile4 = e.target.value; this.setState({ data: this.state.data }); }}
+					  return <Input value={record.customerStatus} 
+	                             onChange={(e) => { record.customerStatus = e.target.value; this.setState({ data: this.state.data }); }}
 	                             style={{width:'120px'}}/>
 	                    }
 				},{
@@ -277,7 +278,6 @@ const MyClient = Form.create()(React.createClass({
 					  key: 'rrr',
 					   render: (text, record, index) => {                    	
                         return <div>
-                            <Button type="primary" onClick={(e)=>{this.intentionModify(record)}} style={{marginRight:'10px'}}>保存</Button>
                             <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record)}} okText="删除" cancelText="不删除">
 							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
 							</Popconfirm>
@@ -388,9 +388,8 @@ const MyClient = Form.create()(React.createClass({
 					  key: 'ttt',
 					  render: (text, record, index) => {                    	
                         return <div>
-                            <Button type="primary" onClick={(e)=>{this.visitModify(record)}} style={{marginRight:'10px'}}>修改</Button>
                             <Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
-							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
+							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
 							</Popconfirm>
                         </div>
                     }
@@ -574,6 +573,7 @@ const MyClient = Form.create()(React.createClass({
                     }
                 } 
             ],
+            data:[],
             dataman:[],
             dataSource: [],
             visitArrList:[],
@@ -587,12 +587,113 @@ const MyClient = Form.create()(React.createClass({
         visible: true,
       });
     },      
-    //拜访
-    visit(e){  
+    //进入新增拜访记录
+    visit(e){ 
+    	this.getNewWoman(e.uid);
     	this.setState({
-    		visitModul:true
-    	})
-    	console.log(e)           	
+    		visitModul:true,
+            loading: true
+        }); 	
+	    $.ajax({
+            method: "get",
+            dataType: "json",
+            url:globalConfig.context + '/api/admin/customer/toAddFollow',
+            data: {         	
+                uid: e.uid,
+            },
+            success: function (data) {                	  
+        		    let theArr = [];
+				    let thedata=data.data;
+				    if (!thedata) {
+	                    if (data.error && data.error.length) {
+	                        message.warning(data.error[0].message);
+	                    };	
+	                    thedata = {}; 
+	                };   
+			        this.setState({
+			        	 uid:thedata.uid,
+			        	 data:thedata.list || [],
+			        	 identityName:thedata.identityName,
+			        	 followTime:thedata.followTime,
+			        	 businessGlossoryId:thedata.businessGlossoryId,
+			        	 followSituation:thedata.followSituation,
+			        	 customerStatus:thedata.customerStatus,
+			        	 remarks:thedata.remarks,
+         		    });
+				  }.bind(this),
+				}).always(function () {
+	            this.setState({
+	                loading: false
+	            });
+	       }.bind(this));               	  	
+    },
+    	
+	//拜访记录删除
+	visitDelet(e){
+		if(e){	
+			$.ajax({
+	            method: "get",
+	            dataType: "json",
+	            crossDomain: false,           
+	            url: globalConfig.context + "/api/admin/customer/deleteCustomer",
+	            data: {
+	                id: e.followId,//删除的ID    
+	            }
+	        }).done(function (data) {
+	            if (!data.error.length) {
+	                message.success('删除成功!');
+	                this.setState({
+	                    loading: false,
+	                });
+	            } else {
+	                message.warning(data.error[0].message);
+	            };
+	            this.visitModify(e.followId);
+	        }.bind(this));
+	    }else{
+	    	this.visitModify(this.state.delectId);
+	    }
+	},
+	//进入修改拜访记录  
+    visitModify(e){ 
+    	this.getNewWoman(e);
+    	this.setState({
+    		visitModul:true,
+            loading: true
+        }); 	
+	    $.ajax({
+            method: "get",
+            dataType: "json",
+            url:globalConfig.context + '/api/admin/customer/toUpdateFollow',
+            data: {         	
+                followId: e,
+            },
+            success: function (data) {                	  
+        		    let theArr = [];
+				    let thedata=data.data;
+				    if (!thedata) {
+	                    if (data.error && data.error.length) {
+	                        message.warning(data.error[0].message);
+	                    };	
+	                    thedata = {}; 
+	                };   
+			        this.setState({
+			        	 data:thedata.userBusinessList || [],
+			        	 followId:thedata.followId,
+			        	 identityName:thedata.identityName,
+			        	 uid:thedata.uid,
+			        	 contacts:thedata.contacts,//当前联系人
+			        	 contactType:thedata.contactType,
+			        	 result:thedata.result,
+			        	 followTime:thedata.followTime,
+			        	 adminName:thedata.adminName,	
+         		    });
+				  }.bind(this),
+				}).always(function () {
+	            this.setState({
+	                loading: false
+	            });
+	       }.bind(this));               	  	
     },
    	
     //列表删除功能
@@ -843,7 +944,8 @@ const MyClient = Form.create()(React.createClass({
     },
     reset() {
     	this.state.typeSearch=undefined; //名称1   
-        this.state.nameSearch='';        
+        this.state.nameSearch=''; 
+        this.state.addressSearch=[];
         this.state.provinceSearch=undefined;
         this.state.citySearch=undefined;
         this.state.statusSearch=undefined;
@@ -881,6 +983,14 @@ const MyClient = Form.create()(React.createClass({
         	rowId:record.id,
         })    
     },
+    VisitRowClick(record, index) { 
+        this.state.RowData = record; 
+        this.visitModify(record.id);
+        this.setState({
+        	selectedRowKeys:[],
+        	delectId:record.id,
+        })    
+    },
     //基本信息提交
     newSubmit(e){
     	e.preventDefault(); 
@@ -908,7 +1018,8 @@ const MyClient = Form.create()(React.createClass({
     		if (!err) {
             	this.setState({
                   loading: true
-            	}); 	
+            	}); 
+            	console.log(this.state.ProvinceCity)
                 $.ajax({
                     method: "post",
                     dataType: "json",
@@ -920,9 +1031,9 @@ const MyClient = Form.create()(React.createClass({
                         introduction:values.introduction,
                         unitName:this.state.unitName,
                         industry:this.state.industry,
-                        locationProvince:values.ProvinceCity?values.ProvinceCity[0]:'',//省-
-                        locationCity:values.ProvinceCity?values.ProvinceCity[1]:'',//市
-                        locationArea:values.ProvinceCity?values.ProvinceCity[2]:'',//区
+                        locationProvince:(this.state.ProvinceCity)[0],//省-
+                        locationCity:(this.state.ProvinceCity)[1],//市
+                        locationArea:(this.state.ProvinceCity)[2],//区
                         postalAddress:values.postalAddress,
                         contactsFixedTel:values.contactsFixedTel,
                         contactsFax:values.contactsFax,
@@ -979,8 +1090,7 @@ const MyClient = Form.create()(React.createClass({
                 let ProvinceS=getprovince(thisData.locationProvince);
                 let citys=getprovince(thisData.locationCity);
                 let Areas=getprovince(thisData.locationArea);
-                ProvinceCityArr.push(ProvinceS,citys,Areas)
-                console.log(ProvinceCityArr)
+                 ProvinceCityArr.push(ProvinceS,citys,Areas);
                 this.setState({
                 	InformationId:thisData.id,
                 	InformationUid:thisData.uid,
@@ -991,8 +1101,9 @@ const MyClient = Form.create()(React.createClass({
                 	companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
                 	dataInformation:thisData,
                 	ProvinceCity:ProvinceCityArr,
-                	industry:(thisData.industry).toString(),
-                });                  
+                	industry:thisData.industry,
+                });  
+                
             }.bind(this),
         }).always(function () {
             this.setState({            	
@@ -1062,7 +1173,7 @@ const MyClient = Form.create()(React.createClass({
 	    });	 	   
 	},
 	//拜访modul函数
-	visitOk(e) {		
+	visitOk(e) {
 	    this.setState({ 
 	    	visitModul:false
 	    });	 	   
@@ -1073,10 +1184,56 @@ const MyClient = Form.create()(React.createClass({
 	    });	 	   
 	},
 	//拜访保存函数
-    visitSubmit(){
-    	this.setState({
-    		visitModul:false,
+    visitSubmit(e){
+    	e.preventDefault(); 
+    	this.state.data=[];
+        this.setState({        	
+            selectedRowKeys: [],           
+        });
+        this.setState({
+          loading: true
+    	}); 
+    	let conName=this.state.lastname;
+    	let ocbIds='';
+    	this.state.orderStatusOption.map(function(item){
+    		if(item.name==conName){
+    			ocbIds=item.ocbId
+    		}
+    		return ocbIds;
     	})
+    	//新增
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            url:this.state.contacts?globalConfig.context + '/api/admin/customer/addFollow':globalConfig.context + '/api/admin/customer/updateFollow',
+            data: this.state.contacts?{
+            	userBusinessList:JSON.stringify(this.state.data),
+                uid: this.state.Accountuid,
+                ocbId: ocbIds,
+                result: this.state.result,
+                followTime: this.state.followTime,
+            }:{
+            	userBusinessList:JSON.stringify(this.state.data),
+                uid: this.state.Accountuid,
+                ocbId: ocbIds,
+                result: this.state.result,
+                followTime: this.state.followTime,
+                userBusinessList: this.state.userBusinessList,
+                contactType:this.state.contactType
+            }
+        }).done(function (data) {                	
+            this.setState({
+                loading: false
+            });
+            if (!data.error.length) {
+                message.success('保存成功!');
+                this.loadVisit(); //
+                this.loadData();
+                this.visitCancel()
+            } else {
+                message.warning(data.error[0].message);
+            }            
+        }.bind(this)); 
     },
     //根据获取的联系人获取到电话号码函数
 	hundleName(e){
@@ -1086,6 +1243,17 @@ const MyClient = Form.create()(React.createClass({
 			nub:changNub.mobile
 		})
 	},
+	//添加新业务及单位客户详情新增
+	addNew() {
+        this.state.data.push({
+            id: null,
+            name: '',
+            url: ''
+        });
+        this.setState({
+            data: this.state.data
+        })
+    },
 	//tab中列表点击修改拜访详情
 	//获取拜访详情ajax
 	loadVisit(pageNo) {
@@ -1094,7 +1262,7 @@ const MyClient = Form.create()(React.createClass({
             loading: true
         });      
         $.ajax({
-            method: "post",
+            method: "get",
             dataType: "json",
             crossDomain: false,          
             url:globalConfig.context + '/api/admin/customer/listFollowHistory',
@@ -1137,23 +1305,7 @@ const MyClient = Form.create()(React.createClass({
             });
         }.bind(this));
     },    
-	visitModify(e){
-		this.setState({
-    		visitModul:true,
-    })
-		this.getNewWoman(e);
-	},
-	//拜访记录删除
-	visitDelet(e){
-		console.log(e)
-	},
-	
-	//顶部搜索省份函数
-	onChange(value, selectedOptions) {
-	    this.setState({
-	      addressSearch:selectedOptions
-	    });
-    },
+
     //修改密码Modul
     modifyPassworld(){
     	 this.setState({ 
@@ -1204,27 +1356,28 @@ const MyClient = Form.create()(React.createClass({
                 method: "get",
                 dataType: "json",
                 crossDomain: false,
-                url: globalConfig.context + "/api/admin/customer/findCustomerUserList",
+                url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
                 data:{
-                   uid:ids.id,
+                   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,
-                         orderStatusOption: theArr, 
-	                 });
+                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,
+	                             orderStatusOption: theArr, 
+                 		});
 					}.bind(this),
 				}).always(function () {
 	            this.setState({
@@ -1420,7 +1573,8 @@ const MyClient = Form.create()(React.createClass({
         const formItemLayput = {
             labelCol: { span: 10 },
             wrapperCol: { span: 14 },
-        };     
+        };  
+        const contacts=this.state.contacts || '';
         return (
             <div className="user-content" >
                 <div className="content-title">                  
@@ -1437,11 +1591,8 @@ const MyClient = Form.create()(React.createClass({
                             {this.state.Provinces}
                     </Select> 
                     <span style={{marginRight:'10px'}}>                   
-	                    {getFieldDecorator('addressSearch', {
-	                        initialValue: this.state.addressSearch
-	                    })(
-	                        <Cascader options={citySelect()} placeholder="详细地址"  onChange={this.onChange}/>
-	                        )}
+	                     <Cascader options={citySelect()}  value={this.state.addressSearch} placeholder="选择城市"
+    						onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />	                 
                     </span>
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>                      
@@ -1631,7 +1782,7 @@ const MyClient = Form.create()(React.createClass({
 					                    <div className="clearfix" style={{paddingLeft:'60px'}}>
 					                    	<FormItem className="half-item" 
 					                         labelCol={{ span: 4 }}
-					                        wrapperCol={{ span: 18 }}
+					                         wrapperCol={{ span: 18 }}
 					                        label="行业"
 					                         > 
 												    <Select placeholder="选择行业" value={this.state.industry} onChange={(e) => {
@@ -1664,12 +1815,9 @@ const MyClient = Form.create()(React.createClass({
 					                           labelCol={{ span: 4 }}
 					                           wrapperCol={{ span: 18 }}
 					                           label="省-市-区"
-					                          > 	             
-							                    {getFieldDecorator('ProvinceCity', {
-							                        initialValue: this.state.ProvinceCity
-							                    })(
-							                        <Cascader options={areaSelect()} placeholder="省-市-区" />
-							                        )}
+					                          > 
+					                            <Cascader options={areaSelect()}  value={this.state.ProvinceCity} placeholder="选择城市"
+    												onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />                
 						                   </FormItem>
 						                   <FormItem className="half-item"
 							                    	labelCol={{ span: 4 }}
@@ -1857,7 +2005,7 @@ const MyClient = Form.create()(React.createClass({
 							</TabPane>
 						    <TabPane tab="联系人信息" key="2">
 						        <div className="clearfix" >
-						            <Button className="ContactsList" type="primary" onClick={this.addContact}>新增</Button> 
+						            <Button className="ContactsList" type="primary" onClick={this.addNew}>新增</Button> 
 						        </div>
 						       <div className="clearfix">
                     			  <Spin spinning={this.state.loading}>
@@ -1989,7 +2137,8 @@ const MyClient = Form.create()(React.createClass({
 								      <Table 
 						            	 pagination={this.state.paginations}
 						            	 columns={this.state.visitsList} 
-						            	 dataSource={data} 
+						            	 dataSource={this.state.data}
+						            	 onRowClick={this.VisitRowClick}
 						            	 />
 								    </Spin> 
 								</div>								
@@ -2029,14 +2178,14 @@ const MyClient = Form.create()(React.createClass({
 			          onOk={this.visitOk}
 					  onCancel={this.visitCancel}							          							          
 			        >				    
-					    <Form horizontal id="demand-form" onSubmit={this.passworldSubmit}>
+					    <Form horizontal id="demand-form" onSubmit={this.visitSubmit}>
 			    			<Spin spinning={this.state.loading}>
 			    			   	<div className="clearfix">
 			    			   		<FormItem className="half-item"
 			                            {...formItemLayout}
 			                            label="拜访方式" >
-			    			   			<Radio.Group value={this.state.styles} onChange={(e) => {
-										        this.setState({ styles: e.target.value }) 
+			    			   			<Radio.Group value={this.state.contactType} onChange={(e) => {
+										        this.setState({ contactType: e.target.value }) 
 						                    }}>
 						                        <Radio value={0}>外出</Radio>
 						                        <Radio value={1}>电话</Radio>
@@ -2055,19 +2204,19 @@ const MyClient = Form.create()(React.createClass({
 				                            {...formItemLayout}
 				                             label="客户名称"
 				                             >
-						                   <span>{this.state.name}</span>
+						                   <span>{this.state.identityName}</span>
 						                </FormItem>
 						                <FormItem className="half-item"
 				                            {...formItemLayout}
 				                             label="拜访人"
 				                             >
-						                    <span>{this.state.baifangren}</span>
+						                    <span>{this.state.adminName}</span>
 						                </FormItem>
 						                 <FormItem className="half-item"
 				                            {...formItemLayout}
 				                             label="当前联系人"
 				                             >
-						                    <span>{this.state.lianxiren}</span>
+						                    <span>{contacts}</span>
 						                </FormItem>
 						                <FormItem className="half-item"
 				                            {...formItemLayout}
@@ -2084,7 +2233,7 @@ const MyClient = Form.create()(React.createClass({
 				                            {...formItemLayout}
 				                             label="拜访时间"
 				                             >
-						                	<span>{this.state.baifangren}</span>
+						                	<span>{this.state.followTime}</span>
 						                </FormItem>
 						                <FormItem className="half-item"
 				                            {...formItemLayout}
@@ -2098,21 +2247,21 @@ const MyClient = Form.create()(React.createClass({
 					                        labelCol={{ span: 4 }}
 							                wrapperCol={{ span: 16 }}
 					                        label="拜访备注" >
-					                        {getFieldDecorator('introduction', {
-					                            initialValue: theInformation.introduction
+					                        {getFieldDecorator('result', {
+					                            initialValue: this.state.result
 					                        })(
 					                            <Input type="textarea" rows={4} />
 					                            )}
 					                    </FormItem>
 					                </div>
 					                <div className="clearfix">
-					                 	<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向<Button onClick={this.addBusiness} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button></div>
+					                 	<div style={{fontSize:'18px',marginLeft:'100px',marginTop:'15px',marginBottom:'10px'}}>业务意向<Button onClick={this.addNew} style={{marginLeft:'420px',background:'green',color:'#ffffff'}}>添加新业务</Button></div>
 					                 	<div className="clearfix" style={{paddingLeft:'50px',paddingRight:'50px'}}>
 		                    			    <Spin spinning={this.state.loading}>
 										      <Table 
-								            	 pagination={this.state.paginations}
+								            	 pagination={false}
 								            	 columns={this.state.intentionList} 
-								            	 dataSource={data}
+								            	 dataSource={this.state.data}
 								            	 />
 										    </Spin> 
 										</div>	 

+ 230 - 194
js/component/manageCenter/customer/customerService/myBusiness.jsx

@@ -137,7 +137,7 @@ const MyBusiness = Form.create()(React.createClass({
             data: { 				
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,               
-                businessId: this.state.businessIdS, //业务意向  
+                businessGlossoryId: this.state.businessIdS, //业务意向  
                 identifyName:this.state.identifyNameS,
                 followSituation:this.state.followSituationS,
                 customerStatus:this.state.customerStatusS,
@@ -307,7 +307,7 @@ const MyBusiness = Form.create()(React.createClass({
                     title: '客户状态',
                     dataIndex: 'customerStatus',
                     key: 'customerStatus',
-                     render: text => { return getcustomerStatue(text) }
+                    render: text => { return getcustomerStatue(text) }
                 },
                 {
                     title: '操作',
@@ -315,7 +315,7 @@ const MyBusiness = Form.create()(React.createClass({
                     key: 'abc',
                     render: (text, record, index) => {                    	
                         return <div>
-                        	<Button onClick={(e) =>{ e.stopPropagation(), this.addClick(record); }} type="primary" style={{marginRight:'10px'}}>跟进</Button> 
+                        	<Button onClick={(e) =>{ e.stopPropagation(), this.addModify(record); }} type="primary" style={{marginRight:'10px'}}>跟进</Button> 
                             <Button onClick={(e) =>{ e.stopPropagation(), this.followStop(record) }} type="primary">停止</Button>
                         </div>
                     }
@@ -401,10 +401,11 @@ const MyBusiness = Form.create()(React.createClass({
         this.state.customerStatusArrOption = customerStatusArr;
         this.loadData();        
     },
- 		
+ 	//新建	
     addClick() {
-        this.state.followSituation=undefined;
-        this.state.customerStatus=undefined;
+    	this.state.businessGlossoryId=undefined;
+        this.state.followSituation='0';
+        this.state.customerStatus='0';
         this.state.contactType=undefined;
         this.state.remarks='';
         this.state.result='';
@@ -412,14 +413,24 @@ const MyBusiness = Form.create()(React.createClass({
         this.setState({
             showDesc: true,           
         });       
+    },
+    //跟进
+    addModify(e) {
+        this.addTime(); 
+        this.HttpFollowUp(e.businessId)
+        this.setState({
+            showDesc: true,           
+        });       
     }, 
     addClickOk(){
     	this.setState({
+    		businessId:'',
             showDesc: false,           
         });
     },
     addClickCancel(){
     	this.setState({
+    		businessId:'',
             showDesc: false,           
         });
     },
@@ -450,79 +461,51 @@ const MyBusiness = Form.create()(React.createClass({
     //基本信息提交
     newSubmit(e){
     	e.preventDefault(); 
-    	this.state.data=[];
         this.setState({        	
             selectedRowKeys: [],           
         });
     	this.props.form.validateFields((err, values) => {
-    		let theorgCodeUrl = [];
-            if (this.state.orgCodeUrl.length) {
-                let picArr = [];
-                this.state.orgCodeUrl.map(function (item) {
-                    picArr.push(item.response.data);
-                });
-                theorgCodeUrl = picArr.join(",");
-            };
-            let thecompanyLogoUrl = [];
-            if (this.state.companyLogoUrl.length) {
-                let picArr = [];
-                this.state.companyLogoUrl.map(function (item) {
-                    picArr.push(item.response.data);
-                });
-                thecompanyLogoUrl = picArr.join(",");
-            };
     		if (!err) {
             	this.setState({
                   loading: true
             	}); 	
                 $.ajax({
-                    method: "post",
+                    method: "get",
                     dataType: "json",
-                    url:globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
+                    url:globalConfig.context + '/api/admin/customer/toUpdateBusiness',
                     data: {         	
-                    	id:this.state.InformationId,
-                        uid: this.state.InformationUid,
-                        societyTag:values.societyTag,
-                        introduction:values.introduction,
-                        unitName:this.state.unitName,
-                        industry:this.state.industry,
-                        locationProvince:values.ProvinceCity?values.ProvinceCity[0]:'',//省-
-                        locationCity:values.ProvinceCity?values.ProvinceCity[1]:'',//市
-                        locationArea:values.ProvinceCity?values.ProvinceCity[2]:'',//区
-                        postalAddress:values.postalAddress,
-                        contactsFixedTel:values.contactsFixedTel,
-                        contactsFax:values.contactsFax,
-                        registeredCapital:values.registeredCapital,
-                        enterpriseScale:values.enterpriseScale,
-                        legalPerson:values.legalPerson,
-                        legalPersonIdCard:values.legalPersonIdCard,
-                        legalPersonTel:values.legalPersonTel,
-                        legalPersonEmail:values.legalPersonEmail,
-                        highTechZone:this.state.highTechZone,
-                        listed:this.state.listed,
-                        orgCode:values.orgCode,
-                        businessScope:values.businessScope,
-                        introduction:values.introduction,
-                        companyLogoUrl:thecompanyLogoUrl,
-                        orgCodeUrl:theorgCodeUrl,    
+                    	businessId:this.state.rowId   
                     }
-                }).done(function (data) {                	
-                    this.setState({
-                        loading: false
-                    });
-                    if (!data.error.length) {
-                        message.success('保存成功!');
-                        this.detailsModal()                     
-                    } else {
+                }).done(function (data) { 
+                	let thisData=data.data;
+                	if (!thisData) {
+                   		 if (data.error && data.error.length) {
                         message.warning(data.error[0].message);
-                    }            
-                }.bind(this));  	
-            }
-    	}) 
+                   		 };
+                    	thisData = {};
+                   	 }; 
+	                	this.setState({
+		                	businessId:thisData.businessId,
+		                	identifyName:thisData.identifyName,
+		                	businessGlossoryId:thisData.businessGlossoryId,
+		                	followSituation:thisData.followSituation,
+		                	customerStatus:thisData.customerStatus,
+		                	createTime:thisData.createTime,
+		                	adminName:thisData.adminName,
+		                	remarks:thisData.remarks,  	
+               		});                  
+		        }.bind(this),
+		        ).always(function () {
+		            this.setState({            	
+		                loading: false
+		            });
+		        }.bind(this));
+			}
+    	})
     },
     //查看基本详情基本信息
-    loadInformation(record){    	
-    	this.RowClick;    
+    loadInformation(record){
+    	console.log(record)
     	$.ajax({
             method: "get",
             dataType: "json",
@@ -543,7 +526,6 @@ const MyBusiness = Form.create()(React.createClass({
                 let ProvinceS=getprovince(thisData.locationProvince);
                 let citys=getprovince(thisData.locationCity);
                 let Areas=getprovince(thisData.locationArea);
-                console.log(getprovince(800))
                 ProvinceCityArr.push(ProvinceS,citys,Areas)
                 
                console.log(ProvinceCityArr)
@@ -557,7 +539,7 @@ const MyBusiness = Form.create()(React.createClass({
                 	companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
                 	dataInformation:thisData,
                 	ProvinceCity:ProvinceCityArr,
-                	industry:(thisData.industry).toString(),
+                	industry:thisData.industry,
                 });                  
             }.bind(this),
         }).always(function () {
@@ -647,7 +629,7 @@ const MyBusiness = Form.create()(React.createClass({
                     } else {
                         message.warning(data.error[0].message);
                     }
-        			      this.getNewWoman(this.state.khId);
+        			this.getNewWoman(this.state.khId);
                 }.bind(this));
             }
         }); 
@@ -664,25 +646,25 @@ const MyBusiness = Form.create()(React.createClass({
                 	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({
-						       	     lastname:thedata[0].name,
-						       		 telNumArr:thedata,
-						       		 nub:thedata[0].mobile,
-		                             orderStatusOption: theArr, 
-	                 });
+            		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({
+					       	     lastname:thedata[0].name||'',
+					       		 telNumArr:thedata,
+					       		 nub:thedata[0].mobile,
+	                             orderStatusOption: theArr, 
+                 		});
 					}.bind(this),
 				}).always(function () {
 	            this.setState({
@@ -708,12 +690,15 @@ const MyBusiness = Form.create()(React.createClass({
                 }); 
                 let thed='';
                 let conts=this.state.lastname;
-                this.state.orderStatusOption.map(function(itam){
+                if(this.state.orderStatusOption){
+                	this.state.orderStatusOption.map(function(itam){
                 	if(itam.name==conts){
                 		thed=itam.ocbId
                 	}
                 	return thed;
                 })
+                }
+               
                 $.ajax({
                     method: "post",
                     dataType: "json",
@@ -727,7 +712,7 @@ const MyBusiness = Form.create()(React.createClass({
                         createTime:this.state.createYear+''+this.state.creatMent,
                         contactType: this.state.contactType,
                         ocbId: thed,
-                        followTime:'2017-10-11'+' '+'00:00:00',
+                        followTime:this.state.followTime,
                         remarks: this.state.remarks,
                         result: this.state.result,
                     }
@@ -736,9 +721,10 @@ const MyBusiness = Form.create()(React.createClass({
                         loading: false
                     });
                     if (!data.error.length) {
-                        message.success('保存成功!');         
+                        message.success('保存成功!'); 
                         this.addClickCancel();
-                        this.loadData();  
+                        this.loadData(); 
+                        this.state.businessId='';
                     } else {
                         message.warning(data.error[0].message);
                     }
@@ -770,12 +756,10 @@ const MyBusiness = Form.create()(React.createClass({
 //			        });	
 					let creatMent=thedata.createTime.substr(10,9);
  				    let createYear=thedata.createTime.substr(0,10);
-					
 					this.setState({	
 						creatMent:creatMent,
 						createYear:createYear,
-						creatMents:thedata.creatMent,
-						createYears:thedata.createYear,
+						followTime:thedata.followTime,
 	                    adminName: thedata.adminName, 
                     });
 				}.bind(this),
@@ -803,8 +787,7 @@ const MyBusiness = Form.create()(React.createClass({
                         message.warning(data.error[0].message);
                     };	
                     thedata = {}; 
-               }; 
-               console.log(thedata)
+              }; 
 					this.setState({
 						customerArr:thedata,	
                     });
@@ -854,6 +837,40 @@ const MyBusiness = Form.create()(React.createClass({
 				        return message.warning('当前客户名不存在')
 				     };
 		},
+		//点击跟进时数据处理
+	    HttpFollowUp(e){
+			$.ajax({
+             method: "get",
+             dataType: "json",
+             crossDomain: false,
+             url: globalConfig.context + "/api/admin/customer/toFollowOneBusiness",
+             data:{
+            	businessId: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({
+						businessId:thedata.businessId,
+						businessGlossoryId:thedata.businessGlossoryId,
+						followSituation:thedata.followSituation,
+						customerStatus:thedata.customerStatus,
+						createTime:thedata.createTime,
+						identifyName:thedata.identifyName,	
+						remarks:thedata.remarks,
+                    });
+				}.bind(this),
+			}).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));  
+	},
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
             if (nextProps.data && nextProps.data.id) {
@@ -865,6 +882,7 @@ const MyBusiness = Form.create()(React.createClass({
         };
     },
     tableRowClick(record, index) { 
+    	console.log(record)
         this.state.RowData = record; 
         console.log(record)
         this.detailsModalOk(record);
@@ -929,8 +947,9 @@ const MyBusiness = Form.create()(React.createClass({
         const formItemLayput = {
             labelCol: { span: 10 },
             wrapperCol: { span: 14 },
-        };  
-        const dataSources=this.state.customerArr || []
+        }; 
+        const businessIds=this.state.businessId||'';
+        const dataSources=this.state.customerArr || [];
         const options = dataSources.map((group) =>
 				      <Option key={group.id} value={group.name}>{group.name}</Option>
 				     )
@@ -1004,19 +1023,42 @@ const MyBusiness = Form.create()(React.createClass({
 					    <Form horizontal id="demand-form" onSubmit={this.addSubmit}>
 			    			<Spin spinning={this.state.loading}>
 			    			   	<div className="clearfix">
-			    			   		<FormItem className="half-item" 
+			    			   		{businessIds!=''?<div><FormItem className="half-item"
+						                            {...formItemLayout}
+						                             label="业务意向名称"
+						                             >
+					    			    <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
+					    			</FormItem>
+			    			    	<FormItem className="half-item"
+			                           {...formItemLayout}
+			                             >
+					                	<Button type="primary" onClick={this.newContacts} style={{marginLeft:'160px'}}>添加新联系人</Button>
+					                </FormItem>
+			    			    	<FormItem className="half-item"
+				                            {...formItemLayout}
+				                             label="意向时间"
+				                             >
+			    			     		<span>{this.state.createTime}</span>
+			    			    	</FormItem>
+			    			    	<FormItem className="half-item"
+				                            {...formItemLayout}
+				                             label="客户名称"
+				                             >
+			    			     		<span>{this.state.businessGlossoryId}</span>
+			    			    	</FormItem></div>
+										:<div><FormItem className="half-item"
 			                           {...formItemLayout}
 			                           label="业务意向名称"
 		                               > 
-				                          <Select placeholder="服务意向名称" value={this.state.businessGlossoryId} onChange={(e) => {
-															        this.setState({businessGlossoryId:e})}} style={{width:'150px'}}>
-								                      {
-								                        intentionalService.map(function (item) {
-								                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-								                        })
-								                      }
-							                    </Select>
-		                   		    </FormItem>
+			                          <Select placeholder="服务意向名称" value={this.state.businessGlossoryId} onChange={(e) => {
+											this.setState({businessGlossoryId:e})}} style={{width:'150px'}}>
+					                       {
+					                        intentionalService.map(function (item) {
+					                            return <Select.Option key={item.value} >{item.key}</Select.Option>
+					                        })
+					                      }
+						               </Select>
+                   		            </FormItem>
 			    			   	    <FormItem className="half-item"
 			                           {...formItemLayout}
 			                             >
@@ -1025,72 +1067,64 @@ const MyBusiness = Form.create()(React.createClass({
 			    			   		<FormItem className="half-item"
 			                            {...formItemLayout}
 			                            label="意向时间" >	
-			                           { /*{getFieldDecorator('createYear', {
-					                        initialValue: this.state.createYear
-					                    })(
-					                            <DatePicker />
-					                    )}
-			                            {getFieldDecorator('creatMent', {
-					                        initialValue: this.state.creatMent
-					                    })(
-					                            <TimePicker />
-					                    )}*/}
 			                               <DatePicker placeholder="更新日期" value={moment(this.state.createYear,'YYYY-MM-DD')} onChange={(time) => {this.setState({createYear: time});}}/>					                               			                               		                           
-					                        <TimePicker placeholder="更新时间" value={moment(this.state.creatMent, 'HH:mm:ss')} onChange={(time) => { this.setState({creatMent: time}); }}/>	
+					                       <TimePicker placeholder="更新时间" value={moment(this.state.creatMent, 'HH:mm:ss')} onChange={(time) => { this.setState({creatMent: time}); }}/>	
 		            				</FormItem> 
-			    			   		  <FormItem className="half-item"
+		    			   		    <FormItem className="half-item"
+			                            {...formItemLayout}
+			                             label="客户名称"
+			                             >
+					                    <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></div>
+
+}
+			    			     	<FormItem className="half-item"
 				                            {...formItemLayout}
-				                             label="客户名称"
+				                             label="营销员"
 				                             >
-						                <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="营销员"
-						                             >
-					    			     		<span>{this.state.adminName}</span>
-					    			    	</FormItem>
-					    			   		<FormItem className="half-item" 
-					                           {...formItemLayout}
-					                           label="业务意向进度"
-				                               > 
-											             <Select  placeholder="业务意向进度" value={this.state.followSituation}
-			                           				 onChange={(e) => { this.setState({ followSituation: e }) }}>
-				                                    {
-				                                        intentionalService.map(function (item) {
-				                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-				                                        })
-				                                    }
-		                                       </Select>  
-				                   		    </FormItem>
-					    			   		<FormItem className="half-item" 
-					                           {...formItemLayout}
-					                           label="业务客户状态"
-			                               > 
-											    <Select placeholder="业务客户状态" value={this.state.customerStatus}
-	                           				 	onChange={(e) => { this.setState({ customerStatus: e }) }}>
+			    			     		<span>{this.state.adminName}</span>
+			    			    	</FormItem>
+			    			   		<FormItem className="half-item" 
+			                           {...formItemLayout}
+			                           label="业务意向进度"
+		                               > 
+									             <Select  placeholder="业务意向进度" value={this.state.followSituation}
+	                           				 onChange={(e) => { this.setState({ followSituation: e }) }}>
 		                                    {
 		                                        intentionalService.map(function (item) {
 		                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
 		                                        })
 		                                    }
-	                                       </Select>                                   
+                                       </Select>  
+		                   		    </FormItem>
+					    			<FormItem className="half-item" 
+			                           {...formItemLayout}
+			                           label="业务客户状态"
+	                                   > 
+									    <Select placeholder="业务客户状态" value={this.state.customerStatus}
+	                       				 	onChange={(e) => { this.setState({ customerStatus: e }) }}>
+	                                        {
+	                                        customerStatus.map(function (item) {
+	                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
+	                                        })
+	                                        }
+                                        </Select>                                   
 		                   		    </FormItem>
 		                   		    <div className="clearfix">
 			                   		    <FormItem
@@ -1118,36 +1152,38 @@ const MyBusiness = Form.create()(React.createClass({
 							                  </Radio.Group>
 						                </FormItem> 
 					                </div>
+					                
+					                <FormItem className="half-item" 
+			                           {...formItemLayout}
+			                           label="联系人"
+		                               > 
+				                        <Select placeholder="联系人姓名"  style={{ width: 140 }}
+						                        value={this.state.lastname}
+						                        onChange={this.hundleName}>
+						                        {this.state.orderStatusOption}
+				                    	</Select>
+		                   		    </FormItem>
+		                   		    
+					                <FormItem className="half-item"
+			                            {...formItemLayout}
+			                             label="联系电话"
+			                            >
+					                	<span>{this.state.nub}</span>
+					                </FormItem>
 					                <div className="clearfix">
-						                <FormItem className="half-item" 
-				                           {...formItemLayout}
-				                           label="联系人"
-			                               > 
-					                        <Select placeholder="联系人姓名"  style={{ width: 140 }}
-							                        value={this.state.lastname}
-							                        onChange={this.hundleName}>
-							                        {this.state.orderStatusOption}
-					                    	</Select>
-			                   		    </FormItem>
 						                <FormItem className="half-item"
 				                            {...formItemLayout}
-				                             label="联系电话"
-				                            >
-						                	<span>{this.state.nub}</span>
-						                </FormItem>
-						                <FormItem className="half-item"
-			                            {...formItemLayout}
-			                            label="拜访时间" >			                                
-			                            <DatePicker placeholder="更新日期" value={moment(this.state.createYears,'YYYY-MM-DD')} onChange={(time) => {this.setState({createYears: time});}}/>					                               			                               		                           
-					                    <TimePicker placeholder="更新时间" value={moment(this.state.creatMents, 'HH:mm:ss')} onChange={(time) => { this.setState({creatMents: time}); }}/>	              
-		            					</FormItem>
-		            					<FormItem className="half-item"
-				                            {...formItemLayout}
 				                             label="拜访人"
 				                            >
 						                	<span>{this.state.adminName}</span>
 						                </FormItem>
-					                </div>
+						                <FormItem className="half-item"
+				                            {...formItemLayout}
+				                            label="拜访时间" >			                                
+				                              <span>{this.state.followTime}</span>
+		            					</FormItem>
+	            					</div>
+					               
 					                <div className="clearfix">
 					                	<FormItem
 					                        labelCol={{ span: 4 }}
@@ -1179,34 +1215,34 @@ const MyBusiness = Form.create()(React.createClass({
 				                   {...formItemLayout}
 				                    label="业务意向名称"
 			                        >
-			                        <span>{theInformation.unitName}</span>
+			                        <span>{getCompanyIntention(theInformation.businessGlossoryId)}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item"
 				                    {...formItemLayout}
 				                    label="意向时间"
 			                        >
-			                        <span>{theInformation.unitName}</span>
+			                        <span>{theInformation.createTime}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item"
 				                    {...formItemLayout}
 				                    label="客户名称"
 			                        >
-			                        <span>{theInformation.unitName}</span>
+			                        <span>{theInformation.identifyName}</span>
 			                    </FormItem>
 			                    <FormItem className="half-item"
 				                   {...formItemLayout}
 				                    label="营销员"
 			                        >
-			                        <span>{theInformation.unitName}</span>
+			                        <span>{theInformation.adminName}</span>
 			                    </FormItem>
-													<FormItem className="half-item" 
+								<FormItem className="half-item" 
 		                           {...formItemLayout}
 		                           label="业务意向进度"
 	                               > 
 								               <Select  placeholder="业务意向进度" value={this.state.followSituation}
                            				 onChange={(e) => { this.setState({ followSituation: e }) }}>
 	                                    {
-	                                        intentionalService.map(function (item) {
+	                                        newFollow.map(function (item) {
 	                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
 	                                        })
 	                                    }
@@ -1216,7 +1252,7 @@ const MyBusiness = Form.create()(React.createClass({
 			                           {...formItemLayout}
 			                           label="业务客户状态"
 		                               > 
-										            <Select placeholder="业务客户状态" value={this.state.customerStatus}
+									 <Select placeholder="业务客户状态" value={this.state.customerStatus}
                            			onChange={(e) => { this.setState({ customerStatus: e }) }}>
 	                                {
 	                                   intentionalService.map(function (item) {

+ 4 - 2
js/component/manageCenter/servicesManage/contract/contractAdd.jsx

@@ -281,7 +281,8 @@ const ContractAddFrom = Form.create()(React.createClass({
                 data:{
                 	uid:ids,
                 },
-                success: function (data) {                	  
+                success: function (data) {  
+                	console.log(data)
             		let theArr = [];
 							    let thedata=data.data;
 							    if (!thedata) {
@@ -294,8 +295,9 @@ const ContractAddFrom = Form.create()(React.createClass({
 						          	theArr.push(<Select.Option value={item.id}>{item.name}</Select.Option>)
 						          	
 			           });
+			          
 				       this.setState({
-				       	  contacts:thedata[0].name,
+				       	  contacts:thedata[0].name||'',
                           orderStatusOption: theArr, 
 	                 });
 					}.bind(this),

+ 9 - 43
js/component/tools.js

@@ -705,18 +705,7 @@ module.exports = {
             return theType;
         }
     },
-    //客户状态反
-	getcustomerStatueOn: function (e) {
-         if (e) {
-            let theType = '';
-            customerStatusOn.map(function (item) {
-                if (item.value == e) {
-                    theType = item.key;
-                };
-            });
-            return theType;
-        }
-    },
+   
     //意向服务
 	getCompanyIntention: function (e) {
          if (e) {
@@ -728,19 +717,7 @@ module.exports = {
             });
             return theType;
         }
-    },
-    //意向服务反
-	getCompanyIntentionOn: function (e) {
-         if (e) {
-            let theType = '';
-            intentionalServiceOn.map(function (item) {
-                if (item.value == e) {
-                    theType = item.key;
-                };
-            });
-            return theType;
-        }
-    },
+   },
     //客户标签
     getTag: function (e) {
          if (e) {
@@ -765,18 +742,7 @@ module.exports = {
             return theType;
         }
     },
-     //最新跟进反
-	getfllowSituationOn: function (e) {
-         if (e) {
-            let theType = '';
-            newFollowOn.map(function (item) {
-                if (item.value == e) {
-                    theType = item.key;
-                };
-            });
-            return theType;
-        }
-    },
+   
      //性别
 	getsex: function (e) {
          if (e) {
@@ -856,16 +822,16 @@ module.exports = {
     	let theType = '';
     	if (nub<=34) {
             provinceList.map(function (item) {
-                if (item.id == nub) {
-                    theType = item.name;
+                if (item.name == nub) {
+                    theType = item.id;
                 };
             });
             return theType;
      }else if(nub>34&&nub<=380){
         	provinceList.map(function (item) {
         		item.cityList.map(function (city) {
-	                if (city.id == nub) {
-	                    theType = city.name;
+	                if (city.name == nub) {
+	                    theType = city.id;
 	                 };
 	             });
            });
@@ -874,8 +840,8 @@ module.exports = {
         	provinceList.map(function (item) {
         		item.cityList.map(function (city) {
         			city.areaList.map(function (areas) {
-		                if (areas.id == nub) {
-		                    theType = areas.name;
+		                if (areas.name == nub) {
+		                    theType = areas.id;
 		                  };
 		                }); 
 		            });