📄 exammodifyinput.jsp
字号:
{
alert("考试安排的所用试卷不能为空,请输入!");
return false;
}
if(classId ==null || trim(classId.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 paperScoreValue = parseInt(paperScore.value);
var passScoreValue = parseInt(passScore.value);
if(passScoreValue > paperScoreValue)
{
alert("考试的及格分数" + passScore.value + "大于试卷的总分数" + paperScore.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;
}
var scope = document.examform.scope;
var staffIds = document.examform.staffIds;
var groupIds = document.examform.groupIds;
if(scope.value == "1")
{
if(staffIds.value == "" && groupIds.value == "")
{
alert("参与人员与参与班组不能都为空,请选择参与人员与班组!");
return false;
}
var checkStaffNoRs = CheckInputNo("<%=GetStaffAction.getStaffNoStr()%>",staffIds.value);
if(checkStaffNoRs != "")
{
alert("所输入参与人员中工号" + checkStaffNoRs + "不存在!");
staffIds.focus();
return false;
}
var checkGroupRs = CheckInputNo("<%=GetStaffAction.getGroupStr()%>",groupIds.value);
if(checkGroupRs != "")
{
alert("所输入参与班组中组号" + checkGroupRs + "不存在!");
groupIds.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()
{
openWindow("/ExamPaperMan.do?opeType=<%=OperatorFlagCode.EPAPER_QUERY_FORSELECT%>&statusTerm=1","选择试卷页面");
}
//选择日期
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 changeScope(scope)
{
var tableRow = document.all.scopeTable.rows;
if(scope == "0" && tableRow != null && tableRow.length != 0)
{
document.all.scopeTable.deleteRow(0);
document.all.scopeTable.deleteRow(0);
}
if(scope == "1")
{
var row = document.all.scopeTable.insertRow();
var cell1=row.insertCell();
cell1.className = "td-cs1";
cell1.align = "center";
cell1.width = "15%";
cell1.innerHTML='参与人员';
var cell2=row.insertCell();
cell2.className = "td-cs2";
cell2.width = "85%";
var ihtml= '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
ihtml = ihtml + ' <tr> <td width="55%" > <input name="staffIds" type="text" class="input2" value="<%=staffNoStr%>" size="40" >';
ihtml = ihtml + ' </td> <td width="45%"> ';
ihtml = ihtml + ' <input name="choise" type="image" onClick="openStaffNoW();return false;" src="/agt/public/images/choise.gif" width="48" height="25" border="0">';
ihtml = ihtml + ' </td> </tr> </table>';
cell2.innerHTML = ihtml;
row = document.all.scopeTable.insertRow();
cell1=row.insertCell();
cell1.className = "td-cs1";
cell1.align = "center";
cell1.width = "15%";
cell1.innerHTML='参与班组';
cell2=row.insertCell();
cell2.className = "td-cs2";
cell2.width = "85%";
var ihtml= '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
ihtml = ihtml + ' <tr> <td width="55%" ><input name="groupIds" type="text" class="input2" value="<%=groupNoStr%>" size="40" >';
ihtml = ihtml + ' </td> <td width="45%"> ';
ihtml = ihtml + ' <input name="choise" type="image" onClick="openGroupW();return false;" src="/agt/public/images/choise.gif" width="48" height="25" border="0">';
ihtml = ihtml + ' </td> </tr> </table>';
cell2.innerHTML = ihtml;
}
}
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 + -