liting2017 7 år sedan
förälder
incheckning
8af3ad7915

+ 10 - 10
js/component/manageCenter/customer/customerData/companyCustomer.jsx

@@ -207,7 +207,7 @@ const PublicCustomer = Form.create()(React.createClass({
                 showQuickJumper: true,
                 pageSize: 10,
                 onChange: function (page) {
-                    this.loadBfVisit(page);
+                    this.loadBfVisit(page,false);
                 }.bind(this),
                 showTotal: function (total) {
                     return '共' + total + '条数据';
@@ -219,7 +219,7 @@ const PublicCustomer = Form.create()(React.createClass({
                 showQuickJumper: true,
                 pageSize: 10,
                 onChange: function (page) {
-                    this.BusinessList(page);
+                    this.BusinessList(page,false);
                 }.bind(this),
                 showTotal: function (total) {
                     return '共' + total + '条数据';
@@ -1216,8 +1216,8 @@ const PublicCustomer = Form.create()(React.createClass({
   	  this.loadInformation(e.id);
   	  this.contactLists(e.id);
 	  this.httpAccount(e.id); 
-	  this.loadBfVisit();  
-	  this.BusinessList();
+	  this.loadBfVisit(1,e.id);  
+	  this.BusinessList(1,e.id);
     },
     //点击消失函数
 	detailsModal(e) {		
@@ -1598,7 +1598,7 @@ const PublicCustomer = Form.create()(React.createClass({
         }.bind(this));
     },
     //tab3拜访记录
-    loadBfVisit(pageNo) {
+    loadBfVisit(pageNo,uids) {
         this.setState({
             loading: true
         });      
@@ -1610,7 +1610,7 @@ const PublicCustomer = Form.create()(React.createClass({
             data: {
             	pageNo: pageNo || 1,
                 pageSize: this.state.paginationsy.pageSize,
-                uid: this.state.rowId, //名称1
+                uid:uids?uids:this.state.rowId, //名称1
             },
             success: function (data) {            	
                 let theArr = []; 
@@ -1715,10 +1715,10 @@ const PublicCustomer = Form.create()(React.createClass({
 			this.httpAccount(this.state.rowId)
     	}
     	if(e==4){    		
-  		    this.loadBfVisit();
+  		    this.loadBfVisit(1,this.state.rowId);
     	}
     	if(e==5){    		
-			this.BusinessList();
+			this.BusinessList(1,this.state.rowId);
     	}
     	if(e==6){    		
 
@@ -1781,7 +1781,7 @@ const PublicCustomer = Form.create()(React.createClass({
     },
 
     //tab5业务意向
-    BusinessList(pageNo) {
+    BusinessList(pageNo,uids) {
         this.setState({
             loading: true
         });      
@@ -1793,7 +1793,7 @@ const PublicCustomer = Form.create()(React.createClass({
             data: { 				
                 pageNo: pageNo || 1,
                 pageSize: this.state.paginationt.pageSize,               
-                uid:this.state.rowId               
+                uid:uids?uids:this.state.rowId               
             },
             success: function (data) {            	
                 let theArr = []; 

+ 46 - 219
js/component/manageCenter/customer/customerData/myClient.jsx

@@ -207,7 +207,7 @@ const MyClient = Form.create()(React.createClass({
                 showQuickJumper: true,
                 pageSize: 10,
                 onChange: function (page) {
-                    this.loadBfVisit(page);
+                    this.loadBfVisit(page,false);
                 }.bind(this),
                 showTotal: function (total) {
                     return '共' + total + '条数据';
@@ -219,7 +219,7 @@ const MyClient = Form.create()(React.createClass({
                 showQuickJumper: true,
                 pageSize: 10,
                 onChange: function (page) {
-                    this.BusinessList(page);
+                    this.BusinessList(page,false);
                 }.bind(this),
                 showTotal: function (total) {
                     return '共' + total + '条数据';
@@ -809,149 +809,7 @@ const MyClient = Form.create()(React.createClass({
             this.loadData();
         }.bind(this));
     },
-    
-    //指定转交人的点击函数
-	showModa(){
-	    this.setState({
-	      visible: true,
-	    });
-	    this.setState({
-            selectedRowKey:[],            
-        });
-	    this.setState({
-            selectedRowKeys:this.state.selectedRowKeys,            
-        });
-	    let changeIds;
-        let adminName;
-        let customerStatus;       
-        let companyIntention;
-        let followSituation;      
-        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
-            let rowItem = this.state.selectedRows[idx];                          
-            if (rowItem.id) {
-                changeIds=rowItem.id;               
-                adminName=rowItem.adminName; 
-                customerStatus=rowItem.customerStatus;
-                companyIntention=rowItem.companyIntention;
-                followSituation=rowItem.followSituation;                  
-            };            
-        };  
-	     $.ajax({
-	     	method: "post",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/customer/findAdmin",
-            data: { 
-            	id: changeIds,//这一行数据的ID	           
-	            beforeCompanyIntention:companyIntention,//意向服务
-				beforeCustomerStatus:customerStatus,//客户状态
-				beforeFollowSituation:followSituation,//最新跟进状态
-				beforeAdminName:adminName,//跟进人
-            }
-       }).done(function (data) {       	
-            if (data.error && data.error.length) {
-            	message.warning(data.error[0].message);
-            } else {
-             let theAssigne = [];
-                if (!data.data) {
-                    if (data.error && data.error.length) {
-                        message.warning(data.error[0].message);
-                    };    
-                  
-                } else {                	
-                    for (let i = 0; i < data.data.length; i++) {
-                    	
-                        let thisdata = data.data[i];  
-                        //处理数据 进行循环
-                        theAssigne.push({
-                            name: thisdata.name,
-                            id: thisdata.id,
-                            ids: thisdata.cid,
-                            mobile:thisdata.mobile,
-                            adminName: thisdata.beforeAdminName,
-                            customerStatus: thisdata.beforeCustomerStatus,
-                            companyIntention: thisdata.beforeCompanyIntention,
-                            followSituation: thisdata.beforeFollowSituation,  
-                        });
-                    }; 
-                   
-                };               
-                this.setState({
-                    dataman: theAssigne,                      
-                    paginations:false
-                });            
-            }
-        }.bind(this));
-    },	   
-	    //选择了指定人之后的保存点击函数,需要修改函数
-    changeAssigner() {
-          this.setState({
-	      visible: false,
-	    });
-	    this.setState({
-            selectedRowKeys:[],            
-       });	    
-        let datt=this.state.selectedRow;       
-	      $.ajax({
-	        method: "post",
-	        dataType: "json",
-	        crossDomain: false,           
-	        url: globalConfig.context + "/api/admin/customer/transferCustomer",
-	        data: {
-	            id: datt[0].ids,//这一行数据的ID
-	            aid:datt[0].id,//指定转交人的ID 
-				beforeAdminName:datt[0].adminName,//之前的跟进人
-				adminName:datt[0].name,//转交的跟进人
-	        }
-        }).done(function (data) {
-            if (!data.error.length) {
-                message.success('转交成功!');
-                this.setState({
-                    loading: false,
-                });
-            } else {
-                message.warning(data.error[0].message);
-            };
-            this.loadData();
-        }.bind(this));
-    }, 
-    
-    //转为公共客户
-    changeRow() {
-        let deletedIds;       
-        let adminName;
-        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
-            let rowItem = this.state.selectedRows[idx];
-            if (rowItem.id) {
-                deletedIds=rowItem.id;               
-                adminName=rowItem.adminName;               
-            };            
-        };       
-        this.setState({
-            selectedRowKeys: [],
-            
-        });
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,           
-            url: globalConfig.context + "/api/admin/customer/transferToPublic",  
-            data: {
-                id: deletedIds,
-				        beforeAdminName:adminName,
-            }
-		        }).done(function (data) {
-		            if (!data.error.length) {
-		                message.success('已转为公共客户!');
-		                this.setState({
-		                    loading: false,
-		                });
-		            } else {
-		                message.warning(data.error[0].message);
-		            };
-		            this.loadData();
-		        }.bind(this));
-    },
+      
     getOrgCodeUrl(e) {
         this.setState({ orgCodeUrl: e });
     },
@@ -1058,6 +916,11 @@ const MyClient = Form.create()(React.createClass({
     tableRowClick(record, index) { 
         this.state.RowData = record; 
         this.detailsModalOk(record);
+        this.loadInformation(record.id);
+	    this.httpAccount(record.id); 
+	    this.loadBfVisit(1,record.id);  
+	    this.BusinessList(1,record.id);
+	    this.contactLists(record.id);
         this.setState({
         	selectedRowKeys:[],
         	rowId:record.id,
@@ -1242,11 +1105,7 @@ const MyClient = Form.create()(React.createClass({
     },
    	detailsModalOk(e) {
   	  this.setState({ modal5Visible:true });//需要一个请求数据
-  	  this.loadInformation(e.id);
-	  this.httpAccount(e.id); 
-	  this.loadBfVisit();  
-	  this.BusinessList();
-	  this.contactLists(e.id);
+  	 
     },
     //点击消失函数
 	detailsModal(e) {		
@@ -1627,7 +1486,7 @@ const MyClient = Form.create()(React.createClass({
         }.bind(this));
     },
     //tab3拜访记录
-    loadBfVisit(pageNo) {
+    loadBfVisit(pageNo,uids) {
         this.setState({
             loading: true
         });      
@@ -1639,7 +1498,7 @@ const MyClient = Form.create()(React.createClass({
             data: {
             	pageNo: pageNo || 1,
                 pageSize: this.state.paginationsy.pageSize,
-                uid: this.state.rowId, //名称1
+                uid: uids?uids:this.state.rowId, //名称1
             },
             success: function (data) {            	
                 let theArr = []; 
@@ -1744,10 +1603,10 @@ const MyClient = Form.create()(React.createClass({
 			this.httpAccount(this.state.rowId)
     	}
     	if(e==4){    		
-  		    this.loadBfVisit();
+  		    this.loadBfVisit(1,this.state.rowId);
     	}
     	if(e==5){    		
-			this.BusinessList();
+			this.BusinessList(1,this.state.rowId);
     	}
     	if(e==6){    		
 
@@ -1810,7 +1669,7 @@ const MyClient = Form.create()(React.createClass({
     },
 
     //tab5业务意向
-    BusinessList(pageNo) {
+    BusinessList(pageNo,uids) {
         this.setState({
             loading: true
         });      
@@ -1822,7 +1681,7 @@ const MyClient = Form.create()(React.createClass({
             data: { 				
                 pageNo: pageNo || 1,
                 pageSize: this.state.paginationt.pageSize,               
-                uid:this.state.rowId               
+                uid:uids?uids:this.state.rowId               
             },
             success: function (data) {            	
                 let theArr = []; 
@@ -1965,43 +1824,9 @@ const MyClient = Form.create()(React.createClass({
 					<Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
 	                        disabled={!hasSelected} 
 	                        onClick={this.delectRow}>删除<Icon type="minus" />
-	               </Button>	
-					<Button type="primary" onClick={this.showModa}  disabled={!hasSelected}>指定转交人</Button>                    	 
-           			<Modal				             
-			              footer=''
-					          title="选择指定人"
-					          visible={this.state.visible}
-					          onOk={this.handleOk}
-					          onCancel={this.handleCancel}							          
-					        >
-				            <Spin spinning={this.state.loading}>
-				            	 <Table 
-				            	 scroll={{y:'350px'}}
-				            	 pagination={false}
-				            	 columns={this.state.columnsman} 
-				            	 rowSelection={rowSelections} 
-				            	 dataSource={this.state.dataman}
-				            	 />		            				        
-			               <FormItem wrapperCol={{ span: 12, offset: 12 }} style={{marginTop:'15px'}}>
-                       		<Button className="set-submit" type="primary" htmlType="submit" id="change_keep" style={{marginLeft:"50px"}} onClick={this.changeAssigner }>保存</Button>
-                       		<Button className="set-submit" type="ghost" onClick={this.handleCancel } style={{marginLeft:"30px"}} id='change_rem'>取消</Button>
-                	  </FormItem>  
-                	</Spin>
-					</Modal>
-                    {/*<Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
-                        disabled={!hasSelected}
-                        onClick={this.changeRow}>转为公共客户<Icon /></Button>*/}
-	                  <Button style={{marginRight:'10px',background: "#595a5c", border: "none",color: "#fff" }}												
-	                        disabled={!hasSelected} 
-	                        onClick={this.delectRow}>锁定
-	                  </Button>
-	                  <Button style={{marginRight:'10px',background: "#11a2c6", border: "none",color: "#fff" }}												
-	                        disabled={!hasSelected} 
-	                        onClick={this.delectRow}>激活
-	                  </Button>			
-	                  <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
+	                </Button>	
+	                <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
                     <Button type="primary" className="addButton" onClick={this.addClick}>新增客户<Icon type="plus" /></Button> 
-                    
                     <div className='clearfix' style={{marginTop:'5px'}}>
 	                  <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>                    			                  
 			                <RangePicker
@@ -2378,33 +2203,35 @@ const MyClient = Form.create()(React.createClass({
 							                            label="注册邮箱" >
 							                         <Input value={this.state.email}  onChange={(e) => { this.setState({ email: e.target.value }); }} />        
 							                    </FormItem>
-							                    <FormItem className="half-item"
-							                            {...formItemLayout}
-							                            label="客户来源" >
-							                            <span>{this.state.source}</span>   
-							                    </FormItem>
-							                    <FormItem className="half-item"
-							                            {...formItemLayout}
-							                            label="客户类型" >
-							                            <span>{this.state.type}</span>   
-							                    </FormItem>
-							                    <FormItem className="half-item"
-							                            {...formItemLayout}
-							                            label="创建时间" >
-							                            <span>{this.state.createTimes}</span>   
-							                    </FormItem>
-							                    <FormItem className="half-item" 
-						                           {...formItemLayout}
-						                           label="账户状态"
-						                         > 
-												    <Select placeholder="账户状态" value={this.state.status}  onChange={(e) => { this.setState({ status: e }); }} >
-				                                    {
-				                                        statuslist.map(function (item) {
-				                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-				                                        })
-				                                    }
-				                                  </Select>
-						                   		</FormItem>
+							                    <div className="clearfix">
+								                    <FormItem className="half-item"
+								                            {...formItemLayout}
+								                            label="客户来源" >
+								                            <span>{this.state.source}</span>   
+								                    </FormItem>
+								                    <FormItem className="half-item"
+								                            {...formItemLayout}
+								                            label="客户类型" >
+								                            <span>{this.state.type}</span>   
+								                    </FormItem>
+								                    <FormItem className="half-item"
+								                            {...formItemLayout}
+								                            label="创建时间" >
+								                            <span>{this.state.createTimes}</span>   
+								                    </FormItem>
+								                    <FormItem className="half-item" 
+							                           {...formItemLayout}
+							                           label="账户状态"
+							                         > 
+													    <Select placeholder="账户状态" value={this.state.status}  onChange={(e) => { this.setState({ status: e }); }} >
+					                                    {
+					                                        statuslist.map(function (item) {
+					                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
+					                                        })
+					                                    }
+					                                  </Select>
+							                   		</FormItem>
+							                   	</div>
 						                   		<div className="clearfix">
 										            <FormItem className="half-item"
 										                {...formItemLayout}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 2980 - 11
js/component/manageCenter/customer/individualCustomer/individualCustomer.jsx


+ 2 - 0
js/component/manageCenter/customer/individualCustomer/myClient.less

@@ -35,6 +35,7 @@
     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 {
@@ -81,6 +82,7 @@
 .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;}
+.pictures{padding-top: 20px;}
 #demand-form {
     .half-item {
         float: left;

+ 49 - 339
js/component/manageCenter/customer/individualCustomer/myClientDesc.jsx

@@ -1,94 +1,34 @@
 import React from 'react';
-import { Tabs, Table, Icon, Tooltip, Modal, message, AutoComplete, Spin, DatePicker,Upload, Input, InputNumber, Select,TimePicker, Button, Radio, Form, Cascader, Tag, Switch } from 'antd';
+import { Icon,  Modal, message,  Spin, Input, Select, Button, Form } from 'antd';
 import './myClient.less';
 import ajax from 'jquery/src/ajax/xhr.js';
-import moment from 'moment';
 import $ from 'jquery/src/ajax';
-import { areaSelect } from '../../../NewDicProvinceList';
-import { maturityList, innovationList, transferModeList,cityArr ,newFollow,customerStatus,intentionalService,tag} from '../../../dataDic';
-import { IndustryObject, getIndustryCategory } from '../../../DicIndustryList.js';
-import { beforeUploadFile, splitUrl, companySearch, getTransferMode, getAchievementCategory, getTechAuditStatus, getDemandType, getMaturity, getInnovation,beforeUpload, getBase64,getsex,getCompanyIntention,getcityArr,getfllowSituation,getcustomerStatue} from '../../../tools.js';
-import throttle from '../../../throttle.js';
-
-
+import {socialAttribute} from '../../../dataDic.js';
 const AchievementDetailForm = Form.create()(React.createClass({
     getInitialState() {
         return {
             loading: false,
-            data: {},
-            tags: [],
+            data: {},           
         };
     },
-
     handleSubmit(e) {
         e.preventDefault();
         this.props.form.validateFields((err, values) => {                                 
-
-            //意向服务多选
-//          let companyMore = [];
-//          if (values.companyIntention.length) {
-//              let companyList = [];
-//              values.companyIntention.map(function (item) {
-//                  companyList.push(item);
-//              });
-//              companyMore = companyList.join(",");
-//          };
-//          let yearMonth = new Date().toLocaleDateString();           
-//          let yearString = yearMonth.split('/').join('-');                                          	           
-        	let days = new Date(); 
-        	
-        	let years =days.getFullYear();
-        	let months=parseInt(days.getMonth()+1)<10? "0"+days.getMonth()+1:days.getMonth()+1;
-        	let dayt = parseInt(days.getDate())<10 ? "0"+days.getDate():days.getDate();
-        	
-        	let yearString=years+'-'+months+'-'+dayt;
-            let hours = parseInt(days.getHours())<10 ? "0"+days.getHours():days.getHours();            
-            let minutes =parseInt(days.getMinutes())<10 ? "0"+days.getMinutes():days.getMinutes();            
-            let seconds =parseInt(days.getSeconds())<10 ? "0"+days.getSeconds():days.getSeconds();           
-            let	pjstringY=hours+':'+minutes+':'+seconds ; 
-            let tags=''
-            switch(values.tag){
-            	case '科技专家':tags=0; break;
-            	case '科研单位':tags=1; break;
-            	case '民间达人':tags=2; break;
-            }
             if (!err) {
                 this.setState({
                     loading: true
                 });
-                
                 $.ajax({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
-                    url: this.props.data.id ?  globalConfig.context + '/api/admin/customer/updCustomer' : globalConfig.context + '/api/admin/customer/addCustomer',
+                    url: globalConfig.context + '/api/admin/customer/addCu',
                     data: {
-                        id: this.props.data.id, //编号
-                        customerType:values.customerTyp ,//客户信息  1                                                                              
-                        companyName: values.companyName,//公司名称  1
-                        companyIndustry: values.companyIndustry,//公司行业  
-                        companyIntention: values.companyIntention,//公司意向1
-                        tag: tags,
-                        locationProvince: values.locationProvince,//省份1
-                        address: values.address,//详细地址1
-                        remarks: values.remarks,//备注1
-                        followSituation: values.followSituation,//最新跟进1
-                        customerStatus: values.customerStatus,//客户状态1
-                        name: values.name,//客户姓名1                        
-                        mobile: values.mobile,//座机1
-                        telNum: values.telNum,//手机号码1
-                        sex: values.sex,//性别1
-                        customerPosition: values.customerPosition,//职位1
-                        wechat: values.wechat,//微信号1
-                        qq: values.qq,//qq     1                 
-                        depatrment: values.depatrment,//部门             1
-                        email: values.email,//邮箱     1                   
-                       	shareType:0,
-                        followDates:yearString+' '+pjstringY,//时间,
-                        primaryFlg:0,
+                        name: this.state.companyNamet, 
+                        contactMobile: this.state.telnum,
+                        type:'0'
                     }
-                }).done(function (data) {
-                    this.state.auditStatus = 0;
+                }).done(function (data) { 
                     this.setState({
                         loading: false
                     });
@@ -102,31 +42,31 @@ const AchievementDetailForm = Form.create()(React.createClass({
             }
         });
     },
+
+	//去完善
+    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);
-        };  
+        this.state.companyNamet='';
+    	this.state.telnum='';
     },
     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.maturityPictureUrl = [];
-            this.state.textFileList = [];
-            this.state.techPlanFileList = [];
-            this.state.businessPlanFileList = [];
-            this.props.form.resetFields();
+            this.state.companyNamet='';
+	    	this.state.telnum='';
+            this.props.form.resetFields(); 
         };
     },
-   
+    
     render() {
         const theData = this.state.data || {};
         const { getFieldDecorator } = this.props.form;
@@ -135,266 +75,35 @@ const AchievementDetailForm = Form.create()(React.createClass({
             labelCol: { span: 8 },
             wrapperCol: { span: 14 },
         };  
-        //let yearMonth = new Date().toLocaleDateString();           
-        //let yearString = yearMonth.split('/').join('-');                                          	           
-    	let days = new Date();
-    	
-    	let years =days.getFullYear();
-    	let months=parseInt(days.getMonth()+1)<10? "0"+days.getMonth()+1:days.getMonth()+1;
-    	let dayt = parseInt(days.getDate())<10 ? "0"+days.getDate():days.getDate();
-    	
-    	let yearString=years+'-'+months+'-'+dayt;
-        let hours = parseInt(days.getHours())<10 ? "0"+days.getHours():days.getHours();            
-        let minutes =parseInt(days.getMinutes())<10 ? "0"+days.getMinutes():days.getMinutes();            
-        let seconds =parseInt(days.getSeconds())<10 ? "0"+days.getSeconds():days.getSeconds();           
-        let	pjstringY=hours+':'+minutes+':'+seconds ;
-        const { RangePicker } = DatePicker;
+
         return (
+        <div>
             <Form horizontal onSubmit={this.handleSubmit} id="demand-form">
                 <Spin spinning={this.state.loading}>
                     <div className="clearfix">
                     	<FormItem className="half-item"
-		                            {...formItemLayout}
-		                            label="客户类型" >
-		                            {getFieldDecorator('customerTyp', {
-		                                rules: [{ required: true, message: '此项为必填项!' }],
-		                                initialValue: theData.customerTyp
-		                            })(
-		                                <Select placeholder="选择客户类型" style={{ width: 160 }} >
-		                                    <Select.Option value="0" >个人客户</Select.Option>
-		                                    <Select.Option value="1" >公司客户</Select.Option>
-		                                    <Select.Option value="2" >团体客户</Select.Option> 
-		                                </Select>
-		                                )}
-		                </FormItem>
-                    	<div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>基本资料:</div>	                    	                       
-                        <div>	                    	
-				              <FormItem className="half-item"
-		                            {...formItemLayout}
-		                            label="录入时间" >	
-		                            {yearString+' '+pjstringY}
-			                   </FormItem> 	                    
-                        </div>
-                        <div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>公司资料:</div>	                    		                           	                                                       	                                               
-                        <div>
-                            <FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="公司名称" >
-	                            {getFieldDecorator('companyName', {
-	                                rules: [{ required: true, message: '此项为必填项!' }],
-	                                initialValue: theData.companyName
-	                            })(
-	                                <Input />
-	                                )}
-	                        </FormItem>
-	                        <FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="公司行业" >
-	                            {getFieldDecorator('companyIndustry', {	                                
-	                                initialValue: theData.companyIndustry
-	                            })(
-	                                <Input />
-	                                )}
-	                        </FormItem>	                     	                        
-			                <FormItem className="half-item"
 	                            {...formItemLayout}
-	                            label="地区" >
-	                            {getFieldDecorator('locationProvince', {
-	                                initialValue: getcityArr(theData.locationProvince)
-	                            })(
-	                                <Select placeholder="选择地区" style={{ width: 160 }} >
-	                                    {
-	                                        cityArr.map(function (item) {
-	                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-	                                        })
-	                                    }
-	                                </Select>
-	                                )}
-	                        </FormItem>
-	                        <FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="最新跟进" >
-	                            {getFieldDecorator('followSituation', {
-	                            	rules: [{ required: true, message: '此项为必填项!' }],
-	                                initialValue: getfllowSituation(theData.followSituation)
-	                            })(
-	                                <Select placeholder="选择跟进进度" style={{ width: 160 }} >
-	                                    {
-	                                        newFollow.map(function (item) {
-	                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-	                                        })
-	                                    }
-	                                </Select>
-	                                )}
-	                        </FormItem>
-	                        <FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="客户状态" >
-	                            {getFieldDecorator('customerStatus', {
-	                            	rules: [{ required: true, message: '此项为必填项!' }],
-	                                initialValue: getcustomerStatue(theData.customerStatus)
-	                            })(
-	                                <Select placeholder="选择客户状态" style={{ width: 160 }} >
-	                                    {
-	                                        customerStatus.map(function (item) {
-	                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-	                                        })
-	                                    }
-	                                </Select>
-	                                )}
-	                        </FormItem>	                       
-	                        <FormItem className="half-item"
-		                            {...formItemLayout}
-		                            label="详细地址" >
-		                            {getFieldDecorator('address', {		                            	
-		                                initialValue: theData.address
-		                            })(
-		                                <Input />
-		                                )}
-		                    </FormItem>
-		                     <FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="标签" >
-	                            {getFieldDecorator('tag', {	                            	
-	                                initialValue: theData.tag
-	                            })(
-                               <Select placeholder="选择客户标签" >
-                                    {
-                                        tag.map(function (item) {
-                                            return <Select.Option key={item.key} >{item.key}</Select.Option>
-                                        })
-                                    }
-                                </Select>
-	                                )}
-	                        </FormItem>
-	                        <div  className="clearfix" >	
-		                        <FormItem className="half-item" style={{marginLeft:'80px'}}
-			                         labelCol={{ span: 4 }}
-			                        wrapperCol={{ span: 18 }}
-			                        label="意向服务" > 
-			                        {getFieldDecorator('companyIntention', {
-			                            	rules: [{ required: true, message: '此项为必填项!' }],	
-			                            	initialValue: theData.companyIntention
-	                                })(
-									    <Select placeholder="选择意向服务" style={{ width: 160 }} >
-	                                    {
-	                                        intentionalService.map(function (item) {
-	                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
-	                                        })
-	                                    }
-	                                </Select>
-	                                )}
-			                    </FormItem>
-		                    </div>
-	                        <div  className="clearfix">		                        
-				                <FormItem
-			                        labelCol={{ span: 4 }}
-			                        wrapperCol={{ span: 18 }}
-			                        label="备注" >
-			                        {getFieldDecorator('remarks', {
-			                            initialValue: theData.remarks
-			                        })(
-			                            <Input type="textarea" rows={4} />
-			                            )}
-			                    </FormItem>
-			                </div>
-                        </div>  
-                        <div className="clearfix" style={{marginLeft:'40px',marginBottom:'20px',color:'#000000'}}>联系资料:</div>
-                        <div>
-                        	<FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="姓名" >
-	                            {getFieldDecorator('name', {
-	                                rules: [{ required: true, message: '此项为必填项!' }],
-	                                initialValue: theData.name
-	                            })(
-	                                <Input />
-	                                )}
-	                        </FormItem>
-                       		<FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="手机号码" >
-	                            {getFieldDecorator('telNum', {	
-	                            	rules: [{ required: true, message: '此项为必填项!' }],
-	                                initialValue: theData.telNum 
-	                            })(
-	                                <Input />
-	                                )}
-	                        </FormItem>	                        
-	                        <FormItem className="half-item"
-                                {...formItemLayout}
-                                label="性别" >
-                                {getFieldDecorator('sex', {                                	
-                                    initialValue: getsex(theData.sex)
-                                })(
-                                    <Radio.Group>
-                                        <Radio value="0">男</Radio>
-                                        <Radio value="1">女</Radio>
-                                    </Radio.Group>
-                                    )}
-                       		</FormItem>
-	                        <FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="座机号" >
-	                            {getFieldDecorator('mobile', {	                              
-	                                initialValue: theData.mobile
-	                            })(
-	                                <Input />
-	                                )}
-	                        </FormItem>
-	                        <FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="QQ号码" >
-	                            {getFieldDecorator('qq', {	                              
-	                                initialValue: theData.qq
-	                            })(
-	                                <Input />
-	                                )}
-	                        </FormItem>
-	                        <FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="邮箱号" >
-	                            {getFieldDecorator('email', {	                              
-	                                initialValue: theData.email
-	                            })(
-	                                <Input />
-	                                )}
-	                        </FormItem>
-	                        <FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="微信" >
-	                            {getFieldDecorator('wechat', {	                              
-	                                initialValue: theData.wechat
-	                            })(
-	                                <Input />
-	                                )}
-	                        </FormItem>
-	                        <FormItem className="half-item"
-	                            {...formItemLayout}
-	                            label="部门" >
-	                            {getFieldDecorator('depatrment', {	                              
-	                                initialValue: theData.depatrment
-	                            })(
-	                                <Input />
-	                                )}
-	                        </FormItem>
-	                        <FormItem className="half-item"
+	                            label="客户名称" >
+	                         <Input value={this.state.companyNamet} placeholder="公司名称" 
+	                              onChange={(e) => { this.setState({ companyNamet: e.target.value }); }} required="required"/>
+	                    </FormItem>
+                    </div>
+                    <div className="clearfix">
+                    	<FormItem className="half-item"
 	                            {...formItemLayout}
-	                            label="职位" >
-	                            {getFieldDecorator('customerPosition', {	                              
-	                                initialValue: theData.customerPosition
-	                            })(
-	                                <Input />
-	                                )}
-	                        </FormItem>
-                        </div>                        
-        			</div>
+	                            label="联系电话" >
+	                              <Input value={this.state.telnum} placeholder="联系电话"  
+	                                    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" 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>                   
+                    </FormItem> 
                 </Spin>
             </Form >
+    	</div>
         )
     }
 }));
@@ -425,7 +134,7 @@ const CustomerDetail = React.createClass({
         if (!this.state.visible && nextProps.showDesc) {
             this.state.tabsKey = "1";
         };
-        this.state.visible = nextProps.showDesc;
+        this.state.visible = nextProps.showDesc; 
     },
     render() {
         
@@ -433,13 +142,14 @@ const CustomerDetail = React.createClass({
                 <div className="patent-desc">
                     <Modal maskClosable={false} visible={this.state.visible}
                         onOk={this.checkPatentProcess} onCancel={this.handleCancel}
-                        width='1000px'
+                        width='800px'
                         title='新建客户'                       
                         footer=''
                         className="admin-desc-content">
                         <Spin spinning={this.state.loading}>               
                             <AchievementDetailForm
-                                data={this.props.data}                               
+                                data={this.props.data} 
+                                newmodal={this.props.newmodal}
                                 closeDesc={this.handleCancel}
                                 visible={this.state.visible}
                                 handleOk={this.handleOk} />