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

电子政务应用

开发平台:

Java

  1. <%
  2. /**
  3.  * $RCSfile: employee_edit_basic_info.jsp,v $
  4.  * $Revision: 1.0 $
  5.  * $Date: 2001/05/17 20:57:46 $
  6.  * /mainctrl/intranet/hr/edit_basic_info
  7.  */
  8. %>
  9. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  10. <%@ page import="com.vnex.intranet.hr.employer_info.value.*"%>
  11. <%@ page import="com.vnex.intranet.hr.employer_info.process.*"%>
  12. <%@ page import="com.vnex.intranet.hr.util.*"%>
  13. <%@ page import="java.util.*" %>
  14. <%@ page import="java.sql.Timestamp" %>
  15. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  16. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  17. <jsp:useBean id="hrProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.MemberInfoProxyBean" scope="application" />
  18. <jsp:useBean id="memberInfoBean" class="com.vnex.intranet.hr.employer_info.value.MemberInfo" scope="session" />
  19. <jsp:setProperty name="memberInfoBean" property="*" />
  20. <%
  21.     int emp_id = -1;
  22.     String str = request.getParameter("emp_id");
  23.     if ( str != null )
  24.     {
  25.         emp_id = Integer.parseInt( str );
  26.         memberInfoBean.setId( emp_id );
  27.         session.setAttribute( "memberInfoBean", memberInfoBean );
  28.     }
  29.     String start = request.getParameter("start");
  30.     //MemberInfoDAO mi = new MemberInfoDAO();
  31.     if ( request.getParameter("doSave") != null && memberInfoBean.getId() > 0 )
  32.     {
  33.         memberInfoBean.setName(request.getParameter("name"));
  34. memberInfoBean.setUserName(request.getParameter("username"));
  35. memberInfoBean.setPwd(request.getParameter("pwd"));
  36. memberInfoBean.setSex(new Integer(request.getParameter("sex")).intValue());
  37. memberInfoBean.setPhone(request.getParameter("phone"));
  38. memberInfoBean.setFax(request.getParameter("fax"));
  39. memberInfoBean.setMobile(request.getParameter("mobile"));
  40. memberInfoBean.setEmail(request.getParameter("email"));
  41. memberInfoBean.setManagerId(new Integer(request.getParameter("managerId")).intValue());
  42. memberInfoBean.setAssistantId(new Integer(request.getParameter("assistantId")).intValue());
  43. memberInfoBean.setTitle(request.getParameter("title"));
  44. memberInfoBean.setNote(request.getParameter("note"));
  45.         hrProxyBean.infoStore( memberInfoBean );
  46.     }
  47.     else
  48.     {
  49.         System.out.println("nThe else status nhrProxyBean.infoFind( memberInfoBean.getId():  "+ memberInfoBean.getId() );
  50.         memberInfoBean = hrProxyBean.infoFind( memberInfoBean.getId() );
  51.         session.setAttribute( "memberInfoBean", memberInfoBean );
  52.         System.out.println("n hrProxyBean.infoFind() complete.");
  53.         System.out.println("n memberInfoBean.getPwd()"+memberInfoBean.getPwd());
  54.         System.out.println("n memberInfoBean.getName()"+memberInfoBean.getName());
  55.         System.out.println("n memberInfoBean.getId()"+memberInfoBean.getId());
  56.         System.out.println("n memberInfoBean.getNote()"+memberInfoBean.getNote());
  57.     }
  58.     Collection collAllP = hrProxyBean.infoFindAll();
  59. %>
  60. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  61. <HTML>
  62. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  63. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  64. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_hr.js"></script>
  65. <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
  66. <script language="JavaScript" src="/vnex/validate.js"></script>
  67. <script language=JavaScript>
  68. function submitSave()
  69. {
  70.     form1.action= "/mainctrl/intranet/hr/edit_basic_info";
  71.     form1.submit();
  72. }
  73. </script>
  74. <script language="javascript" src="/vnex/util/strUtil.js"></script>
  75. <script language="javascript">
  76. function checkdata() 
  77. {
  78.     if ( form1.name.value.length < 1 || isEmptyStr(form1.name.value) )
  79.     {
  80.         alert("你必须输入职员姓名!(不能为空或空格)");
  81.         form1.name.focus();
  82.         return false;
  83.     }
  84.     if ( form1.pwd.value.length < 1 || isEmptyStr(form1.pwd.value) )
  85.     {
  86.         alert("你必须输入口令!(不能为空或空格)");
  87.         form1.pwd.focus();
  88.         return false;
  89.     }
  90.     if ( form1.checkpwd.value.length < 1 || isEmptyStr(form1.checkpwd.value) )
  91.     {
  92.         alert("你必须输入确认口令!(不能为空或空格)");
  93.         form1.checkpwd.focus();
  94.         return false;
  95.     }
  96.     if ( form1.pwd.value != form1.checkpwd.value )
  97.     {
  98.         alert("您输入的口令和确认口令不同!");
  99.         form1.pwd.focus();
  100.         return false;
  101.     }
  102.      if ( form1.pwd.value.length < 4 || form1.checkpwd.value.length > 16 )
  103.     {
  104.         alert("输入的口令长度不能小于4位或大于16位");
  105.         form1.pwd.focus();
  106.         return false;
  107.     }
  108.     if ( form1.email.value.length < 1 || isEmptyStr(form1.email.value) )
  109.     {
  110.         alert("你必须输入Email!(不能为空或空格)");
  111.         form1.email.focus();
  112.         return false;
  113.     }
  114.     if ( !isEmail(form1.email.value) )
  115.     {
  116.         alert("你必须输入正确Email地址!");
  117.         form1.email.focus();
  118.         return false;
  119.     }
  120.  //   if ( form1.phone.value.length < 1 || isEmptyStr(form1.phone.value) )
  121.  //   {
  122.  //       alert("你必须输入电话号码!(不能为空或空格)");
  123.  //       form1.phone.focus();
  124.  //       return false;
  125.  //   }
  126.     //if ( form1.fax.value.length < 1 || isEmptyStr(form1.fax.value) )
  127.     //{
  128.      //   alert("你必须输入传真号码!(不能为空或空格)");
  129.      //   form1.fax.focus();
  130.      //   return false;
  131.    // }
  132.    // if ( form1.title.value.length < 1 || isEmptyStr(form1.title.value) )
  133.    // {
  134.    //     alert("你必须输入职称信息!(不能为空或空格)");
  135.    //     form1.title.focus();
  136.    //     return false;
  137.    // }
  138.     if ( form1.note.value.length > 100 )
  139.     {
  140.         alert("你输入备注信息过多!(<100)");
  141.         form1.note.focus();
  142.         return false;
  143.     }
  144.     return true;
  145. }
  146. </script>
  147. <DIV align=center>
  148. <form name="form1" method="post" action="/mainctrl/intranet/hr/edit_basic_info?emp_id=<%= emp_id %>">
  149.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  150.     <TBODY>
  151.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  152.     <TR> 
  153.         <TD colSpan=3 align="center"> 
  154.           <br>
  155.            <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  156.             <tr>
  157.               <td bgcolor="#fafafa">   
  158.                 <table class=title cellspacing=1 width="600" border=0>
  159.                   <tr bgcolor="#666666"> 
  160.                     <td colspan="3"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/hr/main"><font color="#FFFFFF">人力资源</font></a>&gt;&gt;<a href="/mainctrl/intranet/hr/search_result"><font color="#FFFFFF">员工信息库</font></a>&gt;&gt;基本信息</font></td>
  161.                   </tr>
  162.                   <tr bgcolor="#fafafa"> 
  163.                     <td colspan="3" height="30">&nbsp; 
  164.                       <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>&nbsp;&nbsp;
  165.                       <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>&nbsp;&nbsp;
  166.                       <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>&nbsp;&nbsp;
  167.                       <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>&nbsp;&nbsp;
  168.                       <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>&nbsp;&nbsp;
  169.                       <input type="button" style="width:60px" value="合同管理" onClick="location='/mainctrl/intranet/hr/manage_contract?emp_id=<%= memberInfoBean.getId() %>&start=<%= start %>'" name="B322" class=text>
  170.                     </td>
  171.                   </tr>
  172.                   <tr bgcolor="#fafafa"> 
  173.                     <td width="21%"><font class=strong>&nbsp;姓名:</font></td>
  174.                     <td colspan="2" width="79%"> 
  175.                       <input type="text" name="name" class=text size="24" value="<%= memberInfoBean.getName() %>" maxlength="20">
  176.                       * (注:带 * 的为必填内容)</td>
  177.                   </tr>
  178.                 <!--  <tr bgcolor="#e0e0e0"> 
  179.                     <td width="21%"><font class=strong>&nbsp;员工编号:</font></td>
  180.                     <td colspan="2" width="79%"><%= memberInfoBean.getId() %></td>
  181.                   </tr>
  182.                  -->
  183.                   <tr bgcolor="#e0e0e0"> 
  184.                     <td width="21%"><font class=strong>&nbsp;性别:</font></td>
  185.                     <td colspan="2" width="79%"> 
  186.                       <select style="WIDTH:65px" size="1" name="sex">
  187.                   <option value=0 <% if (memberInfoBean.getSex() == 0) out.print(" selected"); %>>男</option>
  188.                   <option value=1 <% if (memberInfoBean.getSex() == 1) out.print(" selected"); %>>女</option>
  189.                       </select>
  190.                       *</td>
  191.                   </tr>
  192.                   <tr bgcolor="#fafafa"> 
  193.                     <td width="21%"><font class=strong>&nbsp;登录口令:</font></td>
  194.                     <td colspan="2" width="79%"> 
  195.                       <input type="password" name="pwd" class=text maxlength="20" size="24" value="!@#$%^&*<%// memberInfoBean.getPwd() %>">
  196.                       * </td>
  197.                   </tr>
  198.                   <tr>
  199.                     <td bgcolor="#e0e0e0" width="21%"><font class=strong>&nbsp;确认口令:</font></td>
  200.                     <td bgcolor="#e0e0e0" colspan="2" width="79%"> 
  201.                       <input type="password" name="checkpwd" class=text maxlength="20" size="24" value="!@#$%^&*<%//memberInfoBean.getPwd() %>">
  202.                       * </td>
  203.                   </tr>
  204.                   <tr bgcolor="#fafafa"> 
  205.                     <td width="21%"><font class=strong>&nbsp;用户名: </font></td>
  206.                     <td colspan="2" width="79%" bgcolor="#e0e0e0"> 
  207.                       <input type="text" name="username" readonly class=text size="24" value="<%= memberInfoBean.getUserName() %>">
  208.                       (不可修改) </td>
  209.                   </tr>
  210.                   <tr> 
  211.                     <td bgcolor="#e0e0e0" width="21%"><font class=strong>&nbsp;E_mail:</font></td>
  212.                     <td bgcolor="#e0e0e0" colspan="2" width="79%"> 
  213.                       <input type="text" name="email" maxlength="40" class=text size="24" value="<%= memberInfoBean.getEmail() %>">
  214.                       * </td>
  215.                   </tr>
  216.                   <tr bgcolor="#fafafa"> 
  217.                     <td width="21%"><font class=strong>&nbsp;电话号码:</font></td>
  218.                     <td colspan="2" width="79%"> 
  219.                       <input type="text" name="phone" maxlength="20" class=text size="24" value="<%= memberInfoBean.getPhone()==null || memberInfoBean.getPhone().equals("null")?"":memberInfoBean.getPhone() %>">
  220.                        </td>
  221.                   </tr>
  222.                   <tr> 
  223.                     <td bgcolor="#e0e0e0" width="21%"><font class=strong>&nbsp;传真号码:</font></td>
  224.                     <td bgcolor="#e0e0e0" colspan="2" width="79%"> 
  225.                       <input type="text" name="fax" maxlength="20" class=text size="24" value="<%= memberInfoBean.getFax()==null || memberInfoBean.getFax().equals("null")?"":memberInfoBean.getFax() %>">
  226.                        </td>
  227.                   </tr>
  228.                   <tr bgcolor="#fafafa"> 
  229.                     <td width="21%"><font class=strong>&nbsp;手/呼机号码:</font></td>
  230.                     <td colspan="2" width="79%"> 
  231.                       <input type="text" name="mobile" maxlength="20" class=text size="24" value="<%= memberInfoBean.getMobile()==null || memberInfoBean.getMobile().equals("null")?"":memberInfoBean.getMobile() %>" >
  232.                     </td>
  233.                   </tr>
  234.                   <tr bgcolor="#e0e0e0"> 
  235.                     <td width="21%" ><font class=strong>&nbsp;上级:</font></td>
  236.                     <td colspan="2" width="79%">
  237.                 <select size="1" name="managerId">
  238.                   <option value="-1" >--无--</option>
  239.          <%
  240.             Iterator iter3 = collAllP.iterator();
  241.             while ( iter3.hasNext() )
  242.             {
  243.                 MemberSearchBean ms = (MemberSearchBean)iter3.next();
  244.          %>
  245.                   <option value=<%= ms.getId() %> <% if ( ms.getId() == memberInfoBean.getManagerId() ) out.print(" selected");%>><%= ms.getName() %></option>
  246.          <%
  247.             }
  248.          %>
  249.                 </select><!--*-->
  250.                     </td>
  251.                   </tr>
  252.                   <tr bgcolor="#fafafa"> 
  253.                     <td width="21%"><font class=strong>&nbsp;助理:</font></td>
  254.                     <td colspan="2" width="79%" > 
  255.                 <select size="1" name="assistantId">
  256.                   <option value="-1" >--无--</option>
  257.          <%
  258.             Iterator iter4 = collAllP.iterator();
  259.             while ( iter4.hasNext() )
  260.             {
  261.                 MemberSearchBean ms = (MemberSearchBean)iter4.next();
  262.          %>
  263.                   <option value=<%= ms.getId() %><% if ( ms.getId() == memberInfoBean.getAssistantId() ) out.print(" selected");%>><%= ms.getName() %></option>
  264.          <%
  265.             }
  266.          %>
  267.                 </select><!--*-->
  268.                       </td>
  269.                   </tr>
  270.                   <tr bgcolor="#e0e0e0"> 
  271.                   <td width="21%" ><b><font class=strong>&nbsp;职称</font></b></td>
  272.                   <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>
  273.                   </tr> 
  274.                   <tr bgcolor="#fafafa"> 
  275.                     <td width="21%"><font class=strong>&nbsp;备注:</font></td>
  276.                     <td colspan="2" width="79%"> 
  277.                       <textarea name="note" rows="6" cols="59"><%= memberInfoBean.getNote()==null || memberInfoBean.getNote().equals("null")?"":memberInfoBean.getNote() %></textarea>
  278.                     </td>
  279.                   </tr>
  280.                   <tr bgcolor="#fafafa"> 
  281.                     <td colspan="3" align="center" height="30"> 
  282.                       <input type="submit" value="保存" name="B3" onClick="return checkdata()" class=text>&nbsp;&nbsp;
  283.                     <input type=hidden name=start value=<%= start %> >
  284.                     <input type=hidden name=doSave value=1 >
  285.                       <input type="reset" value="重置" name="B22" class=text>&nbsp;&nbsp; 
  286.                       <input type="button" value="放弃" name="B2" onClick="location='/mainctrl/intranet/hr/search_result?start=<%= start %>'"  class=text>
  287.                     </td>
  288.                   </tr>
  289.                 </table>
  290.            </td>
  291.             </tr> 
  292.           </table> 
  293.           <br><br>
  294.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  295.         </TD>
  296.     </TR>
  297.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  298.     </TBODY> 
  299.     </TABLE>
  300.   <BR>
  301.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  302.   </form></DIV>
  303. </BODY></HTML>