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

电子政务应用

开发平台:

Java

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