AddErrandApply.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:19k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  7. <title>出差申请管理-- GForce OA 2.0</title>
  8. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  9. <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
  10. <script language="JavaScript" type="text/javascript">
  11. function checkAddErrandApply()
  12. {
  13.     if(document.AddErrandApply.CompanyTo.value=="")
  14.     {
  15.         alert("请输入出差目的单位名称!");
  16.         document.AddErrandApply.CompanyTo.focus();
  17.         return false;
  18.     }
  19.         if(!isDate(document.AddErrandApply.PlanStartDateD.value))
  20.         {
  21.             alert("日期格式错误,请按照“2002-02-18”重新输入!");
  22.             document.AddErrandApply.PlanStartDateD.focus();
  23.             return false;
  24.         }
  25.         if(!isDate(document.AddErrandApply.PlanEndDateD.value))
  26.         {
  27.             alert("日期格式错误,请按照“2002-02-18”重新输入!");
  28.             document.AddErrandApply.PlanEndDateD.focus();
  29.             return false;
  30.         }
  31.     for(var i=0;i<parseInt(document.AddErrandApply.ApproveLevel.selectedIndex)+1;i++)
  32.     {
  33.        if(parseInt(eval("document.AddErrandApply.ApproveUserID" + (i+1)).value)<1)
  34.        {
  35.          alert("请选择第" + (i+1) + "级审批用户!");
  36.          eval("document.AddErrandApply.PersonnelName" + (i+1)).focus();
  37.          return false;
  38.        }
  39.     }
  40. //计划开始时间,结束时间合成
  41.    document.AddErrandApply.PlanStartTime.value = document.AddErrandApply.PlanStartDateD.value + " "+
  42.                                                  document.AddErrandApply.PlanStartDateT.value + ":00:00";
  43.    document.AddErrandApply.PlanEndTime.value = document.AddErrandApply.PlanEndDateD.value + " "+
  44.                                                  document.AddErrandApply.PlanEndDateT.value + ":00:00";
  45. }
  46. function PopUpSelectUser(UserName,Number,UserID)
  47. {
  48.   showx = event.screenX - event.offsetX;    // + deltaX;
  49.   showy = event.screenY - event.offsetY+18; // + deltaY;
  50.   var retval = window.showModalDialog("/SelectUser1.jsp", "","dialogWidth:480px; dialogHeight:408px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; help:no; status:no; directories:yes;scrollbars:yes;Resizable=yes; ");
  51.   if(retval!=null)
  52.   {
  53.     if(retval.indexOf("|!|")>0)
  54.     {
  55.       var strtemp = retval.split("|!|");
  56.       UserName.value=strtemp[1];
  57.       Number.value=strtemp[2];
  58.       UserID.value=strtemp[0];
  59.     }
  60.   }
  61. }
  62. </script>
  63. </head>
  64. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  65.   <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  66.   <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  67.     <tr>
  68.     <td align="center" valign="top">
  69.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  70.         <tr>
  71.           <td height="50" valign="top" background="../images/dy-back.gif">
  72.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  73.               <tr valign="middle">
  74.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  75.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">出差申请</font></strong></td>
  76.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  77.                    <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59">&nbsp;-->
  78.                  <!--<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59">&nbsp;-->
  79.                   <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59">&nbsp;-->
  80.                   <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59">&nbsp;-->
  81.                   <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59">&nbsp;-->
  82.                   <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79">&nbsp;-->
  83.                 </td>
  84.               </tr>
  85.             </table>
  86.           </td>
  87.         </tr>
  88.       </table><br>
  89. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  90.     <tr>
  91.         <td align="center" valign="top"><p>&nbsp;</p>
  92. <%
  93. Request m_request = new Request(request);
  94. int iSysDirID = m_request.GetInt("SysDirID");
  95. int intUserID = m_session.GetInt("UserID");
  96. %>
  97.             <form name="AddErrandApply" action="/Operation/AddErrandApplyAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkAddErrandApply();">
  98.             <table  border="0" cellpadding="0" cellspacing="0" width="90%">
  99.                 <tr>
  100.                     <td align="right" valign="middle"><font color="#0A0A0A">目的单位名称:</font></td>
  101.                     <td align="left" valign="middle" nowrap>
  102.                         <input name="ApplyUserID" type="hidden" value="<%=intUserID%>">
  103.                         <input name="ConfirmUserID" type="hidden" value="<%=intUserID%>">
  104.                         <input name="SysDirID" type="hidden" value="<%=iSysDirID%>">
  105.                         <input name="CompanyTo" type="text" maxlength="150" size="37">
  106.                     </td>
  107.                 </tr>
  108.                 <tr>
  109.                     <td align="right" valign="middle"><font color="#0A0A0A">目的城市:</font></td>
  110.                     <td align="left" valign="middle" nowrap>
  111.                         <input name="CityTo" type="text" maxlength="60" size="37">
  112.                     </td>
  113.                 </tr>
  114.                 <tr>
  115.                     <td align="right" valign="middle"><font color="#0A0A0A">出差事由:</font></td>
  116.                     <td align="left" valign="middle" nowrap>
  117.                         <input name="ErrandTitle" type="text" maxlength="150" size="37">
  118.                     </td>
  119.                 </tr>
  120.                 <tr>
  121.                     <td align="right" valign="middle"><font color="#0A0A0A">出差事由描述:</font></td>
  122.                     <td align="left" valign="middle" nowrap>
  123.                       <textarea name="ErrandContent" cols="30" rows="6"></textarea>
  124.                     </td>
  125.                 </tr>
  126.                 <tr>
  127.                     <td align="right" valign="middle"><font color="#0A0A0A">出差人员:</font></td>
  128.                     <td align="left" valign="middle" nowrap>
  129.                     <input name="Personnels" type="text" maxlength="200" size="37">
  130.                     <%java.util.Date t_Date = new java.util.Date();%>
  131.                     <input name="ApplyTime" type="hidden" value="<%=StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm:ss")%>">
  132.                     </td>
  133.                 </tr>
  134.                 <tr>
  135.                     <td align="right" valign="middle"><font color="#0A0A0A">计划开始时间:</font></td>
  136.                     <td align="left" valign="middle" nowrap>
  137.                     <input name="PlanStartTime" type="hidden">
  138.                     <input name="PlanStartDateD" type="text" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="12" size="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  139.               <select name="PlanStartDateT">
  140.                 <option value="6">6</option>
  141.                 <option value="7">7</option>
  142.                 <option value="8">8</option>
  143.                 <option value="9" selected>9</option>
  144.                 <option value="10">10</option>
  145.                 <option value="11">11</option>
  146.                 <option value="12">12</option>
  147.                 <option value="13">13</option>
  148.                 <option value="14">14</option>
  149.                 <option value="15">15</option>
  150.                 <option value="16">16</option>
  151.                 <option value="17">17</option>
  152.                 <option value="18">18</option>
  153.                 <option value="19">19</option>
  154.                 <option value="20">20</option>
  155.               </select>
  156.               <font color="#0A0A0A">时</font> </td>
  157.                 </tr>
  158.                 <tr>
  159.                     <td align="right" valign="middle"><font color="#0A0A0A">计划结束时间:</font></td>
  160.                     <td align="left" valign="middle" nowrap>
  161.                     <input name="PlanEndTime" type="hidden">
  162.                     <input name="PlanEndDateD" type="text" onFocus="JavaScript:this.value=fPopUpCalendarDlg();" maxlength="12" size="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  163.               <select name="PlanEndDateT">
  164.                 <option value="6">6</option>
  165.                 <option value="7">7</option>
  166.                 <option value="8">8</option>
  167.                 <option value="9">9</option>
  168.                 <option value="10">10</option>
  169.                 <option value="11">11</option>
  170.                 <option value="12">12</option>
  171.                 <option value="13">13</option>
  172.                 <option value="14">14</option>
  173.                 <option value="15">15</option>
  174.                 <option value="16">16</option>
  175.                 <option value="17" selected>17</option>
  176.                 <option value="18">18</option>
  177.                 <option value="19">19</option>
  178.                 <option value="20">20</option>
  179.               </select>
  180.               <font color="#0A0A0A">时</font> </td>
  181.                 </tr>
  182.                 <tr>
  183.                     <td align="right" valign="middle"><font color="#0A0A0A">备注:</font></td>
  184.                     <td align="left" valign="middle" nowrap>
  185.                       <textarea name="Remark" cols="30" rows="3"></textarea>
  186.                     </td>
  187.                 </tr>  <tr>
  188.     <td align="right" valign="middle">审批级别:</td>
  189.     <td align="left" valign="middle" nowrap>
  190.       <select name="ApproveLevel" onchange="for(var i=0;i<7;i++){if(i>this.selectedIndex){eval('document.all.ApproveList' + (i+1)).style.display='none';}else{eval('document.all.ApproveList' + (i+1)).style.display='';}}">
  191.         <option value="1" selected>1级</option>
  192.         <option value="2">2级</option>
  193.         <option value="3">3级</option>
  194.         <option value="4">4级</option>
  195.         <option value="5">5级</option>
  196.         <option value="6">6级</option>
  197.         <option value="7">7级</option>
  198.       </select>
  199.     </td>
  200.   </tr>
  201.   <tr>
  202.     <td align="right" valign="middle">&nbsp;</td>
  203.     <td align="center" valign="middle" nowrap>
  204.       <table border="1" cellpadding="0" cellspacing="0" width="95%">
  205.         <tr bgcolor="<%=m_session.GetString("TitleColor")%>">
  206.           <th align="center" valign="middle" nowrap>级别</th>
  207.           <th align="center" valign="middle" nowrap>员工姓名</th>
  208.           <th align="center" valign="middle" nowrap>员工编号</th>
  209.         </tr>
  210.         <tr ID="ApproveList1">
  211.           <td align="center" valign="middle" nowrap>一级</td>
  212.           <td align="center" valign="middle" nowrap><input name="PersonnelName1" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName1,document.AddErrandApply.PersonnelNumber1,document.AddErrandApply.ApproveUserID1);"><input name="ApproveUserID1" type="Hidden" value="0"><a href="" onclick="PopUpSelectUser(document.AddErrandApply.PersonnelName1,document.AddErrandApply.PersonnelNumber1,document.AddErrandApply.ApproveUserID1);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  213.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber1" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName1,document.AddErrandApply.PersonnelNumber1,document.AddErrandApply.ApproveUserID1);"></td>
  214.         </tr>
  215.         <tr ID="ApproveList2" style="display:none">
  216.           <td align="center" valign="middle" nowrap>二级</td>
  217.           <td align="center" valign="middle" nowrap><input name="PersonnelName2" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName2,document.AddErrandApply.PersonnelNumber2,document.AddErrandApply.ApproveUserID2);"><input name="ApproveUserID2" type="Hidden" value="0"><a href="" onClick="PopUpSelectUser(document.AddErrandApply.PersonnelName2,document.AddErrandApply.PersonnelNumber2,document.AddErrandApply.ApproveUserID2);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  218.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber2" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName1,document.AddErrandApply.PersonnelNumber2,document.AddErrandApply.ApproveUserID1);" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName2,document.AddErrandApply.PersonnelNumber2,document.AddErrandApply.ApproveUserID2);"></td>
  219.         </tr>
  220.         <tr ID="ApproveList3" style="display:none">
  221.           <td align="center" valign="middle" nowrap>三级</td>
  222.           <td align="center" valign="middle" nowrap><input name="PersonnelName3" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName3,document.AddErrandApply.PersonnelNumber3,document.AddErrandApply.ApproveUserID3);"><input name="ApproveUserID3" type="Hidden" value="0"><a href="" onClick="PopUpSelectUser(document.AddErrandApply.PersonnelName3,document.AddErrandApply.PersonnelNumber3,document.AddErrandApply.ApproveUserID3);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  223.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber3" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName3,document.AddErrandApply.PersonnelNumber3,document.AddErrandApply.ApproveUserID3);" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName3,document.AddErrandApply.PersonnelNumber3,document.AddErrandApply.ApproveUserID3);"></td>
  224.         </tr>
  225.         <tr ID="ApproveList4" style="display:none">
  226.           <td align="center" valign="middle" nowrap>四级</td>
  227.           <td align="center" valign="middle" nowrap><input name="PersonnelName4" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName4,document.AddErrandApply.PersonnelNumber4,document.AddErrandApply.ApproveUserID4);"><input name="ApproveUserID4" type="Hidden" value="0"><a href="" onClick="PopUpSelectUser(document.AddErrandApply.PersonnelName4,document.AddErrandApply.PersonnelNumber4,document.AddErrandApply.ApproveUserID4);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  228.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber4" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName4,document.AddErrandApply.PersonnelNumber4,document.AddErrandApply.ApproveUserID4);" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName4,document.AddErrandApply.PersonnelNumber4,document.AddErrandApply.ApproveUserID4);"></td>
  229.         </tr>
  230.         <tr ID="ApproveList5" style="display:none">
  231.           <td align="center" valign="middle" nowrap>五级</td>
  232.           <td align="center" valign="middle" nowrap><input name="PersonnelName5" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName5,document.AddErrandApply.PersonnelNumber5,document.AddErrandApply.ApproveUserID5);"><input name="ApproveUserID5" type="Hidden" value="0"><a href="" onClick="PopUpSelectUser(document.AddErrandApply.PersonnelName5,document.AddErrandApply.PersonnelNumber5,document.AddErrandApply.ApproveUserID5);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  233.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber5" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName5,document.AddErrandApply.PersonnelNumber5,document.AddErrandApply.ApproveUserID5);" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName5,document.AddErrandApply.PersonnelNumber5,document.AddErrandApply.ApproveUserID5);"></td>
  234.         </tr>
  235.         <tr ID="ApproveList6" style="display:none">
  236.           <td align="center" valign="middle" nowrap>六级</td>
  237.           <td align="center" valign="middle" nowrap><input name="PersonnelName6" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName6,document.AddErrandApply.PersonnelNumber6,document.AddErrandApply.ApproveUserID6);"><input name="ApproveUserID6" type="Hidden" value="0"><a href="" onClick="PopUpSelectUser(document.AddErrandApply.PersonnelName6,document.AddErrandApply.PersonnelNumber6,document.AddErrandApply.ApproveUserID6);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  238.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber6" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName6,document.AddErrandApply.PersonnelNumber6,document.AddErrandApply.ApproveUserID6);" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName6,document.AddErrandApply.PersonnelNumber6,document.AddErrandApply.ApproveUserID6);"></td>
  239.         </tr>
  240.         <tr ID="ApproveList7" style="display:none">
  241.           <td align="center" valign="middle" nowrap>七级</td>
  242.           <td align="center" valign="middle" nowrap><input name="PersonnelName7" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName7,document.AddErrandApply.PersonnelNumber7,document.AddErrandApply.ApproveUserID7);"><input name="ApproveUserID7" type="Hidden" value="0"><a href="" onClick="PopUpSelectUser(document.AddErrandApply.PersonnelName7,document.AddErrandApply.PersonnelNumber7,document.AddErrandApply.ApproveUserID7);return false;"><img src="/images/couple.gif" border='0' title="点击选择用户"></a></td>
  243.           <td align="center" valign="middle" nowrap><input name="PersonnelNumber7" type="text" readonly size="20" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName7,document.AddErrandApply.PersonnelNumber7,document.AddErrandApply.ApproveUserID7);" onDblClick="PopUpSelectUser(document.AddErrandApply.PersonnelName7,document.AddErrandApply.PersonnelNumber7,document.AddErrandApply.ApproveUserID7);"></td>
  244.         </tr>
  245.       </table>
  246.     </td>
  247.   </tr>
  248.                 <tr>
  249.                     <td align="right" valign="middle">&nbsp;</td>
  250.                     <td align="left" valign="middle" nowrap>
  251.                         <input type="submit" value="添加">  &nbsp;&nbsp;&nbsp;
  252.                         <input type="reset" value="重填">  &nbsp;&nbsp;&nbsp;
  253.                         <input type="button" value="返回" onclick="window.location='ErrandApplyManage.jsp?SysDirID=<%=iSysDirID%>';">
  254.                     </td>
  255.                 </tr>
  256.             </table>
  257.             </form>
  258.         </td>
  259.     </tr>
  260. </table>
  261. </body>
  262. </html>