liting2017 7 years ago
parent
commit
b06a7bbb09

+ 13 - 10
js/component/manageCenter/customer/individualCustomer/individualCustomer.jsx

@@ -1055,17 +1055,20 @@ 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;
+		var reg=/^[1-9]\d*$|^0$/;
+		if(this.state.consultationPrice){
+			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: [],

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

@@ -988,16 +988,19 @@ const QueryCustomer = Form.create()(React.createClass({
 			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;
+		if(this.state.consultationPrice){
+			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: [],
 		});
@@ -2249,17 +2252,7 @@ const QueryCustomer = Form.create()(React.createClass({
 							                                <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 }}
-							                        wrapperCol={{ span: 18 }}
-							                        label="客户简介" >
-							                            <Input type="textarea" rows={4} value={this.state.introduction} 
-    												onChange={(e,pre) => { this.setState({ introduction: e.target.value })}}/>
-							                    </FormItem>
-						                    </div>
-						                    <div className="clearfix">
-						                     <FormItem className="half-item" 
+							                    <FormItem className="half-item" 
 									            	{...formItemLayout}
 							                        label="实名认证"
 									            >
@@ -2273,6 +2266,17 @@ const QueryCustomer = Form.create()(React.createClass({
 						                                }
 								                    </Select>
 									        </FormItem>
+											<div className='clearfix'>
+							                    <FormItem
+							                        labelCol={{ span: 4 }}
+							                        wrapperCol={{ span: 18 }}
+							                        label="客户简介" >
+							                            <Input type="textarea" rows={4} value={this.state.introduction} 
+    												onChange={(e,pre) => { this.setState({ introduction: e.target.value })}}/>
+							                    </FormItem>
+						                    </div>
+						                    <div className="clearfix">
+						                     
 						                    <FormItem className="half-item"
 						                   			 {...formItemLayout}
 							                           label="业务认证"