dept_bottom.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ page import="java.io.InputStream" %>
  3. <%@ page import="java.util.*" %>
  4. <%@ page import="cn.js.fan.db.*" %>
  5. <%@ page import="cn.js.fan.util.*" %>
  6. <%@ page import="com.redmoon.oa.dept.*" %>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <title>部门信息管理</title>
  12. <LINK href="default.css" type=text/css rel=stylesheet>
  13. <script>
  14. function form1_onsubmit() {
  15. form1.root_code.value = window.parent.dirmainFrame.getRootCode();
  16. }
  17. </script>
  18. </head>
  19. <body>
  20. <%
  21. String parent_code = ParamUtil.get(request, "parent_code");
  22. if (parent_code.equals(""))
  23. parent_code = "root";
  24. String parent_name = ParamUtil.get(request, "parent_name");
  25. String code = ParamUtil.get(request, "code");
  26. String name = ParamUtil.get(request, "name");
  27. String description = ParamUtil.get(request, "description");
  28. String op = ParamUtil.get(request, "op");
  29. int type = 0;
  30. if (op.equals(""))
  31. op = "AddChild";
  32. DeptDb leaf = null;
  33. if (op.equals("modify")) {
  34. DeptMgr dir = new DeptMgr();
  35. leaf = dir.getDeptDb(code);
  36. name = leaf.getName();
  37. description = leaf.getDescription();
  38. type = leaf.getType();
  39. }
  40. %>
  41. <TABLE 
  42. style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid" 
  43. cellSpacing=0 cellPadding=3 width="95%" align=center>
  44.   <!-- Table Head Start-->
  45.   <TBODY>
  46.     <TR>
  47.       <TD class=thead style="PADDING-LEFT: 10px" noWrap width="70%">部门增加或修改</TD>
  48.     </TR>
  49.     <TR class=row style="BACKGROUND-COLOR: #fafafa">
  50.       <TD align="center" style="PADDING-LEFT: 10px"><table class="frame_gray" width="61%" border="0" cellpadding="0" cellspacing="1">
  51.         <tr>
  52.           <td align="center"><table width="92%">
  53.             <form name="form1" method="post" action="dept_top.jsp?op=<%=op%>" target="dirmainFrame" onClick="return form1_onsubmit()">
  54.               <tr>
  55.                 <td width="104" rowspan="5" align="left" valign="top"><br>
  56.                   当前结点:<br>
  57.                     <font color=blue><%=parent_name.equals("")?"所有部门":parent_name%></font> </td>
  58.                 <td align="center"> 编码
  59.                     <input name="code" value="<%=code%>" <%=op.equals("modify")?"readonly":""%>>                </td>
  60.               </tr>
  61.               <tr>
  62.                 <td align="center">名称
  63.                     <input name="name" value="<%=name%>"></td>
  64.               </tr>
  65.               <tr>
  66.                 <td align="center">描述
  67.                     <input name="description" value="<%=description%>">
  68.                     <input type=hidden name=parent_code value="<%=parent_code%>">
  69.                     <input type=hidden name=type value=1>
  70.                     <input type=hidden name=root_code value=""></td>
  71.               </tr>
  72.               <tr>
  73.                 <td align="center"><%if (op.equals("modify")) {%>
  74.                   <script>
  75.     var bcode = "<%=leaf.getCode()%>";
  76.         </script>
  77. &nbsp;
  78. <%if (code.equals(leaf.ROOTCODE)) {%>
  79. <input type=hidden name="parentCode" value="<%=leaf.getParentCode()%>">
  80. <%}else{%>
  81. 父结点:
  82. <select name="parentCode">
  83.   <%
  84. DeptDb rootlf = leaf.getDeptDb(DeptDb.ROOTCODE);
  85. DeptView dv = new DeptView(rootlf);
  86. dv.ShowDeptAsOptions(out, rootlf, rootlf.getLayer());
  87. %>
  88. </select>
  89. <script>
  90. form1.parentCode.value = "<%=leaf.getParentCode()%>";
  91. </script>
  92. <%}%>
  93. <%}%></td>
  94.               </tr>
  95.               <tr>
  96.                 <td align="center"><input name="Submit" type="submit" class="singleboarder" value="提交">
  97. &nbsp;&nbsp;&nbsp;
  98. <input name="Submit" type="reset" class="singleboarder" value="重置">   </td>
  99.               </tr>
  100.             </form>
  101.           </table></td>
  102.         </tr>
  103.       </table>
  104.       </TD>
  105.     </TR>
  106.     <!-- Table Body End -->
  107.     <!-- Table Foot -->
  108.     <TR>
  109.       <TD class=tfoot align=right><DIV align=right> </DIV></TD>
  110.     </TR>
  111.     <!-- Table Foot -->
  112.   </TBODY>
  113. </TABLE>
  114. </body>
  115. </html>