department_attribute.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:8k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
- <%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
- <%@ page import="com.vnex.intranet.organization.value.*"%>
- <%@ page import="com.vnex.intranet.organization.proxy.*"%>
- <jsp:useBean id="organizationProxy" scope="Application" class="com.vnex.intranet.organization.proxy.OrganizationProxyBean" />
- <jsp:useBean id="dvalue" scope="Application" class="com.vnex.intranet.organization.value.DivisionValueBean" />
- <%
- int did = Integer.parseInt(request.getParameter("id"));
- String dname = request.getParameter("name");
- System.out.println("nnn+"+dname);
- dvalue = organizationProxy.getDivision(did);
- %>
- <script language=JavaScript src="/vnex/util/validate.js" ></script>
- <script language="Javascript">
- function docheck()
- {
- if (myform.divisionName.value == "" )
- {
- alert("请输入部门名称");
- myform.divisionName.focus();
- return false;
- }
- if (myform.divisionName.value == myform.parentDivisionName.value )
- {
- alert("部门名称不能和父部门名称重复!");
- myform.divisionName.focus();
- return false;
- }
- if (myform.divisionName.value.length > 20)
- {
- alert("部门名称长度小于20!");
- myform.divisionName.focus();
- return false;
- }
- if (myform.divisionDuty.value.length > 50)
- {
- alert("部门职能长度小于50!");
- myform.divisionDuty.focus();
- return false;
- }
- if (myform.managerId.value == -1)
- {
- alert("必须选择部门主管!");
- return false;
- }
- if (!(isTelephone(myform.telephone.value)) || (myform.telephone.value.length>20))
- {
- alert("电话号码无效!");
- myform.telephone.focus();
- return false;
- }
- if (!(isTelephone(myform.fax.value)) || (myform.fax.value.length>20))
- {
- alert("传真号码无效!");
- myform.fax.focus();
- return false;
- }
- if (myform.location.value.length > 15)
- {
- alert("办公地址长度小于15!");
- myform.location.focus();
- return false;
- }
- if ( !(isZIPCode(myform.zipCode.value)) )
- {
- alert("邮政编码必须是数字,6位!");
- myform.zipCode.focus();
- return false;
- }
- if (!(isEmail(myform.email.value)))
- {
- alert("email 不合法!");
- myform.email.focus();
- return false;
- }
- myform.action="/mainctrl/organization/updateDivision";
- myform.submit();
- }
- function dodelete()
- {
- myform.action="/mainctrl/organization/deleteDivision";
- myform.submit();
- }
- </script>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript" src="/vnex/menu/dockmenu_hr.js"></script>
- <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
- <DIV align=center>
- <form name="myform" method="post" >
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center">
- <br>
- <!--休假事件表开始 -->
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr>
- <td bgcolor="#fafafa">
- <table class=title cellspacing=1 width="600" border=0 cellpadding="2">
- <tr>
- <td colspan="2" bgcolor="#666666"><font class="strongw">
- <a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>>
- <a href="/mainctrl/hr/main"><font color="#FFFFFF">人力资源</font></a>>>
- <a href="/mainctrl/organization/getAllDivision"><font color="#FFFFFF">组织结构与职位管理</font></a>>>
- <font color="#ffffff">部门属性编辑</font></font></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="118" ><font class=strong> 部门名称:</font></td>
- <td width="371">
- <input type="text" name="divisionName" class=text size="24" value="<%=dvalue.getDivisionName()%>">
- * (注:带*为必填内容) </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="118" ><font class=strong> 上级部门:</font></td>
- <td width="70%">
- <org:DivisionList divisionId='<%= did%>'>
- <select name="parentDivisionId">
- <vnex:items select='<%= dvalue.getParentDivisionId()+"" %>'>
- <option value="<org:DivisionAttribute attribute="id"/>" <org:DivisionAttribute attribute="isSelected"/>>
- <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/>
- </option>
- </vnex:items>
- </select>
- </org:DivisionList>
- <input type=hidden name=divisionId value=<%=did%>>
- <input type=hidden name=parentDivisionId value="<%=dvalue.getParentDivisionId()%>">
- <input type=hidden name=parentDivisionName value="<%=dvalue.getParentDivisionName()%>">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="118" ><font class=strong> 部门主管:</font></td>
- <td width="371"> <hr:EmployeeList divisionId="-1">
- <select name="managerId">
- <option value="-1">--请选择--</option>
- <vnex:items select ='<%=dvalue.getManagerId()+""%>'>>
- <option value="<hr:EmployeeAttribute attribute="id"/>"
- <hr:EmployeeAttribute attribute="isSelected"/> > <hr:EmployeeAttribute attribute="employee_name"/>
- </option>
- </vnex:items>
- </select>
- </hr:EmployeeList> * </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="118" ><font class=strong> 部门职能:</font></td>
- <td width="371">
- <textarea rows="5" name="divisionDuty" cols="59"><%=dvalue.getDivisionDuty()%></textarea>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="118" ><font class=strong> 电话:</font></td>
- <td width="371">
- <input type="text" name="telephone" class=text size="24" value="<%=dvalue.getTelephone()%>">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="118" ><font class=strong> 传真:</font></td>
- <td width="371">
- <input type="text" name="fax" class=text size="24" value="<%=dvalue.getFax()%>">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="118" ><font class=strong> 办公地址:</font></td>
- <td width="371">
- <input type="text" name="location" class=text size="24" value="<%=dvalue.getLocation()%>">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="118" ><font class=strong> 邮编:</font></td>
- <td width="371">
- <input type="text" name="zipCode" class=text size="24" value="<%=dvalue.getZipCode()%>">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="118" ><font class=strong> E_mail:</font></td>
- <td width="371">
- <input type="text" name="email" class=text size="24" value="<%=dvalue.getEmail()%>" maxlength="30">
- </td>
- </tr>
- <tr bgcolor="#fafafa" height="30">
- <td colspan="2" align="center">
- <input type="button" value="保存" name="B3" onclick="docheck()" class=text>
-
- <input type="button" value="删除" name="B2" onclick="if(confirm('确定要删除吗')) dodelete();" class=text>
-
- <input type="button" value="放弃" name="B1" onclick="window.location='/mainctrl/organization/getAllDivision'" class=text>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form>
- </DIV>
- </BODY>
- </HTML>