employee_edit_basic_info.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:15k
源码类别:
电子政务应用
开发平台:
Java
- <%
- /**
- * $RCSfile: employee_edit_basic_info.jsp,v $
- * $Revision: 1.0 $
- * $Date: 2001/05/17 20:57:46 $
- * /mainctrl/intranet/hr/edit_basic_info
- */
- %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.hr.employer_info.value.*"%>
- <%@ page import="com.vnex.intranet.hr.employer_info.process.*"%>
- <%@ page import="com.vnex.intranet.hr.util.*"%>
- <%@ page import="java.util.*" %>
- <%@ page import="java.sql.Timestamp" %>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
- <jsp:useBean id="hrProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.MemberInfoProxyBean" scope="application" />
- <jsp:useBean id="memberInfoBean" class="com.vnex.intranet.hr.employer_info.value.MemberInfo" scope="session" />
- <jsp:setProperty name="memberInfoBean" property="*" />
- <%
- int emp_id = -1;
- String str = request.getParameter("emp_id");
- if ( str != null )
- {
- emp_id = Integer.parseInt( str );
- memberInfoBean.setId( emp_id );
- session.setAttribute( "memberInfoBean", memberInfoBean );
- }
- String start = request.getParameter("start");
- //MemberInfoDAO mi = new MemberInfoDAO();
- if ( request.getParameter("doSave") != null && memberInfoBean.getId() > 0 )
- {
- memberInfoBean.setName(request.getParameter("name"));
- memberInfoBean.setUserName(request.getParameter("username"));
- memberInfoBean.setPwd(request.getParameter("pwd"));
- memberInfoBean.setSex(new Integer(request.getParameter("sex")).intValue());
- memberInfoBean.setPhone(request.getParameter("phone"));
- memberInfoBean.setFax(request.getParameter("fax"));
- memberInfoBean.setMobile(request.getParameter("mobile"));
- memberInfoBean.setEmail(request.getParameter("email"));
- memberInfoBean.setManagerId(new Integer(request.getParameter("managerId")).intValue());
- memberInfoBean.setAssistantId(new Integer(request.getParameter("assistantId")).intValue());
- memberInfoBean.setTitle(request.getParameter("title"));
- memberInfoBean.setNote(request.getParameter("note"));
- hrProxyBean.infoStore( memberInfoBean );
- }
- else
- {
- System.out.println("nThe else status nhrProxyBean.infoFind( memberInfoBean.getId(): "+ memberInfoBean.getId() );
- memberInfoBean = hrProxyBean.infoFind( memberInfoBean.getId() );
- session.setAttribute( "memberInfoBean", memberInfoBean );
- System.out.println("n hrProxyBean.infoFind() complete.");
- System.out.println("n memberInfoBean.getPwd()"+memberInfoBean.getPwd());
- System.out.println("n memberInfoBean.getName()"+memberInfoBean.getName());
- System.out.println("n memberInfoBean.getId()"+memberInfoBean.getId());
- System.out.println("n memberInfoBean.getNote()"+memberInfoBean.getNote());
- }
- Collection collAllP = hrProxyBean.infoFindAll();
- %>
- <!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="JavaScript1.2" src="/vnex/menu/dockmenu_hr.js"></script>
- <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
- <script language="JavaScript" src="/vnex/validate.js"></script>
- <script language=JavaScript>
- function submitSave()
- {
- form1.action= "/mainctrl/intranet/hr/edit_basic_info";
- form1.submit();
- }
- </script>
- <script language="javascript" src="/vnex/util/strUtil.js"></script>
- <script language="javascript">
- function checkdata()
- {
- if ( form1.name.value.length < 1 || isEmptyStr(form1.name.value) )
- {
- alert("你必须输入职员姓名!(不能为空或空格)");
- form1.name.focus();
- return false;
- }
- if ( form1.pwd.value.length < 1 || isEmptyStr(form1.pwd.value) )
- {
- alert("你必须输入口令!(不能为空或空格)");
- form1.pwd.focus();
- return false;
- }
- if ( form1.checkpwd.value.length < 1 || isEmptyStr(form1.checkpwd.value) )
- {
- alert("你必须输入确认口令!(不能为空或空格)");
- form1.checkpwd.focus();
- return false;
- }
- if ( form1.pwd.value != form1.checkpwd.value )
- {
- alert("您输入的口令和确认口令不同!");
- form1.pwd.focus();
- return false;
- }
- if ( form1.pwd.value.length < 4 || form1.checkpwd.value.length > 16 )
- {
- alert("输入的口令长度不能小于4位或大于16位");
- form1.pwd.focus();
- return false;
- }
- if ( form1.email.value.length < 1 || isEmptyStr(form1.email.value) )
- {
- alert("你必须输入Email!(不能为空或空格)");
- form1.email.focus();
- return false;
- }
- if ( !isEmail(form1.email.value) )
- {
- alert("你必须输入正确Email地址!");
- form1.email.focus();
- return false;
- }
- // if ( form1.phone.value.length < 1 || isEmptyStr(form1.phone.value) )
- // {
- // alert("你必须输入电话号码!(不能为空或空格)");
- // form1.phone.focus();
- // return false;
- // }
- //if ( form1.fax.value.length < 1 || isEmptyStr(form1.fax.value) )
- //{
- // alert("你必须输入传真号码!(不能为空或空格)");
- // form1.fax.focus();
- // return false;
- // }
- // if ( form1.title.value.length < 1 || isEmptyStr(form1.title.value) )
- // {
- // alert("你必须输入职称信息!(不能为空或空格)");
- // form1.title.focus();
- // return false;
- // }
- if ( form1.note.value.length > 100 )
- {
- alert("你输入备注信息过多!(<100)");
- form1.note.focus();
- return false;
- }
- return true;
- }
- </script>
- <DIV align=center>
- <form name="form1" method="post" action="/mainctrl/intranet/hr/edit_basic_info?emp_id=<%= emp_id %>">
- <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>
- <tr bgcolor="#666666">
- <td colspan="3"><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/intranet/hr/search_result"><font color="#FFFFFF">员工信息库</font></a>>>基本信息</font></td>
- </tr>
- <tr bgcolor="#fafafa">
- <td colspan="3" height="30">
- <input type="button" style="width:60px" value="基本信息" onClick="location='/mainctrl/intranet/hr/edit_basic_info?emp_id=<%= memberInfoBean.getId() %>&start=<%= start %>'" name="B322" class=text>
- <input type="button" style="width:60px" value="个人信息" onClick="location='/mainctrl/intranet/hr/edit_personal_info?emp_id=<%= memberInfoBean.getId() %>&start=<%= start %>'" name="B322" class=text>
- <input type="button" style="width:60px" value="学历信息" onClick="location='/mainctrl/intranet/hr/edit_degree_info?emp_id=<%= memberInfoBean.getId() %>&start=<%= start %>'" name="B322" class=text>
- <input type="button" style="width:60px" value="履历信息" onClick="location='/mainctrl/intranet/hr/edit_resume_info?emp_id=<%= memberInfoBean.getId() %>&start=<%= start %>'" name="B322" class=text>
- <input type="button" style="width:95px" value="本公司工作履历" onClick="location='/mainctrl/intranet/hr/edit_inner_resume?emp_id=<%= memberInfoBean.getId() %>&start=<%= start %>'" name="B322" class=text>
- <input type="button" style="width:60px" value="合同管理" onClick="location='/mainctrl/intranet/hr/manage_contract?emp_id=<%= memberInfoBean.getId() %>&start=<%= start %>'" name="B322" class=text>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 姓名:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="name" class=text size="24" value="<%= memberInfoBean.getName() %>" maxlength="20">
- * (注:带 * 的为必填内容)</td>
- </tr>
- <!-- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 员工编号:</font></td>
- <td colspan="2" width="79%"><%= memberInfoBean.getId() %></td>
- </tr>
- -->
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 性别:</font></td>
- <td colspan="2" width="79%">
- <select style="WIDTH:65px" size="1" name="sex">
- <option value=0 <% if (memberInfoBean.getSex() == 0) out.print(" selected"); %>>男</option>
- <option value=1 <% if (memberInfoBean.getSex() == 1) out.print(" selected"); %>>女</option>
- </select>
- *</td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 登录口令:</font></td>
- <td colspan="2" width="79%">
- <input type="password" name="pwd" class=text maxlength="20" size="24" value="!@#$%^&*<%// memberInfoBean.getPwd() %>">
- * </td>
- </tr>
- <tr>
- <td bgcolor="#e0e0e0" width="21%"><font class=strong> 确认口令:</font></td>
- <td bgcolor="#e0e0e0" colspan="2" width="79%">
- <input type="password" name="checkpwd" class=text maxlength="20" size="24" value="!@#$%^&*<%//memberInfoBean.getPwd() %>">
- * </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 用户名: </font></td>
- <td colspan="2" width="79%" bgcolor="#e0e0e0">
- <input type="text" name="username" readonly class=text size="24" value="<%= memberInfoBean.getUserName() %>">
- (不可修改) </td>
- </tr>
- <tr>
- <td bgcolor="#e0e0e0" width="21%"><font class=strong> E_mail:</font></td>
- <td bgcolor="#e0e0e0" colspan="2" width="79%">
- <input type="text" name="email" maxlength="40" class=text size="24" value="<%= memberInfoBean.getEmail() %>">
- * </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 电话号码:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="phone" maxlength="20" class=text size="24" value="<%= memberInfoBean.getPhone()==null || memberInfoBean.getPhone().equals("null")?"":memberInfoBean.getPhone() %>">
- </td>
- </tr>
- <tr>
- <td bgcolor="#e0e0e0" width="21%"><font class=strong> 传真号码:</font></td>
- <td bgcolor="#e0e0e0" colspan="2" width="79%">
- <input type="text" name="fax" maxlength="20" class=text size="24" value="<%= memberInfoBean.getFax()==null || memberInfoBean.getFax().equals("null")?"":memberInfoBean.getFax() %>">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 手/呼机号码:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="mobile" maxlength="20" class=text size="24" value="<%= memberInfoBean.getMobile()==null || memberInfoBean.getMobile().equals("null")?"":memberInfoBean.getMobile() %>" >
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%" ><font class=strong> 上级:</font></td>
- <td colspan="2" width="79%">
- <select size="1" name="managerId">
- <option value="-1" >--无--</option>
- <%
- Iterator iter3 = collAllP.iterator();
- while ( iter3.hasNext() )
- {
- MemberSearchBean ms = (MemberSearchBean)iter3.next();
- %>
- <option value=<%= ms.getId() %> <% if ( ms.getId() == memberInfoBean.getManagerId() ) out.print(" selected");%>><%= ms.getName() %></option>
- <%
- }
- %>
- </select><!--*-->
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 助理:</font></td>
- <td colspan="2" width="79%" >
- <select size="1" name="assistantId">
- <option value="-1" >--无--</option>
- <%
- Iterator iter4 = collAllP.iterator();
- while ( iter4.hasNext() )
- {
- MemberSearchBean ms = (MemberSearchBean)iter4.next();
- %>
- <option value=<%= ms.getId() %><% if ( ms.getId() == memberInfoBean.getAssistantId() ) out.print(" selected");%>><%= ms.getName() %></option>
- <%
- }
- %>
- </select><!--*-->
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%" ><b><font class=strong> 职称</font></b></td>
- <td width="79%" colspan = 2 ><input class=text maxlength="30" name=title size="24" value="<%= memberInfoBean.getTitle()==null || memberInfoBean.getTitle().equals("null")?"":memberInfoBean.getTitle() %>"><!--*--></td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 备注:</font></td>
- <td colspan="2" width="79%">
- <textarea name="note" rows="6" cols="59"><%= memberInfoBean.getNote()==null || memberInfoBean.getNote().equals("null")?"":memberInfoBean.getNote() %></textarea>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td colspan="3" align="center" height="30">
- <input type="submit" value="保存" name="B3" onClick="return checkdata()" class=text>
- <input type=hidden name=start value=<%= start %> >
- <input type=hidden name=doSave value=1 >
- <input type="reset" value="重置" name="B22" class=text>
- <input type="button" value="放弃" name="B2" onClick="location='/mainctrl/intranet/hr/search_result?start=<%= start %>'" class=text>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <br><br>
- <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>