📄 examaddinputbyclass.jsp
字号:
var startTime = document.examform.startTime;
var endTime = document.examform.endTime;
var checkHandler = document.examform.checkHandler;
var teacherId = document.examform.teacherId;
if(title == null || trim(title.value)=="")
{
alert("考试安排的名称不能为空,请输入!");
title.focus();
return false;
}
if(classId ==null || trim(classId.value)=="")
{
alert("考试安排的所属类别不能为空,请输入!");
return false;
}
var paperId = document.examform.paperId1;
if(paperId == null || trim(paperId.value)=="")
{
alert("第一组所用试卷不能为空,请输入!");
return false;
}
paperId = document.examform.paperId2;
if(paperId == null || trim(paperId.value)=="")
{
alert("第二组所用试卷不能为空,请输入!");
return false;
}
paperId = document.examform.paperId3;
if(paperId == null || trim(paperId.value)=="")
{
alert("第三组所用试卷不能为空,请输入!");
return false;
}
paperId = document.examform.paperId4;
if(paperId == null || trim(paperId.value)=="")
{
alert("第四组所用试卷不能为空,请输入!");
return false;
}
if(passScore ==null || trim(passScore.value)=="")
{
alert("考试安排的及格分数不能为空,请输入!");
passScore.focus();
return false;
}
if(!isNumber(passScore.value))
{
alert("考试安排的及格分数应是数字,输入错误,请重新输入!");
passScore.focus();
return false;
}
var paperScoreValue1 = parseInt(document.examform.paperScore1.value);
var paperScoreValue2 = parseInt(document.examform.paperScore2.value);
var paperScoreValue3 = parseInt(document.examform.paperScore3.value);
var paperScoreValue4 = parseInt(document.examform.paperScore4.value);
var passScoreValue = parseInt(passScore.value);
if(passScoreValue > paperScoreValue1 ||
passScoreValue > paperScoreValue2 ||
passScoreValue > paperScoreValue3 ||
passScoreValue > paperScoreValue4)
{
alert("考试的及格分数" + passScore.value + "大于其中一张试卷的总分数,请重新输入!");
passScore.focus();
return false;
}
if(examTime != null && examTime.value != "")
{
if(!isNumber(examTime.value))
{
alert("考试安排的考试时间应是数字,输入错误,请重新输入!");
examTime.focus();
return false;
}
}
if(maxCount != null && maxCount.value != "")
{
if(!isNumber(maxCount.value))
{
alert("考试安排的最大次数应是数字,输入错误,请重新输入!");
maxCount.focus();
return false;
}
}
//开始时间与结束时间
if(startTime.value != null && endTime.value != null && startTime.value != "" && endTime.value != "")
{
if(startTime.value > endTime.value || startTime.value == endTime.value)
{
alert("开始时间不能小于或等于结束时间,请重新输入");
startTime.focus();
return false;
}
}
var tmpTime = GetCurrentDate() + " 00:00";
if(startTime.value != "")
{
if(startTime.value < tmpTime)
{
alert("开始日期不能小于当前日期,请重新输入");
startTime.focus();
return false;
}
}
if(endTime.value != "")
{
if(endTime.value < GetCurrentTime())
{
alert("结束时间不能小于当前时间,请重新输入");
endTime.focus();
return false;
}
}
if(trim(teacherId.value)!="")
{
var checkTeacherIdRs = CheckInputNo("<%=GetStaffAction.getTeacherStr()%>",teacherId.value);
if(checkTeacherIdRs != "")
{
alert("所输入评卷教师工号" + checkTeacherIdRs + "不存在或者不具有评卷的权限!");
teacherId.focus();
return false;
}
}
if(checkHandler == null || trim(checkHandler.value)=="")
{
alert("审查人不能为空,请输入!");
checkHandler.focus();
return false;
}
if(checkHandler.value.indexOf(",") != -1)
{
alert("只能输入一个审查人的工号!");
checkHandler.focus();
return false;
}
var checkHandlerRs = CheckInputNo("<%=GetStaffAction.getExamChecker()%>",checkHandler.value);
if(checkHandlerRs != "")
{
alert("所输入审查人工号" + checkHandlerRs + "不存在或者不具有审查考试的权限!");
checkHandler.focus();
return false;
}
return true;
}
//提交保存
function saveSubmit()
{
if(checkForm() == false)
{
return false;
}
document.examform.state.value = "0";
document.examform.submit();
}
//提交审查
function checkSubmit()
{
if(checkForm() == false)
{
return false;
}
document.examform.state.value = "1";
document.examform.submit();
}
//选择试卷
function selectPaper(order)
{
var urlStr ="/ExamPaperMan.do?opeType=<%=OperatorFlagCode.EPAPER_QUERY_FORSELECT%>&statusTerm=1&paperTypeTerm=0&order=" + order;
openWindow(urlStr,"选择试卷页面");
}
//选择日期
function SelectDate(DivID)
{
var fullPath="/agt/public/pages/PopTime.htm";
var strDate; //Chinese date formate
var intDate; //Integer date formate
var objEffectDate=eval("examform." + DivID);
intDate=showModalDialog(fullPath,window,"dialogWidth=335px;dialogHeight=300px;center=yes;border=this;help=no");
if (intDate!=null)
{
objEffectDate.value=intDate.substr(0,4)+"-"+intDate.substr(5,2)+"-"+intDate.substr(8,8);
if (objEffectDate.value!="undefined")
{
strDate=intDate.substr(0,4)+"-"+intDate.substr(5,2)+"-"+intDate.substr(8,8);
objEffectDate.value=strDate;
}
else
{
objEffectDate.value="";
}
}
event.returnValue =false;
}
function changeGroupExam(value)
{
if(value == "0")
{
document.examform.action="/agt/exam/ExamAddInput.jsp";
document.examform.submit();
}
if(value == "1")
{
document.examform.action="/agt/exam/ExamAddInputByClass.jsp";
document.examform.submit();
}
}
function openStaffNoW()
{
window.showModalDialog('/GetStaff.do?opeType=<%=OperatorFlagCode.GET_STAFFNO%>',document.forms[0],'dialogWidth:460px; dialogHeight:380px; toolbar:no; status:no; location:no; scrolling:no; resize:no;');
}
function openGroupW()
{
window.showModalDialog('/GetStaff.do?opeType=<%=OperatorFlagCode.GET_GROUP%>',document.forms[0],'dialogWidth:460px; dialogHeight:380px; toolbar:no; status:no; location:no; scrolling:no; resize:no;');
}
</script>
<%@ include file="/agt/public/jsp/bot.jsp" %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -