Pārlūkot izejas kodu

Merge branch 'master' of https://git.coding.net/aft/AFT-WEB

dengzhiguo 7 gadi atpakaļ
vecāks
revīzija
155d9a4ee7

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

@@ -1450,6 +1450,14 @@ const PublicCustomer = Form.create()(React.createClass({
 	},
 	//点击新增详情
 	newContacts() {
+		this.state.newsex =undefined;
+		this.state.newname ='';
+		this.state.newmobile='';
+		this.state.newwechat='';
+		this.state.newqq='';
+		this.state.newdepatrment='';
+		this.state.newposition='';
+		this.state.newemail='';
 		this.setState({
 			uids: this.state.uid,
 			addcontactModul: true
@@ -2015,7 +2023,7 @@ const PublicCustomer = 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.isSuperAdmin?'inline-block':'none'}}
+					<Button type='danger' style={{marginRight:'10px' ,marginLeft:'10px',display:adminData.isSuperAdmin?'inline-block':'none'}}
 	                        disabled={!hasSelected}
 	                        onClick={this.delectRow}>删除<Icon type="minus" />
 	                </Button>			
@@ -2600,7 +2608,7 @@ const PublicCustomer = Form.create()(React.createClass({
 						    					<FormItem className="half-item"
 							                            {...formItemLayout}
 							                            label="注册手机号" >
-							                        {adminData.isSuperAdmin?<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}  disabled 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"

+ 145 - 9
js/component/manageCenter/customer/customerData/myClient.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Radio, Icon, Button, Cascader, Input, Select, Tabs, Spin, Popconfirm, Popover, Table, Switch, message, DatePicker, Modal, Upload, Form, Row, Col, TimePicker } from 'antd';
+import { Radio, Icon, Button, AutoComplete,Cascader, Input, Select, Tabs, Spin, Popconfirm, Popover, Table, Switch, message, DatePicker, Modal, Upload, Form, Row, Col, TimePicker } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -9,7 +9,7 @@ const { Column, ColumnGroup } = Table;
 const TabPane = Tabs.TabPane;
 import CustomerDetail from './myClientDesc.jsx';
 import { socialAttribute, industry, newFollow, auditStatusL, lvl, currentMember, cityArr, statuslist, customerStatus, intentionalService, sex } from '../../../dataDic.js';
-import { getCompanyIntention, splitUrl,getIndustry, getStatuslist, getAuditStatus, getContactType, getSocialAttribute, getfllowSituation, beforeUploadFile, getWhether, getcityArr, getcustomerStatue, getfllowSituationOn, getCertification, getcustomerTyp, getLvl, getCurrentMember, getprovince } from '../../../tools.js';
+import { getCompanyIntention, splitUrl, getIndustry, getStatuslist, getAuditStatus, getContactType, getSocialAttribute, getfllowSituation, beforeUploadFile, getWhether, getcityArr, getcustomerStatue, getfllowSituationOn, getCertification, getcustomerTyp, getLvl, getCurrentMember, getprovince } from '../../../tools.js';
 
 //图片组件
 const PicturesWall = React.createClass({
@@ -990,6 +990,14 @@ const MyClient = Form.create()(React.createClass({
 			message.warning('请选择地区');
 			return false;
 		};
+		if(isNaN(this.state.registeredCapital)){
+			message.warning('注册资本只能输入数字')
+			return false;
+		};
+		if(isNaN(this.state.enterpriseScale)){
+			message.warning('单位规模只能输入数字')
+			return false;
+		}
 		this.setState({
 			selectedRowKeys: [],
 		});
@@ -1117,7 +1125,7 @@ const MyClient = Form.create()(React.createClass({
 					businessScope: thisData.businessScope,
 					orgCode: thisData.orgCode,
 					investment: thisData.investment,
-					auditStatus: thisData.auditStatus?String(thisData.auditStatus):undefined,
+					auditStatus: thisData.auditStatus ? String(thisData.auditStatus) : undefined,
 					businessAudit: thisData.businessAudit
 				});
 			}.bind(this),
@@ -1377,6 +1385,14 @@ const MyClient = Form.create()(React.createClass({
 	},
 	//点击新增详情
 	newContacts() {
+		this.state.newsex = undefined;
+		this.state.newname = '';
+		this.state.newmobile = '';
+		this.state.newwechat = '';
+		this.state.newqq = '';
+		this.state.newdepatrment = '';
+		this.state.newposition = '';
+		this.state.newemail = '';
 		this.setState({
 			uids: this.state.uid,
 			addcontactModul: true
@@ -1852,6 +1868,104 @@ const MyClient = Form.create()(React.createClass({
 			});
 		}.bind(this));
 	},
+	//指定转交人自动补全
+	supervisor(e){ 
+		$.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/customer/listAdminByName",
+            data:{
+            	adminName:e
+            },
+            success: function (data) {                	  
+				       let thedata=data.data;
+				    if (!thedata) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };	
+                    thedata = {}; 
+              }; 
+					this.setState({
+						customerArr:thedata,	
+                    });
+				}.bind(this),
+			}).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));  
+	},
+	//上级主管输入框失去焦点是判断客户是否存在
+	selectAuto(value,options){
+		this.setState({
+			auto:value
+		})
+	},
+	blurChange(e){
+		console.log(e)
+		let theType='';
+		let contactLists=this.state.customerArr||[];
+			if (e) {
+            contactLists.map(function (item) {
+                if (item.name == e.toString()) {
+                    theType = item.id;
+                }
+           });     
+   	    }
+		this.setState({
+			theTypes:theType
+		})
+	},
+	//值改变时请求客户名称
+	httpChange(e){
+		if(e.length>=1){
+			this.supervisor(e); 
+		}	
+		this.setState({
+			auto:e
+		})
+	},
+	//转交
+	changeAssigner() {
+		if(this.state.theTypes){
+			this.setState({
+				selectedRowKeys: [],
+			});
+			let changeIds;
+			for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
+				let rowItem = this.state.selectedRows[idx];
+				if(rowItem.id) {
+					changeIds = rowItem.id;
+					
+				};
+			};
+			$.ajax({
+				method: "get",
+				dataType: "json",
+				crossDomain: false,
+				url: globalConfig.context + "/api/admin/customer/transferToOther",
+				data: {
+					uid: changeIds, //这一行数据的ID
+					aid: this.state.theTypes, //指定转交人的ID 
+				}
+			}).done(function(data) {
+				if(!data.error.length) {
+					message.success('转交成功!');
+					this.setState({
+						auto:'',
+						loading: false,
+					});
+				} else {
+					message.warning(data.error[0].message);
+				};
+				this.loadData();
+			}.bind(this));
+		}else{
+			message.warning('请输入转交人姓名')
+		}
+	},
+
 	componentWillReceiveProps(nextProps) {
 		if(!this.props.visible && nextProps.visible) {
 			if(nextProps.data && nextProps.data.id) {
@@ -1909,6 +2023,10 @@ const MyClient = Form.create()(React.createClass({
 			wrapperCol: { span: 14 },
 		};
 		const contacts = this.state.contacts || '';
+		const dataSources=this.state.customerArr || [];
+        const options = dataSources.map((group) =>
+				      <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
+				     )
 		return(
 			<div className="user-content" >
                 <div className="content-title">                  
@@ -1955,13 +2073,30 @@ const MyClient = Form.create()(React.createClass({
                         <Button>上传批量内容</Button>
                     </Upload>                        
 	                <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
-							     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
+							     <Button type="danger" style={{marginLeft:'10px'}}
 	                       			 disabled={!hasSelected} 
 	                       		 >删除<Icon type="minus" />
 	                        </Button>
 	                </Popconfirm> 
-	                <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
-                        disabled={!hasSelected}
+	                <AutoComplete
+				        className="certain-category-search"
+				        dropdownClassName="certain-category-search-dropdown"
+				        dropdownMatchSelectWidth={false}
+				        dropdownStyle={{ width: 120 }}
+				        style={{ width: '120px'}}
+				        dataSource={options}
+				        placeholder="输入转交人姓名"
+				        value={this.state.auto}
+				        onChange={this.httpChange}
+				        filterOption={true}
+				        onBlur={this.blurChange}
+				        onSelect={this.selectAuto}
+				        disabled={!hasSelected}
+				      >
+				        <Input />
+				      </AutoComplete>  
+					<Button type="primary" onClick={this.changeAssigner}  disabled={!hasSelected} >转交</Button>  
+	                <Button type='primary' 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> 
@@ -2165,7 +2300,7 @@ const MyClient = Form.create()(React.createClass({
 							                        wrapperCol={{ span: 18 }}
 							                        label="注册资本"
 						                            >
-						                                <Input placeholder="注册资本" value={this.state.registeredCapital} 
+						                                <Input placeholder="注册资本" value={this.state.registeredCapital}  maxLength='6'
 											    				onChange={(e)=>{this.setState({registeredCapital:e.target.value})}}/>
 						                    </FormItem>
 						                    <FormItem className="half-item"
@@ -2173,7 +2308,7 @@ const MyClient = Form.create()(React.createClass({
 							                        wrapperCol={{ span: 18 }}
 							                        label="单位规模"
 						                            >
-						                                <Input placeholder="单位规模" value={this.state.enterpriseScale} 
+						                                <Input placeholder="单位规模" value={this.state.enterpriseScale} maxLength='1'
 											    				onChange={(e)=>{this.setState({enterpriseScale:e.target.value})}}/>
 						                    </FormItem>
 						                    <FormItem className="half-item"
@@ -2380,7 +2515,8 @@ const MyClient = Form.create()(React.createClass({
 						    					<FormItem className="half-item"
 							                            {...formItemLayout}
 							                            label="注册手机号" >
-							                         <Input value={this.state.mobile} onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
+							                         <Input value={this.state.mobile} disabled
+							                         onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
 							                    	 <Button onClick={this.modifyPassworld}>修改密码</Button>
 							                    </FormItem>
 							                    <FormItem className="half-item"

+ 15 - 2
js/component/manageCenter/customer/customerService/myBusiness.jsx

@@ -501,10 +501,22 @@ const MyBusiness = Form.create()(React.createClass({
 	},
 	//点击新增详情
 	newContacts(){
+		if(this.state.uids||this.state.khId){
+		this.state.newsex =undefined;
+		this.state.newname ='';
+		this.state.newmobile='';
+		this.state.newwechat='';
+		this.state.newqq='';
+		this.state.newdepatrment='';
+		this.state.newposition='';
+		this.state.newemail='';
 		this.setState({
-			uids:this.state.uids,
+			uids:this.state.uids?this.state.uids:this.state.khId,
 	    	addcontactModul:true
 	   });
+		  }else{
+		  	 message.warning('请输入客户名称')
+		  }
 	},
 	//新增联系人保存函数
 	submitcontactman(){
@@ -768,6 +780,7 @@ const MyBusiness = Form.create()(React.createClass({
                     thedata = {}; 
               }; 
 					this.setState({
+						uids:thedata.id,
 						customerArr:thedata,	
                     });
 				}.bind(this),
@@ -1049,7 +1062,7 @@ const MyBusiness = Form.create()(React.createClass({
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button> 
 	                <Popconfirm title="是否删除?" onConfirm={this.delectRow} okText="是" cancelText="否">
-					     <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px'}}
+					     <Button style={{ marginRight:'10px' ,marginLeft:'10px'}} type='danger'
                    			 disabled={!hasSelected} 
                     		 >删除<Icon type="minus" />
            			     </Button>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1916 - 1935
js/component/manageCenter/customer/individualCustomer/individualCustomer.jsx


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

@@ -900,6 +900,8 @@ const QueryCustomer = Form.create()(React.createClass({
 		this.loadData();
 	},
 	reset() {
+		this.state.expertSearch = undefined;
+		this.state.celebritySearch = undefined;
 		this.state.shareTypeSearch = undefined;
 		this.state.typeSearch = undefined; //名称1   
 		this.state.nameSearch = '';
@@ -1039,6 +1041,7 @@ const QueryCustomer = Form.create()(React.createClass({
 						professionalTitle: this.state.professionalTitle,
 						workUnit: this.state.workUnit,
 						education: this.state.education,
+						graduateSchool: this.state.graduateSchool,
 						majorCategory: this.state.majorCategory,
 						qualification: this.state.qualification,
 						businessAudit:this.state.businessAudit,
@@ -1117,6 +1120,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					professionalTitle: thisData.professionalTitle,
 					workUnit: thisData.workUnit,
 					education: thisData.education,
+					graduateSchool: thisData.graduateSchool,
 					majorCategory: thisData.majorCategory,
 					qualification: thisData.qualification,
 					businessAudit:thisData.businessAudit,
@@ -1371,6 +1375,14 @@ const QueryCustomer = Form.create()(React.createClass({
 	},
 	//点击新增详情
 	newContacts() {
+		this.state.newsex =undefined;
+		this.state.newname ='';
+		this.state.newmobile='';
+		this.state.newwechat='';
+		this.state.newqq='';
+		this.state.newdepatrment='';
+		this.state.newposition='';
+		this.state.newemail='';
 		this.setState({
 			uids: this.state.uid,
 			addcontactModul: true
@@ -1943,7 +1955,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.isSuperAdmin?'inline-block':'none'}}
+					<Button type='danger' style={{marginRight:'10px' ,marginLeft:'10px',display:adminData.isSuperAdmin?'inline-block':'none'}}
 	                        disabled={!hasSelected} 
 	                        onClick={this.delectRow}>删除<Icon type="minus" />
 	                </Button>	 
@@ -2146,6 +2158,13 @@ const QueryCustomer = Form.create()(React.createClass({
 							                    </FormItem>
 							                    <FormItem className="half-item" 
 								                    	 {...formItemLayout}
+								                        label="毕业院校"
+						                           	 >
+							                            <Input placeholder="学历" value={this.state.graduateSchool} onChange={(e) => {
+									                        this.setState({ graduateSchool:  e.target.value })}}/>
+							                    </FormItem>
+							                    <FormItem className="half-item" 
+								                    	 {...formItemLayout}
 								                        label="专业类别"
 						                           	 >
 							                            <Input placeholder="专业类别" value={this.state.majorCategory} onChange={(e) => {
@@ -2153,9 +2172,9 @@ const QueryCustomer = Form.create()(React.createClass({
 							                    </FormItem>
 							                    <FormItem className="half-item" 
 								                    	 {...formItemLayout}
-								                        label="业资格"
+								                        label="业资格"
 						                           	 >
-							                            <Input placeholder="业资格" value={this.state.qualification} onChange={(e) => {
+							                            <Input placeholder="业资格" value={this.state.qualification} onChange={(e) => {
 									                        this.setState({ qualification:  e.target.value })}}/>
 							                    </FormItem>
 							                    <FormItem className="half-item"
@@ -2438,13 +2457,19 @@ const QueryCustomer = Form.create()(React.createClass({
 						                    </FormItem>
 						                    <FormItem className="half-item" 
 							                    	 {...formItemLayout}
+							                        label="毕业院校"
+					                           	 >
+						                    		 <span>{this.state.graduateSchool}</span> 
+						                    </FormItem>
+						                    <FormItem className="half-item" 
+							                    	 {...formItemLayout}
 							                        label="专业类别"
 					                           	 >
 						                   		 <span>{this.state.majorCategory}</span> 
 						                    </FormItem>
 						                    <FormItem className="half-item" 
 							                    	 {...formItemLayout}
-							                        label="业资格"
+							                        label="业资格"
 					                           	 >
 						                   	    <span>{this.state.qualification}</span>
 						                    </FormItem>
@@ -2592,7 +2617,8 @@ const QueryCustomer = Form.create()(React.createClass({
 						    					<FormItem className="half-item"
 							                            {...formItemLayout}
 							                            label="注册手机号" >
-							                         <Input value={this.state.mobile}  onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
+							                         <Input value={this.state.mobile} disabled 
+							                           onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
 							                    	 <Button onClick={this.modifyPassworld}>修改密码</Button>
 							                    </FormItem>
 							                    <FormItem className="half-item"

+ 1 - 0
js/component/manageCenter/customer/statistics/followStatistics.jsx

@@ -92,6 +92,7 @@ const FollowStatistics = React.createClass({
 		return {
 			releaseDate: [],
 			loading: false,
+			callnub:'1',
 			pagination: {
 				defaultCurrent: 1,
 				defaultPageSize: 10,