liting2017 hace 7 años
padre
commit
a7cd7b02ae

+ 71 - 43
js/component/manageCenter/customer/customerData/myClient.jsx

@@ -11,43 +11,6 @@ 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';
 
-const data = [{
-id: '1',
-name: '长沙科技1',
-contacts: '午安行',
-contactMobile: '321312311',
-expert:'0',
-serviceCertification:'0',
-userCertification:'0',
-locationProvince:'湖南',
-area:'500',
-}, {
-id: '2',
-name: '上海科技',
-contacts: '老王',
-contactMobile: '231321311',
-expert:'1',
-serviceCertification:'1',
-userCertification:'0',
-locationProvince:'湖南-长沙',
-Province:'1',
-city:'38',
-area:'330',
-
-}, {
-id: '3',
-name: '广州科技',
-contacts: '老李',
-contactMobile: '1123213123',
-expert:'1',
-serviceCertification:'0',
-userCertification:'1',
-locationProvince:'湖南-长沙-雨花区',
-Province:'6',
-city:'24',
-area:'900',
-}
-];
 //图片组件
 const PicturesWall = React.createClass({
     getInitialState() {
@@ -238,6 +201,18 @@ const MyClient = Form.create()(React.createClass({
                     return '共' + total + '条数据';
                 }
             },
+            paginationsy: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadBfVisit(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
             paginationt: {
                 defaultCurrent: 1,
                 defaultPageSize: 10,
@@ -257,7 +232,7 @@ const MyClient = Form.create()(React.createClass({
 					  dataIndex: 'businessGlossoryId',
 					  key: 'businessGlossoryId',
 					  render: (text, record, index) => {
-	                  return  <Select  placeholder="选择业务名称" value={record.businessGlossoryId}  onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
+	                  return  <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>
@@ -335,7 +310,7 @@ const MyClient = Form.create()(React.createClass({
 					  title: '业务意向进度',
 					  dataIndex: 'followSituation',
 					  key: 'followSituation',
-					  render:text=>{return getCompanyIntention(text)}
+					  render:text=>{return getfllowSituation(text)}
 				},{
 					  title: '客户状态',
 					  dataIndex: 'customerStatus',
@@ -1125,7 +1100,6 @@ const MyClient = Form.create()(React.createClass({
             	this.setState({
                   loading: true
             	}); 
-            	console.log(this.state.ProvinceCity)
                 $.ajax({
                     method: "post",
                     dataType: "json",
@@ -1244,7 +1218,6 @@ const MyClient = Form.create()(React.createClass({
                 	sourcecustomer='录入客户'
                 	break;
                 }
-                console.log(thisData)
                 this.setState({
                 	Accountuid:thisData.id,
                 	mobile:thisData.mobile,
@@ -1271,7 +1244,7 @@ const MyClient = Form.create()(React.createClass({
   	  this.setState({ modal5Visible:true });//需要一个请求数据
   	  this.loadInformation(e.id)
 	  this.httpAccount(e.id); 
-	  this.loadVisit();  
+	  this.loadBfVisit();  
 	  this.BusinessList();
 	  this.contactLists(e.id);
     },
@@ -1642,6 +1615,7 @@ const MyClient = Form.create()(React.createClass({
                     this.state.paginations.total = data.data.totalCount;
                 };               
                 this.setState({
+                	
                     visitArrList: theArr,
                     paginations: this.state.paginations
                 });
@@ -1652,13 +1626,67 @@ const MyClient = Form.create()(React.createClass({
             });
         }.bind(this));
     },
+    //tab3拜访记录
+    loadBfVisit(pageNo) {
+        this.setState({
+            loading: true
+        });      
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,          
+            url:globalConfig.context + '/api/admin/customer/listFollowHistory',
+            data: {
+            	pageNo: pageNo || 1,
+                pageSize: this.state.paginationsy.pageSize,
+                uid: this.state.rowId, //名称1
+            },
+            success: function (data) {            	
+                let theArr = []; 
+                if (data.error.length || data.data.list=="") {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };                   
+                } else {  
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];                        
+                        theArr.push({
+                            followId:thisdata.followId,
+                            followTime:thisdata.followTime,
+                            identityName:thisdata.identityName, 
+                            contacts:thisdata.contacts,
+                            contactMobile:thisdata.contactMobile,
+                            result:thisdata.result,
+                            ufbId:thisdata.ufbId,
+                            adminName:thisdata.adminName,
+                            followSituation:thisdata.followSituation,
+                            customerStatus:thisdata.customerStatus,
+                            contactType:thisdata.contactType
+                        });
+                    };
+                    this.state.paginationsy.current = data.data.pageNo;
+                    this.state.paginationsy.total = data.data.totalCount;
+                };               
+                this.setState({
+                    visitArrList: theArr,
+                    paginationsy: this.state.paginationsy
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({	
+                loading: false
+            });
+        }.bind(this));
+    },
 	businessIntentionOk(){
 		this.setState({
+			businessGlossoryId:'',
 			businessModul:false
 		})
 	},
 	businessIntentionCancel(){
 		this.setState({
+			businessGlossoryId:'',
 			businessModul:false
 		})
 	},
@@ -1716,7 +1744,7 @@ const MyClient = Form.create()(React.createClass({
 			this.httpAccount(this.state.rowId)
     	}
     	if(e==4){    		
-  		    this.loadVisit();
+  		    this.loadBfVisit();
     	}
     	if(e==5){    		
 			this.BusinessList();

+ 29 - 88
js/component/manageCenter/customer/customerService/myBusiness.jsx

@@ -12,64 +12,6 @@ const TabPane = Tabs.TabPane;
 import {socialAttribute,newFollow,lvl, customerStatus,intentionalService} from '../../../dataDic.js';
 import {getcustomerStatue,getprovince,getCompanyIntention,getfllowSituation,getContactType } from '../../../tools.js';
 
-const dataSource = [{  
-    name: 'AntDesign',
-    id: '10000',
-  }, {
-    name: 'AntDesign UI',
-    id: '10600',
-  
-}, {
- 
-    name: 'AntDesign UI 有多好',
-    id: '60100',
-  }, {
-    name: 'AntDesign 是啥',
-    id: '30010',
- 
-}, {
- 
-    name: 'AntDesign 是一个设计语言',
-    id: '100000',
- 
-}];
-
-const data = [{
-id: '1',
-name: '长沙科技1',
-contacts: '午安行',
-contactMobile: '321312311',
-expert:'0',
-serviceCertification:'0',
-userCertification:'0',
-locationProvince:'广州',
-}, {
-id: '2',
-name: '上海科技',
-contacts: '老王',
-contactMobile: '231321311',
-expert:'1',
-serviceCertification:'1',
-userCertification:'0',
-locationProvince:'湖南-湘潭',
-Province:'1',
-city:'38',
-eare:'500',
-
-}, {
-id: '3',
-name: '广州科技',
-contacts: '老李',
-contactMobile: '1123213123',
-expert:'1',
-serviceCertification:'0',
-userCertification:'1',
-locationProvince:'北京',
-Province:'6',
-city:'24',
-eare:'12',
-}
-];
 //图片组件
 const PicturesWall = React.createClass({
     getInitialState() {
@@ -256,7 +198,7 @@ const MyBusiness = Form.create()(React.createClass({
                     dataIndex: 'adminName',
                     key: 'adminName',
                 }, {
-                    title: '业务意向进度',
+                    title: '意向进度',
                     dataIndex: 'followSituation',
                     key: 'followSituation', 
                     render:text=>{return getfllowSituation(text)}
@@ -313,7 +255,7 @@ const MyBusiness = Form.create()(React.createClass({
                     key: 'adminName',                    
                 }, 
                 {
-                    title: '业务意向进度',
+                    title: '意向进度',
                     dataIndex: 'followSituation',
                     key:'followSituation',  
                     render: text => { return getfllowSituation(text) }
@@ -480,15 +422,14 @@ const MyBusiness = Form.create()(React.createClass({
                   loading: true
             	}); 	
                 $.ajax({
-                    method: "get",
+                    method: "post",
                     dataType: "json",
                     url:globalConfig.context + '/api/admin/customer/updateBusiness',
                     data: {         	
                     	businessId:this.state.rowId, 
                     	followSituation:this.state.followSituation, 
                     	customerStatus:this.state.customerStatus, 
-                    	result:this.state.result, 
-                    	
+                    	remarks:this.state.remarks, 	
                     }
                 }).done(function (data) { 
                 	 this.setState({
@@ -1186,7 +1127,7 @@ const MyBusiness = Form.create()(React.createClass({
 			    			   	<div className="clearfix">
 			    			   		{businessIds!=''?<div><FormItem className="half-item"
 						                            {...formItemLayout}
-						                             label="业务意向名称"
+						                             label="意向名称"
 						                             >
 					    			    <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
 					    			</FormItem>
@@ -1209,7 +1150,7 @@ const MyBusiness = Form.create()(React.createClass({
 			    			    	</FormItem></div>
 										:<div><FormItem className="half-item"
 			                           {...formItemLayout}
-			                           label="业务意向名称"
+			                           label="意向名称"
 		                               > 
 			                          <Select placeholder="服务意向名称" value={this.state.businessGlossoryId} onChange={(e) => {
 											this.setState({businessGlossoryId:e})}} style={{width:'150px'}}>
@@ -1263,12 +1204,12 @@ const MyBusiness = Form.create()(React.createClass({
 			    			    	</FormItem>
 			    			   		<FormItem className="half-item" 
 			                           {...formItemLayout}
-			                           label="业务意向进度"
+			                           label="意向进度"
 		                               > 
-									             <Select  placeholder="业务意向进度" value={this.state.followSituation}
+									             <Select  placeholder="意向进度" value={this.state.followSituation}
 	                           				 onChange={(e) => { this.setState({ followSituation: e }) }}>
 		                                    {
-		                                        intentionalService.map(function (item) {
+		                                        newFollow.map(function (item) {
 		                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
 		                                        })
 		                                    }
@@ -1276,9 +1217,9 @@ const MyBusiness = Form.create()(React.createClass({
 		                   		    </FormItem>
 					    			<FormItem className="half-item" 
 			                           {...formItemLayout}
-			                           label="业务客户状态"
+			                           label="客户状态"
 	                                   > 
-									    <Select placeholder="业务客户状态" value={this.state.customerStatus}
+									    <Select placeholder="客户状态" value={this.state.customerStatus}
 	                       				 	onChange={(e) => { this.setState({ customerStatus: e }) }}>
 	                                        {
 	                                        customerStatus.map(function (item) {
@@ -1291,8 +1232,8 @@ const MyBusiness = Form.create()(React.createClass({
 			                   		    <FormItem
 					                        labelCol={{ span: 4 }}
 					                        wrapperCol={{ span: 16 }}
-					                        label="业务意向说明" >					                        
-					                        <Input type="textarea" rows={4} placeholder="业务意向说明" value={this.state.remarks}
+					                        label="意向说明" >					                        
+					                        <Input type="textarea" rows={4} placeholder="意向说明" value={this.state.remarks}
 	                           				 	onChange={(e) => { this.setState({ remarks: e.target.value }) }}/>					                           
 					                    </FormItem>
 					                </div>    
@@ -1374,7 +1315,7 @@ const MyBusiness = Form.create()(React.createClass({
 			               	<div className="clearfix">
 		                    	<FormItem className="half-item"
 				                   {...formItemLayout}
-				                    label="业务意向名称"
+				                    label="意向名称"
 			                        >
 			                        <span>{getCompanyIntention(theInformation.businessGlossoryId)}</span>
 			                    </FormItem>
@@ -1398,9 +1339,9 @@ const MyBusiness = Form.create()(React.createClass({
 			                    </FormItem>
 								<FormItem className="half-item" 
 		                           {...formItemLayout}
-		                           label="业务意向进度"
+		                           label="意向进度"
 	                               > 
-								               <Select  placeholder="业务意向进度" value={this.state.followSituation}
+								               <Select  placeholder="意向进度" value={this.state.followSituation}
                            				 onChange={(e) => { this.setState({ followSituation: e }) }}>
 	                                    {
 	                                        newFollow.map(function (item) {
@@ -1411,12 +1352,12 @@ const MyBusiness = Form.create()(React.createClass({
 	                   		    </FormItem>
 				    			   		    <FormItem className="half-item" 
 			                           {...formItemLayout}
-			                           label="业务客户状态"
+			                           label="客户状态"
 		                               > 
-									 <Select placeholder="业务客户状态" value={this.state.customerStatus}
+									 <Select placeholder="客户状态" value={this.state.customerStatus}
                            			onChange={(e) => { this.setState({ customerStatus: e }) }}>
 	                                {
-	                                   intentionalService.map(function (item) {
+	                                   customerStatus.map(function (item) {
 	                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
 	                                    })
 	                                }
@@ -1426,8 +1367,8 @@ const MyBusiness = Form.create()(React.createClass({
 			                   		    <FormItem
 					                        labelCol={{ span: 4 }}
 					                        wrapperCol={{ span: 16 }}
-					                        label="业务意向说明" >					                        
-					                        <Input type="textarea" rows={4} placeholder="业务意向说明" value={this.state.remarks}
+					                        label="意向说明" >					                        
+					                        <Input type="textarea" rows={4} placeholder="意向说明" value={this.state.remarks}
 	                           				 	onChange={(e) => { this.setState({ remarks: e.target.value }) }}/>					                           
 					                    </FormItem>
 				                  	</div>
@@ -1554,7 +1495,7 @@ const MyBusiness = Form.create()(React.createClass({
 			    			   	<div className="clearfix">
 			    			   		<FormItem className="half-item"
 						                            {...formItemLayout}
-						                             label="业务意向名称"
+						                             label="意向名称"
 						                             >
 					    			    <span>{getCompanyIntention(this.state.businessGlossoryId)}</span>
 					    			</FormItem>
@@ -1583,12 +1524,12 @@ const MyBusiness = Form.create()(React.createClass({
 			    			    	</FormItem>
 			    			   		<FormItem className="half-item" 
 			                           {...formItemLayout}
-			                           label="业务意向进度"
+			                           label="意向进度"
 		                               > 
-									             <Select  placeholder="业务意向进度" value={this.state.followSituation}
+									             <Select  placeholder="意向进度" value={this.state.followSituation}
 	                           				 onChange={(e) => { this.setState({ followSituation: e }) }}>
 		                                    {
-		                                        intentionalService.map(function (item) {
+		                                        newFollow.map(function (item) {
 		                                            return <Select.Option key={item.value} >{item.key}</Select.Option>
 		                                        })
 		                                    }
@@ -1596,9 +1537,9 @@ const MyBusiness = Form.create()(React.createClass({
 		                   		    </FormItem>
 					    			<FormItem className="half-item" 
 			                           {...formItemLayout}
-			                           label="业务客户状态"
+			                           label="客户状态"
 	                                   > 
-									    <Select placeholder="业务客户状态" value={this.state.customerStatus}
+									    <Select placeholder="客户状态" value={this.state.customerStatus}
 	                       				 	onChange={(e) => { this.setState({ customerStatus: e }) }}>
 	                                        {
 	                                        customerStatus.map(function (item) {
@@ -1611,8 +1552,8 @@ const MyBusiness = Form.create()(React.createClass({
 			                   		    <FormItem
 					                        labelCol={{ span: 4 }}
 					                        wrapperCol={{ span: 16 }}
-					                        label="业务意向说明" >					                        
-					                        <Input type="textarea" rows={4} placeholder="业务意向说明" value={this.state.remarks}
+					                        label="意向说明" >					                        
+					                        <Input type="textarea" rows={4} placeholder="意向说明" value={this.state.remarks}
 	                           				 	onChange={(e) => { this.setState({ remarks: e.target.value }) }}/>					                           
 					                    </FormItem>
 					                </div>