Browse Source

电话正则修改

hy 7 years ago
parent
commit
2bc8ab8ac1

+ 4 - 0
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -258,6 +258,8 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 allowBlank:false,
                 text : "电话", 
                 editor : {
+                    regex:/^1(3|4|5|7|8|9)\d{9}$/,
+                    regexText:'请输入正确的手机号码',
                     hideTrigger:true,
                     xtype : "textfield"
                 },
@@ -369,6 +371,8 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 allowBlank:true,
                 text : "联系电话", 
                 editor : {
+                    regex:/^1(3|4|5|7|8|9)\d{9}$/,
+                    regexText:'请输入正确的手机号码',
                     xtype : "textfield",
                     hideTrigger:true,
                 },

+ 2 - 0
frontend/saas-web/app/view/document/employee/Window.js

@@ -88,6 +88,8 @@ Ext.define('saas.view.document.employee.Window', {
                 xtype:'textfield',
                 fieldLabel: '联系电话',
                 name: 'em_mobile',
+                regex:/^1(3|4|5|7|8|9)\d{9}$/,
+                regexText:'请输入正确的手机号码',
                 allowBlank:false,
                 maxLength: 20
             },{

+ 2 - 0
frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -253,6 +253,8 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                 allowBlank:false,
                 text : "电话", 
                 editor : {
+                    regex:/^1(3|4|5|7|8|9)\d{9}$/,
+                    regexText:'请输入正确的手机号码',
                     hideTrigger:true,
                     xtype : "textfield"
                 },

+ 1 - 1
frontend/saas-web/app/view/sys/account/AddWindow.js

@@ -30,7 +30,7 @@ Ext.define('saas.view.sys.account.AddWindow', {
                     allowBlank:false,
                     maxLength: 30,
                     columnWidth:0.7,
-                    regex:/^1(3|4|5|7|8)\d{9}$/,
+                    regex:/^1(3|4|5|7|8|9)\d{9}$/,
                     regexText:'请输入正确的手机号码',
                     listeners:{
                         change:function(f,a,b){

+ 3 - 1
frontend/saas-web/app/view/sys/account/DataList.js

@@ -22,7 +22,9 @@ Ext.define('saas.view.sys.account.DataList', {
         width: 140,
         name: 'mobile',
         xtype: 'textfield',
-        emptyText : '手机号码'
+        emptyText : '手机号码',
+        regex:/^1(3|4|5|7|8|9)\d{9}$/,
+        regexText:'请输入正确的手机号码'
     },{
         xtype:'button',
         text:'查询',

+ 2 - 0
frontend/saas-web/app/view/sys/account/EditWindow.js

@@ -46,6 +46,8 @@ Ext.define('saas.view.sys.account.EditWindow', {
             },{
                 xtype:'textfield',
                 fieldLabel: '手机号码',
+                regex:/^1(3|4|5|7|8|9)\d{9}$/,
+                regexText:'请输入正确的手机号码',
                 name: 'mobile',
                 readOnly:true,
                 editable:false,

+ 2 - 0
frontend/saas-web/app/view/sys/config/FormPanel.js

@@ -67,6 +67,8 @@ Ext.define('saas.view.sys.config.FormPanel', {
         bind:'{tel}',
         xtype: 'textfield',
         name: 'tel',
+        regex:/^1(3|4|5|7|8|9)\d{9}$/,
+        regexText:'请输入正确的手机号码',
         fieldLabel: '电话',
         beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         allowBlank: false,

+ 2 - 0
frontend/saas-web/app/view/sys/feedback/FormPanel.js

@@ -37,6 +37,8 @@ Ext.define('saas.view.sys.feedback.FormPanel', {
             xtype : "textfield", 
             name : "fb_mobile", 
             fieldLabel : "手机号",
+            regex:/^1(3|4|5|7|8|9)\d{9}$/,
+            regexText:'请输入正确的手机号码',
             value:saas.util.BaseUtil.getCurrentUser() ? saas.util.BaseUtil.getCurrentUser().mobile:null
         }, {
             xtype : "textfield",