liting2017 7 lat temu
rodzic
commit
3c2fcaad1a

+ 379 - 194
js/component/manageCenter/customer/customerData/myClient.jsx

@@ -8,8 +8,8 @@ import { citySelect,provinceList,areaSelect} from '../../../NewDicProvinceList';
 const { Column, ColumnGroup } = Table;
 const TabPane = Tabs.TabPane;
 import  CustomerDetail from './myClientDesc.jsx';
-import {socialAttribute,newFollow,lvl,currentMember,cityArr, statuslist,customerStatus,intentionalService,sex} from '../../../dataDic.js';
-import {getContactType,getCompanyIntention,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
+import {socialAttribute,industryList,newFollow,lvl,currentMember,cityArr, statuslist,customerStatus,intentionalService,sex} from '../../../dataDic.js';
+import {getCompanyIntention,getContactType,getfllowSituation,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
 
 const data = [{
 id: '1',
@@ -226,6 +226,30 @@ const MyClient = Form.create()(React.createClass({
                     return '共' + total + '条数据';
                 }
             },
+            paginations: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadVisit(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            paginationt: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.BusinessList(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
             //业务意向列表
             intentionList:[
 				{
@@ -324,35 +348,40 @@ const MyClient = Form.create()(React.createClass({
 					  render:(text,record) =>{return (<Button onClick={(e)=>{this.businessIntentionDetails(record)}}>查看</Button>)}
 				}
 			],
-			businessFollowList:[{
-					  title: '跟进时间',
-					  dataIndex: 'name',
-					  key: 'name'	 
-				},{
-					  title: '营销员',
-					  dataIndex: 'mobile2',
-					  key: 'mobile2'	 
-				},{
-					  title: '业务意向进度',
-					  dataIndex: 'mobile3',
-					  key: 'mobile3'	 
-				}
-				,{
-					  title: '客户状态',
-					  dataIndex: 'mobile4',
-					  key: 'mobile4'	 
-				},{
-					  title: '拜访方式',
-					  dataIndex: 'mobile5',
-					  key: 'mobile5'	 
-				},{
-					  title: '联系人',
-					  dataIndex: 'mobile6',
-					  key: 'mobile6'	 
-				},{
-					  title: '联系电话',
-					  dataIndex: 'mobile7',
-					  key: 'mobile7'	 
+			businessFollowList:[
+			   {
+                    title: '跟进时间',
+                    dataIndex: 'followTime',
+                    key: 'followTime',                                        
+                }, {
+                    title: '营销员',
+                    dataIndex: 'adminName',
+                    key: 'adminName',
+                }, {
+                    title: '业务意向进度',
+                    dataIndex: 'followSituation',
+                    key: 'followSituation', 
+                    render:text=>{return getfllowSituation(text)}
+                }, {
+                    title: '客户状态',
+                    dataIndex: 'customerStatus',
+                    key: 'customerStatus',  
+                    render:text=>{return getcustomerStatue(text)}
+                }, 
+                {
+                    title: '拜访方式',
+                    dataIndex: 'contactType',
+                    key:'contactType',
+                    render:text=>{return getContactType(text)}
+                }, {
+                    title: '联系人',
+                    dataIndex: 'contacts',
+                    key: 'contacts',                    
+                }, 
+                {
+                    title: '联系电话',
+                    dataIndex: 'contactMobile',
+                    key:'contactMobile',                    
 				},{
 					  title: '操作',
 					  dataIndex: 'ooo',
@@ -404,70 +433,65 @@ const MyClient = Form.create()(React.createClass({
 				}
 	        ],
             
-            ContactsList:[{
+            ContactsLists:[{
 					  title: '姓名',
 					  dataIndex: 'name',
 					  key: 'name',	
 					  render: (text, record, index) => {
-	                  return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
+	                  return <Input value={record.name} placeholder="姓名" key={record.id}
+	                           onChange={(e) => { record.name = e.target.value; 
+	                           	this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
 	            }
 				},{
 					  title: '联系人部门',
-					  dataIndex: 'mobile1',
-					  key: 'mobile1',
+					  dataIndex: 'depatrment',
+					  key: 'depatrment',
 					  render: (text, record, index) => {
-	                  return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
+	                  return <Input value={record.depatrment} placeholder="联系人部门" key={record.id}
+	                   onChange={(e) => { record.depatrment = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
 	            }
 				},{
 					  title: '联系人职务',
-					  dataIndex: 'mobile2',
-					  key: 'mobile2',
+					  dataIndex: 'position',
+					  key: 'position',
 					  render: (text, record, index) => {
-	                  return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
+	                  return <Input value={record.position} placeholder="联系人职务" key={record.id}
+	                  onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
 	            }
 				},{
 					  title: '手机号码',
-					  dataIndex: 'mobile3',
-					  key: 'mobile3',
+					  dataIndex: 'mobile',
+					  key: 'mobile',
 					  render: (text, record, index) => {
-	                  return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
+	                  return <Input value={record.mobile} placeholder="手机号码" key={record.id}
+	                  onChange={(e) => { record.mobile = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
 	            }
 				},{
-					  title: '固定电话',
-					  dataIndex: 'mobile4',
-					  key: 'mobile4',
+					  title: '微信',
+					  dataIndex: 'wechat',
+					  key: 'wechat',
 					  render: (text, record, index) => {
-	                  return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
+	                  return <Input value={record.wechat} placeholder="微信" key={record.id}
+	                  onChange={(e) => { record.wechat = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
 	            }
 				},{
 					  title: '联系人QQ',
-					  dataIndex: 'mobile5',
-					  key: 'mobile5',
+					  dataIndex: 'qq',
+					  key: 'qq',
 					  render: (text, record, index) => {
-	                  return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
+	                  return <Input value={record.qq} placeholder="联系人QQ" key={record.id}
+	                  onChange={(e) => { record.qq = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
 	            }
 				},{
 					  title: '电子邮箱',
-					  dataIndex: 'mobile6',
-					  key: 'mobile6',
-					  render: (text, record, index) => {
-	                  return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
-	            }
-				},{
-					  title: '营销员',
-					  dataIndex: 'mobile7',
-					  key: 'mobile7',
-					  render: (text, record, index) => {
-	                  return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
-	            }
-				},{
-					  title: '备注',
-					  dataIndex: 'mobile8',
-					  key: 'mobile8',
+					  dataIndex: 'email',
+					  key: 'email',
 					  render: (text, record, index) => {
-	                  return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} style={{width:'80px'}}/>
-	            }
-				},{
+	                  return <Input value={record.email} placeholder="电子邮箱" key={record.id}
+	                  onChange={(e) => { record.email = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
+	              	}
+				},
+				{
 					  title: '操作',
 					  dataIndex: 'dels',
 					  key: 'dels',
@@ -476,7 +500,6 @@ const MyClient = Form.create()(React.createClass({
                             <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
 							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
 							</Popconfirm>
-							<Button type="primary" onClick={(e)=>{this.ContactsListSave(record)}}>保存</Button>
                         </div>
                     }
 				 }
@@ -595,8 +618,52 @@ const MyClient = Form.create()(React.createClass({
         visible: true,
       });
     },      
-    
-    //刷新新增拜访记录删除列表
+    //tab2获取联系人详情
+	contactLists(ids) {
+        this.setState({
+            loading: true
+        });      
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,          
+            url:globalConfig.context + '/api/admin/customer/findCustomerContacts',
+            data: {
+                uid:ids , //名称1
+            },
+            success: function (data) {            	
+                let theArr = []; 
+                if (data.error.length || data.data.list=="") {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };                   
+                } else {  
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[i];                        
+                        theArr.push({
+                            id:thisdata.id,
+                            name:thisdata.name,
+                            mobile:thisdata.mobile, 
+                            email:thisdata.email,
+                            qq:thisdata.qq,
+                            wechat:thisdata.wechat,
+                            depatrment:thisdata.depatrment,
+                            position:thisdata.position,
+                        });
+                    };
+                    
+                };               
+                this.setState({
+                    contactList: theArr,
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({	
+                loading: false
+            });
+        }.bind(this));
+    },
+    //刷新新增拜访记录刷新
     deletelist(e){
     	$.ajax({
             method: "get",
@@ -618,9 +685,9 @@ const MyClient = Form.create()(React.createClass({
                         let thisdata = data.data.userBusinessList[i];                        
                         listArr.push({                          
                             id: thisdata.id,                                                  
-                            businessGlossoryId:(thisdata.businessGlossoryId).toString(),
-                            followSituation:(thisdata.followSituation).toString(),
-                            customerStatus:(thisdata.customerStatus).toString(),
+                            businessGlossoryId:String(thisdata.businessGlossoryId),
+                            followSituation:String(thisdata.followSituation),
+                            customerStatus:String(thisdata.customerStatus),
                             remarks:thisdata.remarks,
                         });
                    };
@@ -649,6 +716,8 @@ const MyClient = Form.create()(React.createClass({
     	this.getNewWoman(e.id);
     	this.deletelist(e.id)
     	this.setState({
+    		result:'',
+    		contactType:undefined,
     		visitModul:true,
             loading: true
         }); 	
@@ -698,14 +767,15 @@ const MyClient = Form.create()(React.createClass({
 	                        message.warning(data.error[0].message);
 	                    };	
 	                    thedata = {}; 
-	                };   
+	                };
+	                
 	                for (let i = 0; i < data.data.userBusinessList.length; i++) {
                         let thisdata = data.data.userBusinessList[i];                        
                         theArr.push({                          
                             id: thisdata.id,                                                  
-                            businessGlossoryId:(thisdata.businessGlossoryId).toString(),
-                            followSituation:(thisdata.followSituation).toString(),
-                            customerStatus:(thisdata.customerStatus).toString(),
+                            businessGlossoryId:String(thisdata.businessGlossoryId),
+                            followSituation:String(thisdata.followSituation),
+                            customerStatus:String(thisdata.customerStatus),
                             remarks:thisdata.remarks,
                         });
                    };
@@ -917,14 +987,14 @@ const MyClient = Form.create()(React.createClass({
         //城市
         let Province = [];
         provinceList.map(function (item) {
-        	var id=item.id.toString()
+        	var id= String(item.id)
             Province.push(
                 <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
             )
         });                
-         //意向服务
+         //行业
         let intentionalArr = [];
-        intentionalService.map(function (item) {
+        industryList.map(function (item) {
             intentionalArr.push(
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
@@ -1020,7 +1090,6 @@ const MyClient = Form.create()(React.createClass({
     },
     VisitRowClick(record, index) { 
     	this.state.keys=false;
-    	console.log(record)
         this.state.RowData = record;
         this.visitModify(record.followId);
         this.setState({
@@ -1138,7 +1207,7 @@ const MyClient = Form.create()(React.createClass({
                 	companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
                 	dataInformation:thisData,
                 	ProvinceCity:ProvinceCityArr,
-                	industry:thisData.industry?(thisData.industry).toString():undefined,
+                	industry:String(thisData.industry)?String(thisData.industry):undefined,
                 });    
             }.bind(this),
         }).always(function () {
@@ -1167,7 +1236,7 @@ const MyClient = Form.create()(React.createClass({
                     thisData = {};
                 }; 
                 let sourcecustomer=''
-                switch((thisData.source).toString()){
+                switch(String(thisData.source)){
                 	case '0':
                 	sourcecustomer='注册客户'
                 	break;
@@ -1184,10 +1253,10 @@ const MyClient = Form.create()(React.createClass({
                 	type:getcustomerTyp(thisData.type),
                 	source:sourcecustomer,
                 	isMember:thisData.isMember,
-                	currentMemberStatus:(thisData.currentMemberStatus).toString(),
-                	lvl:(thisData.lvl).toString(),
+                	currentMemberStatus:String(thisData.currentMemberStatus),
+                	lvl:String(thisData.lvl),
                 	serviceCertification:thisData.serviceCertification,
-                	status:(thisData.status).toString(),
+                	status:String(thisData.status),
                 	userCertification:thisData.userCertification,
                 	createTimes:thisData.createTimes,	
                 });                  
@@ -1204,6 +1273,7 @@ const MyClient = Form.create()(React.createClass({
 	  this.httpAccount(e.id); 
 	  this.loadVisit();  
 	  this.BusinessList();
+	  this.contactLists(e.id);
     },
     //点击消失函数
 	detailsModal(e) {		
@@ -1304,59 +1374,65 @@ const MyClient = Form.create()(React.createClass({
             data: this.state.data
         })
     },
-	//tab中列表点击修改拜访详情
-	//获取拜访详情ajax
-	loadVisit(pageNo) {
-        this.state.data = [];
+    //tab2新增联系人
+    addcontact() {
+        this.state.contactList.push({	
+        	id:null,
+            name: '',
+            mobile: '',
+            email: '',
+            qq: '',
+            wechat: '',
+            depatrment: '',
+            position: '',
+        });
+       	
         this.setState({
-            loading: true
-        });      
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,          
-            url:globalConfig.context + '/api/admin/customer/listFollowHistory',
-            data: {
-            	pageNo: pageNo || 1,
-                pageSize: this.state.pagination.pageSize,
-                uid: this.state.rowId, //名称1
-                businessGlossoryId:'',
-            },
-            success: function (data) {            	
-                let theArr = []; 
-                if (data.error.length || data.data.list=="") {
+            contactList: this.state.contactList
+        })
+    },   
+	//tab5进入修改时
+	//进入修改时
+	listFollowUp(e){
+			$.ajax({
+             method: "get",
+             dataType: "json",
+             crossDomain: false,
+             url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
+             data:{
+            	ufbId:e
+             },
+             success: function (data) {                	  
+				       let thedata=data.data;
+				    if (!thedata) {
                     if (data.error && data.error.length) {
                         message.warning(data.error[0].message);
-                    };                   
-                } else {  
-                    for (let i = 0; i < data.data.list.length; i++) {
-                        let thisdata = data.data.list[i];                        
-                        theArr.push({
-                            followId:thisdata.followId,
-                            followTime:thisdata.followTime,
-                            identityName:thisdata.identityName, 
-                            contacts:thisdata.contacts,
-                            contactMobile:thisdata.contactMobile,
-                            result:thisdata.result, 
-                            adminName:thisdata.adminName,
-                            contactType:thisdata.contactType
-                        });
-                    };
-                    this.state.pagination.current = data.data.pageNo;
-                    this.state.pagination.total = data.data.totalCount;
-                };               
-                this.setState({
-                    visitArrList: theArr,
-                    pagination: this.state.pagination
-                });
-            }.bind(this),
-        }).always(function () {
+                    };	
+                    thedata = {}; 
+           		 }; 
+					this.setState({
+						businessGlossoryIds:thedata.businessGlossoryId,
+						followSituations:thedata.followSituation,
+						customerStatuss:thedata.customerStatus,
+						followTimes:thedata.followTime,
+						createTimes:thedata.createTime,
+						identifyNames:thedata.identifyName,
+						contactTypes:parseInt(thedata.contactType),
+						results:thedata.result,
+						remarkss:thedata.remarks,
+						adminNames:thedata.adminName,
+						contactss:thedata.contacts,
+						contactMobiles:thedata.contactMobile,
+						ufbId:thedata.ufbId,
+						followIds:thedata.followId,
+                    });
+				}.bind(this),
+			}).always(function () {
             this.setState({
                 loading: false
             });
-        }.bind(this));
-    },    
-
+       }.bind(this));   
+	},
     //修改密码Modul
     modifyPassworld(){
     	 this.setState({ 
@@ -1450,7 +1526,8 @@ const MyClient = Form.create()(React.createClass({
 	},
 	//拜访意向服务列表单个删除
 	intentionDelet(e){
-		let detId=this.state.uid?this.state.uid:this.state.followId;
+		
+		let detId=!this.state.keys?this.state.followIds:this.state.uid;
 		if(e.id||e.followId){
 			this.setState({
 	       	  selectedRowKeys: [],
@@ -1472,21 +1549,109 @@ const MyClient = Form.create()(React.createClass({
 		            } else {
 		                message.warning(data.error[0].message);
 		            };
-		            
-		            this.visitModify(detId)
+		          !this.state.keys?this.visitModify(detId):this.deletelist(detId);
 		        }.bind(this));
 		}else{
-			this.visitModify(detId)
+			!this.state.keys?this.visitModify(detId):this.deletelist(detId);
 		}
 	},
 	
 	//tab5意向业务
 	//意向业务查看列表单个详情
 	businessIntentionDetails(e){
+		$.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/customer/toUpdateBusiness',
+            data: {
+                businessId: e.businessId
+            },
+            success: function (data) {
+                let thisData = data.data;                
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    thisData = {};
+                }; 
+                this.setState({
+                	businessGlossoryId:thisData.businessGlossoryId,
+                	identifyName:thisData.identifyName,
+                	uid:thisData.uid,
+                	businessId:thisData.businessId,
+                	followSituation:thisData.followSituation,
+                	customerStatus:thisData.customerStatus,
+                	createTime:thisData.createTime,
+                	followTime:thisData.followTime,
+                	adminName:thisData.adminName,
+                	remarks:thisData.remarks,
+                	result:thisData.result,	
+                });                  
+            }.bind(this),
+       }).always(function () {
+        	this.loadVisit();
+            this.setState({            	
+                loading: false
+            });
+        }.bind(this)); 
 		this.setState({
 			businessModul:true
 		})
 	},
+	//查看跟进记录列表
+	loadVisit(pageNo) {
+        this.setState({
+            loading: true
+        });      
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,          
+            url:globalConfig.context + '/api/admin/customer/listFollowHistory',
+            data: {
+            	pageNo: pageNo || 1,
+                pageSize: this.state.paginations.pageSize,
+                uid: this.state.rowId, //名称1
+                businessGlossoryId:this.state.businessGlossoryId,
+            },
+            success: function (data) {            	
+                let theArr = []; 
+                if (data.error.length || data.data.list=="") {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };                   
+                } else {  
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];                        
+                        theArr.push({
+                            followId:thisdata.followId,
+                            followTime:thisdata.followTime,
+                            identityName:thisdata.identityName, 
+                            contacts:thisdata.contacts,
+                            contactMobile:thisdata.contactMobile,
+                            result:thisdata.result,
+                            ufbId:thisdata.ufbId,
+                            adminName:thisdata.adminName,
+                            followSituation:thisdata.followSituation,
+                            customerStatus:thisdata.customerStatus,
+                            contactType:thisdata.contactType
+                        });
+                    };
+                    this.state.paginations.current = data.data.pageNo;
+                    this.state.paginations.total = data.data.totalCount;
+                };               
+                this.setState({
+                    visitArrList: theArr,
+                    paginations: this.state.paginations
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({	
+                loading: false
+            });
+        }.bind(this));
+    },
 	businessIntentionOk(){
 		this.setState({
 			businessModul:false
@@ -1499,6 +1664,7 @@ const MyClient = Form.create()(React.createClass({
 	},
 	//业务跟进查看跟多
 	businessFollowDetails(e){
+		this.listFollowUp(e.ufbId)
 		this.setState({
 			businessFollowModul:true
 		})
@@ -1513,13 +1679,38 @@ const MyClient = Form.create()(React.createClass({
 			businessFollowModul:false
 		})
 	},
+	//tab2联系人保存
+	contactSave() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            url: globalConfig.context + '/api/admin/customer/updateCustomerContacts',
+            method: 'post',
+            data: {
+            	uid:this.state.rowId,
+                contactList: JSON.stringify(this.state.contactList)
+            }
+        }).done(function (data) {                	
+	            this.setState({
+	                loading: false
+	            });
+	            if (!data.error.length) {
+	                message.success('保存成功!');
+	                 this.detailsModal()
+               		 this.loadData();
+	            } else {
+	                message.warning(data.error[0].message);
+	            }            
+	        }.bind(this));
+    },
     //详情tab切换数据处理
     callback(e){       	
     	if(e==1){     		
     		this.loadInformation(this.state.rowId)
     	}
     	if(e==2){    		
-			
+			this.contactLists(this.state.rowId)
     	}
     	if(e==3){    		
 			this.httpAccount(this.state.rowId)
@@ -1583,24 +1774,13 @@ const MyClient = Form.create()(React.createClass({
             }            
         }.bind(this));  		
     },
-    //列表详情tab2联系人新建
-    addContact(){
-//  	this.state.data.push({
-//          name: '', 
-//      });
-//
-//      this.setState({
-//          data: this.state.data
-//      })
-    },
-    //删除
+
+
+    //tab2删除
     confirmDelet(e){
     	console.log(e)
     },
-    //保存
-    ContactsListSave(e){
-    	console.log(e)
-    },
+
     //tab5业务意向
     BusinessList(pageNo) {
         this.setState({
@@ -1613,7 +1793,7 @@ const MyClient = Form.create()(React.createClass({
             url:globalConfig.context + '/api/admin/customer/listBusiness',
             data: { 				
                 pageNo: pageNo || 1,
-                pageSize: this.state.pagination.pageSize,               
+                pageSize: this.state.paginationt.pageSize,               
                 uid:this.state.rowId               
             },
             success: function (data) {            	
@@ -1626,8 +1806,7 @@ const MyClient = Form.create()(React.createClass({
                     for (let i = 0; i < data.data.list.length; i++) {
                         let thisdata = data.data.list[i];                        
                         theArr.push({
-                            key: i,                           
-                            id: thisdata.id,                                                  
+                            key: i,                                                                           
                             businessId:thisdata.businessId,
                             businessName:thisdata.businessName,
                             identifyName:thisdata.identifyName,
@@ -1637,12 +1816,12 @@ const MyClient = Form.create()(React.createClass({
                    			createTime:thisdata.createTime			                
                         });
                     };
-                    this.state.pagination.current = data.data.pageNo;
-                    this.state.pagination.total = data.data.totalCount;
+                    this.state.paginationt.current = data.data.pageNo;
+                    this.state.paginationt.total = data.data.totalCount;
                 };               
                 this.setState({
                     dataBusiness: theArr,
-                    pagination: this.state.pagination
+                    paginationt: this.state.paginationt
                 });
             }.bind(this),
         }).always(function () {
@@ -1770,7 +1949,7 @@ const MyClient = Form.create()(React.createClass({
 				            <Spin spinning={this.state.loading}>
 				            	 <Table 
 				            	 scroll={{y:'350px'}}
-				            	 pagination={this.state.paginations}
+				            	 pagination={false}
 				            	 columns={this.state.columnsman} 
 				            	 rowSelection={rowSelections} 
 				            	 dataSource={this.state.dataman}
@@ -1781,9 +1960,9 @@ const MyClient = Form.create()(React.createClass({
                 	  </FormItem>  
                 	</Spin>
 					</Modal>
-                    <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                    {/*<Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                         disabled={!hasSelected}
-                        onClick={this.changeRow}>转为公共客户<Icon /></Button>
+                        onClick={this.changeRow}>转为公共客户<Icon /></Button>*/}
 	                  <Button style={{marginRight:'10px',background: "#595a5c", border: "none",color: "#fff" }}												
 	                        disabled={!hasSelected} 
 	                        onClick={this.delectRow}>锁定
@@ -1922,7 +2101,7 @@ const MyClient = Form.create()(React.createClass({
 												    <Select placeholder="选择行业" value={this.state.industry} onChange={(e) => {
 								                        this.setState({industry:e})}}>
 				                                      {
-				                                        intentionalService.map(function (item) {
+				                                        industryList.map(function (item) {
 				                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
 				                                        })
 				                                      }
@@ -2139,15 +2318,21 @@ const MyClient = Form.create()(React.createClass({
 							</TabPane>
 						    <TabPane tab="联系人信息" key="2">
 						        <div className="clearfix" >
-						            <Button className="ContactsList" type="primary" onClick={this.addNew}>新增</Button> 
+						            <Button className="ContactsList" type="primary" onClick={this.addcontact}>新增</Button> 
 						        </div>
 						       <div className="clearfix">
                     			  <Spin spinning={this.state.loading}>
+                    			     <Form horizontal id="demand-form" onSubmit={this.contactSave} >
 								      <Table 
-						            	 pagination={this.state.paginations}
-						            	 columns={this.state.ContactsList} 
-						            	 dataSource={data}
+						            	 pagination={false}
+						            	 columns={this.state.ContactsLists} 
+						            	 dataSource={this.state.contactList}
 						            	 />
+					            	    <div className="clearfix">
+								                <Button  type="primary" htmlType="submit" style={{fontSize:'16px',margin:'20px 25px 40px 120px'}}>保存</Button>  
+				                                <Button  type="ghost" onClick={this.detailsModal} style={{fontSize:'18px'}}>取消</Button>
+								            </div>
+						            	</Form> 
 								   </Spin> 
 								</div>
 						    </TabPane>
@@ -2269,7 +2454,7 @@ const MyClient = Form.create()(React.createClass({
 							     <div className="clearfix">
                     			    <Spin spinning={this.state.loading}>
 								      <Table 
-						            	 pagination={this.state.paginations}
+						            	 pagination={false}
 						            	 columns={this.state.visitsList} 
 						            	 dataSource={this.state.visitArrList}
 						            	 onRowClick={this.VisitRowClick}
@@ -2281,7 +2466,7 @@ const MyClient = Form.create()(React.createClass({
 							    <div className="clearfix">
                     			    <Spin spinning={this.state.loading}>
 								      <Table 
-						            	 pagination={this.state.paginations}
+						            	 pagination={this.state.paginationt}
 						            	 columns={this.state.businessIntentionList} 
 						            	 dataSource={this.state.dataBusiness}
 						            	 />
@@ -2399,7 +2584,7 @@ const MyClient = Form.create()(React.createClass({
 										</div>	 
 					                </div>
 			    			   	</div>
-							    <Button  type="primary" size="large" htmlType="submit" style={{margin:'15px  15px 20px 95px'}}>保存</Button>
+							    <Button  type="primary" size="large" htmlType="submit" style={{margin:'15px  35px 35px 120px'}}>保存</Button>
 					           	<Button  size="large" onClick={this.visitCancel}>取消</Button>
 					   		</Spin>
 					    </Form>
@@ -2535,7 +2720,7 @@ const MyClient = Form.create()(React.createClass({
 			    <Modal	
 				      footer=''
 			          title="业务意向详情"
-			          width='600px'
+			          width='1000px'
 			          visible={this.state.businessModul}
 			          onOk={this.businessIntentionOk}
 					  onCancel={this.businessIntentionCancel}							          							          
@@ -2547,39 +2732,39 @@ const MyClient = Form.create()(React.createClass({
 				    					<FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="意向业务名称" >
-					                        <span>{this.state.a}</span>
+					                        <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="意向时间" >
-					                        <span>{this.state.a1}</span>
+					                        <span>{this.state.createTime}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="客户名称" >
-					                        <span>{this.state.a}</span>
+					                        <span>{this.state.identifyName}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="营销员" >
-					                        <span>{this.state.a}</span>
+					                        <span>{this.state.adminName}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="意向业务进度" >
-					                        <span>{this.state.a}</span>
+					                        <span>{getfllowSituation(this.state.followSituation)}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="业务客户状态" >
-					                        <span>{this.state.a}</span>
+					                        <span>{getcustomerStatue(this.state.customerStatus)}</span>
 					                    </FormItem>
 					                </div>
 				                    <div className="clearfix">
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="业务意向说明" >
-					                        <span>{this.state.a}</span>
+					                        <span>{this.state.remarks}</span>
 					                    </FormItem>
 			                        </div>
 			                        <div className="clearfix">
@@ -2589,7 +2774,7 @@ const MyClient = Form.create()(React.createClass({
 										      <Table 
 								            	 pagination={this.state.paginations}
 								            	 columns={this.state.businessFollowList} 
-								            	 dataSource={data}
+								            	 dataSource={this.state.visitArrList}
 								            	 />
 										    </Spin> 
 										</div>	
@@ -2613,73 +2798,73 @@ const MyClient = Form.create()(React.createClass({
 				    					<FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="意向业务名称" >
-					                        <span>{this.state.a}</span>
+					                        <span>{getCompanyIntention(this.state.businessGlossoryIds)}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="意向时间" >
-					                        <span>{this.state.a1}</span>
+					                        <span>{this.state.createTimes}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="客户名称" >
-					                        <span>{this.state.a}</span>
+					                        <span>{this.state.identifyNames}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="营销员" >
-					                        <span>{this.state.a}</span>
+					                        <span>{this.state.adminNames}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="意向业务进度" >
-					                        <span>{this.state.a}</span>
+					                        <span>{getfllowSituation(this.state.followSituations)}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="业务客户状态" >
-					                        <span>{this.state.a}</span>
+					                        <span>{getcustomerStatue(this.state.customerStatuss)}</span>
 					                    </FormItem>
 					                </div>
 				                    <div className="clearfix">
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="业务意向说明" >
-					                        <span>{this.state.a}</span>
+					                        <span>{this.state.remarkss}</span>
 					                    </FormItem>
 			                        </div>
 			                        <div className="clearfix">
-			                        	<div>拜访情况</div>
+			                        	<div style={{fontSize:'18px',lineHeight:'30px'}}>拜访情况</div>
 			                        	<FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="拜访方式" >
-					                        <span>{this.state.a}</span>
+					                        <span>{getContactType(this.state.contactTypes)}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="联系人" >
-					                        <span>{this.state.a}</span>
+					                        <span>{this.state.contactss}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="联系电话" >
-					                        <span>{this.state.a}</span>
+					                        <span>{this.state.contactMobiles}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="拜访时间" >
-					                        <span>{this.state.a}</span>
+					                        <span>{this.state.followTimes}</span>
 					                    </FormItem>
 					                    <FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="拜访人" >
-					                        <span>{this.state.a}</span>
+					                        <span>{this.state.adminNames}</span>
 					                    </FormItem> 
 					                    <div className="clearfix">
 					                    	<FormItem className="half-item"
 					                            {...formItemLayout}
 					                            label="拜访备注" >
-					                        <span>{this.state.a}</span>
+					                        <span>{this.state.results}</span>
 					                    </FormItem>
 					                    </div>
 			                        </div>

+ 1 - 1
js/component/manageCenter/customer/customerData/myClientDesc.jsx

@@ -180,7 +180,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     </div>
                     <FormItem wrapperCol={{ span: 12, offset: 4 }}>
                         <Button className="set-submit" type="primary" htmlType="submit">保存</Button>  
-                        <Button className="set-submit" type="primary"  onClick={(e)=>{this.addContent();this.props.closeDesc}}>去完善</Button>
+                        {/*<Button className="set-submit" type="primary"  onClick={(e)=>{this.addContent();this.props.closeDesc}}>去完善</Button>*/}
                         <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
                     </FormItem> 
                 </Spin>

+ 298 - 116
js/component/manageCenter/customer/customerService/myBusiness.jsx

@@ -10,7 +10,7 @@ import { areaSelect} from '../../../NewDicProvinceList';
 const { Column, ColumnGroup } = Table;
 const TabPane = Tabs.TabPane;
 import {socialAttribute,newFollow,lvl, customerStatus,intentionalService} from '../../../dataDic.js';
-import {getcustomerStatue,getprovince,getCompanyIntention,getfllowSituation} from '../../../tools.js';
+import {getcustomerStatue,getprovince,getCompanyIntention,getfllowSituation,getContactType } from '../../../tools.js';
 
 const dataSource = [{  
     name: 'AntDesign',
@@ -234,6 +234,18 @@ const MyBusiness = Form.create()(React.createClass({
                     return '共' + total + '条数据';
                 }
             },
+            paginations: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadVisit(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
 	          businessFollowList: [               
                 {
                     title: '跟进时间',
@@ -245,17 +257,20 @@ const MyBusiness = Form.create()(React.createClass({
                     key: 'adminName',
                 }, {
                     title: '业务意向进度',
-                    dataIndex: 'businessGlossoryId',
-                    key: 'businessGlossoryId', 
+                    dataIndex: 'followSituation',
+                    key: 'followSituation', 
+                    render:text=>{return getfllowSituation(text)}
                 }, {
                     title: '客户状态',
                     dataIndex: 'customerStatus',
-                    key: 'customerStatus',                    
+                    key: 'customerStatus',  
+                    render:text=>{return getcustomerStatue(text)}
                 }, 
                 {
                     title: '拜访方式',
                     dataIndex: 'contactType',
-                    key:'contactType',                   
+                    key:'contactType',
+                    render:text=>{return getContactType(text)}
                 }, {
                     title: '联系人',
                     dataIndex: 'contacts',
@@ -272,8 +287,8 @@ const MyBusiness = Form.create()(React.createClass({
                     key:'ccc',  
  					render: (text, record, index) => {                    	
                         return <div>
-                            <Popconfirm title="是否删除?" onConfirm={(e)=>{e.stopPropagation(),this.intentionDelet(record)}} okText="删除" cancelText="不删除">
-							                 <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
+                            <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record)}} okText="删除" cancelText="不删除">
+							                 <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
 							              </Popconfirm>
                         </div>
                     }
@@ -410,6 +425,7 @@ const MyBusiness = Form.create()(React.createClass({
         this.state.remarks='';
         this.state.result='';
         this.state.keys=false;
+        this.state.lastName=undefined;
         this.addTime(); 
         this.setState({
             showDesc: true,           
@@ -498,7 +514,7 @@ const MyBusiness = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + '/api/admin/customer/toUpdateBusiness',
             data: {
-                uid: record
+                businessId: record
             },
             success: function (data) {
                 let thisData = data.data;                
@@ -509,10 +525,16 @@ const MyBusiness = Form.create()(React.createClass({
                     thisData = {};
                 }; 
                 this.setState({
-                	dataInformation:thisData,	
+                	uids:thisData.uid,
+                	dataInformation:thisData,
+                	followSituation:thisData.followSituation,
+                	businessGlossoryId:thisData.businessGlossoryId,
+                	customerStatus:thisData.customerStatus,
+                	remarks:thisData.remarks,	
                 });                  
             }.bind(this),
         }).always(function () {
+        	this.loadVisit();
             this.setState({            	
                 loading: false
             });
@@ -534,8 +556,6 @@ const MyBusiness = Form.create()(React.createClass({
     		visitModul:false,
     	})
     },
-	
-	
 	//新增联系人
 	addcontactModulOK(){
 		this.setState({ 
@@ -625,6 +645,16 @@ const MyBusiness = Form.create()(React.createClass({
 	//新建保存
 	addSubmit(e){
 		e.preventDefault();
+		if(this.state.businessGlossoryId==undefined){
+		  		message.warning('请选择业务意向')
+		  		return false;
+		}
+		if(!this.state.businessId){
+			if(!this.state.theTypes){
+			  		message.warning('客户名为空或不存在')
+			  		return false;
+			}
+		}
 		if(this.state.contactType==undefined){
     		message.warning('请选择联系方式')
     		return false;
@@ -645,14 +675,26 @@ const MyBusiness = Form.create()(React.createClass({
                     dataType: "json",
                     crossDomain: false,
                     url:!this.state.keys?globalConfig.context + '/api/admin/customer/addBusinessAndFollow':globalConfig.context + '/api/admin/customer/addFollowOneBusiness ',
-                    data:{
+                    data:!this.state.businessId?{
+                    	uid:this.state.khId,
+                        businessGlossoryId: this.state.businessGlossoryId, 
+                        followSituation:this.state.followSituation,
+                        customerStatus: this.state.customerStatus,
+                        contactType: this.state.contactType,
+                        ocbId: contactsId,
+                        createTime:this.state.createYear+''+this.state.creatMent,
+                        followTime:this.state.followTime,
+                        remarks: this.state.remarks,
+                        result: this.state.result,
+                    }:{
+                    	uid:this.state.uids,
                     	businessId:this.state.businessId,
                         businessGlossoryId: this.state.businessGlossoryId, 
                         followSituation:this.state.followSituation,
                         customerStatus: this.state.customerStatus,
                         contactType: this.state.contactType,
-                        ocbId: this.state.kid,
-                        createTime:this.state.createTime,
+                        ocbId: contactsId,
+                        followTime:this.state.followTime,
                         remarks: this.state.remarks,
                         result: this.state.result,
                     }
@@ -671,7 +713,89 @@ const MyBusiness = Form.create()(React.createClass({
                 }.bind(this));
             }
         });
-       
+	},
+	//列表保存
+	addlistSubmit(e){
+		e.preventDefault();
+		this.props.form.validateFields((err, values) => {                                 
+            if (!err) {
+                this.setState({
+                    loading: true
+                }); 
+                let conts=this.state.lastName;
+           		let contactsId= conts?this.state.contactsIdArr[conts].id:'';
+                $.ajax({
+                    method: "post",
+                    dataType: "json",
+                    crossDomain: false,
+                    url:globalConfig.context + '/api/admin/customer/updateFollowOneBusiness',
+                    data:{
+                    	ufbId:this.state.ufbIds,
+                    	followId:this.state.followId,
+                        customerStatus: this.state.customerStatus, 
+                        followSituation:this.state.followSituation,
+                        contactType: this.state.contactType,
+                        ocbId:contactsId,
+                        remarks: this.state.remarks,
+                        result: this.state.result,
+                    }
+                }).done(function (data) { 
+                    this.setState({
+                        loading: false
+                    });
+                    if (!data.error.length) {
+                        message.success('保存成功!'); 
+                        this.businessFollowCancel();
+                        this.loadVisit()
+                    } else {
+                        message.warning(data.error[0].message);
+                    }
+                }.bind(this));
+            }
+        });
+	},
+	//进入修改时
+	listFollowUp(e){
+			$.ajax({
+             method: "get",
+             dataType: "json",
+             crossDomain: false,
+             url: globalConfig.context + "/api/admin/customer/toUpdateFollowOneBusiness",
+             data:{
+            	ufbId:e.ufbId
+             },
+             success: function (data) {                	  
+				       let thedata=data.data;
+				    if (!thedata) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };	
+                    thedata = {}; 
+            }; 
+					this.setState({
+						businessGlossoryId:thedata.businessGlossoryId,
+						followSituation:thedata.followSituation,
+						customerStatus:thedata.customerStatus,
+						followTime:thedata.followTime,
+						createTime:thedata.createTime,
+						identifyName:thedata.identifyName,
+						contactType:parseInt(thedata.contactType),
+						result:thedata.result,
+						remarks:thedata.remarks,
+						adminName:thedata.adminName,
+						contacts:thedata.contacts,
+						contactMobile:thedata.contactMobile,
+						ufbId:thedata.ufbId,
+						followId:thedata.followId,
+                    });
+				}.bind(this),
+			}).always(function () {
+			this.getNewWoman(this.state.uids)
+            this.setState({
+            	ufbIds:e.ufbId,
+                loading: false
+            });
+       }.bind(this));   
 	},
 	//新建HTTP获取数据
 	addTime(){
@@ -695,10 +819,11 @@ const MyBusiness = Form.create()(React.createClass({
 					let creatMent=thedata.createTime.substr(10,9);
  				    let createYear=thedata.createTime.substr(0,10);
 					this.setState({	
+						createTime:thedata.createTime,
 						creatMent:creatMent,
 						createYear:createYear,
 						followTime:thedata.followTime,
-	                    adminName: thedata.adminName, 
+	                    adminName: thedata.adminName,
                     });
 				}.bind(this),
 			}).always(function () {
@@ -740,7 +865,7 @@ const MyBusiness = Form.create()(React.createClass({
 		httpChange(e){
 			if(e.length>=2){
 				this.customerList(e); 
-			}	 
+			}	
 		},
 		//选择值时值匹配及联系人函数加载
 		autoChange(e){
@@ -752,7 +877,7 @@ const MyBusiness = Form.create()(React.createClass({
 	                    theType = item.id;
 	                }
 	           });     
-	   		 }	
+	   		}	
 			this.setState({
 				  khId:theType
 			})
@@ -768,10 +893,11 @@ const MyBusiness = Form.create()(React.createClass({
 	                    theType = item.id;
 	                }
 	           });     
-	    }
-			 if(!theType){
-				        return message.warning('当前客户名不存在')
-				     };
+	   		}
+			
+			this.setState({
+				theTypes:theType
+			})
 		},
 		//点击跟进时数据处理
 	    HttpFollowUp(e){
@@ -797,9 +923,12 @@ const MyBusiness = Form.create()(React.createClass({
 						businessGlossoryId:thedata.businessGlossoryId,
 						followSituation:thedata.followSituation,
 						customerStatus:thedata.customerStatus,
+						followTime:thedata.followTime,
 						createTime:thedata.createTime,
-						identifyName:thedata.identifyName,	
-						remarks:thedata.remarks,
+						identifyName:thedata.identifyName,
+						contactType:undefined,
+						result:'',
+						remarks:'',
                     });
 				}.bind(this),
 			}).always(function () {
@@ -856,7 +985,6 @@ const MyBusiness = Form.create()(React.createClass({
 	},
 	//获取拜访详情ajax
 	loadVisit(pageNo) {
-        this.state.data = [];
         this.setState({
             loading: true
         });      
@@ -867,9 +995,9 @@ const MyBusiness = Form.create()(React.createClass({
             url:globalConfig.context + '/api/admin/customer/listFollowHistory',
             data: {
             	pageNo: pageNo || 1,
-                pageSize: this.state.pagination.pageSize,
-                uid: this.state.rowId, //名称1
-                businessGlossoryId:'',
+                pageSize: this.state.paginations.pageSize,
+                uid: this.state.uids, //名称1
+                businessGlossoryId:this.state.businessGlossoryId,
             },
             success: function (data) {            	
                 let theArr = []; 
@@ -886,21 +1014,24 @@ const MyBusiness = Form.create()(React.createClass({
                             identityName:thisdata.identityName, 
                             contacts:thisdata.contacts,
                             contactMobile:thisdata.contactMobile,
-                            result:thisdata.result, 
+                            result:thisdata.result,
+                            ufbId:thisdata.ufbId,
                             adminName:thisdata.adminName,
+                            followSituation:thisdata.followSituation,
+                            customerStatus:thisdata.customerStatus,
                             contactType:thisdata.contactType
                         });
                     };
-                    this.state.pagination.current = data.data.pageNo;
-                    this.state.pagination.total = data.data.totalCount;
+                    this.state.paginations.current = data.data.pageNo;
+                    this.state.paginations.total = data.data.totalCount;
                 };               
                 this.setState({
                     visitArrList: theArr,
-                    pagination: this.state.pagination
+                    paginations: this.state.paginations
                 });
             }.bind(this),
         }).always(function () {
-            this.setState({
+            this.setState({	
                 loading: false
             });
         }.bind(this));
@@ -918,7 +1049,6 @@ const MyBusiness = Form.create()(React.createClass({
     tableRowClick(record, index) { 
         this.state.RowData = record; 
         this.detailsModalOk(record);
-        this.loadVisit();
         this.setState({
         	selectedRowKeys:[],
         	rowId:record.businessId,
@@ -927,13 +1057,10 @@ const MyBusiness = Form.create()(React.createClass({
     followRowClick(record, index) { 
     	console.log(record)
         this.state.RowData = record; 
-        this.addTime();
-        this.getNewWoman(record.khId)
-        this.customerList();
+        this.listFollowUp(record);
         this.setState({
             businessFollowModul: true, 
             selectedRowKeys:[],
-        	rowId:record.businessId,
         });    
     },
     render() {
@@ -1416,92 +1543,147 @@ const MyBusiness = Form.create()(React.createClass({
     			<Modal	
 				      footer=''
 			          title="业务跟进详情"
-			          width='600px'
+			          width='1000px'
 			          visible={this.state.businessFollowModul}
 			          onOk={this.businessFollowOk}
 					  onCancel={this.businessFollowCancel}							          							          
 			        >				    
 					    <div className="clearfix">
-			    			<Form horizontal id="demand-form" onSubmit={this.passworldSubmit} style={{paddingLeft:'30px'}}>
-			    				<Spin spinning={this.state.loading}>
-			    					<div className="clearfix" >
-				    					<FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="意向业务名称" >
-					                        <span>{this.state.a}</span>
-					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="意向时间" >
-					                        <span>{this.state.a1}</span>
-					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="客户名称" >
-					                        <span>{this.state.a}</span>
-					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="营销员" >
-					                        <span>{this.state.a}</span>
-					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="意向业务进度" >
-					                        <span>{this.state.a}</span>
-					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="业务客户状态" >
-					                        <span>{this.state.a}</span>
-					                    </FormItem>
-					                </div>
-				                    <div className="clearfix">
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="业务意向说明" >
-					                        <span>{this.state.a}</span>
-					                    </FormItem>
-			                        </div>
-			                        <div className="clearfix">
-			                        	<div style={{fontSize:'18px'}}>拜访情况</div>
-			                        	<div className="clearfix">
-				                        	<FormItem className="half-item"
+			    			<Form horizontal id="demand-form" onSubmit={this.addlistSubmit}>
+			    			<Spin spinning={this.state.loading}>
+			    			   	<div className="clearfix">
+			    			   		<FormItem className="half-item"
 						                            {...formItemLayout}
-						                            label="拜访方式" >
-						                        <span>{this.state.a}</span>
-						                    </FormItem>
-					                    </div>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="联系人" >
-					                        <span>{this.state.a}</span>
-					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="联系电话" >
-					                        <span>{this.state.a}</span>
+						                             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.identifyName}</span>
+			    			    	</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 }) }}>
+	                                        {
+	                                        customerStatus.map(function (item) {
+	                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
+	                                        })
+	                                        }
+                                        </Select>                                   
+		                   		    </FormItem>
+		                   		    <div className="clearfix">
+			                   		    <FormItem
+					                        labelCol={{ span: 4 }}
+					                        wrapperCol={{ span: 16 }}
+					                        label="业务意向说明" >					                        
+					                        <Input type="textarea" rows={4} placeholder="业务意向说明" value={this.state.remarks}
+	                           				 	onChange={(e) => { this.setState({ remarks: e.target.value }) }}/>					                           
 					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="拜访时间" >
-					                        <span>{this.state.a}</span>
+					                </div>    
+		                   		    <div style={{fontSize:'18px',marginLeft:'30px'}}>拜访情况</div>
+	                   		    	<div className="clearfix">
+				    			   		<FormItem className="half-item"
+				                            labelCol={{ span: 8 }}
+					                        wrapperCol={{ span: 16 }}
+				                            label="拜访方式" >
+				    			   			<Radio.Group value={this.state.contactType} onChange={(e) => {
+											        this.setState({ contactType: e.target.value }) 
+							                    }}>
+							                        <Radio value={0}>外出</Radio>
+							                        <Radio value={1}>电话</Radio>
+							                        <Radio value={2}>QQ</Radio>
+							                        <Radio value={3}>微信</Radio>
+							                        <Radio value={4}>邮箱</Radio>
+							                  </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.contacts}</span>
+		                   		    </FormItem>
+					                <FormItem className="half-item"
+			                            {...formItemLayout}
+			                             label="联系电话"
+			                            >
+					                	<span>{this.state.nub}</span>
+					                </FormItem>
+					                <div className="clearfix">
+						                <FormItem className="half-item"
+				                            {...formItemLayout}
+				                             label="拜访人"
+				                            >
+						                	<span>{this.state.adminName}</span>
+						                </FormItem>
+						                <FormItem className="half-item"
+				                            {...formItemLayout}
+				                            label="拜访时间" >			                                
+				                              <span>{this.state.followTime}</span>
+		            					</FormItem>
+	            					</div>
+					               
+					                <div className="clearfix">
+					                	<FormItem
+					                        labelCol={{ span: 4 }}
+							                wrapperCol={{ span: 16 }}
+					                        label="拜访备注" >
+					                        <Input type="textarea" rows={4} value={this.state.result}  placeholder="来电备注" 
+						                          onChange={(e) => { this.setState({ result: e.target.value }); }}/>   
 					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="拜访人" >
-					                        <span>{this.state.a}</span>
-					                    </FormItem> 
-					                    <div className="clearfix">
-					                    	<FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="拜访备注" >
-					                        	<span>{this.state.a}</span>
-					                    	</FormItem>
-					                    </div>
-			                        </div>
-				                </Spin>
-							</Form>                  
+					                </div>   
+			    			   	</div>
+							    <Button  type="primary" size="large" htmlType="submit" style={{margin:'15px  15px 20px 160px'}}>保存</Button>
+					           	<Button  size="large" onClick={this.businessFollowCancel}>取消</Button>
+					   		</Spin>
+					    </Form> 
 						</div>	                    
     			</Modal>
           </div >

+ 2 - 2
template/template.html

@@ -6,7 +6,7 @@
     <title>
         <%= htmlWebpackPlugin.options.title %>
     </title>
-    <script>
+    <!--<script>
            window.userData = {
                mobile: "13600000000",
                nickname: "Lina",
@@ -24,7 +24,7 @@
                uploadPath: "/data/wwwroot/aft/upload",
                uploadPrivatePath: "/data/upload"
            };
-    </script>
+    </script>-->
 </head>
 
 <body>