1
0
Просмотр исходного кода

成绩查询页面列表中将总分筛选条件中的开始分数和结束分数校验规则修改为:同时存在(不存在)

nikang 6 лет назад
Родитель
Сommit
c6278ff5e9
1 измененных файлов с 16 добавлено и 2 удалено
  1. 16 2
      stmms-web/src/main/webapp/WEB-INF/views/modules/exam/scoreList.jsp

+ 16 - 2
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/scoreList.jsp

@@ -61,9 +61,9 @@
             </select>
             <!--     总分 > startScore and 总分 <=endScore             -->
 			<label>总分:从</label>
-			<input  type="text" number="true" name="startScroe"value="${query.startScroe}" class="input-mini"/>
+			<input  type="text" number="true" id="startScroe"  name="startScroe"value="${query.startScroe}" class="input-mini"/>
 			<label> 到&nbsp;&nbsp;&nbsp;</label>
-			<input type="text"  number="true" name="endScroe" value="${query.endScroe}"  class="input-mini"/>
+			<input type="text"  number="true" id="endScroe" name="endScroe"  value="${query.endScroe}"  class="input-mini"/>
 			<br/><br/>
 			<input id="btnSubmit" class="btn btn-primary" type="button" value="查询" onclick="goSearch()"/>
 			&nbsp;
@@ -259,6 +259,20 @@ function page(n,s){
 	return false;
 }
 function goSearch(){
+    var startScroe = $("#startScroe").val();var endScore = $("#endScroe").val();
+    if(startScroe.length>0){
+        if(endScore.length == 0){
+            alert("请输入结束分数值!");return false;
+        }
+    }if(endScore.length>0){
+        if(startScroe.length == 0){
+            alert("请输入开始分数值!");return false;
+        }
+    }if(endScore.length>0 && startScroe.length > 0){
+        if(parseInt(startScroe) > parseInt(endScore)){
+            alert("开始分值必须小于结束分值");return false;
+        }
+    }
 	$("#pageNumber").val(1);
 	$("#pageSize").val('${query.pageSize}');
 	$("#searchForm").attr('action','${ctx}/admin/exam/score');