Browse Source

更新202108251825

fanghuisheng 3 năm trước cách đây
mục cha
commit
8f4784a444

+ 9 - 5
WebRoot/opt/inspectors/scripts/inspectors.js

@@ -144,7 +144,13 @@ Ext.onReady(function () {
 				if (form.isValid()) {
 					var query = new Object();
 					query.name = Ext.getCmp('fa_name').getValue();
+					if(query.name == null || query.name == ""){
+						Ext.Msg.alert('系统提示', '姓名不能为空!');
+					}
 					query.phone = Ext.getCmp('fa_phone').getValue();
+					if(query.phone == null || query.phone == ""){
+						Ext.Msg.alert('系统提示', '手机号不能为空!');
+					}
 					query.Job_duties = Ext.getCmp('fa_Job_duties').getValue();
 					query.company_code = Ext.getCmp('fa_company_code').getValue();
 					var jsonstr = Ext.JSON.encode(query);
@@ -207,11 +213,9 @@ Ext.onReady(function () {
 			anchor: '75%',
 			listeners: {
 				change: function (o, e) {
-					if (e.length > 10) {
-						Ext.Msg.alert('提示', '姓名长度不可超过10个字!', function (btn, txt) {
-							Ext.getCmp('ff_name').setValue('');
-						});
-						return false;
+					if (e.length > 20) {
+						Ext.getCmp('ff_name').setValue(e.substring(0, 20));
+						return;
 					}
 				}
 			}

+ 1 - 1
out/artifacts/YtIoT_Web_exploded/WEB-INF/web.xml

@@ -77,7 +77,7 @@
     </servlet-mapping>
     <session-config>
         <session-timeout>15</session-timeout>
-    </session-config>
+    </session-config>   
     <welcome-file-list>
         <welcome-file>index.html</welcome-file>
         <welcome-file>index.htm</welcome-file>

+ 9 - 5
out/artifacts/YtIoT_Web_exploded/opt/inspectors/scripts/inspectors.js

@@ -144,7 +144,13 @@ Ext.onReady(function () {
 				if (form.isValid()) {
 					var query = new Object();
 					query.name = Ext.getCmp('fa_name').getValue();
+					if(query.name == null || query.name == ""){
+						Ext.Msg.alert('系统提示', '姓名不能为空!');
+					}
 					query.phone = Ext.getCmp('fa_phone').getValue();
+					if(query.phone == null || query.phone == ""){
+						Ext.Msg.alert('系统提示', '手机号不能为空!');
+					}
 					query.Job_duties = Ext.getCmp('fa_Job_duties').getValue();
 					query.company_code = Ext.getCmp('fa_company_code').getValue();
 					var jsonstr = Ext.JSON.encode(query);
@@ -207,11 +213,9 @@ Ext.onReady(function () {
 			anchor: '75%',
 			listeners: {
 				change: function (o, e) {
-					if (e.length > 10) {
-						Ext.Msg.alert('提示', '姓名长度不可超过10个字!', function (btn, txt) {
-							Ext.getCmp('ff_name').setValue('');
-						});
-						return false;
+					if (e.length > 20) {
+						Ext.getCmp('ff_name').setValue(e.substring(0, 20));
+						return;
 					}
 				}
 			}