dengzhiguo лет назад: 6
Родитель
Сommit
c5656efc5e

+ 9 - 0
js/component/manageCenter/set/userManagementS/newUser.jsx

@@ -100,6 +100,15 @@ const Newuser = Form.create()(React.createClass({
         	message.warning('请输入正确的上级主管');
         	return false;
         };
+        if(this.state.contactMobile){
+        	if(!(/^1[3|4|5|8][0-9]\d{4,8}$/.test(this.state.contactMobile))){ 
+			  message.warning("不是完整的11位手机号或者正确的手机号前七位"); 
+			  this.setState({
+                    loading: false
+                });
+			  return false;
+			} 
+        }
         let theorgCodeUrl = [];
         if (this.state.orgCodeUrl.length) {
             let picArr = [];

+ 10 - 0
js/component/manageCenter/topTab.jsx

@@ -254,6 +254,7 @@ const UserModal = React.createClass({
         this.setState({
             loading: true
         });
+        
         $.ajax({
             method: "get",
             dataType: "json",
@@ -323,6 +324,15 @@ const UserModal = React.createClass({
         this.setState({
             loading: true
         });
+        if(this.state.contactMobile){
+        	if(!(/^1[3|4|5|8][0-9]\d{4,8}$/.test(this.state.contactMobile))){ 
+			  message.warning("不是完整的11位手机号或者正确的手机号前七位"); 
+			  this.setState({
+                    loading: false
+                });
+			  return false;
+			} 
+        }
         $.ajax({
             method: "post",
             dataType: "json",