department_attribute_sub_new.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
  3. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  4. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  5. <HTML><jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  6. <script language="JavaScript" src="/vnex/util/popSelect.js"></script>
  7. <script language="JavaScript1.2" src="/vnex/util/strutil.js"></script>
  8. <script language="JavaScript" src="/vnex/util/validate.js"></script>
  9. <script language=JavaScript >
  10. function docheck()
  11. {
  12.     if(isEmpty(myform.divisionName.value) || isEmptyStr(myform.divisionName.value) )
  13. {
  14. alert("请输入部门名称");
  15. myform.divisionName.focus();
  16. return false;
  17. }
  18. if (myform.divisionName.value == myform.parentDivisionName.value )
  19. {
  20. alert("部门名称不能和父部门名称重复!");
  21. myform.divisionName.focus();
  22. return false;
  23. }
  24. if (myform.divisionName.value.length > 20)
  25. {
  26. alert("部门名称长度小于20!");
  27. myform.divisionName.focus();
  28. return false;
  29. }
  30. if (myform.divisionDuty.value.length > 50)
  31. {
  32. alert("部门职能长度小于50!");
  33. myform.divisionDuty.focus();
  34. return false;
  35. }
  36. if (myform.managerId.value == -1)
  37. {
  38. alert("必须选择部门主管!");
  39. return false;
  40. }
  41. if (!(isTelephone(myform.telephone.value)) || (myform.telephone.value.length>20))
  42. {
  43. alert("电话号码无效!");
  44. myform.telephone.focus();
  45. return false;
  46. }
  47. if (!(isTelephone(myform.fax.value)) || (myform.fax.value.length>20))
  48. {
  49. alert("传真号码无效!");
  50. myform.fax.focus();
  51. return false;
  52. }
  53. if (myform.location.value.length > 15)
  54. {
  55. alert("办公地址长度小于15!");
  56. myform.location.focus();
  57. return false;
  58. }
  59. if ( !(isZIPCode(myform.zipCode.value)) )
  60. {
  61. alert("邮政编码必须是数字,6位!");
  62. myform.zipCode.focus();
  63. return false;
  64. }
  65. if (!(isEmail(myform.email.value)))
  66. {
  67. alert("email 不合法!");
  68. myform.email.focus();
  69. return false;
  70. }
  71.     
  72. myform.action="/mainctrl/organization/addDivisionProcess";
  73. myform.submit();
  74. }
  75. </script>
  76. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  77. <script language="JavaScript" src="/vnex/menu/dockmenu_hr.js"></script>
  78. <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
  79. <DIV align=center>
  80. <form name="myform" method="post" action="">
  81.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  82.     <tbody>
  83.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  84.     <TR> 
  85.         <TD colSpan=3 align="center"> 
  86.           <br>
  87.           <!--休假事件表开始 -->
  88.          <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  89.             <tr>
  90.               <td bgcolor="#fafafa">  
  91.                 <table class=title cellspacing=1 width="600" border=0 cellpadding="2">
  92.                   <tr bgcolor="#666666"> 
  93.                     <td colspan="2"><font class="strongw">
  94. <a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;
  95. <a href="/mainctrl/hr/main"><font color="#FFFFFF">人力资源</font></a>&gt;&gt;
  96. <a href="/mainctrl/organization/getAllDivision"><font color="#FFFFFF">组织结构与职位管理</font></a>&gt;&gt; 
  97.                       增加下属新部门</font></td>
  98.                   </tr>
  99.             <tr bgcolor="#fafafa"> 
  100.               <td width="118"><font class=strong>&nbsp;部门名称:</font></td>
  101.               <td width="371"> 
  102.                 <input type="text" name="divisionName" class=text size="24">&nbsp;* &nbsp(注:带*为必填内容)
  103.               </td>
  104.             </tr>
  105.             <tr bgcolor="#e0e0e0"> 
  106.               <td width="118"><font class=strong>&nbsp;上级部门:</font></td>
  107.               <td width="70%"> <%=request.getParameter("name")%> 
  108.                 <% String id = request.getParameter("id");%>
  109.                 <input type=hidden name=parentDivisionId value="<%=id%>">
  110.                 <input type=hidden name=parentDivisionName value="<%=request.getParameter("name")%>">
  111.               </td>
  112.             </tr>
  113.             <tr bgcolor="#fafafa">
  114.               <td width="118"><font class=strong>&nbsp;部门主管:</font></td>
  115.                     <td width="371"> <hr:EmployeeList divisionId="-1"> 
  116.                       <select name="managerId">
  117.                         <option value="-1">--请选择--</option>
  118.                         <vnex:items > 
  119.                         <option value="<hr:EmployeeAttribute attribute="id"/>" 
  120.                         > <hr:EmployeeAttribute attribute="employee_name"/> </option>
  121.                         </vnex:items> 
  122.                       </select>
  123.                       </hr:EmployeeList> &nbsp;* &nbsp</td>
  124.             </tr>
  125.             <tr bgcolor="#fafafa"> 
  126.               <td width="118"><font class=strong>&nbsp;部门职能:</font></td>
  127.               <td width="371"> 
  128.                 <textarea rows="5" name="divisionDuty" cols="59"></textarea>
  129.               </td>
  130.             </tr>
  131.             <tr bgcolor="#e0e0e0"> 
  132.               <td width="118"><font class=strong>&nbsp;电话:</font></td>
  133.               <td width="371"> 
  134.                 <input type="text" name="telephone" class=text size="24">
  135.               </td>
  136.             </tr>
  137.             <tr bgcolor="#fafafa"> 
  138.               <td width="118"><font class=strong>&nbsp;传真:</font></td>
  139.               <td width="371"> 
  140.                 <input type="text" name="fax" class=text size="24">
  141.               </td>
  142.             </tr>
  143.             <tr bgcolor="#e0e0e0"> 
  144.               <td width="118"><font class=strong>&nbsp;办公地址:</font></td>
  145.               <td width="371"> 
  146.                 <input type="text" name="location" class=text size="24">
  147.               </td>
  148.             </tr>
  149.             <tr bgcolor="#fafafa"> 
  150.               <td width="118"><font class=strong>&nbsp;邮编:</font></td>
  151.               <td width="371"> 
  152.                 <input type="text" name="zipCode" class=text size="24">
  153.               </td>
  154.             </tr>
  155.             <tr bgcolor="#e0e0e0"> 
  156.               <td width="118"><font class=strong>&nbsp;E_mail:</font></td>
  157.               <td width="371"> 
  158.                 <input type="text" name="email" class=text size="24" maxlength="30">
  159.               </td>
  160.             </tr>
  161.             <tr bgcolor="#fafafa" height="30">
  162.               <td colspan="2" align="center">
  163.  <input type="button" value="保存" name="B3" onclick="docheck()" class=text>
  164.   &nbsp;&nbsp;
  165.       <input type="reset" value="放弃" name="B2" onclick="window.location='/mainctrl/organization/getAllDivision'" class=text >
  166.   </td>
  167. </tr>  
  168.           </table>
  169.           </td>
  170.           </tr>
  171.           </table>
  172.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  173.        </TD>
  174.      </TR>
  175.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  176.     </TBODY> 
  177.   </TABLE>
  178.     <BR>
  179.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  180. </form>
  181. </DIV>
  182. </BODY>
  183. </HTML>