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

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. <%
  5. Request m_request = new Request(request);
  6. int iID = m_request.GetInt("ID");
  7. int iPage = m_request.GetInt("Page");
  8. Vector vt = SignTypeManager.getRecordByID(iID);
  9. String strTypeName="";
  10. String strRemark="";
  11. String strNoSignUserIDs = "";
  12. String strWorkDay = "";
  13. String strAfterEnd = "";
  14. String strBeforeBeign = "";
  15. String strStartTime = "";
  16. String strEndTime = "";
  17. try {
  18. if(vt.size()==1)
  19. {
  20.   strTypeName=((Vector)vt.get(0)).get(1).toString();
  21.   strStartTime = ((Vector)vt.get(0)).get(2).toString();
  22.   strEndTime = ((Vector)vt.get(0)).get(3).toString();
  23.   strBeforeBeign = ((Vector)vt.get(0)).get(4).toString();
  24.   strAfterEnd = ((Vector)vt.get(0)).get(5).toString();
  25.   strRemark=((Vector)vt.get(0)).get(6).toString();
  26.   strWorkDay = ((Vector)vt.get(0)).get(7).toString();
  27.   strNoSignUserIDs = ((Vector)vt.get(0)).get(8).toString();
  28. }
  29. }
  30. catch (Exception ex) {
  31. }
  32. %>
  33. <html>
  34.   <head>
  35.     <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  36.     <title>考勤签到-- GForce OA 2.0</title>
  37.     <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  38.     <script language="JavaScript" src="/js/changestyle.js"></script>
  39.     <script language="JavaScript" type="text/javascript">
  40.     function checkEditSignType()
  41.     {
  42.         with(document.editsigntype)
  43.         {
  44.             if(TypeName.value=="")
  45.             {
  46.                 alert("请输入签到类型名称!");
  47.                 TypeName.focus();
  48.                 return false;
  49.             }
  50.             StartTime.value=StartTimeHour.options[StartTimeHour.selectedIndex].text + ":" + StartTimeMinute.options[StartTimeMinute.selectedIndex].text;
  51.             EndTime.value=EndTimeHour.options[EndTimeHour.selectedIndex].text + ":" + EndTimeMinute.options[EndTimeMinute.selectedIndex].text;
  52.             if(StartTime.value>EndTime.value)
  53.             {
  54.               alert("开始签到时间不能比签到结束时间晚!");
  55.               StartTimeHour.focus();
  56.               return false;
  57.             }
  58.             if(BeforeBeign.value=="")
  59.             {
  60.                 alert("请输入早签到描述!");
  61.                 BeforeBeign.focus();
  62.                 return false;
  63.             }
  64.             if(AfterEnd.value=="")
  65.             {
  66.                 alert("请输入晚签到描述!");
  67.                 AfterEnd.focus();
  68.                 return false;
  69.             }
  70.             NoSignUserIDs.value="";
  71.             try
  72.             {
  73.               for(var i=0;i<self.selectuser.document.selectuser.userid.length;i++)
  74.               {
  75.                 if(self.selectuser.document.selectuser.userid[i].checked)
  76.                 {
  77.                   NoSignUserIDs.value+="," + self.selectuser.document.selectuser.userid[i].value;
  78.                 }
  79.               }
  80.               if(NoSignUserIDs.value.length>0)
  81.               {
  82.                 NoSignUserIDs.value = NoSignUserIDs.value.substr(1);
  83.               }
  84.             }
  85.             catch(ex)
  86.             {
  87.             }
  88.         }
  89.         return true;
  90.     }
  91.     </script>
  92.     <style type="text/css">
  93.       <!--
  94.       .imgtd {
  95.           border: 1px solid #0A0A0A;
  96.       }
  97.       -->
  98.     </style>
  99.   </head>
  100.   <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  101.     <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  102.       <tr>
  103.         <td align="center" valign="top"><p>&nbsp;</p>
  104.           <form name="editsigntype" action="EditSignTypeAction.jsp" method="post" onSubmit="javascript:return checkEditSignType();">
  105.             <table width="90%" border="1" cellspacing="0" cellpadding="0">
  106.               <tr>
  107.                 <td width="20%" bgcolor="<%=m_session.GetString("TitleColor")%>">签到类型名称:</td>
  108.                 <td width="50%"><input name="TypeName" type="text" id="Title" maxlength="60" size="38" value="<%=strTypeName%>"></td>
  109.                 <td width="30%" bgcolor="<%=m_session.GetString("TitleColor")%>">不用签到的人员:</td>
  110.               </tr>
  111.               <tr>
  112.                 <td bgcolor="<%=m_session.GetString("TitleColor")%>">签到开始时间:</td>
  113.                 <td>
  114.                   <input type="Hidden" name="StartTime" value="<%=strStartTime%>">
  115.                   <select name="StartTimeHour">
  116.                     <option>00</option>
  117.                     <option>01</option>
  118.                     <option>02</option>
  119.                     <option>03</option>
  120.                     <option>04</option>
  121.                     <option>05</option>
  122.                     <option>06</option>
  123.                     <option>07</option>
  124.                     <option selected>08</option>
  125.                     <option>09</option>
  126.                     <option>10</option>
  127.                     <option>11</option>
  128.                     <option>12</option>
  129.                     <option>13</option>
  130.                     <option>14</option>
  131.                     <option>15</option>
  132.                     <option>16</option>
  133.                     <option>17</option>
  134.                     <option>18</option>
  135.                     <option>19</option>
  136.                     <option>20</option>
  137.                     <option>21</option>
  138.                     <option>22</option>
  139.                     <option>23</option>
  140.                   </select>点
  141.                   <select name="StartTimeMinute">
  142.                     <option selected>00</option>
  143.                     <option>05</option>
  144.                     <option>10</option>
  145.                     <option>15</option>
  146.                     <option>20</option>
  147.                     <option>25</option>
  148.                     <option>30</option>
  149.                     <option>35</option>
  150.                     <option>40</option>
  151.                     <option>45</option>
  152.                     <option>50</option>
  153.                     <option>55</option>
  154.                   </select>分(原值:<%=strStartTime%>)
  155.                 </td>
  156.                 <td>
  157. <%
  158. if(strNoSignUserIDs.length()>0)
  159. {
  160.   String[] strNoSignUserID = strNoSignUserIDs.split(",");
  161.   for(int j=0;j<strNoSignUserID.length;j++)
  162.   {
  163.     out.print(UserManager.getPersonnelNameByUserID(Integer.parseInt(strNoSignUserID[j])) + "&nbsp;");
  164.   }
  165. }
  166. else
  167. {
  168.   out.print("&nbsp;");
  169. }
  170. %>
  171.                 </td>
  172.               </tr>
  173.               <tr>
  174.                 <td bgcolor="<%=m_session.GetString("TitleColor")%>">签到结束时间:</td>
  175.                 <td>
  176.                   <input type="Hidden" name="EndTime" value="<%=strEndTime%>">
  177.                   <select name="EndTimeHour">
  178.                     <option>00</option>
  179.                     <option>01</option>
  180.                     <option>02</option>
  181.                     <option>03</option>
  182.                     <option>04</option>
  183.                     <option>05</option>
  184.                     <option>06</option>
  185.                     <option>07</option>
  186.                     <option selected>08</option>
  187.                     <option>09</option>
  188.                     <option>10</option>
  189.                     <option>11</option>
  190.                     <option>12</option>
  191.                     <option>13</option>
  192.                     <option>14</option>
  193.                     <option>15</option>
  194.                     <option>16</option>
  195.                     <option>17</option>
  196.                     <option>18</option>
  197.                     <option>19</option>
  198.                     <option>20</option>
  199.                     <option>21</option>
  200.                     <option>22</option>
  201.                     <option>23</option>
  202.                   </select>点
  203.                   <select name="EndTimeMinute">
  204.                     <option>00</option>
  205.                     <option>05</option>
  206.                     <option>10</option>
  207.                     <option>15</option>
  208.                     <option>20</option>
  209.                     <option>25</option>
  210.                     <option selected>30</option>
  211.                     <option>35</option>
  212.                     <option>40</option>
  213.                     <option>45</option>
  214.                     <option>50</option>
  215.                     <option>55</option>
  216.                   </select>分(原值:<%=strEndTime%>)
  217.                 </td>
  218.                 <td rowspan="6" style="height:100%;"><iframe id="selectuser" frameborder=0 src="/SelectUser.jsp" width="100%" height="100%" scrolling="auto" style="width:100%;height:100%;"></iframe></td>
  219.               </tr>
  220.               <tr>
  221.                 <td bgcolor="<%=m_session.GetString("TitleColor")%>">早签到描述:</td>
  222.                 <td><input name="BeforeBeign" type="text" maxlength="50" size="30" value="<%=strBeforeBeign%>"></td>
  223.               </tr>
  224.               <tr>
  225.                 <td bgcolor="<%=m_session.GetString("TitleColor")%>">晚签到描述:</td>
  226.                 <td><input name="AfterEnd" type="text" maxlength="50" size="30" value="<%=strAfterEnd%>"></td>
  227.               </tr>
  228.               <tr>
  229.                 <td bgcolor="<%=m_session.GetString("TitleColor")%>">签到有效日:</td>
  230.                 <td>
  231.                   <input type="checkbox" name="WorkDay" value="0" <%=strWorkDay.indexOf("0")>=0?"Checked":""%>>星期天&nbsp;
  232.                   <input type="checkbox" name="WorkDay" value="1" <%=strWorkDay.indexOf("1")>=0?"Checked":""%>>星期一&nbsp;
  233.                   <input type="checkbox" name="WorkDay" value="2" <%=strWorkDay.indexOf("2")>=0?"Checked":""%>>星期二&nbsp;
  234.                   <input type="checkbox" name="WorkDay" value="3" <%=strWorkDay.indexOf("3")>=0?"Checked":""%>>星期三&nbsp;<br>
  235.                   <input type="checkbox" name="WorkDay" value="4" <%=strWorkDay.indexOf("4")>=0?"Checked":""%>>星期四&nbsp;
  236.                   <input type="checkbox" name="WorkDay" value="5" <%=strWorkDay.indexOf("5")>=0?"Checked":""%>>星期五&nbsp;
  237.                   <input type="checkbox" name="WorkDay" value="6" <%=strWorkDay.indexOf("6")>=0?"Checked":""%>>星期六&nbsp;
  238.                 </td>
  239.               </tr>
  240.               <tr>
  241.                 <td bgcolor="<%=m_session.GetString("TitleColor")%>">备注:</td>
  242.                 <td><textarea name="Remark" cols="30" rows="6"><%=strRemark%></textarea></td>
  243.               </tr>
  244.               <tr>
  245.                 <td>
  246.                   <input name="NoSignUserIDs" type="hidden"><input name="ID" type="hidden" value="<%=iID%>"><input name="Page" type="hidden" value="<%=iPage%>">
  247.                 </td>
  248.                 <td align="center"><input type="submit" name="Submit" value="修改"><input type="reset" name="Submit2" value="重置">
  249.                   <input name="Submit3" type="button" onClick="self.location='SignTypeManage.jsp';" value="返回">
  250.                 </td>
  251.               </tr>
  252.             </table>
  253.           </form>
  254.         </td>
  255.       </tr>
  256.     </table>
  257.   </body>
  258. </html>