⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 schedulemodify.jsp

📁 培训考试系统代码
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%>

<%@ include file="/agt/public/jsp/top.jsp" %>





<%

     SysResultSet res = (SysResultSet)request.getAttribute("schedule_detail");

     res.next();
     
     String RemTime = "";
     
     if(!(res.getString("REMINDTIME").equals("")))
     {
       RemTime = res.getString("REMINDTIME").substring(0,16);
     }

 %>

<title>新日程</title>

<script src="/public/scripts/cal.js"></script>
<script language="javascript" src="/agt/public/js/func.js"></script>

<form name="ScheduleOperatorForm" method="post" action="/ScheduleOperatorAction.do">

  <input type="hidden" name="operatorFlag" value = "<%=OperatorFlagCode.SCHEDULE_SAVE%>">

<input type="hidden" name="scheduleID" value="<%=res.getString("SCHEDULEID")%>">

<input type="hidden" name="makeStaffID">



  <table width="539" border="0" cellpadding="3" cellspacing="1" class="table-cs1">

    <tr>

      <td width="100" align="center" class="td-cs1">日程名称*</td>

      <td colspan="3" class="td-cs2">

        <input name="scheduleName" type="text" class="input2"

       value = "<%=res.getString("SCHEDULETITLE")%>">

      </td>

  </tr>

    <tr>

      <td width="100" align="center" class="td-cs1">日程说明</td>

      <td colspan="3" class="td-cs2">

        <textarea name="note" cols="55" rows="5" class="remark"><%=res.getString("NOTE")%></textarea>

      </td>

  </tr>

    <tr>

      <td width="100" align="center" class="td-cs1">开始时间*</td>

      <td colspan="3" class="td-cs2">

        <input name="beginTime" type="text" class="input2" value = "<%= res.getString("BEGINTIME").substring(0,16)%>" onClick="javascript:calDateTimeNoS(this);"  onKeypress="javascript:calDateTimeNoS(this);" readonly>

        </td>

  </tr>

    <tr>

      <td width="100" align="center" class="td-cs1">结束时间*</td>

      <td colspan="3" class="td-cs2">

        <input name="endTime" type="text" class="input2" value = "<%= res.getString("ENDTIME").substring(0,16) %>" onClick="javascript:calDateTimeNoS(this);"  onKeypress="javascript:calDateTimeNoS(this);" readonly>

       </td>

  </tr>

  <tr>

      <td width="100" align="center" class="td-cs1">

        <p>通知人*

          </p>

      </td>

                        <td colspan="3"  class="td-cs2"> 
                          <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td width="61%"><input type="text" class="input2" name="staffIds" value = "<%= res.getString("ATTSTAFFNO")%>"></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" align="center" class="td-cs1">是否提醒</td>

                        <td colspan="3" class="td-cs2"><select name="doRemind" class="input3" onchange="changeIsRemind(this.value)">
                            <option value = "0" <%if(res.getString("DOREMIND").equals("0")) {%> selected <%}%>>是</option>
                            <option value = "1" <%if(res.getString("DOREMIND").equals("1")) {%> selected <%}%>>否</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" value = "<%=RemTime%>" onClick="javascript:calDateTimeNoS(this);"  onKeypress="javascript:calDateTimeNoS(this);" size="-1" readonly font></div></td>


  </tr>


</table>

  <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%">&nbsp; </td>
                              <td width="25%"> 
                                <input name="save" type="image" onclick="SaveSubmit();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>
                  </form>

<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";
       document.all.remindTime.value = "";

   }
}

 changeIsRemind(document.ScheduleOperatorForm.doRemind.value);
 



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;

 }



  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 SaveSubmit(){

  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 + -