liting2017 7 years ago
parent
commit
ad6e0a664a

+ 20 - 1
js/component/manageCenter/customer/individualCustomer/individualCustomer.jsx

@@ -1055,7 +1055,17 @@ const IndividualCustomer = Form.create()(React.createClass({
 			message.warning('请选择地区');
 			return false;
 		};
-
+		var reg=/^[1-9]\d*$|^0$/;   
+		if(this.state.consultationPrice.length>6) {
+			message.warning('咨询费用不超过6位数');
+			this.refs.consul.focus();
+			return false;
+		};
+		if(!reg.test(this.state.consultationPrice)){
+			message.warning('咨询费用只能输入数字');
+			this.refs.consul.focus();
+			return false;
+		}
 		this.state.data = [];
 		this.setState({
 			selectedRowKeys: [],
@@ -1119,6 +1129,7 @@ const IndividualCustomer = Form.create()(React.createClass({
 						consultant: this.state.consultant,
 						international: this.state.international,
 						fixedTel: this.state.fixedTel,
+						consultationPrice:this.state.consultationPrice,
 						qq: this.state.qq,
 						contacts: this.state.contacts,
 						contactMobile: this.state.contactMobile,
@@ -1201,6 +1212,7 @@ const IndividualCustomer = Form.create()(React.createClass({
 					yearMonth: month,
 					postalAddress: thisData.postalAddress,
 					fixedTel: thisData.fixedTel,
+					consultationPrice:thisData.consultationPrice,
 					email: thisData.email,
 					qq: thisData.qq,
 					introduction: thisData.introduction,
@@ -2403,6 +2415,13 @@ const IndividualCustomer = Form.create()(React.createClass({
 							                                <Input placeholder="客户电子邮箱" value={this.state.email} 
 	    												onChange={(e) => {this.setState({email: e.target.value })}}/>
 							                    </FormItem>
+							                    <FormItem className="half-item"
+								                    	 {...formItemLayout}
+								                         label="咨询费用"
+							                            >
+							                                <Input ref='consul' placeholder="请输入咨询费用" value={this.state.consultationPrice} 
+	    												onChange={(e) => {this.setState({consultationPrice: e.target.value })}}/>
+							                    </FormItem>
 							                     <FormItem className="half-item" 
 										            	{...formItemLayout}
 								                        label="实名认证"

+ 20 - 1
js/component/manageCenter/customer/individualCustomer/queryCustomer.jsx

@@ -987,6 +987,17 @@ const QueryCustomer = Form.create()(React.createClass({
 			message.warning('请选择地区');
 			return false;
 		};
+		var reg=/^[1-9]\d*$|^0$/;   
+		if(this.state.consultationPrice.length>6) {
+			message.warning('咨询费用不超过6位数');
+			this.refs.consul.focus();
+			return false;
+		};
+		if(!reg.test(this.state.consultationPrice)){
+			message.warning('咨询费用只能输入数字 ');
+			this.refs.consul.focus();
+			return false;
+		}
 		this.setState({
 			selectedRowKeys: [],
 		});
@@ -1048,6 +1059,7 @@ const QueryCustomer = Form.create()(React.createClass({
 						celebrity: this.state.celebrity,
 						international: this.state.international,
 						fixedTel: this.state.fixedTel,
+						consultationPrice: this.state.consultationPrice,
 						qq: this.state.qq,
 						contacts: this.state.contacts,
 						contactMobile: this.state.contactMobile,
@@ -1134,6 +1146,7 @@ const QueryCustomer = Form.create()(React.createClass({
 					yearMonth: month,
 					postalAddress: thisData.postalAddress,
 					fixedTel: thisData.fixedTel,
+					consultationPrice: thisData.consultationPrice,
 					email: thisData.email,
 					qq: thisData.qq,
 					introduction: thisData.introduction,
@@ -2229,7 +2242,13 @@ const QueryCustomer = Form.create()(React.createClass({
 							                                <Input placeholder="客户电子邮箱" value={this.state.email} 
 	    												onChange={(e) => {this.setState({email: e.target.value })}}/>
 							                    </FormItem>
-						                   
+						                   		<FormItem className="half-item"
+								                    	 {...formItemLayout}
+								                         label="咨询费用"
+							                            >
+							                                <Input ref='consul' placeholder="输入数字且不超过6位" value={this.state.consultationPrice} 
+	    												onChange={(e) => {this.setState({consultationPrice: e.target.value })}}/>
+							                    </FormItem>
 											<div className='clearfix'>
 							                    <FormItem
 							                        labelCol={{ span: 4 }}