liting2017 il y a 7 ans
Parent
commit
167bbb7560

+ 93 - 10
js/component/dataDic.js

@@ -1151,19 +1151,15 @@ module.exports = {
     currentMember:[
         {
             value: '0',
-            key: "普通用户"
+            key: "正常"
         }, {
             value: '1',
-            key: "月付会员"
+            key: "锁定"
         },
         {
             value: '2',
-            key: "年付会员"
+            key: "过期"
         },  
-        {
-            value: '3',
-            key: "已过期"
-        }, 
     ], 
     //会员等级
     lvl:[
@@ -1228,10 +1224,10 @@ module.exports = {
     statuslist:[
         {
             value: '0',
-            key: "有效"
+            key: "正常"
         }, {
             value: '1',
-            key: "失效"
+            key: "注销"
         },
         {
             value: '2',
@@ -1258,5 +1254,92 @@ module.exports = {
             value: "4",
             key: "邮件"
         },
-    ]
+    ],
+    //行业
+    industry:[
+        {
+            value: "1",
+            key: "采掘"
+        },
+        {
+            value: "2",
+            key: "化工"
+        },
+        {
+            value: "3",
+            key: "钢铁"
+        }, {
+            value: "4",
+            key: "建筑材料"
+        },
+        {
+            value: "5",
+            key: "建筑装饰"
+        },
+         {
+            value: "6",
+            key: "电气设备"
+        },{
+            value: "7",
+            key: "机械设备"
+        },
+         {
+            value: "8",
+            key: "国防军工"
+        },{
+            value: "9",
+            key: "汽车"
+        },
+         {
+            value: "10",
+            key: "家用电器"
+        },{
+            value: "11",
+            key: "纺织服装"
+        },
+        {
+            value: "12",
+            key: "轻工制造"
+        }, {
+            value: "13",
+            key: "商业贸易"
+        },
+        {
+            value: "14",
+            key: "农林牧渔"
+        },
+        {
+            value: "15",
+            key: "食品饮料"
+        }, {
+            value: "16",
+            key: "休闲服务"
+        },
+        {
+            value: "17",
+            key: "医药生物"
+        },
+         {
+            value: "18",
+            key: "公用事业"
+        },{
+            value: "19",
+            key: "交通运输"
+        },
+         {
+            value: "20",
+            key: "房地产"
+        },{
+            value: "21",
+            key: "电子"
+        },
+         {
+            value: "22",
+            key: "计算机"
+        },{
+            value: "23",
+            key: "传媒"
+        }
+        
+    ],   
 };

+ 169 - 127
js/component/manageCenter/customer/customerData/companyCustomer.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,industryList,newFollow,lvl,currentMember,cityArr, statuslist,customerStatus,intentionalService,sex} from '../../../dataDic.js';
-import {getIndustryType,getSocialAttribute,getCompanyIntention,getContactType,getStatuslist,getfllowSituation,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
+import {socialAttribute,industry,newFollow,lvl,currentMember,cityArr, statuslist,customerStatus,intentionalService,sex} from '../../../dataDic.js';
+import {getIndustry,getSocialAttribute,getCompanyIntention,getContactType,getStatuslist,getfllowSituation,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
 
 //图片组件
 const PicturesWall = React.createClass({
@@ -65,36 +65,41 @@ const PicturesWall = React.createClass({
 });
 
 const PublicCustomer = Form.create()(React.createClass({	
-    loadData(pageNo, apiUrl) {
+    loadData(pageNo) {
         this.state.data = [];
         this.setState({
             loading: true
-        });      
+        });  
         $.ajax({
             method: "post",
             dataType: "json",
-            crossDomain: false,          
-            url:globalConfig.context + '/api/admin/customer/listPrivateOrganizationCustomer',
+            crossDomain: false,         
+            url:globalConfig.context + '/api/admin/customer/listAllOrganizationCustomer',
             data: { 				
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,               
                 type: this.state.typeSearch, //名称1   
                 name:this.state.nameSearch,
-                province:this.state.addressSearch?this.state.addressSearch[0]:this.state.provinceSearch,  
-                city: this.state.addressSearch?this.state.addressSearch[1]:'',
+                shareType:this.state.shareTypeSearch,
+                province:(this.state.addressSearch).length?this.state.addressSearch[0]:this.state.provinceSearch,  
+                city: (this.state.addressSearch).length?this.state.addressSearch[1]:'',
                 //area: this.state.addressSearch?this.state.addressSearch[2].value:'',
                 status:this.state.statusSearch,
                 industry:this.state.industrySearch,
                 serviceCertification:this.state.serviceCertificationSearch,
 			    userCertification: this.state.userCertificationSearch,
               	currentMemberStatus:this.state.currentMemberStatusSearch,
+              	international:this.state.internationalSearch,
 				lvl:this.state.lvlSearch,
+				international:this.state.internationalSearch,
+				societyTag:this.state.societyTagSearch,
 				listed:this.state.listedSearch,  //是否上市
 				highTechZone:this.state.highTechZoneSearch, //是否高新
 				startDate: this.state.releaseDate[0],
                 endDate: this.state.releaseDate[1],                
             },
-            success: function (data) {            	
+            success: function (data) { 
+            	console.log(data)
                 let theArr = []; 
                 if (data.error.length || data.data.list=="") {
                     if (data.error && data.error.length) {
@@ -116,6 +121,9 @@ const PublicCustomer = Form.create()(React.createClass({
                             serviceCertification:thisdata.serviceCertification,
                             userCertification:thisdata.userCertification, 
                             lvl:thisdata.lvl,
+                            
+                            shareType:thisdata.shareType,
+                            societyTag:thisdata.societyTag,
                             currentMemberStatus:thisdata.currentMemberStatus,
                             international:thisdata.international,
                             listed:thisdata.listed,
@@ -123,9 +131,9 @@ const PublicCustomer = Form.create()(React.createClass({
                             locationProvince:thisdata.province?thisdata.province+'-'+thisdata.city||''+'-'+thisdata.area :'--'                       						                
                         });
                     };
-                    this.state.pagination.current = data.data.pageNo;
-                    this.state.pagination.total = data.data.totalCount;
-                };               
+                }; 
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination
@@ -167,6 +175,7 @@ const PublicCustomer = Form.create()(React.createClass({
 	},	
     getInitialState() {
         return { 
+        	addressSearch:[],
         	orgCodeUrl:[],
             companyLogoUrl:[],
         	visible: false ,
@@ -232,7 +241,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'businessGlossoryId',
 					  key: 'businessGlossoryId',
 					  render: (text, record, index) => {
-	                  return  adminData.name=="管理员"?<Select  placeholder="选择业务名称" disabled={record.id?true:false} value={record.businessGlossoryId}  onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
+	                  return  adminData.isSuperAdmin?<Select  placeholder="选择业务名称" disabled={record.id?true:false} value={record.businessGlossoryId}  onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
                                     {
                                         intentionalService.map(function (item) {
                                             return <Select.Option key={item.value} >{item.key}</Select.Option>
@@ -246,7 +255,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'followSituation',
 					  key: 'followSituation',
 					  render: (text, record, index) => {
-	                  return  adminData.name=="管理员"?<Select  placeholder="选择最新进度" value={record.followSituation}  onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
+	                  return  adminData.isSuperAdmin?<Select  placeholder="选择最新进度" value={record.followSituation}  onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
                                     {
                                         newFollow.map(function (item) {
                                             return <Select.Option key={item.value} >{item.key}</Select.Option>
@@ -259,7 +268,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'customerStatus',
 					  key: 'customerStatus',
 					  render: (text, record, index) => {
-	                  return  adminData.name=="管理员"?<Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
+	                  return  adminData.isSuperAdmin?<Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
                                     {
                                         customerStatus.map(function (item) {
                                             return <Select.Option key={item.value} >{item.key}</Select.Option>
@@ -272,7 +281,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'remarks',
 					  key: 'remarks',
 					  render: (text, record, index) => {
-					  return adminData.name=="管理员"?<Input value={record.remarks} placeholder="跟进说明" 
+					  return adminData.isSuperAdmin?<Input value={record.remarks} placeholder="跟进说明" 
 	                             onChange={(e) => { record.remarks = e.target.value; this.setState({ data: this.state.data }); }}
 	                             style={{width:'120px'}}/>:<span>{text}</span>
 	                    }
@@ -281,7 +290,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'rrr',
 					  key: 'rrr',
 					   render: (text, record, index) => {                    	
-                        return <div style={{display:adminData.name=="管理员"?'inline-block':'none'}}>
+                        return <div style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
                             <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record)}} okText="删除" cancelText="不删除">
 							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
 							</Popconfirm>
@@ -370,8 +379,8 @@ const PublicCustomer = Form.create()(React.createClass({
 					  key: 'followTime'	 
 				},{
 					  title: '客户名称',
-					  dataIndex: 'identityName',
-					  key: 'identityName'	 
+					  dataIndex: 'identifyName',
+					  key: 'identifyName'	 
 				},{
 					  title: '拜访方式',
 					  dataIndex: 'contactType',
@@ -399,7 +408,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'ttt',
 					  key: 'ttt',
 					  render: (text, record, index) => {                    	
-                        return adminData.name=="管理员"?<div>
+                        return adminData.isSuperAdmin?<div>
                             <Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
 							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
 							</Popconfirm>
@@ -413,7 +422,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'name',
 					  key: 'name',	
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.name} placeholder="姓名" key={record.id} required="required"
+	                  return adminData.isSuperAdmin?<Input value={record.name} placeholder="姓名" key={record.id} required="required"
 	                           onChange={(e) => { record.name = e.target.value; 
 	                           	this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	                  }
@@ -422,7 +431,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'depatrment',
 					  key: 'depatrment',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.depatrment} placeholder="联系人部门" key={record.id}
+	                  return adminData.isSuperAdmin?<Input value={record.depatrment} placeholder="联系人部门" key={record.id}
 	                   onChange={(e) => { record.depatrment = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	            }
 				},{
@@ -430,7 +439,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'position',
 					  key: 'position',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.position} placeholder="联系人职务" key={record.id}
+	                  return adminData.isSuperAdmin?<Input value={record.position} placeholder="联系人职务" key={record.id}
 	                  onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	            }
 				},{
@@ -438,7 +447,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'mobile',
 					  key: 'mobile',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.mobile} placeholder="手机号码" key={record.id} required="required"
+	                  return adminData.isSuperAdmin?<Input value={record.mobile} placeholder="手机号码" key={record.id} required="required"
 	                  onChange={(e) => { record.mobile = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	            }
 				},{
@@ -446,7 +455,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'wechat',
 					  key: 'wechat',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.wechat} placeholder="微信" key={record.id}
+	                  return adminData.isSuperAdmin?<Input value={record.wechat} placeholder="微信" key={record.id}
 	                  onChange={(e) => { record.wechat = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	            }
 				},{
@@ -454,7 +463,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'qq',
 					  key: 'qq',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.qq} placeholder="联系人QQ" key={record.id}
+	                  return adminData.isSuperAdmin?<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'}}/>:<span>{text}</span>
 	            }
 				},{
@@ -462,7 +471,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'email',
 					  key: 'email',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.email} placeholder="电子邮箱" key={record.id}
+	                  return adminData.isSuperAdmin?<Input value={record.email} placeholder="电子邮箱" key={record.id}
 	                  onChange={(e) => { record.email = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	              	}
 				},
@@ -471,7 +480,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  dataIndex: 'dels',
 					  key: 'dels',
 					  render: (text, record, index) => {                    	
-                        return adminData.name=="管理员"?<div>
+                        return adminData.isSuperAdmin?<div>
                             <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
 							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
 							</Popconfirm>
@@ -505,10 +514,16 @@ const PublicCustomer = Form.create()(React.createClass({
                     key: 'industry',
                 },
                  {
+                    title: '社会性质',
+                    dataIndex: 'societyTag',
+                    key: 'societyTag',
+                    render: text => { return getSocialAttribute(text) }
+                },
+                 {
                     title: '公共客户',
-                    dataIndex: 'type',
-                    key: 'type',
-                    render: text => { return getWhether(text) }
+                    dataIndex: 'shareType',
+                    key: 'shareType',
+                    render: (text ,record)=> { return record.shareType=='1'?<span>公共客户</span>:<span>个人客户</span> }
                  
                 },
                 {
@@ -563,7 +578,7 @@ const PublicCustomer = Form.create()(React.createClass({
                     dataIndex: 'abc',
                     key: 'abc',
                     render: (text, record, index) => {                    	
-                        return record.publics?<div>
+                        return record.shareType=='1'?<div>
                                <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                                 onClick={(e)=>{this.changeRow(record)}}>领取<Icon /></Button>  
                         </div>:<span>无权限</span>
@@ -661,7 +676,7 @@ const PublicCustomer = Form.create()(React.createClass({
 			        	 contacts:thedata.contacts,
 			        	 uid:thedata.uid,
 			        	 data:listArr,
-			        	 identityName:thedata.identityName,
+			        	 identifyName:thedata.identifyName,
 			        	 followTime:thedata.followTime,
 			        	 businessGlossoryId:thedata.businessGlossoryId,
 			        	 followSituation:thedata.followSituation,
@@ -753,7 +768,7 @@ const PublicCustomer = Form.create()(React.createClass({
 			        	 nub:thedata.contactMobile,
 			        	 result:thedata.result,
 			        	 contactType:parseInt(thedata.contactType),
-			        	 identityName:thedata.identityName,
+			        	 identifyName:thedata.identifyName,
 			        	 followTime:thedata.followTime,
 			        	 businessGlossoryId:thedata.businessGlossoryId,
 			        	 followSituation:thedata.followSituation,
@@ -770,14 +785,15 @@ const PublicCustomer = Form.create()(React.createClass({
    	
     //列表删除功能
     delectRow() {
-        let deletedIds;              
+         let deletedIds;              
         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
             let rowItem = this.state.selectedRows[idx];                          
             if (rowItem.id) {
                 deletedIds=rowItem.id;                    
             };            
-        };         
-        this.setState({        	
+        }; 
+        this.setState({  
+        	loading:true,
             selectedRowKeys: [],            
         });       
         $.ajax({
@@ -786,7 +802,7 @@ const PublicCustomer = Form.create()(React.createClass({
             crossDomain: false,           
             url: globalConfig.context + "/api/admin/customer/deleteCustomer",
             data: {
-                id: deletedIds,//删除的ID    
+                uid: deletedIds,//删除的ID    
             }
         }).done(function (data) {
             if (!data.error.length) {
@@ -916,10 +932,9 @@ const PublicCustomer = Form.create()(React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,           
-            url: globalConfig.context + "/api/admin/customer/transferToPublic",  
+            url: globalConfig.context + "/api/admin/customer/receiveCustomer",  
             data: {
-                id: uids.uid,
-				AdminName:uids.adminName,
+                uid: uids.uid,
             }
 		        }).done(function (data) {
 		            if (!data.error.length) {
@@ -950,11 +965,11 @@ const PublicCustomer = Form.create()(React.createClass({
         });                
          //行业
         let intentionalArr = [];
-        industryList.map(function (item) {
+        industry.map(function (item) {
             intentionalArr.push(
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
-        });   
+        });    
         //会员等级
 		let lvlArr = [];
         lvl.map(function (item) {
@@ -969,24 +984,18 @@ const PublicCustomer = Form.create()(React.createClass({
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
         });
-        //客户状态
-        let customerStatusArr = [];
-        customerStatus.map(function (item) {
-            customerStatusArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });
         this.state.Provinces = Province;
         this.state.intentionalOption = intentionalArr;
         this.state.lvlArrOption = lvlArr;
         this.state.currentMemberArrOption = currentMemberArr;
-        this.state.customerStatusArrOption = customerStatusArr;
         this.loadData();        
     },		
     search() {
         this.loadData();
     },
     reset() {
+    	this.state.internationalSearch=undefined;
+    	this.state.shareTypeSearch=undefined;
     	this.state.typeSearch=undefined; //名称1   
         this.state.nameSearch=''; 
         this.state.addressSearch=[];
@@ -1001,6 +1010,7 @@ const PublicCustomer = Form.create()(React.createClass({
       	this.state.currentMemberStatusSearch=undefined;
 	    this.state.lvlSearch=undefined;
 	    this.state.listedSearch=undefined;
+	    this.state.societyTagSearch=undefined;
 	    this.state.highTechZoneSearch=undefined;
 	    this.state.releaseDate[0]=undefined;
         this.state.releaseDate[1]=undefined;
@@ -1076,7 +1086,7 @@ const PublicCustomer = Form.create()(React.createClass({
                         uid: this.state.InformationUid,
                         societyTag:values.societyTag,
                         introduction:values.introduction,
-                        unitName:this.state.unitName,
+                        identifyName:this.state.identifyName,
                         industry:this.state.industry,
                         locationProvince:(this.state.ProvinceCity)[0],//省-
                         locationCity:(this.state.ProvinceCity)[1],//市
@@ -1143,7 +1153,7 @@ const PublicCustomer = Form.create()(React.createClass({
                 this.setState({
                 	InformationId:thisData.id,
                 	InformationUid:thisData.uid,
-                	unitName:thisData.unitName,
+                	identifyName:thisData.identifyName,
                 	listed:thisData.listed,
                 	highTechZone:thisData.highTechZone,
                 	orgCodeUrl: thisData.orgCodeUrl ? splitUrl(thisData.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],
@@ -1420,13 +1430,42 @@ const PublicCustomer = Form.create()(React.createClass({
 	},
 	//点击新增详情
 	newContacts(){
-		this.setState({ 
+		this.setState({
+			uids:this.state.uid,
 	    	addcontactModul:true
-	    });
+	   });
 	},
 	//新增联系人保存函数
-	submitcontactman(e){
-		e.preventDafault();
+	submitcontactman(){
+		this.setState({
+			loading:true
+		})
+		$.ajax({
+                method: "post",
+                dataType: "json",
+                crossDomain: false,
+                url: globalConfig.context + "/api/admin/customer/addOneContact",
+                data:{
+                   uid:this.state.uids,
+                   name:this.state.newname,
+                   mobile:this.state.newmobile,
+                   email:this.state.newemail,
+                   wechat:this.state.newwechat,
+                   depatrment:this.state.newdepatrment,
+                   position:this.state.newposition, 
+                   sex:this.state.newsex,
+                   qq:this.state.newqq
+                },
+                success: function (data) {                	  
+                		if (!data.error.length) {
+			                this.setState({
+			                    loading: false,
+			                })
+		            } else {
+		                message.warning(data.error[0].message);
+		            };
+		        }.bind(this)
+		     });
 	},
 	//获取联系人下拉框
 	getNewWoman(ids) {  
@@ -1580,7 +1619,7 @@ const PublicCustomer = Form.create()(React.createClass({
                         theArr.push({
                             followId:thisdata.followId,
                             followTime:thisdata.followTime,
-                            identityName:thisdata.identityName, 
+                            identifyName:thisdata.identifyName, 
                             contacts:thisdata.contacts,
                             contactMobile:thisdata.contactMobile,
                             result:thisdata.result,
@@ -1633,7 +1672,7 @@ const PublicCustomer = Form.create()(React.createClass({
                         theArr.push({
                             followId:thisdata.followId,
                             followTime:thisdata.followTime,
-                            identityName:thisdata.identityName, 
+                            identifyName:thisdata.identifyName, 
                             contacts:thisdata.contacts,
                             contactMobile:thisdata.contactMobile,
                             result:thisdata.result,
@@ -1850,6 +1889,7 @@ const PublicCustomer = Form.create()(React.createClass({
             this.state.data = {};
             this.state.companyLogoUrl = [];
             this.state.orgCodeUrl = [];
+            this.loadData(null);
            
         };
     },
@@ -1906,7 +1946,7 @@ const PublicCustomer = Form.create()(React.createClass({
                     <span>我的客户</span>
                 </div>
                 <div className="user-search">                    
-                    <Input placeholder="公司名称"
+                    <Input placeholder="客户名称"
                         value={this.state.nameSearch}
                         onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />    
                     <Select placeholder="省"
@@ -1919,9 +1959,17 @@ const PublicCustomer = Form.create()(React.createClass({
 	                     <Cascader options={citySelect()}  value={this.state.addressSearch} placeholder="选择城市"
     						onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />	                 
                     </span>
+                     <span style={{marginRight:'10px'}}>客户类型:</span>
+	                        <Select placeholder="选择客户类型"
+	                            style={{ width: 100 }}
+	                            value={this.state.shareTypeSearch}
+	                            onChange={(e) => { this.setState({ shareTypeSearch: e }) }}>
+	                            <Select.Option value="" >所有客户</Select.Option>
+	                            <Select.Option value="1" >公共客户</Select.Option>
+	                        </Select>
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>                                         				
-					<Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px',display:adminData.name=="管理员"?'inline-block':'none'}}
+					<Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px',display:adminData.isSuperAdmin?'inline-block':'none'}}
 	                        disabled={!hasSelected}
 	                        onClick={this.delectRow}>删除<Icon type="minus" />
 	                </Button>			
@@ -1932,11 +1980,12 @@ const PublicCustomer = Form.create()(React.createClass({
 		                        value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
 		                        this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
 		                        onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />  
-	                        <Select placeholder="户状态"
+	                        <Select placeholder="户状态"
 	                            style={{ width: 100 }}
 	                            value={this.state.statusSearch}
 	                            onChange={(e) => { this.setState({ statusSearch: e }) }}>
-	                            {this.state.customerStatusArrOption}
+	                            <Select.Option value="0" >正常</Select.Option>
+	                            <Select.Option value="2" >锁定</Select.Option>
 	                        </Select>
 	                        <Select placeholder="行业"
 	                            style={{ width: 100 }}
@@ -1989,14 +2038,23 @@ const PublicCustomer = Form.create()(React.createClass({
 	                            value={this.state.lvlSearch}
 	                            onChange={(e) => { this.setState({ lvlSearch: e }) }}>
 	                            {this.state.lvlArrOption}
-	                        </Select>
-	                         
+	                        </Select> 
 	                        <Select placeholder="会员状态"
 	                            style={{ width: 100 }}
 	                            value={this.state.currentMemberStatusSearch}
 	                            onChange={(e) => { this.setState({ currentMemberStatusSearch: e }) }}>
 	                            {this.state.currentMemberArrOption}
 	                        </Select>
+	                        <Select placeholder="社会性质"
+	                            style={{ width: 100 }}
+	                            value={this.state.societyTagSearch}
+	                            onChange={(e) => { this.setState({ societyTagSearch: e }) }}>
+                                    {
+                                        socialAttribute.map(function (item) {
+                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
+                                        })
+                                    }
+	                        </Select>
 			            </div>  
 		            </div>
                 </div>                                               
@@ -2021,7 +2079,7 @@ const PublicCustomer = Form.create()(React.createClass({
 			        >				    
 					     <Tabs defaultActiveKey="1" onChange={this.callback}>
 						    <TabPane tab="基本信息" key="1">
-						        {adminData.name=="管理员"?<Form horizontal onSubmit={this.newSubmit} id="demand-form">
+						        {adminData.isSuperAdmin?<Form horizontal onSubmit={this.newSubmit} id="demand-form">
 					                <Spin spinning={this.state.loading}>
 						               	<div className="clearfix" style={{paddingLeft:'60px'}}>
 					                    	<FormItem className="half-item"
@@ -2029,7 +2087,7 @@ const PublicCustomer = Form.create()(React.createClass({
 							                    wrapperCol={{ span: 18 }}
 							                    label="客户名称"
 						                        >
-						                        <span>{theInformation.unitName}</span>
+						                        <span>{theInformation.identifyName}</span>
 						                    </FormItem>
 					                    </div>
 					                   <div className="clearfix" style={{paddingLeft:'60px'}}>
@@ -2044,7 +2102,7 @@ const PublicCustomer = Form.create()(React.createClass({
 				                                 })(
 												    <Select placeholder="选择行业" >
 				                                      {
-				                                        industryList.map(function (item) {
+				                                        industry.map(function (item) {
 				                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
 				                                        })
 				                                      }
@@ -2267,7 +2325,7 @@ const PublicCustomer = Form.create()(React.createClass({
 							                    wrapperCol={{ span: 18 }}
 							                    label="客户名称"
 						                        >
-						                        <span>{theInformation.unitName}</span>
+						                        <span>{theInformation.identifyName}</span>
 						                    </FormItem>
 					                    </div>
 					                    <div className="clearfix" style={{paddingLeft:'60px'}}>
@@ -2276,7 +2334,7 @@ const PublicCustomer = Form.create()(React.createClass({
 						                         wrapperCol={{ span: 18 }}
 						                        label="行业"
 						                         > 
-				                             <span>{getIndustryType(String(theInformation.industry))}</span>     
+				                             <span>{getIndustry(String(theInformation.industry))}</span>     
 					                   		 </FormItem>
 					                   		 <FormItem className="half-item" 
 						                           labelCol={{ span: 4 }}
@@ -2442,7 +2500,7 @@ const PublicCustomer = Form.create()(React.createClass({
 							</TabPane>
 						    <TabPane tab="联系人信息" key="2">
 						        <div className="clearfix" >
-						            <Button className="ContactsList" type="primary" onClick={this.addcontact} style={{display:adminData.name=="管理员"?'inline-block':'none'}}>新增</Button> 
+						            <Button className="ContactsList" type="primary" onClick={this.addcontact} style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>新增</Button> 
 						        </div>
 						       <div className="clearfix">
                     			  <Spin spinning={this.state.loading}>
@@ -2452,7 +2510,7 @@ const PublicCustomer = Form.create()(React.createClass({
 						            	 columns={this.state.ContactsLists} 
 						            	 dataSource={this.state.contactList}
 						            	 />
-					            	    <div className="clearfix" style={{display:adminData.name=="管理员"?'inline-block':'none'}}>
+					            	    <div className="clearfix" style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
 								                <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>
@@ -2468,19 +2526,19 @@ const PublicCustomer = Form.create()(React.createClass({
 						    					<FormItem className="half-item"
 							                            {...formItemLayout}
 							                            label="注册手机号" >
-							                        {adminData.name=="管理员"?<div><Input value={this.state.mobile}  onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
+							                        {adminData.isSuperAdmin?<div><Input value={this.state.mobile}  onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
 							                    	 <Button onClick={this.modifyPassworld}>修改密码</Button></div>:<span>{this.state.mobile}</span>}
 							                    </FormItem>
 							                    <FormItem className="half-item"
 							                            {...formItemLayout}
 							                            label="注册用户名" >
-							                         {adminData.name=="管理员"?<Input value={this.state.nickname} 
+							                         {adminData.isSuperAdmin?<Input value={this.state.nickname} 
 							                           onChange={(e) => { this.setState({ nickname: e.target.value }); }} />:<span>{this.state.nickname}</span>}
 							                    </FormItem>
 							                    <FormItem className="half-item"
 							                            {...formItemLayout}
 							                            label="注册邮箱" >
-							                         {adminData.name=="管理员"?<Input value={this.state.email} 
+							                         {adminData.isSuperAdmin?<Input value={this.state.email} 
 							                          onChange={(e) => { this.setState({ email: e.target.value }); }} />:<span>{this.state.nickname}</span>}
 							                    </FormItem>
 							                    </div>
@@ -2503,7 +2561,7 @@ const PublicCustomer = Form.create()(React.createClass({
 						                           {...formItemLayout}
 						                           label="账户状态"
 						                         > 
-												    {adminData.name=="管理员"?<Select placeholder="账户状态" value={this.state.status}  onChange={(e) => { this.setState({ status: e }); }} >
+												    {adminData.isSuperAdmin?<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>
@@ -2516,7 +2574,7 @@ const PublicCustomer = Form.create()(React.createClass({
 										                {...formItemLayout}
 								                        label="会员"
 										            > 
-								                   		 {adminData.name=="管理员"?<Radio.Group value={this.state.isMember} onChange={(e) => {
+								                   		 {adminData.isSuperAdmin?<Radio.Group value={this.state.isMember} onChange={(e) => {
 										                        this.setState({ isMember:  e.target.value })
 										                    }}>
 										                        <Radio value={0}>否</Radio>
@@ -2527,7 +2585,7 @@ const PublicCustomer = Form.create()(React.createClass({
 								                          {...formItemLayout}
 								                           label="会员等级"
 								                         > 
-													    {adminData.name=="管理员"?<Select placeholder="客户状态" value={this.state.lvl}  onChange={(e) => { this.setState({ lvl: e }); }} >
+													    {adminData.isSuperAdmin?<Select placeholder="客户状态" value={this.state.lvl}  onChange={(e) => { this.setState({ lvl: e }); }} >
 					                                     {
 					                                        lvl.map(function (item) {
 					                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
@@ -2539,7 +2597,7 @@ const PublicCustomer = Form.create()(React.createClass({
 							                           {...formItemLayout}
 							                           label="会员状态"
 							                         > 
-													    {adminData.name=="管理员"?<Select placeholder="会员状态" value={this.state.currentMemberStatus}  onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
+													    {adminData.isSuperAdmin?<Select placeholder="会员状态" value={this.state.currentMemberStatus}  onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
 					                                    {
 					                                        currentMember.map(function (item) {
 					                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
@@ -2552,7 +2610,7 @@ const PublicCustomer = Form.create()(React.createClass({
 						                   			 {...formItemLayout}
 							                           label="业务认证"
 						                   		>
-							                   		 {adminData.name=="管理员"?<Radio.Group value={this.state.serviceCertification} onChange={(e) => {
+							                   		 {adminData.isSuperAdmin?<Radio.Group value={this.state.serviceCertification} onChange={(e) => {
 									                        this.setState({ serviceCertification:  e.target.value })
 									                    }}>
 									                        <Radio value={0}>未认证</Radio>
@@ -2563,14 +2621,14 @@ const PublicCustomer = Form.create()(React.createClass({
 									            	{...formItemLayout}
 							                        label="实名认证"
 									            >
-							                   		 {adminData.name=="管理员"?<Radio.Group value={this.state.userCertification} onChange={(e) => {
+							                   		 {adminData.isSuperAdmin?<Radio.Group value={this.state.userCertification} onChange={(e) => {
 									                        this.setState({ userCertification: e.target.value })
 									                    }}>
 									                        <Radio value={0}>未认证</Radio>
 									                        <Radio value={1}>已认证</Radio>
 									                  </Radio.Group>:<span>{this.state.isMember?'是':'否'}</span>}
 									            </FormItem>
-									            <div className="clearfix" style={{display:adminData.name=="管理员"?'inline-block':'none'}}>
+									            <div className="clearfix" style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
 									                <Button className='saveBtn' type="primary" htmlType="submit">保存</Button>  
 					                                <Button  type="ghost" onClick={this.detailsModal}>取消</Button>
 									            </div>
@@ -2625,7 +2683,7 @@ const PublicCustomer = Form.create()(React.createClass({
 					  onCancel={this.visitCancel}							          							          
 			        >				    
 					    <Form horizontal id="demand-form" onSubmit={this.visitSubmit}>
-			    			{adminData.name=="管理员"?<Spin spinning={this.state.loading}>
+			    			{adminData.isSuperAdmin?<Spin spinning={this.state.loading}>
 			    			   	<div className="clearfix">
 			    			   		<FormItem className="half-item"
 			                            {...formItemLayout}
@@ -2650,7 +2708,7 @@ const PublicCustomer = Form.create()(React.createClass({
 				                            {...formItemLayout}
 				                             label="客户名称"
 				                             >
-						                   <span>{this.state.identityName}</span>
+						                   <span>{this.state.identifyName}</span>
 						                </FormItem>
 						                <FormItem className="half-item"
 				                            {...formItemLayout}
@@ -2726,7 +2784,7 @@ const PublicCustomer = Form.create()(React.createClass({
 				                            {...formItemLayout}
 				                             label="客户名称"
 				                             >
-						                   <span>{this.state.identityName}</span>
+						                   <span>{this.state.identifyName}</span>
 						                </FormItem>
 						                <FormItem className="half-item"
 				                            {...formItemLayout}
@@ -2826,76 +2884,60 @@ const PublicCustomer = Form.create()(React.createClass({
 				        <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
 					      <Spin spinning={this.state.loading}> 											             
 					        <Row>	
-								<FormItem
-		                        labelCol={{ span: 4 }}
-		                        wrapperCol={{ span: 14 }}
-		                        label="是否是主要联系人:"  style={{marginRight:'10px'}}>
-		                        <Radio.Group value={this.state.hotst} onChange={(e) => {
-				                    this.setState({ hotst: e.target.value }) 
-				                    }}>
-				                        <Radio value={0}>是</Radio>
-				                        <Radio value={1}>否</Radio>
-			                    </Radio.Group>
-		                    	</FormItem>	
 			                    <FormItem 
-			                        labelCol={{ span: 4 }}
+			                        labelCol={{ span: 3 }}
 			                        wrapperCol={{ span: 14 }}
 			                        label="性别:"  style={{marginRight:'10px',marginTop: '-15px'}}>
-			                        <Radio.Group value={this.state.hott} onChange={(e) => {
-					                    this.setState({ hott: e.target.value }) 
+			                        <Radio.Group value={this.state.newsex} onChange={(e) => {
+					                    this.setState({ newsex: e.target.value }) 
 					                    }}>
-					                        <Radio value={0}>男</Radio>
-					                        <Radio value={1}>女</Radio>
+					                        <Radio value='男'>男</Radio>
+					                        <Radio value='女'>女</Radio>
 				                    </Radio.Group>
 			                    </FormItem>	
 							</Row>								               
 					        <Row style={{ paddingLeft:'50px' }}>
-		                        <Col span={2}>姓名:</Col>
+		                        <Col span={2}><span style={{color:'red'}}>*</span>姓名:</Col>
                                 <Col span={8}>
-                                    <Input value={this.state.paymentIdt} required="required"
-                                        onChange={(e) => { this.setState({ paymentIdt: e.target.value }) }} />
+                                    <Input value={this.state.newname} required="required"
+                                        onChange={(e) => { this.setState({ newname: e.target.value }) }} />
                                 </Col>
-                                <Col span={2} style={{ marginLeft: '50px' }}>QQ号:</Col>
+                                <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>手机:</Col>
                                 <Col span={8}>
-                                    <Input value={this.state.entIdt}
-                                        onChange={(e) => { this.setState({ entIdt: e.target.value }) }} />
+                                    <Input value={this.state.newmobile} required="required"
+                                        onChange={(e) => { this.setState({ newmobile: e.target.value }) }} />
                                 </Col>
+                                
                             </Row>
 		                    <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
-		                        <Col span={2}>手机号:</Col>
-                                <Col span={8}>
-                                    <Input value={this.state.payt} required="required"
-                                        onChange={(e) => { this.setState({ payt: e.target.value }) }} />
+                                <Col span={2}>微信:</Col>
+                                	<Col span={8}>
+                                    <Input value={this.state.newwechat}
+                                        onChange={(e) => { this.setState({ newwechat: e.target.value }) }} />
                                 </Col>
-                                <Col span={2} style={{ marginLeft: '50px' }}>座机号:</Col>
+                                <Col span={2} style={{ marginLeft: '50px' }}>Q Q:</Col>
                                 <Col span={8}>
-                                    <Input value={this.state.paymt}
-                                        onChange={(e) => { this.setState({ paymt: e.target.value }) }} />
+                                    <Input value={this.state.newqq}
+                                        onChange={(e) => { this.setState({ newqq: e.target.value }) }} />
                                 </Col>
                             </Row>
-
                             <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
                         		<Col span={2}>部门:</Col>
                         		<Col span={8}>
-                           		 	<Input value={this.state.paytIdtt}
-                               		 onChange={(e) => { this.setState({ paytIdtt: e.target.value }) }} />
+                           		 	<Input value={this.state.newdepatrment}
+                               		 onChange={(e) => { this.setState({ newdepatrment: e.target.value }) }} />
                                 </Col>
                                 <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
                                 <Col span={8}>
-                                    <Input value={this.state.paentIdt}
-                                        onChange={(e) => { this.setState({ paentIdt: e.target.value }) }} />
+                                    <Input value={this.state.newposition}
+                                        onChange={(e) => { this.setState({ newposition: e.target.value }) }} />
                                 </Col>
                             </Row>	
                             <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>						                       
-                                 <Col span={2}>微信号:</Col>
-                                	<Col span={8}>
-                                    <Input value={this.state.payIdt}
-                                        onChange={(e) => { this.setState({ payIdt: e.target.value }) }} />
-                                </Col>
-                                <Col span={2} style={{ marginLeft: '50px' }}>邮箱:</Col>
+                                <Col span={2}>邮箱:</Col>
                                 <Col span={8}>
-                                    <Input value={this.state.emailst}
-                                        onChange={(e) => { this.setState({ emailst: e.target.value }) }} />
+                                    <Input value={this.state.newemail}
+                                        onChange={(e) => { this.setState({ newemail: e.target.value }) }} />
                                 </Col>
                             </Row>
                             <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>

+ 248 - 126
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,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';
+import {socialAttribute,industry,newFollow,lvl,currentMember,cityArr, statuslist,customerStatus,intentionalService,sex} from '../../../dataDic.js';
+import {getCompanyIntention,getIndustry,getStatuslist,getContactType,getSocialAttribute,getfllowSituation,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
 
 //图片组件
 const PicturesWall = React.createClass({
@@ -69,7 +69,10 @@ const MyClient = Form.create()(React.createClass({
         this.state.data = [];
         this.setState({
             loading: true
-        });      
+        }); 
+        
+        console.log(this.state.addressSearch)
+        console.log(this.state.provinceSearch)
         $.ajax({
             method: "post",
             dataType: "json",
@@ -80,15 +83,18 @@ const MyClient = Form.create()(React.createClass({
                 pageSize: this.state.pagination.pageSize,               
                 type: this.state.typeSearch, //名称1   
                 name:this.state.nameSearch,
-                province:this.state.addressSearch?this.state.addressSearch[0]:this.state.provinceSearch,  
-                city: this.state.addressSearch?this.state.addressSearch[1]:'',
+                province:!(this.state.addressSearch).length?this.state.provinceSearch:this.state.addressSearch[0],  
+                city: !(this.state.addressSearch).length?'':this.state.addressSearch[1],
                 //area: this.state.addressSearch?this.state.addressSearch[2].value:'',
                 status:this.state.statusSearch,
                 industry:this.state.industrySearch,
                 serviceCertification:this.state.serviceCertificationSearch,
 			    userCertification: this.state.userCertificationSearch,
+			    international:this.state.internationalSearch,
               	currentMemberStatus:this.state.currentMemberStatusSearch,
 				lvl:this.state.lvlSearch,
+				isMember:this.state.isMemberSearch,
+				societyTag:this.state.societyTagSearch,
 				listed:this.state.listedSearch,  //是否上市
 				highTechZone:this.state.highTechZoneSearch, //是否高新
 				startDate: this.state.releaseDate[0],
@@ -116,16 +122,19 @@ const MyClient = Form.create()(React.createClass({
                             serviceCertification:thisdata.serviceCertification,
                             userCertification:thisdata.userCertification, 
                             lvl:thisdata.lvl,
+                            isMember:thisdata.isMember,
+                            status:thisdata.status,
+                            societyTag:thisdata.societyTag,
                             currentMemberStatus:thisdata.currentMemberStatus,
                             international:thisdata.international,
                             listed:thisdata.listed,
                             highTechZone:thisdata.highTechZone,
                             locationProvince:thisdata.province?thisdata.province+'-'+thisdata.city||''+'-'+thisdata.area :'--'                       						                
                         });
-                    };
-                    this.state.pagination.current = data.data.pageNo;
-                    this.state.pagination.total = data.data.totalCount;
-                };               
+                    };    
+                }; 
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination
@@ -167,6 +176,7 @@ const MyClient = Form.create()(React.createClass({
 	},	
     getInitialState() {
         return { 
+        	addressSearch:[],
         	orgCodeUrl:[],
             companyLogoUrl:[],
         	visible: false ,
@@ -282,7 +292,7 @@ const MyClient = Form.create()(React.createClass({
 					  key: 'rrr',
 					   render: (text, record, index) => {                    	
                         return <div>
-                            <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record)}} okText="删除" cancelText="不删除">
+                            <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record,index)}} okText="删除" cancelText="不删除">
 							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
 							</Popconfirm>
                         </div>
@@ -370,8 +380,8 @@ const MyClient = Form.create()(React.createClass({
 					  key: 'followTime'	 
 				},{
 					  title: '客户名称',
-					  dataIndex: 'identityName',
-					  key: 'identityName'	 
+					  dataIndex: 'identifyName',
+					  key: 'identifyName'	 
 				},{
 					  title: '拜访方式',
 					  dataIndex: 'contactType',
@@ -518,7 +528,12 @@ const MyClient = Form.create()(React.createClass({
                     title: '行业',
                     dataIndex: 'industry',
                     key: 'industry',
-                  //render: text => { return getcustomerStatue(text) }
+                },
+                {
+                    title: '社会性质',
+                    dataIndex: 'societyTag',
+                    key: 'societyTag',
+                    render: text => { return getSocialAttribute(text) }
                 },
                 {
                     title: '创建时间',
@@ -567,7 +582,12 @@ const MyClient = Form.create()(React.createClass({
                     key: 'currentMemberStatus',
                     render:text => {return getCurrentMember(text)}
                 },
-                
+                {
+                    title: '账户状态',
+                    dataIndex: 'status',
+                    key: 'status',
+                    render:text => {return getStatuslist(text)}
+                },
                 {
                     title: '操作',
                     dataIndex: 'abc',
@@ -670,7 +690,7 @@ const MyClient = Form.create()(React.createClass({
 			        	 contacts:thedata.contacts,
 			        	 uid:thedata.uid,
 			        	 data:listArr,
-			        	 identityName:thedata.identityName,
+			        	 identifyName:thedata.identifyName,
 			        	 followTime:thedata.followTime,
 			        	 businessGlossoryId:thedata.businessGlossoryId,
 			        	 followSituation:thedata.followSituation,
@@ -701,13 +721,16 @@ const MyClient = Form.create()(React.createClass({
     	
 	//拜访记录删除
 	visitDelet(e){
+			this.setState({
+				loading:true
+			});
 			$.ajax({
 	            method: "get",
 	            dataType: "json",
 	            crossDomain: false,           
-	            url: globalConfig.context + "/api/admin/customer/deleteCustomer",
+	            url: globalConfig.context + "/api/admin/customer/deleteFollow",
 	            data: {
-	                id: e.followId,//删除的ID    
+	                followId: e.followId,//删除的ID    
 	            }
 	        }).done(function (data) {
 	            if (!data.error.length) {
@@ -762,7 +785,7 @@ const MyClient = Form.create()(React.createClass({
 			        	 nub:thedata.contactMobile,
 			        	 result:thedata.result,
 			        	 contactType:parseInt(thedata.contactType),
-			        	 identityName:thedata.identityName,
+			        	 identifyName:thedata.identifyName,
 			        	 followTime:thedata.followTime,
 			        	 businessGlossoryId:thedata.businessGlossoryId,
 			        	 followSituation:thedata.followSituation,
@@ -776,7 +799,41 @@ const MyClient = Form.create()(React.createClass({
 	            });
 	       }.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));
+    },
     //列表删除功能
     delectRow() {
         let deletedIds;              
@@ -785,8 +842,9 @@ const MyClient = Form.create()(React.createClass({
             if (rowItem.id) {
                 deletedIds=rowItem.id;                    
             };            
-        };         
-        this.setState({        	
+        }; 
+        this.setState({ 
+        	loading:true,
             selectedRowKeys: [],            
         });       
         $.ajax({
@@ -795,7 +853,7 @@ const MyClient = Form.create()(React.createClass({
             crossDomain: false,           
             url: globalConfig.context + "/api/admin/customer/deleteCustomer",
             data: {
-                id: deletedIds,//删除的ID    
+                uid: deletedIds,//删除的ID    
             }
         }).done(function (data) {
             if (!data.error.length) {
@@ -816,7 +874,7 @@ const MyClient = Form.create()(React.createClass({
     getCompanyLogoUrl(e) {
         this.setState({ companyLogoUrl: e });
     },
-    componentWillMount() {       
+    componentWillMount(){       
         //城市
         let Province = [];
         provinceList.map(function (item) {
@@ -827,7 +885,7 @@ const MyClient = Form.create()(React.createClass({
         });                
          //行业
         let intentionalArr = [];
-        industryList.map(function (item) {
+        industry.map(function (item) {
             intentionalArr.push(
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
@@ -846,18 +904,11 @@ const MyClient = Form.create()(React.createClass({
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
         });
-        //客户状态
-        let customerStatusArr = [];
-        customerStatus.map(function (item) {
-            customerStatusArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });
         this.state.Provinces = Province;
         this.state.intentionalOption = intentionalArr;
         this.state.lvlArrOption = lvlArr;
         this.state.currentMemberArrOption = currentMemberArr;
-        this.state.customerStatusArrOption = customerStatusArr;
+     
         this.loadData();        
     },
  		
@@ -882,6 +933,8 @@ const MyClient = Form.create()(React.createClass({
         this.loadData();
     },
     reset() {
+    	this.state.isMemberSearch=undefined;
+    	this.state.internationalSearch=undefined;
     	this.state.typeSearch=undefined; //名称1   
         this.state.nameSearch=''; 
         this.state.addressSearch=[];
@@ -899,6 +952,7 @@ const MyClient = Form.create()(React.createClass({
 	    this.state.highTechZoneSearch=undefined;
 	    this.state.releaseDate[0]=undefined;
         this.state.releaseDate[1]=undefined;
+        this.state.societyTagSearch=undefined;
         this.loadData(); 
     },
     searchSwitch() {
@@ -1016,7 +1070,10 @@ const MyClient = Form.create()(React.createClass({
     //点击整行查看详情
     //查看基本详情基本信息
     loadInformation(record){    	
-    	this.RowClick;    
+    	this.RowClick; 
+    	this.setState({
+    		dataInformation:[]
+    	})
     	$.ajax({
             method: "get",
             dataType: "json",
@@ -1034,7 +1091,6 @@ const MyClient = Form.create()(React.createClass({
                     thisData = {};
                 }; 
                 let ProvinceCityArr=[];
-                
                 let ProvinceS=thisData.locationProvince;  //getprovince
                 let citys=thisData.locationCity;
                 let Areas=thisData.locationArea;
@@ -1049,11 +1105,11 @@ const MyClient = Form.create()(React.createClass({
                 	companyLogoUrl: thisData.companyLogoUrl ? splitUrl(thisData.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],
                 	dataInformation:thisData,
                 	ProvinceCity:ProvinceCityArr,
-                	industry:String(thisData.industry)=='null'?undefined:String(thisData.industry),
+                	industry:thisData.industry?thisData.industry.toString():'',
                 });    
             }.bind(this),
         }).always(function () {
-            this.setState({            	
+            this.setState({
                 loading: false
             });
         }.bind(this));       
@@ -1311,13 +1367,44 @@ const MyClient = Form.create()(React.createClass({
 	},
 	//点击新增详情
 	newContacts(){
-		this.setState({ 
+		this.setState({
+			uids:this.state.uid,
 	    	addcontactModul:true
-	    });
+	   });
 	},
 	//新增联系人保存函数
-	submitcontactman(e){
-		e.preventDefault();
+	submitcontactman(){
+		this.setState({
+			loading:true
+		})
+		$.ajax({
+                method: "post",
+                dataType: "json",
+                crossDomain: false,
+                url: globalConfig.context + "/api/admin/customer/addOneContact",
+                data:{
+                   uid:this.state.uids,
+                   name:this.state.newname,
+                   mobile:this.state.newmobile,
+                   email:this.state.newemail,
+                   wechat:this.state.newwechat,
+                   depatrment:this.state.newdepatrment,
+                   position:this.state.newposition, 
+                   sex:this.state.newsex,
+                   qq:this.state.newqq
+                },
+                success: function (data) {                	  
+                		if (!data.error.length) {
+                			this.addcontactModulOK()
+                			this.getNewWoman(this.state.uids)
+			                this.setState({
+			                    loading: false,
+			                })
+		            } else {
+		                message.warning(data.error[0].message);
+		            };
+		        }.bind(this)
+		     });
 	},
 	//获取联系人下拉框
 	getNewWoman(ids) {  
@@ -1369,34 +1456,40 @@ const MyClient = Form.create()(React.createClass({
 		console.log(e)
 	},
 	//拜访意向服务列表单个删除
-	intentionDelet(e){
-		
-		let detId=!this.state.keys?this.state.followIds:this.state.uid;
-		if(e.id||e.followId){
+	intentionDelet(e,index){
+		if(!this.state.keys){
+			let detId=this.state.followIds;
+			if(e.id){
+				this.setState({
+		       	  selectedRowKeys: [],
+		        });
+		        $.ajax({
+		            method: "get",
+		            dataType: "json",
+		            crossDomain: false,           
+		            url: globalConfig.context + "/api/admin/customer/deleteFollowOneBusiness",  
+		            data: {
+		                ufbId:e.id
+		            }
+			        }).done(function (data) {
+			            if (!data.error.length) {
+			                message.success('删除成功');
+			                this.setState({
+			                    loading: false,
+			                });
+			            } else {
+			                message.warning(data.error[0].message);
+			            };
+			          this.visitModify(detId);
+			        }.bind(this));
+		    }else{
+		        this.visitModify(detId);
+		        }
+		}else{
+			let deteluserBusinessList=(this.state.data).splice(index,1)
 			this.setState({
 	       	  selectedRowKeys: [],
 	        });
-	        $.ajax({
-	            method: "get",
-	            dataType: "json",
-	            crossDomain: false,           
-	            url: globalConfig.context + "/api/admin/customer/transferToPublic",  
-	            data: {
-	                id: e.id||e.followId
-	            }
-		        }).done(function (data) {
-		            if (!data.error.length) {
-		                message.success('删除成功');
-		                this.setState({
-		                    loading: false,
-		                });
-		            } else {
-		                message.warning(data.error[0].message);
-		            };
-		          !this.state.keys?this.visitModify(detId):this.deletelist(detId);
-		        }.bind(this));
-		}else{
-			!this.state.keys?this.visitModify(detId):this.deletelist(detId);
 		}
 	},
 	
@@ -1471,7 +1564,7 @@ const MyClient = Form.create()(React.createClass({
                         theArr.push({
                             followId:thisdata.followId,
                             followTime:thisdata.followTime,
-                            identityName:thisdata.identityName, 
+                            identifyName:thisdata.identifyName, 
                             contacts:thisdata.contacts,
                             contactMobile:thisdata.contactMobile,
                             result:thisdata.result,
@@ -1524,7 +1617,7 @@ const MyClient = Form.create()(React.createClass({
                         theArr.push({
                             followId:thisdata.followId,
                             followTime:thisdata.followTime,
-                            identityName:thisdata.identityName, 
+                            identifyName:thisdata.identifyName, 
                             contacts:thisdata.contacts,
                             contactMobile:thisdata.contactMobile,
                             result:thisdata.result,
@@ -1678,7 +1771,32 @@ const MyClient = Form.create()(React.createClass({
 
     //tab2删除
     confirmDelet(e){
-    	console.log(e)
+    	this.setState({
+				loading:true
+		});
+		if(e.id){
+			$.ajax({
+	            method: "get",
+	            dataType: "json",
+	            crossDomain: false,           
+	            url: globalConfig.context + "/api/admin/customer/deleteOneContact",
+	            data: {
+	                ocbId: e.id,//删除的ID    
+	            }
+	        }).done(function (data) {
+	            if (!data.error.length) {
+	                message.success('删除成功!');
+	                this.setState({
+	                    loading: false,
+	                });
+	            } else {
+	                message.warning(data.error[0].message);
+	            };
+	            this.contactLists(this.state.rowId);
+	        }.bind(this));
+        }else{
+        	this.contactLists(this.state.rowId);
+        }
     },
 
     //tab5业务意向
@@ -1779,8 +1897,7 @@ const MyClient = Form.create()(React.createClass({
     	  const formItemLayout = {
             labelCol: { span: 8 },
             wrapperCol: { span: 14 },
-        };
-        //const theDatak = this.state.datak || {};
+       };
         const theInformation=this.state.dataInformation || {}
       	const contactsOption="";    	        	
         const formItemLayput = {
@@ -1794,7 +1911,7 @@ const MyClient = Form.create()(React.createClass({
                     <span>我的客户</span>
                 </div>
                 <div className="user-search">                    
-                    <Input placeholder="公司名称"
+                    <Input placeholder="客户名称"
                         value={this.state.nameSearch}
                         onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />    
                     <Select placeholder="省"
@@ -1831,13 +1948,17 @@ const MyClient = Form.create()(React.createClass({
                                 message.error(`${info.file.name} 文件上传失败。`);
                             };
                         }} >
-                        <Button>上传批量内容</Button>
+                        <Button disabled>上传批量内容</Button>
                     </Upload>                        
-										
-					<Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
-	                        disabled={!hasSelected} 
-	                        onClick={this.delectRow}>删除<Icon type="minus" />
-	                </Button>	
+	                <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
+							     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
+	                       			 disabled={!hasSelected} 
+	                       		 >删除<Icon type="minus" />
+	                        </Button>
+	                </Popconfirm> 
+	                <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                        disabled={!hasSelected}
+                        onClick={this.changeRow}>转为公共客户<Icon /></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'}}>
@@ -1846,11 +1967,12 @@ const MyClient = Form.create()(React.createClass({
 		                        value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
 		                        this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
 		                        onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />    
-	                        <Select placeholder="户状态"
+	                        <Select placeholder="户状态"
 	                            style={{ width: 100 }}
 	                            value={this.state.statusSearch}
 	                            onChange={(e) => { this.setState({ statusSearch: e }) }}>
-	                            {this.state.customerStatusArrOption}
+	                            <Select.Option value="0" >正常</Select.Option>
+	                            <Select.Option value="2" >锁定</Select.Option>
 	                        </Select>
 	                        <Select placeholder="行业"
 	                            style={{ width: 100 }}
@@ -1898,19 +2020,35 @@ const MyClient = Form.create()(React.createClass({
 	                            <Select.Option value="1" >是</Select.Option>
 	                        </Select>
 	                        <span>会员:</span>
+	                        <Select placeholder="是否会员"
+	                            style={{ width: 100 }}
+	                            value={this.state.isMemberSearch}
+	                            onChange={(e) => { this.setState({ isMemberSearch: e }) }}>
+	                            <Select.Option value="0" >否</Select.Option>
+	                            <Select.Option value="1" >是</Select.Option>
+	                        </Select>
 	                        <Select placeholder="会员等级"
 	                            style={{ width: 100 }}
 	                            value={this.state.lvlSearch}
 	                            onChange={(e) => { this.setState({ lvlSearch: e }) }}>
 	                            {this.state.lvlArrOption}
-	                        </Select>
-	                         
+	                        </Select>  
 	                        <Select placeholder="会员状态"
 	                            style={{ width: 100 }}
 	                            value={this.state.currentMemberStatusSearch}
 	                            onChange={(e) => { this.setState({ currentMemberStatusSearch: e }) }}>
 	                            {this.state.currentMemberArrOption}
 	                        </Select>
+	                        <Select placeholder="社会性质"
+	                            style={{ width: 100 }}
+	                            value={this.state.societyTagSearch}
+	                            onChange={(e) => { this.setState({ societyTagSearch: e }) }}>
+                                    {
+                                        socialAttribute.map(function (item) {
+                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
+                                        })
+                                    }
+	                        </Select>
 			            </div>  
 		            </div>
                 </div>                                               
@@ -1964,7 +2102,7 @@ const MyClient = Form.create()(React.createClass({
 				                                 })(
 												    <Select placeholder="选择行业" >
 				                                      {
-				                                        industryList.map(function (item) {
+				                                        industry.map(function (item) {
 				                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
 				                                        })
 				                                      }
@@ -1992,7 +2130,7 @@ const MyClient = Form.create()(React.createClass({
 					                         <FormItem className="half-item" 
 					                           labelCol={{ span: 4 }}
 					                           wrapperCol={{ span: 18 }}
-					                           label="省-市-区"
+					                           label="*省-市-区"
 					                          > 
 					                            <Cascader options={areaSelect()}  value={this.state.ProvinceCity} placeholder="选择城市(必填项)"
     												onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />                
@@ -2389,7 +2527,7 @@ const MyClient = Form.create()(React.createClass({
 				                            {...formItemLayout}
 				                             label="客户名称"
 				                             >
-						                   <span>{this.state.identityName}</span>
+						                   <span>{this.state.identifyName}</span>
 						                </FormItem>
 						                <FormItem className="half-item"
 				                            {...formItemLayout}
@@ -2505,76 +2643,60 @@ const MyClient = Form.create()(React.createClass({
 				        <Form horizontal onSubmit={this.submitcontactman} id="demand-form">
 					      <Spin spinning={this.state.loading}> 											             
 					        <Row>	
-								<FormItem
-		                        labelCol={{ span: 4 }}
-		                        wrapperCol={{ span: 14 }}
-		                        label="是否是主要联系人:"  style={{marginRight:'10px'}}>
-		                        <Radio.Group value={this.state.hotst} onChange={(e) => {
-				                    this.setState({ hotst: e.target.value }) 
-				                    }}>
-				                        <Radio value={0}>是</Radio>
-				                        <Radio value={1}>否</Radio>
-			                    </Radio.Group>
-		                    	</FormItem>	
 			                    <FormItem 
-			                        labelCol={{ span: 4 }}
+			                        labelCol={{ span: 3 }}
 			                        wrapperCol={{ span: 14 }}
 			                        label="性别:"  style={{marginRight:'10px',marginTop: '-15px'}}>
-			                        <Radio.Group value={this.state.hott} onChange={(e) => {
-					                    this.setState({ hott: e.target.value }) 
+			                        <Radio.Group value={this.state.newsex} onChange={(e) => {
+					                    this.setState({ newsex: e.target.value }) 
 					                    }}>
-					                        <Radio value={0}>男</Radio>
-					                        <Radio value={1}>女</Radio>
+					                        <Radio value='男'>男</Radio>
+					                        <Radio value='女'>女</Radio>
 				                    </Radio.Group>
 			                    </FormItem>	
 							</Row>								               
 					        <Row style={{ paddingLeft:'50px' }}>
-		                        <Col span={2}>姓名:</Col>
+		                        <Col span={2}><span style={{color:'red'}}>*</span>姓名:</Col>
                                 <Col span={8}>
-                                    <Input value={this.state.paymentIdt} required="required"
-                                        onChange={(e) => { this.setState({ paymentIdt: e.target.value }) }} />
+                                    <Input value={this.state.newname} required="required"
+                                        onChange={(e) => { this.setState({ newname: e.target.value }) }} />
                                 </Col>
-                                <Col span={2} style={{ marginLeft: '50px' }}>QQ号:</Col>
+                                <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>手机:</Col>
                                 <Col span={8}>
-                                    <Input value={this.state.entIdt}
-                                        onChange={(e) => { this.setState({ entIdt: e.target.value }) }} />
+                                    <Input value={this.state.newmobile} required="required"
+                                        onChange={(e) => { this.setState({ newmobile: e.target.value }) }} />
                                 </Col>
+                                
                             </Row>
 		                    <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
-		                        <Col span={2}>手机号:</Col>
-                                <Col span={8}>
-                                    <Input value={this.state.payt} required="required"
-                                        onChange={(e) => { this.setState({ payt: e.target.value }) }} />
+                                <Col span={2}>微信:</Col>
+                                	<Col span={8}>
+                                    <Input value={this.state.newwechat}
+                                        onChange={(e) => { this.setState({ newwechat: e.target.value }) }} />
                                 </Col>
-                                <Col span={2} style={{ marginLeft: '50px' }}>座机号:</Col>
+                                <Col span={2} style={{ marginLeft: '50px' }}>Q Q:</Col>
                                 <Col span={8}>
-                                    <Input value={this.state.paymt}
-                                        onChange={(e) => { this.setState({ paymt: e.target.value }) }} />
+                                    <Input value={this.state.newqq}
+                                        onChange={(e) => { this.setState({ newqq: e.target.value }) }} />
                                 </Col>
                             </Row>
-
                             <Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
                         		<Col span={2}>部门:</Col>
                         		<Col span={8}>
-                           		 	<Input value={this.state.paytIdtt}
-                               		 onChange={(e) => { this.setState({ paytIdtt: e.target.value }) }} />
+                           		 	<Input value={this.state.newdepatrment}
+                               		 onChange={(e) => { this.setState({ newdepatrment: e.target.value }) }} />
                                 </Col>
                                 <Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
                                 <Col span={8}>
-                                    <Input value={this.state.paentIdt}
-                                        onChange={(e) => { this.setState({ paentIdt: e.target.value }) }} />
+                                    <Input value={this.state.newposition}
+                                        onChange={(e) => { this.setState({ newposition: e.target.value }) }} />
                                 </Col>
                             </Row>	
                             <Row style={{ marginTop: '20px',paddingLeft:'50px' }}>						                       
-                                 <Col span={2}>微信号:</Col>
-                                	<Col span={8}>
-                                    <Input value={this.state.payIdt}
-                                        onChange={(e) => { this.setState({ payIdt: e.target.value }) }} />
-                                </Col>
-                                <Col span={2} style={{ marginLeft: '50px' }}>邮箱:</Col>
+                                <Col span={2}>邮箱:</Col>
                                 <Col span={8}>
-                                    <Input value={this.state.emailst}
-                                        onChange={(e) => { this.setState({ emailst: e.target.value }) }} />
+                                    <Input value={this.state.newemail}
+                                        onChange={(e) => { this.setState({ newemail: e.target.value }) }} />
                                 </Col>
                             </Row>
                             <Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>

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

@@ -39,7 +39,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     data: {
                         name: values.name, 
                         contacts:values.content,
-                        contactMobile: values.telnum,
+                        contactMobile:values.telnum,
                         societyTag:values.societyTagt,
                         type:'1'
                     }

+ 92 - 54
js/component/manageCenter/customer/customerService/myBusiness.jsx

@@ -50,13 +50,15 @@ const MyBusiness = Form.create()(React.createClass({
                             identifyName:thisdata.identifyName,
                             followSituation:thisdata.followSituation,
                             customerStatus:thisdata.customerStatus,
+                            customerStatust:thisdata.customerStatus,
                             adminName:thisdata.adminName,
                    			createTime:thisdata.createTime			                
                         });
                     };
-                    this.state.pagination.current = data.data.pageNo;
-                    this.state.pagination.total = data.data.totalCount;
-                };               
+                   
+                };
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination
@@ -176,8 +178,8 @@ const MyBusiness = Form.create()(React.createClass({
  					render: (text, record, index) => {                    	
                         return <div>
                             <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>
+							        <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
+							</Popconfirm>
                         </div>
                     }
                 } 
@@ -218,8 +220,10 @@ const MyBusiness = Form.create()(React.createClass({
                     key: 'abc',
                     render: (text, record, index) => {                    	
                         return <div>
-                        	<Button onClick={(e) =>{ e.stopPropagation(), this.addModify(record); }} type="primary" style={{marginRight:'10px'}}>跟进</Button> 
-                            <Button onClick={(e) =>{ e.stopPropagation(), this.followStop(record) }} type="primary">停止</Button>
+                        	<Button onClick={(e) =>{ e.stopPropagation(), this.addModify(record); }} type="primary" style={{marginRight:'10px',}} disabled={record.customerStatust=='6'?true:false}>跟进</Button> 
+                            <Popconfirm title="是否停止?" onConfirm={(e)=>{this.followStop(record)}} okText="停止" cancelText="不停止">
+							    <Button type="primary" style={{marginRight:'10px'}} onClick={(e) =>{ e.stopPropagation()}} disabled={record.customerStatust=='6'?true:false}>停止</Button>
+							</Popconfirm>
                         </div>
                     }
                 } 
@@ -229,8 +233,30 @@ const MyBusiness = Form.create()(React.createClass({
         };
     },
     //删除跟进记录
-    intentionDelet(e){
-    	console.log(e)
+    intentionDelet(uids){
+    	 this.setState({
+	       		loading:true
+	        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,           
+            url: globalConfig.context + "/api/admin/customer/deleteFollowOneBusiness",
+            data: {
+                ufbId: uids.ufbId,//删除的ID    
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('删除成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadVisit();
+            this.loadData();
+        }.bind(this));
     },
     //更多操作
     ModalOperation(){
@@ -238,23 +264,16 @@ const MyBusiness = Form.create()(React.createClass({
         visible: true,
       });
     },      
-    //拜访
-    visit(e){  
-    	this.setState({
-    		visitModul:true
-    	})
-    	console.log(e)           	
-    },
-   	
+ 
     //列表删除功能
     delectRow() {
-        let deletedIds;              
+    	let deletedIds;              
         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
             let rowItem = this.state.selectedRows[idx];                          
-            if (rowItem.id) {
-                deletedIds=rowItem.id;                    
+            if (rowItem.businessId) {
+                deletedIds=rowItem.businessId;                    
             };            
-        };         
+        }; 
         this.setState({        	
             selectedRowKeys: [],            
         });       
@@ -262,9 +281,9 @@ const MyBusiness = Form.create()(React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,           
-            url: globalConfig.context + "/api/admin/customer/deleteCustomer",
+            url: globalConfig.context + "/api/admin/customer/deleteBusiness",
             data: {
-                id: deletedIds,//删除的ID    
+                businessId: deletedIds,//删除的ID    
             }
         }).done(function (data) {
             if (!data.error.length) {
@@ -276,9 +295,33 @@ const MyBusiness = Form.create()(React.createClass({
                 message.warning(data.error[0].message);
             };
             this.loadData();
-        }.bind(this));
+        }.bind(this));  
+    },
+    //停止跟进
+    followStop(uids) {
+	        this.setState({
+	       		loading:true
+	        });
+	        $.ajax({
+	            method: "get",
+	            dataType: "json",
+	            crossDomain: false,           
+	            url: globalConfig.context + "/api/admin/customer/stopBusiness",
+	            data: {
+	                businessId: uids.businessId,//删除的ID    
+	            }
+	        }).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 });
     },
@@ -292,16 +335,8 @@ const MyBusiness = Form.create()(React.createClass({
             intentionalArr.push(
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
-        });   
-        //客户状态
-        let customerStatusArr = [];
-        customerStatus.map(function (item) {
-            customerStatusArr.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });
+        });    
         this.state.intentionalOption = intentionalArr;
-        this.state.customerStatusArrOption = customerStatusArr;
         this.loadData();        
     },
  	//新建	
@@ -898,7 +933,7 @@ const MyBusiness = Form.create()(React.createClass({
                         theArr.push({
                             followId:thisdata.followId,
                             followTime:thisdata.followTime,
-                            identityName:thisdata.identityName, 
+                            identifyName:thisdata.identifyName, 
                             contacts:thisdata.contacts,
                             contactMobile:thisdata.contactMobile,
                             result:thisdata.result,
@@ -1020,13 +1055,15 @@ const MyBusiness = Form.create()(React.createClass({
                     </Select>
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button> 
-                    <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
-	                        disabled={!hasSelected} 
-	                        onClick={this.delectRow}>删除<Icon type="minus" />
-	               </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'}}>
+	                <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
+					     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
+                   			 disabled={!hasSelected} 
+                    		 >删除<Icon type="minus" />
+           			     </Button>
+					</Popconfirm>
+	                <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
 		                        value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
@@ -1036,7 +1073,8 @@ const MyBusiness = Form.create()(React.createClass({
 	                            style={{ width: 150 }}
 	                            value={this.state.customerStatusS}
 	                            onChange={(e) => { this.setState({ customerStatusS: e }) }}>
-	                            {this.state.customerStatusArrOption}
+	                            <Select.Option value="0" >正常</Select.Option>
+	                            <Select.Option value="2" >锁定</Select.Option>
 	                        </Select>
 	                        <Select placeholder="业务进度"
 	                            style={{ width: 150 }}
@@ -1313,17 +1351,17 @@ const MyBusiness = Form.create()(React.createClass({
 	                                        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>
-				                  	</div>
+                                  </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>
+				                </div>
 			                    <Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'160px',marginBottom:'30px'}}>保存</Button>  
 		                        <Button className="set-submit" type="ghost" onClick={this.detailsModal}>取消</Button>
 		                  </div>	

+ 6 - 6
js/component/manageCenter/customer/customerService/serviceQuery.jsx

@@ -19,7 +19,7 @@ const ServiceQuery= Form.create()(React.createClass({
             method: "post",
             dataType: "json",
             crossDomain: false,          
-            url:globalConfig.context + '/api/admin/customer/listBusiness',
+            url:globalConfig.context + '/api/admin/customer/listAllBusiness',
             data: { 				
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,               
@@ -29,7 +29,7 @@ const ServiceQuery= Form.create()(React.createClass({
                 customerStatus:this.state.customerStatusS,
 			    adminName: this.state.adminNameS,
 				startDate: this.state.releaseDate[0],
-                endDate: this.state.releaseDate[1],                
+                endDate: this.state.releaseDate[1],   
             },
             success: function (data) {            	
                 let theArr = []; 
@@ -52,9 +52,9 @@ const ServiceQuery= Form.create()(React.createClass({
                    			createTime:thisdata.createTime			                
                         });
                     };
-                    this.state.pagination.current = data.data.pageNo;
-                    this.state.pagination.total = data.data.totalCount;
-                };               
+                }; 
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination
@@ -372,7 +372,7 @@ const ServiceQuery= Form.create()(React.createClass({
                         theArr.push({
                             followId:thisdata.followId,
                             followTime:thisdata.followTime,
-                            identityName:thisdata.identityName, 
+                            identifyName:thisdata.identifyName, 
                             contacts:thisdata.contacts,
                             contactMobile:thisdata.contactMobile,
                             result:thisdata.result,

+ 11 - 11
js/component/manageCenter/customer/individualCustomer/individualCustomer.jsx

@@ -122,10 +122,10 @@ const IndividualCustomer = Form.create()(React.createClass({
                             highTechZone:thisdata.highTechZone,
                             locationProvince:thisdata.province?thisdata.province+'-'+thisdata.city||''+'-'+thisdata.area :'--'                       						                
                         });
-                    };
-                    this.state.pagination.current = data.data.pageNo;
-                    this.state.pagination.total = data.data.totalCount;
-                };               
+                    };  
+                }; 
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination
@@ -371,8 +371,8 @@ const IndividualCustomer = Form.create()(React.createClass({
 					  key: 'followTime'	 
 				},{
 					  title: '客户姓名',
-					  dataIndex: 'identityName',
-					  key: 'identityName'	 
+					  dataIndex: 'identifyName',
+					  key: 'identifyName'	 
 				},{
 					  title: '拜访方式',
 					  dataIndex: 'contactType',
@@ -682,7 +682,7 @@ const IndividualCustomer = Form.create()(React.createClass({
 			        	 contacts:thedata.contacts,
 			        	 uid:thedata.uid,
 			        	 data:listArr,
-			        	 identityName:thedata.identityName,
+			        	 identifyName:thedata.identifyName,
 			        	 followTime:thedata.followTime,
 			        	 businessGlossoryId:thedata.businessGlossoryId,
 			        	 followSituation:thedata.followSituation,
@@ -774,7 +774,7 @@ const IndividualCustomer = Form.create()(React.createClass({
 			        	 nub:thedata.contactMobile,
 			        	 result:thedata.result,
 			        	 contactType:parseInt(thedata.contactType),
-			        	 identityName:thedata.identityName,
+			        	 identifyName:thedata.identifyName,
 			        	 followTime:thedata.followTime,
 			        	 businessGlossoryId:thedata.businessGlossoryId,
 			        	 followSituation:thedata.followSituation,
@@ -1663,7 +1663,7 @@ const IndividualCustomer = Form.create()(React.createClass({
                         theArr.push({
                             followId:thisdata.followId,
                             followTime:thisdata.followTime,
-                            identityName:thisdata.identityName, 
+                            identifyName:thisdata.identifyName, 
                             contacts:thisdata.contacts,
                             contactMobile:thisdata.contactMobile,
                             result:thisdata.result,
@@ -1717,7 +1717,7 @@ const IndividualCustomer = Form.create()(React.createClass({
                         theArr.push({
                             followId:thisdata.followId,
                             followTime:thisdata.followTime,
-                            identityName:thisdata.identityName, 
+                            identifyName:thisdata.identifyName, 
                             contacts:thisdata.contacts,
                             contactMobile:thisdata.contactMobile,
                             result:thisdata.result,
@@ -2620,7 +2620,7 @@ const IndividualCustomer = Form.create()(React.createClass({
 				                            {...formItemLayout}
 				                             label="客户姓名"
 				                             >
-						                   <span>{this.state.identityName}</span>
+						                   <span>{this.state.identifyName}</span>
 						                </FormItem>
 						                <FormItem className="half-item"
 				                            {...formItemLayout}

+ 31 - 31
js/component/manageCenter/customer/individualCustomer/queryCustomer.jsx

@@ -123,9 +123,9 @@ const QueryCustomer = Form.create()(React.createClass({
                             locationProvince:thisdata.province?thisdata.province+'-'+thisdata.city||''+'-'+thisdata.area :'--'                       						                
                         });
                     };
-                    this.state.pagination.current = data.data.pageNo;
-                    this.state.pagination.total = data.data.totalCount;
-                };               
+                };
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
                 this.setState({
                     dataSource: theArr,
                     pagination: this.state.pagination
@@ -233,7 +233,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'businessGlossoryId',
 					  key: 'businessGlossoryId',
 					  render: (text, record, index) => {
-	                  return  adminData.name=="管理员"?<Select  placeholder="选择业务名称" disabled={record.id?true:false} value={record.businessGlossoryId}  onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
+	                  return  adminData.isSuperAdmin?<Select  placeholder="选择业务名称" disabled={record.id?true:false} value={record.businessGlossoryId}  onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
                                     {
                                         intentionalService.map(function (item) {
                                             return <Select.Option key={item.value} >{item.key}</Select.Option>
@@ -247,7 +247,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'followSituation',
 					  key: 'followSituation',
 					  render: (text, record, index) => {
-	                  return  adminData.name=="管理员"?<Select  placeholder="选择最新进度" value={record.followSituation}  onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
+	                  return  adminData.isSuperAdmin?<Select  placeholder="选择最新进度" value={record.followSituation}  onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
                                     {
                                         newFollow.map(function (item) {
                                             return <Select.Option key={item.value} >{item.key}</Select.Option>
@@ -260,7 +260,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'customerStatus',
 					  key: 'customerStatus',
 					  render: (text, record, index) => {
-	                  return  adminData.name=="管理员"?<Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
+	                  return  adminData.isSuperAdmin?<Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
                                     {
                                         customerStatus.map(function (item) {
                                             return <Select.Option key={item.value} >{item.key}</Select.Option>
@@ -273,7 +273,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'remarks',
 					  key: 'remarks',
 					  render: (text, record, index) => {
-					  return adminData.name=="管理员"?<Input value={record.remarks} placeholder="跟进说明" 
+					  return adminData.isSuperAdmin?<Input value={record.remarks} placeholder="跟进说明" 
 	                             onChange={(e) => { record.remarks = e.target.value; this.setState({ data: this.state.data }); }}
 	                             style={{width:'120px'}}/>:<span>{text}</span>
 	                    }
@@ -282,7 +282,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'rrr',
 					  key: 'rrr',
 					   render: (text, record, index) => {                    	
-                        return <div style={{display:adminData.name=="管理员"?'inline-block':'none'}}>
+                        return <div style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
                             <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record)}} okText="删除" cancelText="不删除">
 							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
 							</Popconfirm>
@@ -371,8 +371,8 @@ const QueryCustomer = Form.create()(React.createClass({
 					  key: 'followTime'	 
 				},{
 					  title: '客户姓名',
-					  dataIndex: 'identityName',
-					  key: 'identityName'	 
+					  dataIndex: 'identifyName',
+					  key: 'identifyName'	 
 				},{
 					  title: '拜访方式',
 					  dataIndex: 'contactType',
@@ -403,7 +403,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'ttt',
 					  key: 'ttt',
 					  render: (text, record, index) => {                    	
-                        return adminData.name=="管理员"?<div>
+                        return adminData.isSuperAdmin?<div>
                             <Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
 							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
 							</Popconfirm>
@@ -417,7 +417,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'name',
 					  key: 'name',	
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.name} placeholder="姓名" key={record.id}
+	                  return adminData.isSuperAdmin?<Input value={record.name} placeholder="姓名" key={record.id}
 	                           onChange={(e) => { record.name = e.target.value; 
 	                           	this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	                  }
@@ -426,7 +426,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'depatrment',
 					  key: 'depatrment',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.depatrment} placeholder="联系人部门" key={record.id}
+	                  return adminData.isSuperAdmin?<Input value={record.depatrment} placeholder="联系人部门" key={record.id}
 	                   onChange={(e) => { record.depatrment = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	            }
 				},{
@@ -434,7 +434,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'position',
 					  key: 'position',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.position} placeholder="联系人职务" key={record.id}
+	                  return adminData.isSuperAdmin?<Input value={record.position} placeholder="联系人职务" key={record.id}
 	                  onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	            }
 				},{
@@ -442,7 +442,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'mobile',
 					  key: 'mobile',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.mobile} placeholder="手机号码" key={record.id}
+	                  return adminData.isSuperAdmin?<Input value={record.mobile} placeholder="手机号码" key={record.id}
 	                  onChange={(e) => { record.mobile = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	            }
 				},{
@@ -450,7 +450,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'wechat',
 					  key: 'wechat',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.wechat} placeholder="微信" key={record.id}
+	                  return adminData.isSuperAdmin?<Input value={record.wechat} placeholder="微信" key={record.id}
 	                  onChange={(e) => { record.wechat = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	            }
 				},{
@@ -458,7 +458,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'qq',
 					  key: 'qq',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.qq} placeholder="联系人QQ" key={record.id}
+	                  return adminData.isSuperAdmin?<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'}}/>:<span>{text}</span>
 	            }
 				},{
@@ -466,7 +466,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'email',
 					  key: 'email',
 					  render: (text, record, index) => {
-	                  return adminData.name=="管理员"?<Input value={record.email} placeholder="电子邮箱" key={record.id}
+	                  return adminData.isSuperAdmin?<Input value={record.email} placeholder="电子邮箱" key={record.id}
 	                  onChange={(e) => { record.email = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
 	              	}
 				},
@@ -475,7 +475,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  dataIndex: 'dels',
 					  key: 'dels',
 					  render: (text, record, index) => {                    	
-                        return adminData.name=="管理员"?<div>
+                        return adminData.isSuperAdmin?<div>
                             <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
 							    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
 							</Popconfirm>
@@ -684,7 +684,7 @@ const QueryCustomer = Form.create()(React.createClass({
 			        	 contacts:thedata.contacts,
 			        	 uid:thedata.uid,
 			        	 data:listArr,
-			        	 identityName:thedata.identityName,
+			        	 identifyName:thedata.identifyName,
 			        	 followTime:thedata.followTime,
 			        	 businessGlossoryId:thedata.businessGlossoryId,
 			        	 followSituation:thedata.followSituation,
@@ -762,7 +762,7 @@ const QueryCustomer = Form.create()(React.createClass({
 			        	 nub:thedata.contactMobile,
 			        	 result:thedata.result,
 			        	 contactType:parseInt(thedata.contactType),
-			        	 identityName:thedata.identityName,
+			        	 identifyName:thedata.identifyName,
 			        	 followTime:thedata.followTime,
 			        	 businessGlossoryId:thedata.businessGlossoryId,
 			        	 followSituation:thedata.followSituation,
@@ -1482,7 +1482,7 @@ const QueryCustomer = Form.create()(React.createClass({
                         theArr.push({
                             followId:thisdata.followId,
                             followTime:thisdata.followTime,
-                            identityName:thisdata.identityName, 
+                            identifyName:thisdata.identifyName, 
                             contacts:thisdata.contacts,
                             contactMobile:thisdata.contactMobile,
                             result:thisdata.result,
@@ -1536,7 +1536,7 @@ const QueryCustomer = Form.create()(React.createClass({
                         theArr.push({
                             followId:thisdata.followId,
                             followTime:thisdata.followTime,
-                            identityName:thisdata.identityName, 
+                            identifyName:thisdata.identifyName, 
                             contacts:thisdata.contacts,
                             contactMobile:thisdata.contactMobile,
                             result:thisdata.result,
@@ -1838,7 +1838,7 @@ const QueryCustomer = Form.create()(React.createClass({
 	                </Select>
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>                                    					
-					<Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px',display:adminData.name=="管理员"?'inline-block':'none'}}
+					<Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px',display:adminData.isSuperAdmin?'inline-block':'none'}}
 	                        disabled={!hasSelected} 
 	                        onClick={this.delectRow}>删除<Icon type="minus" />
 	                </Button>	 
@@ -1946,7 +1946,7 @@ const QueryCustomer = Form.create()(React.createClass({
 			        >				    
 					     <Tabs defaultActiveKey="1" onChange={this.callback}>
 						    <TabPane tab="基本信息" key="1">
-						        {adminData.name=="管理员"?<Form horizontal onSubmit={this.newSubmit} id="demand-form">
+						        {adminData.isSuperAdmin?<Form horizontal onSubmit={this.newSubmit} id="demand-form">
 					                <Spin spinning={this.state.loading}>
 						               	<div className="clearfix" >
 					                    	<FormItem className="half-item"
@@ -2327,7 +2327,7 @@ const QueryCustomer = Form.create()(React.createClass({
 								}
 							</TabPane>
 						    <TabPane tab="联系人信息" key="2">
-						        <div className="clearfix" style={{display:adminData.name=="管理员"?'block':'none'}}>
+						        <div className="clearfix" style={{display:adminData.isSuperAdmin?'block':'none'}}>
 						            <Button className="ContactsList" type="primary" onClick={this.addcontact}>新增</Button> 
 						        </div>
 						       <div className="clearfix">
@@ -2338,7 +2338,7 @@ const QueryCustomer = Form.create()(React.createClass({
 						            	 columns={this.state.ContactsLists} 
 						            	 dataSource={this.state.contactList}
 						            	 />
-					            	        <div className="clearfix" style={{display:adminData.name=="管理员"?'inline-block':'none'}}>
+					            	        <div className="clearfix" style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
 								                <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>
@@ -2348,7 +2348,7 @@ const QueryCustomer = Form.create()(React.createClass({
 						    </TabPane>
 						    <TabPane tab="账户信息" key="3">
 						    		<div className="clearfix">
-						    			{adminData.name=="管理员"?<Form horizontal id="demand-form" onSubmit={this.accountSave} >
+						    			{adminData.isSuperAdmin?<Form horizontal id="demand-form" onSubmit={this.accountSave} >
 						    				<Spin spinning={this.state.loading} >
 						    					<FormItem className="half-item"
 							                            {...formItemLayout}
@@ -2618,7 +2618,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					  onCancel={this.visitCancel}							          							          
 			        >				    
 					     <Form horizontal id="demand-form" onSubmit={this.visitSubmit}>
-			    			{adminData.name=="管理员"?<Spin spinning={this.state.loading}>
+			    			{adminData.isSuperAdmin?<Spin spinning={this.state.loading}>
 			    			   	<div className="clearfix">
 			    			   		<FormItem className="half-item"
 			                            {...formItemLayout}
@@ -2643,7 +2643,7 @@ const QueryCustomer = Form.create()(React.createClass({
 				                            {...formItemLayout}
 				                             label="客户姓名"
 				                             >
-						                   <span>{this.state.identityName}</span>
+						                   <span>{this.state.identifyName}</span>
 						                </FormItem>
 						                <FormItem className="half-item"
 				                            {...formItemLayout}
@@ -2719,7 +2719,7 @@ const QueryCustomer = Form.create()(React.createClass({
 				                            {...formItemLayout}
 				                             label="客户姓名"
 				                             >
-						                   <span>{this.state.identityName}</span>
+						                   <span>{this.state.identifyName}</span>
 						                </FormItem>
 						                <FormItem className="half-item"
 				                            {...formItemLayout}

+ 14 - 0
js/component/tools.js

@@ -48,6 +48,7 @@ import {
     Certification,
     currentMember,
     lvl,
+    industry,
     socialAttribute,
 } from './dataDic.js';
 
@@ -901,5 +902,18 @@ module.exports = {
             return theType;
         }
     
+	},
+	//行业
+   getIndustry:function(e){
+   		 if (e) {
+            let theType = '';
+            industry.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    
 	}
 }