📄 scheduleadd.jsp
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ include file="/agt/public/jsp/top.jsp" %>
<script language="javascript" src="/agt/public/js/func.js"></script>
<title>新日程</title>
<form name="ScheduleOperatorForm" method="post" action="/ScheduleOperatorAction.do">
<input type="hidden" name="operatorFlag" value = "<%=OperatorFlagCode.SCHEDULE_ADD%>">
<input type="hidden" name="scheduleID">
<input type="hidden" name="makeStaffID">
<table width="539" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
<tr>
<td width="100" height="25" align="center" class="td-cs1">日程名称*</td>
<td class="td-cs2">
<input name="scheduleName" type="text" class="input2" maxlength=10>
</td>
</tr>
<tr>
<td width="100" height="25" align="center" class="td-cs1">日程说明</td>
<td class="td-cs2">
<textarea name="note" cols="55" rows="5" class="remark"></textarea>
</td>
</tr>
<tr>
<td width="100" height="25" align="center" class="td-cs1">开始时间*</td>
<td class="td-cs2">
<input name="beginTime" class="input2" onClick="javascript:calDateTimeNoS(this);" onKeypress="javascript:calDateTimeNoS(this);" size="20" readonly>
</td>
</tr>
<tr>
<td width="100" height="25" align="center" class="td-cs1">结束时间*</td>
<td class="td-cs2">
<input name="endTime" class="input2" onClick="javascript:calDateTimeNoS(this);" onKeypress="javascript:calDateTimeNoS(this);" size="20" readonly>
</td>
</tr>
<tr>
<td width="100" height="20" align="center" class="td-cs1">通知人*</td>
<td class="td-cs2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="61%"><input type="text" class="input2" name="staffIds"></td>
<td width="39%"><a href="javascript:;" onClick="window.showModalDialog('/GetStaff.do?opeType=<%=OperatorFlagCode.GET_STAFFNO%>',document.forms[0],'dialogWidth:480px; dialogHeight:420px; toolbar:no; status:no; location:no; scrolling:no; resize:no;');" onMouseOver="MM_swapImage('Image131','','/agt/public/images/choise_2.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="/agt/public/images/choise.gif" name="Image131" width="48" height="25" border="0" id="Image131"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100" height="25" align="center" class="td-cs1">是否提醒</td>
<td class="td-cs2">
<select name="doRemind" class="input3" onchange="changeIsRemind(this.value)">
<option value = "0" selected>是</option>
<option value = "1">否</option>
</select></td>
</tr>
<tr>
<td align="center" class="td-cs1"><div id="md1">提醒时间*</div></td>
<td class="td-cs2"> <div id="md2"><input name="remindTime" class="input2" onClick="javascript:calDateTimeNoS(this);" onKeypress="javascript:calDateTimeNoS(this);" size="-1" readonly font></div></td>
</tr>
</table>
</form>
<table width="539" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"> <table width="424" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="25%"> </td>
<td width="25%">
<input name="save" type="image" onclick="doSubmit();return false;" src="/agt/public/images/save.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'">
</td>
<td>
<input name="reset" type="image" onclick="ScheduleOperatorForm.reset();changeIsRemind('0');return false;" src="/agt/public/images/reset.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'">
</td>
</tr>
</table></td>
</tr>
</table>
<script src="/public/scripts/cal.js"></script>
<script src="/agt/public/js/my_functions.js" type="text/javascript"></script>
<script language="JavaScript" type="text/JavaScript">
function changeIsRemind(isRemind)
{
if(isRemind == "0")
{
document.all.md1.style.display = "inline";
document.all.md2.style.display = "inline";
}
else
{
document.all.md1.style.display = "none";
document.all.md2.style.display = "none";
}
}
changeIsRemind("0");
function CheckAvailable()
{
if (document.ScheduleOperatorForm.scheduleName.value == "")
{
alert("日程名称不能为空");
document.ScheduleOperatorForm.scheduleName.focus();
return false;
}
else if (document.ScheduleOperatorForm.staffIds.value == "")
{
alert("日程通知人不能为空");
document.ScheduleOperatorForm.staffIds.focus();
return false;
}
///:huangyuyuan add 2004-06-22
//对通知人进行检查,如果输入重复工号,返回错误
/*
var staffs = document.ScheduleOperatorForm.staffIds.value.split(",");
if(staffs.length > 1)
{
for(var i = 0; i < staffs.length-1; i++){
for(var j = i+1; j < staffs.length; j++){
if(staffs[i] == staffs[j])
{
alert("通知人中包含有重复的工号,请去掉重复的工号!");
return false;
}
}
}
}
*/
///:~
var date = checkDateTime(document.ScheduleOperatorForm.beginTime.value,document.ScheduleOperatorForm.endTime.value)
if( date ==-1)
{
alert("开始时间晚于结束时间");
document.ScheduleOperatorForm.beginTime.focus();
return false;
}
else if( date ==0)
{
alert("开始时间跟结束时间相等");
document.ScheduleOperatorForm.beginTime.focus();
return false;
}
else if( date ==2)
{
alert("开始时间跟结束时间不能为空");
document.ScheduleOperatorForm.beginTime.focus();
return false;
}
else if( document.ScheduleOperatorForm.note.value.length > 50)
{
alert("日程说明应不多于50个字符,您的输入过长,请删减");
document.ScheduleOperatorForm.note.focus();
return false;
}
else if( document.ScheduleOperatorForm.doRemind.value == 0)
{
if ( document.ScheduleOperatorForm.remindTime.value =="")
{
alert("选择提醒必须要设置提醒时间!");
document.ScheduleOperatorForm.remindTime.focus();
return false;
}
else
{
var daterem = checkDateTime(document.ScheduleOperatorForm.remindTime.value,document.ScheduleOperatorForm.endTime.value)
if( daterem ==-1)
{
alert("提醒时间不能比结束时间晚!");
document.ScheduleOperatorForm.remindTime.focus();
return false;
}
else
{
return true;
}
}
}
else
{
document.ScheduleOperatorForm.remindTime.value = "";
var staffIds = document.ScheduleOperatorForm.staffIds;
var checkStaffNoRs = CheckInputNo("<%=GetStaffAction.getStaffNoStr()%>",staffIds.value);
if(checkStaffNoRs != "")
{
alert("所输入日程通知人中工号" + checkStaffNoRs + "不存在!");
staffIds.focus();
return false;
}
else
{
return true;
}
}
}
function doSubmit(){
if (CheckAvailable())
{
document.ScheduleOperatorForm.submit();
return true;
}
else
{
return false;
}
}
</script>
<%@ include file="/agt/public/jsp/bot.jsp" %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -