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

电子政务应用

开发平台:

Java

  1. <%
  2. /**
  3.  * $RCSfile: employee_create_basic_info.jsp,v $
  4.  * $Revision: 1.0 $
  5.  * $Date: 2001/05/17 20:57:46 $
  6.  * /mainctrl/intranet/hr/add_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="com.vnex.intranet.util.CommonDBOperation"%>
  14. <%@ page import="java.util.*" %>
  15. <%@ page import="java.sql.*"%>
  16. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  17. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  18. <%
  19. // from role setting
  20. %>
  21. <%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
  22. <%
  23. // End of from role setting
  24. %>
  25. <jsp:useBean id="hrProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.MemberInfoProxyBean" scope="application" />
  26. <jsp:useBean id="memberInfoBean" class="com.vnex.intranet.hr.employer_info.value.MemberInfo" scope="session" />
  27. <jsp:setProperty name="memberInfoBean" property="*" />
  28. <%
  29.     boolean doNew = false;
  30.     String exOfconn = null;
  31. // from role setting
  32. %>
  33. <jsp:useBean id="dutyInfoBean" class="com.vnex.intranet.hr.employer_info.value.MemberDutyInfo" scope="page" />
  34. <jsp:useBean id="businessSession" class="com.vnex.intranet.pub.BusinessSession" scope="page" />
  35. <jsp:setProperty name="dutyInfoBean" property="*" />
  36. <%
  37. // End of from role setting
  38. %>
  39. <%
  40.     if ( request.getParameter("doNew") != null )
  41.     {
  42.         doNew = true;
  43.         int empIdSeqNext = CommonDBOperation.getNextSequenceId("S_EMP_ID");
  44.         session.setAttribute("empIdSeqNext",new Integer( empIdSeqNext ));
  45.         session.setAttribute("doNewOrDoAdd","new");
  46.         System.out.println("****doNew Status: empIdSeqNext:"+empIdSeqNext);
  47.         memberInfoBean.setId(((Integer)session.getAttribute("empIdSeqNext")).intValue());
  48.         memberInfoBean.setName("");
  49.         memberInfoBean.setUserName("");
  50.         memberInfoBean.setDevisionId(1);
  51.         memberInfoBean.setPwd("");
  52.         memberInfoBean.setPhone("");
  53.         memberInfoBean.setSex(0);
  54.         memberInfoBean.setFax("");
  55.         memberInfoBean.setMobile("");
  56.         memberInfoBean.setEmail("");
  57.         memberInfoBean.setManagerId(-1);
  58.         memberInfoBean.setAssistantId(-1);
  59.         memberInfoBean.setTitle("");
  60.         memberInfoBean.setNote("");
  61.         // System.out.println("---------do init-----------");
  62.         session.removeAttribute( "memberInfoBean" );
  63.         session.setAttribute( "memberInfoBean", new MemberInfo() );
  64.         session.removeAttribute( "personalInfoBean" );
  65.     }
  66.     //MemberInfoDAO mi = new MemberInfoDAO();
  67.    
  68.     if( request.getParameter("submitByRoleSetting") != null || request.getParameter("doAdd")!=null )
  69.     {
  70. if( ((String) session.getAttribute("doNewOrDoAdd")).equals("new"))
  71. doNew = true;
  72. if( ((String) session.getAttribute("doNewOrDoAdd")).equals("add"))
  73. doNew = false;
  74. memberInfoBean.setId(((Integer)session.getAttribute("empIdSeqNext")).intValue());
  75. dutyInfoBean.setEmpId(((Integer)session.getAttribute("empIdSeqNext")).intValue());
  76. System.out.println("***the submitByRoleSetting or add status:" + ((Integer)session.getAttribute("empIdSeqNext")).intValue());
  77. System.out.println("***the submitByRoleSetting or add status:" + ((Integer)session.getAttribute("empIdSeqNext")).intValue());
  78.     }
  79. System.out.println("memberInfoBean.getId()"+memberInfoBean.getId());
  80. System.out.println("memberInfoBean.getName()"+memberInfoBean.getName());
  81. System.out.println("memberInfoBean.getUserName()"+memberInfoBean.getUserName());
  82. System.out.println("memberInfoBean.getPwd()"+memberInfoBean.getPwd());
  83. System.out.println("dutyInfoBean.getEmpId()"+dutyInfoBean.getEmpId());
  84. System.out.println("dutyInfoBean.getDivisionId()"+dutyInfoBean.getDivisionId());
  85.  
  86.     if ( request.getParameter("doAdd") != null )
  87.     {
  88.         doNew = false;
  89.         session.setAttribute("doNewOrDoAdd","add");
  90.         System.out.println("***************Begin to create memberInfoBean.getId()"+memberInfoBean.getId());
  91.         try
  92.         {
  93.          hrProxyBean.infoCreate( memberInfoBean );
  94.         }
  95.         catch(SQLException e)
  96.         {
  97.         System.out.println("Exception at Employee_create_basic_info.jsp:"+e);
  98.         exOfconn = e.getMessage();
  99.         if(!( exOfconn.substring(0,35).equals("Connection has already been closed.")))
  100. {       
  101.         throw new SQLException(e.getMessage());
  102.         }
  103.         }
  104.         catch(Exception ex)
  105.         {
  106.         throw new Exception(ex.getMessage());
  107.        
  108.         }
  109.     }
  110.     Collection collAllP = hrProxyBean.infoFindAll();
  111. %>
  112. <%
  113. // from role setting
  114.     Collection pageColl = new ArrayList();
  115.     int emp_id = ((Integer) session.getAttribute("empIdSeqNext")).intValue();
  116.     int chgMainDivisionId = -1;
  117.     int chgMainDutyId = -1;
  118.     String start = request.getParameter("start");
  119.     //MemberDutyDAO mi = new MemberDutyDAO();
  120.     if ( request.getParameter("doAddDuty") != null && dutyInfoBean.getEmpId() > 0 )
  121.     {
  122.         System.out.println("******In the role part dutyInfoBean.getEmpId()"+dutyInfoBean.getEmpId());
  123.         dutyInfoBean.setAssignId( businessSession.getEmpId() );
  124.         hrProxyBean.dutyCreate( dutyInfoBean );
  125.     }
  126.     if( request.getParameter("doDel") != null && dutyInfoBean.getEmpId() > 0 && request.getParameter("delId") != null)
  127.     {
  128.         String[] delId = request.getParameterValues("delId");
  129.         for ( int i=0; i<delId.length; i++ )
  130.         {
  131.             hrProxyBean.dutyRemove( dutyInfoBean.getEmpId(), Integer.parseInt( delId[i].substring(1) ) );
  132.         }
  133.     }
  134.     int deIdTemp = -1;
  135.     if ( request.getParameter("doChange") != null && dutyInfoBean.getEmpId() > 0 )
  136.     {
  137.         if ( request.getParameter("divisionId") != null )
  138.             deIdTemp = Integer.parseInt( request.getParameter("divisionId") );
  139.     }
  140.     if( request.getParameter("doModifyMainDuty") != null)
  141.     {
  142.      System.out.println("nn**********************Processing the if condition()");
  143.      System.out.println("nn**********************request.getParameter("divisionId")"+request.getParameter("divisionId"));
  144.      System.out.println("nn**********************request.getParameter("dutyId") "+request.getParameter("dutyId") );
  145.      if( request.getParameter("divisionId") != null )
  146.      chgMainDivisionId = Integer.parseInt(request.getParameter("divisionId") );
  147.      if( request.getParameter("dutyId") != null )
  148.      chgMainDutyId = Integer.parseInt( request.getParameter("dutyId") );
  149.         if(chgMainDivisionId > 0 && chgMainDutyId > 0 && emp_id > 0)    
  150.         {
  151.          try
  152.          {
  153.          System.out.println("nn********************Processing the method:hrProxyBean.modifyIsMainDuty()");
  154.          hrProxyBean.modifyIsMainDuty( chgMainDutyId, chgMainDivisionId , emp_id); 
  155.          }
  156.          catch(Exception e)
  157.          {
  158.          System.out.println("n Exception at jsp:"+e);
  159.          throw new Exception(e.getMessage());
  160.          }
  161.         }
  162.     }
  163.     
  164.     pageColl = hrProxyBean.dutyFindForCreateEmp( emp_id );
  165. // End of from role setting
  166. %>
  167. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  168. <HTML>
  169. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  170. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  171. <script language="JavaScript" src="/vnex/validate.js"></script>
  172. <script language="javascript" src="/vnex/util/strUtil.js"></script>
  173. <script language=JavaScript>
  174. function checkdata() 
  175. {
  176.     if ( form1.name.value.length < 1 || isEmptyStr(form1.name.value) )
  177.     {
  178.         alert("你必须输入职员姓名!(不能为空或空格)");
  179.         form1.name.focus();
  180.         return false;
  181.     }
  182.     if ( form1.userName.value.length < 1 || isEmptyStr(form1.userName.value) )
  183.     {
  184.         alert("你必须输入职员用户名!(不能为空或空格)");
  185.         form1.userName.focus();
  186.         return false;
  187.     }
  188.     if ( form1.pwd.value.length < 1 || isEmptyStr(form1.pwd.value) )
  189.     {
  190.         alert("你必须输入口令!(不能为空或空格)");
  191.         form1.pwd.focus();
  192.         return false;
  193.     }
  194.     if ( form1.checkpwd.value.length < 1 || isEmptyStr(form1.checkpwd.value) )
  195.     {
  196.         alert("你必须输入确认口令!(不能为空或空格)");
  197.         form1.checkpwd.focus();
  198.         return false;
  199.     }
  200.     if ( form1.pwd.value != form1.checkpwd.value )
  201.     {
  202.         alert("您输入的口令和确认口令不同!");
  203.         form1.pwd.focus();
  204.         return false;
  205.     }
  206.     if ( form1.pwd.value.length < 4 || form1.checkpwd.value.length > 16 )
  207.     {
  208.         alert("输入的口令长度不能小于4位或大于16位");
  209.         form1.pwd.focus();
  210.         return false;
  211.     }
  212.     
  213.     if ( form1.email.value.length < 1 || isEmptyStr(form1.email.value) )
  214.     {
  215.         alert("你必须输入Email!(不能为空或空格)");
  216.         form1.email.focus();
  217.         return false;
  218.     }
  219.     if ( !isEmail(form1.email.value) )
  220.     {
  221.         alert("你必须输入正确Email地址!");
  222.         form1.email.focus();
  223.         return false;
  224.     }
  225.     //if ( form1.phone.value.length < 1 || isEmptyStr(form1.phone.value) )
  226.     //{
  227.     //   alert("你必须输入电话号码!(不能为空或空格)");
  228.     //    form1.phone.focus();
  229.     //    return false;
  230.    // }
  231.    // if ( form1.fax.value.length < 1 || isEmptyStr(form1.fax.value) )
  232.    // {
  233.    //     alert("你必须输入传真号码!(不能为空或空格)");
  234.    //     form1.fax.focus();
  235.    //     return false;
  236.    // }
  237.    // if ( form1.title.value.length < 1 || isEmptyStr(form1.title.value) )
  238.    // {
  239.    //     alert("你必须输入职称信息!(不能为空或空格)");
  240.    //     form1.title.focus();
  241.    //     return false;
  242.    // }
  243.   //  if ( form1.note.value.length > 100 )
  244.  //   {
  245.  //       alert("你输入备注信息过多!(<100)");
  246.   //      form1.note.focus();
  247.   //      return false;
  248.  //   }
  249.     if( form1.ifAddedDuty.value ==  "Yes" )
  250.     {
  251.      form1.action="/mainctrl/intranet/hr/add_basic_info?doAdd=1"
  252.      form1.submit();
  253.     }
  254.     else
  255.     {
  256.      alert("您必须至少赋予该员工一个职位.");
  257.      return false;
  258.     }
  259.     
  260. }
  261. </script>
  262. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_hr.js"></script>
  263. <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
  264. <script language="JavaScript" src="/vnex/validate.js"></script>
  265. <script language="javascript" src="/vnex/util/strUtil.js"></script>
  266. <script language=JavaScript>
  267. function submitAdd()
  268. {
  269.     if (form1.divisionId.selectedIndex < 0)
  270.     {
  271.         alert("你必须选择部门!");
  272.         form1.divisionId.focus();
  273.         return false;
  274.     }
  275.     if (form1.dutyId.selectedIndex < 0)
  276.     {
  277.         alert("你必须选择职务!");
  278.         form1.dutyId.focus();
  279.         return false;
  280.     }
  281.     form1.action= "/mainctrl/intranet/hr/add_basic_info?doAddDuty=1&submitByRoleSetting=1";
  282.     form1.submit();
  283. }
  284. function change(select)
  285. {
  286.     form1.action="/mainctrl/intranet/hr/add_basic_info?doChange=1&submitByRoleSetting=1?empId=<%=emp_id%>";
  287.     form1.submit();
  288. }
  289. function checkIfValidForDel(ob,division,dutyName)
  290. {
  291. if( ob.value.charAt(0)=="N" && ob.checked == true )
  292. {
  293. alert("该员工在"+division+"担任了两个或两个以上职位,您当前选中想要删除的"+dutyName+"职位是该员工在"+division+"担任的主要职位,您必须给该员工在"+division+"部门另指定一个主要职位然后再选择删除.");
  294. return false;
  295. }
  296. else
  297. {
  298. return false;
  299. }
  300. }
  301. function submitDel()
  302. {
  303.     if(form1.delId == null)
  304.     {
  305.        alert("目前没有数据可供删除!");
  306.        return false;
  307.     }
  308.     if(!isChecked(form1.delId))
  309.     {
  310.        alert("您没有选择要删除的项!");
  311.        return false;
  312.     }
  313.     for(var i=0;i<document.form1.delId.length;i++)
  314.     {
  315.    if (document.form1.delId[i].checked)
  316.   {
  317. if( document.form1.delId[i].value.charAt(0)=="N" )
  318. {
  319. alert("根据职位设定的原则,您必须保证每一个员工在其任职的每一个部门有而且仅有一个主要职位,n如果该员工在一个部门担任了两个或两个以上的职位(其中会有一个而且仅有一个为主要职位),当您试图去删除其在某部门担任的主要职务时,n请您先将该员工在该部门担任的主要职务标记更换到他在该部门担任的另一个职务上以后再选中删除.");
  320. return false;
  321. }
  322. }    
  323.     }
  324.     if ( confirm("你确认要删除您选中的项吗?") )
  325.     {
  326.         form1.action= "/mainctrl/intranet/hr/add_basic_info?doDel=1&submitByRoleSetting=1";
  327.         form1.submit();
  328.     }
  329.   else return false;
  330. }
  331. function domodifyMainDuty( ob, dutyId,divisionId,empId)
  332. {
  333. if(ob.value == "Y")
  334. {
  335. //alert("Y"+dutyId);
  336. return false;
  337. }
  338. if(ob.value == "N")
  339. {
  340. ob.checked = false;
  341. form1.action = "/mainctrl/intranet/hr/add_basic_info?doModifyMainDuty=1&dutyId="+dutyId+"&empId="+empId+"&divisionId="+divisionId+"&submitByRoleSetting=1";
  342. form1.submit();
  343. }
  344. return false;
  345. }
  346. </script>
  347. <DIV align=center>
  348. <form name="form1" method="post" >
  349.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  350.     <TBODY>
  351.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  352.     <TR> 
  353.         <TD colSpan=3 align="center"> 
  354.           <br>
  355.            <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  356.             <tr>
  357.               <td bgcolor="#fafafa">   
  358.                 <table class=title cellspacing=1 width="600" border=0>
  359.             <tr> 
  360.               <td bgcolor="#666666" 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>
  361.             </tr>
  362.             <tr> 
  363.               <td  bgcolor="#fafafa" colspan="3" height=30>&nbsp;
  364.                 <input type="button" value="基本信息" name="B32" class=text>
  365.                 <%
  366.                     if ( memberInfoBean.getId() > 0 && doNew == false )
  367.                     {
  368.                 %>  
  369.                 <input type="button" value="个人信息" onClick="location='/mainctrl/intranet/hr/add_personal_info?emp_id=<%= memberInfoBean.getId() %>'" name="B32" class=text>
  370.                   
  371.                 <input type="button" value="学历信息" onClick="location='/mainctrl/intranet/hr/add_degree_info?emp_id=<%= memberInfoBean.getId() %>'" name="B32" class=text>
  372.                   
  373.                 <input type="button" value="履历信息" onClick="location='/mainctrl/intranet/hr/add_resume_info?emp_id=<%= memberInfoBean.getId() %>'" name="B32" class=text>
  374.                 <%
  375.                     }
  376.                 %>
  377.               </td>
  378.             </tr>
  379.      <%
  380.         if ( doNew == true )
  381.         {
  382.          System.out.println("nn^^^^doNew status.");
  383.      %>
  384.              <tr> 
  385.               <td bgcolor="#e0e0e0" width="21%"><font class=strong>&nbsp;姓名:</font></td>
  386.               <td bgcolor="#e0e0e0" colspan="2" width="79%"> 
  387.                 <input type="text" name="name"  class=text size="20" value=<%= memberInfoBean.getName() %> >*
  388.               </td>
  389.             </tr>
  390.           <!--  <tr> 
  391.               <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;员工编号:</font></td>
  392.               <td bgcolor="#fafafa" colspan="2" width="79%"> <%= memberInfoBean.getId() %></td>
  393.             </tr>
  394.          -->
  395.             <tr bgcolor="#fafafa"> 
  396.               <td width="21%"><font class=strong>&nbsp;性别:</font></td>
  397.               <td colspan="2" width="79%"><b> 
  398.                 <select style="WIDTH:65px" size="1" name="sex"  >
  399.                   <option value=0 <% if (memberInfoBean.getSex() == 0) out.print("selected"); %>>男</option>
  400.                   <option value=1 <% if (memberInfoBean.getSex() == 1) out.print("selected"); %>>女</option>
  401.                 </select>
  402.                 </b></td>
  403.             </tr>
  404.                <tr> 
  405.               <td bgcolor="#e0e0e0" width="21%" ><font class=strong>&nbsp;登录口令:</font></td>
  406.               <td bgcolor="#e0e0e0" colspan="2" width="79%"> 
  407.                 <input type="password" name="pwd" class=text value ="<%=memberInfoBean.getPwd()%>"  size="20" maxlength="20">*
  408.               </td>
  409.             </tr>
  410.             <tr> 
  411.               <td bgcolor="#fafafa" width="21%" ><font class=strong>&nbsp;确认口令:</font></td>
  412.               <td bgcolor="#fafafa" colspan="2" width="79%"> 
  413.                 <input type="password" name="checkpwd" class=text value = "<%=memberInfoBean.getPwd()%>" size="20" maxlength="20">*
  414.               </td>
  415.             </tr>
  416.             <tr bgcolor="#e0e0e0"> 
  417.               <td width="21%"><font class=strong>&nbsp;用户名:</font></td>
  418.               <td colspan="2" width="79%" bgcolor="#e0e0e0"> <b> 
  419.                 <input type="text" name="userName"  class=text size="20" value="<%= memberInfoBean.getUserName() %>"></b>*
  420.                 </td>
  421.             </tr>
  422.             <tr> 
  423.               <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;E_mail:</font></td>
  424.               <td bgcolor="#fafafa" colspan="2" width="79%"> 
  425.                 <input type="text" name="email"  class=text size="20" value="<%= memberInfoBean.getEmail() %>">*
  426.               </td>
  427.             </tr>
  428.             <tr bgcolor="#e0e0e0"> 
  429.               <td width="21%"><font class=strong>&nbsp;电话号码:</font></td>
  430.               <td colspan="2" width="79%"> 
  431.                 <input type="text" name="phone"  class=text size="20" value="<%= memberInfoBean.getPhone() %>">
  432.               </td>
  433.             </tr>
  434.             <tr> 
  435.               <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;传真号码:</font></td>
  436.               <td bgcolor="#fafafa" colspan="2" width="79%"> 
  437.                 <input type="text" name="fax"  class=text size="20" value="<%= memberInfoBean.getFax() %>">
  438.               </td>
  439.             </tr>
  440.             <tr bgcolor="#e0e0e0"> 
  441.               <td width="21%"><font class=strong>&nbsp;手/呼机号码:</font></td>
  442.               <td colspan="2" width="79%"> 
  443.                 <input type="text" name="mobile"  class=text size="20" value=<%= memberInfoBean.getMobile() %>>
  444.               </td>
  445.             </tr>
  446.             <tr> 
  447.               <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;上级:</font></td>
  448.               <td bgcolor="#fafafa" colspan="2" width="79%"> 
  449.                 <select size="1" name="managerId" >
  450.                   <option value="-1" >--无--</option>
  451.          <%
  452.             Iterator iter3 = collAllP.iterator();
  453.             while ( iter3.hasNext() )
  454.             {
  455.                 MemberSearchBean ms = (MemberSearchBean)iter3.next();
  456.          %>
  457.                   <option value=<%= ms.getId() %> <% if ( ms.getId() == memberInfoBean.getManagerId() ) out.print("selected");%>><%= ms.getName() %></option>
  458.          <%
  459.             }
  460.          %>
  461.                 </select><!--*-->
  462.               </td>
  463.             </tr>
  464.             <tr bgcolor="#e0e0e0"> 
  465.               <td width="21%"><font class=strong>&nbsp;助理:</font></td>
  466.               <td colspan="2" width="79%"> 
  467.                 <select size="1" name="assistantId" >
  468.                   <option value="-1" >--无--</option>
  469.          <%
  470.             Iterator iter4 = collAllP.iterator();
  471.             while ( iter4.hasNext() )
  472.             {
  473.                 MemberSearchBean ms = (MemberSearchBean)iter4.next();
  474.          %>
  475.                   <option value=<%= ms.getId() %> <% if ( ms.getId() == memberInfoBean.getAssistantId() ) out.print("selected");%>><%= ms.getName() %></option>
  476.          <%
  477.             }
  478.          %>
  479.                 </select>
  480.               </td>
  481.             </tr>
  482.             <tr> 
  483.               <td width="21%" bgcolor="#fafafa"><b><font class = strong >&nbsp;职称</font></b></td>
  484.               <td width="79%"  bgcolor="#fafafa"><input type="text" name="title"  class=text size="20" value="<%= memberInfoBean.getTitle() %>"></td>
  485.             </tr>
  486.             <tr bgcolor="#e0e0e0"> 
  487.               <td width="21%"><font class=strong>&nbsp;备注:</font></td>
  488.               <td colspan="2" width="79%"> 
  489.                 <textarea name="note" rows="6" cols="36" ><%= memberInfoBean.getNote() %></textarea>
  490.                 </td>
  491.             </tr><!-- start role seting-->
  492.             <tr>
  493.             <td colspan = 3>
  494.              <table class=title cellspacing=1 width="600" border=0>
  495.        <%
  496.         if ( pageColl.size() > 0 )
  497.         {
  498.     %>              
  499.                   <tr bgcolor="#fafafa"> 
  500.                     <td colspan="6" height="30">&nbsp; 
  501.                       <input type="button" value="删除" name="B22" onClick="submitDel()"  class=text>
  502.                     </td>
  503.             </tr>
  504.     <%
  505.         }
  506.     %>                  <tr> 
  507.                     <td width="40" align="center"><font class=strong>选择</font></td>
  508.                     <td width="140" align="center"><font class=strong>设定时间</font></td>
  509.                     <td width="140" align="center"><font class=strong>部门</font></td>
  510.                     <td width="140" align="center"><font class=strong>主管</font></td>
  511.                     <td width="140" align="center"> <font class=strong>职务</font></td>
  512.                     <td width="10" align="center"> <font class=strong>主</font></td>
  513.             </tr>
  514.     <%
  515.         String bgcolor = null;
  516.         int color_i = 0;
  517.         Iterator iter = pageColl.iterator();
  518.         %>
  519.         <input type = hidden name = "ifAddedDuty" value = "<%=iter.hasNext()?"Yes":"No"%>">
  520.         <%
  521.         while ( iter.hasNext() )
  522.         {
  523.             MemberDutyInfo mdi = (MemberDutyInfo)iter.next();
  524.             color_i++;
  525.             if( color_i%2==0 )
  526.             {
  527.                 bgcolor = "#e0e0e0";
  528.             }
  529.             else
  530.             {
  531.                 bgcolor = "#fafafa";
  532.             }
  533.     %>
  534.                   <tr bgcolor="<%= bgcolor %>"> 
  535.                     <td width="40" align="center"><font class=strongw> 
  536.                       <input type="checkbox" name="delId" value="<%= hrProxyBean.isValidForDel(mdi.getDutyId(),emp_id)?"Y":"N"%><%= mdi.getDutyId() %>" onclick = "checkIfValidForDel(this,'<%= mdi.getDivisionName() %>','<%= mdi.getDutyName() %>')">
  537.                 </font></td>
  538.                     <td width="140" align="center"><%= MyDateFormat.myDate(mdi.getAssignDate()) %></td>
  539.                     <td align="center" width="140"><%= mdi.getDivisionName() %></td>
  540.                     <td width="140" align="center"><%= mdi.getManagerName() %></td>
  541.                     <td width="140" align="center"><%= mdi.getDutyName() %></td>
  542.                     <td width="10" align="center"><input type="radio"  name="radio<%=mdi.getDutyId()%>" value="<%=mdi.getIsMainDuty()?"Y":"N"%>" <% if( mdi.getIsMainDuty() == true ) out.print("checked");%> onclick = "domodifyMainDuty(this,'<%= mdi.getDutyId() %>','<%=mdi.getDivisionId()%>','<%=emp_id%>')" ></td>
  543.             </tr>
  544.     <%
  545.         }
  546.     %>
  547.           </table>
  548.                 <table class=title cellspacing=1 width="600" border=0>
  549.                   <tr> 
  550.                     <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;部门:</font></td>
  551.                     <td bgcolor="#fafafa" width="79%"> 
  552.                     <!--部门列表开始-->
  553.                     <select name="divisionId" class=choice onChange=change(this)>
  554.                     <option value="-1">------------请选择部门------------</option>
  555.                     <org:DivisionList>
  556.                     <vnex:items select='<%= deIdTemp+"" %>' >
  557.                     <option value=<org:DivisionAttribute attribute="id"/> <org:DivisionAttribute attribute="isSelected"/> >
  558.                     <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/></option>
  559.                     </vnex:items>
  560.                     </org:DivisionList>
  561.                     </select>
  562.                     <!--部门列表结束-->
  563.                     </td>
  564.                   </tr>
  565.                   <tr bgcolor="#e0e0e0"> 
  566.                     <td width="21%"><font class=strong>&nbsp;职位:</font></td>
  567.                     <td width="79%"> 
  568.                     <select name="dutyId">
  569.                     <%
  570.                     try
  571.                     {
  572.                      System.out.println("deIdTemp:"+deIdTemp);
  573.                     %>
  574.                     <hr:DutyList divisionId='<%= deIdTemp %>'>                          
  575.             <vnex:items >
  576.             <option value="<hr:DutyAttribute attribute="id" />"  >
  577.             <hr:DutyAttribute attribute='<%= null %>' /></option>
  578.             </vnex:items>            
  579.      </hr:DutyList> 
  580.      <%
  581.      }
  582.      catch(Exception e)
  583.      {
  584.       System.out.println("Error at Employee_role_setting.jsp at the DutyList tag:"+e.getMessage());
  585.      }
  586.      %>            
  587.             </select>
  588.                     </td>
  589.                   </tr>
  590.                   <tr bgcolor="#fafafa"> 
  591.                     <td width="21%"><font class=strong>&nbsp;主要职务:</font></td>
  592.                     <td width="79%"> 
  593.                       <input type="checkbox" name="isMainDuty" value=true >
  594.                     </td>
  595.                   </tr>
  596.                   <tr bgcolor="#fafafa" align="center"> 
  597.                     <td colspan="2" height="30"> 
  598.                       <input type=button value=新增职务 name=B3 class=text onclick="submitAdd()" >*&nbsp;&nbsp;
  599.                     </td>
  600.                   </tr>
  601.                 </table>
  602.             </td>
  603.             </tr>
  604.             <!-- end role seting-->
  605.                   <tr bgcolor="#fafafa"> 
  606.                     <td colspan="3" align="center" height="30"> 
  607.             <input type="button" value="保存" name="B1" class=text onclick="checkdata()">&nbsp;&nbsp;
  608.            <input type="reset" name="Button32" value="重置" class=text>&nbsp;&nbsp;
  609.           <input type="reset" value="放弃" name="B2" class=text onclick="location='/mainctrl/intranet/hr/search_result'">
  610.                     </td>
  611.                   </tr>
  612.     <%
  613.         }//end of the condition ( do new status. )
  614.         else 
  615.         {
  616.         System.out.println("nn^^^^doAdd status.");
  617.     %>
  618.             <tr> 
  619.               <td bgcolor="#e0e0e0" width="21%"><font class=strong>&nbsp;姓名:</font></td>
  620.               <td bgcolor="#e0e0e0" colspan="2" width="79%"> 
  621.                 <input type="text" name="name" readonly class=text size="20" value=<%= memberInfoBean.getName() %> >*
  622.               </td>
  623.             </tr>
  624.             <tr> 
  625.               <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;员工编号:</font></td>
  626.               <td bgcolor="#fafafa" colspan="2" width="79%"> <%= memberInfoBean.getId() %></td>
  627.             </tr>
  628.             <tr bgcolor="#e0e0e0"> 
  629.               <td width="21%"><font class=strong>&nbsp;性别:</font></td>
  630.               <td colspan="2" width="79%"><b> 
  631.                 <select style="WIDTH:65px" size="1" name="sex" disabled >
  632.                   <option value=0 <% if (memberInfoBean.getSex() == 0) out.print("selected"); %>>男</option>
  633.                   <option value=1 <% if (memberInfoBean.getSex() == 1) out.print("selected"); %>>女</option>
  634.                 </select>
  635.                 </b></td>
  636.             </tr>
  637.             <tr bgcolor="#e0e0e0"> 
  638.               <td width="21%"><font class=strong>&nbsp;用户名:</font></td>
  639.               <td colspan="2" width="79%" bgcolor="#e0e0e0"> <b> 
  640.                 <input type="text" name="username" readonly class=text size="20" value="<%= memberInfoBean.getUserName() %>"></b>*
  641.                 </td>
  642.             </tr>
  643.             <tr> 
  644.               <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;E_mail:</font></td>
  645.               <td bgcolor="#fafafa" colspan="2" width="79%"> 
  646.                 <input type="text" name="email" readonly class=text size="20" value="<%= memberInfoBean.getEmail() %>">*
  647.               </td>
  648.             </tr>
  649.             <tr bgcolor="#e0e0e0"> 
  650.               <td width="21%"><font class=strong>&nbsp;电话号码:</font></td>
  651.               <td colspan="2" width="79%"> 
  652.                 <input type="text" name="phone" readonly class=text size="20" value="<%= memberInfoBean.getPhone() %>">
  653.               </td>
  654.             </tr>
  655.             <tr> 
  656.               <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;传真号码:</font></td>
  657.               <td bgcolor="#fafafa" colspan="2" width="79%"> 
  658.                 <input type="text" name="fax" readonly class=text size="20" value="<%= memberInfoBean.getFax() %>">
  659.               </td>
  660.             </tr>
  661.             <tr bgcolor="#e0e0e0"> 
  662.               <td width="21%"><font class=strong>&nbsp;手/呼机号码:</font></td>
  663.               <td colspan="2" width="79%"> 
  664.                 <input type="text" name="mobile" readonly class=text size="20" value=<%= memberInfoBean.getMobile() %>>
  665.               </td>
  666.             </tr>
  667.             <tr> 
  668.               <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;上级:</font></td>
  669.               <td bgcolor="#fafafa" colspan="2" width="79%"> 
  670.                 <select size="1" name="managerId" disabled>
  671.                   <option value="-1" >--无--</option>
  672.          <%
  673.             Iterator iter3 = collAllP.iterator();
  674.             while ( iter3.hasNext() )
  675.             {
  676.                 MemberSearchBean ms = (MemberSearchBean)iter3.next();
  677.          %>
  678.                   <option value=<%= ms.getId() %> <% if ( ms.getId() == memberInfoBean.getManagerId() ) out.print("selected");%>><%= ms.getName() %></option>
  679.          <%
  680.             }
  681.          %>
  682.                 </select><!--*-->
  683.               </td>
  684.             </tr>
  685.             <tr bgcolor="#e0e0e0"> 
  686.               <td width="21%"><font class=strong>&nbsp;助理:</font></td>
  687.               <td colspan="2" width="79%"> 
  688.                 <select size="1" name="assistantId" disabled>
  689.                   <option value="-1" >--无--</option>
  690.          <%
  691.             Iterator iter4 = collAllP.iterator();
  692.             while ( iter4.hasNext() )
  693.             {
  694.                 MemberSearchBean ms = (MemberSearchBean)iter4.next();
  695.          %>
  696.                   <option value=<%= ms.getId() %> <% if ( ms.getId() == memberInfoBean.getAssistantId() ) out.print("selected");%>><%= ms.getName() %></option>
  697.          <%
  698.             }
  699.          %>
  700.                 </select>
  701.               </td>
  702.             </tr>
  703.             <tr> 
  704.               <td width="21%" bgcolor="#fafafa"><b><font class = strong >&nbsp;职称</font></b></td>
  705.               <td width="79%"  bgcolor="#fafafa"><input type="text" name="title" readonly class=text size="20" value="<%= memberInfoBean.getTitle() %>"></td>
  706.             </tr>
  707.             <tr bgcolor="#e0e0e0"> 
  708.               <td width="21%"><font class=strong>&nbsp;备注:</font></td>
  709.               <td colspan="2" width="79%"> 
  710.                 <textarea name="note" rows="6" cols="36" readonly><%= memberInfoBean.getNote() %></textarea>
  711.                 </td>
  712.             </tr>
  713.          <!-- start role seting-->
  714.             <tr>
  715.             <td colspan = 3>
  716.              <table class=title cellspacing=1 width="600" border=0>
  717.        <%
  718.         if ( pageColl.size() > 0 )
  719.         {
  720.     %>              
  721.                   <tr bgcolor="#fafafa"> 
  722.                     <td colspan="6" height="30">&nbsp; 
  723.                       <input type="button" value="删除" name="B22" onClick="submitDel()"  class=text>
  724.                     </td>
  725.             </tr>
  726.     <%
  727.         }
  728.     %>                  <tr> 
  729.                     <td width="40" align="center"><font class=strong>选择</font></td>
  730.                     <td width="140" align="center"><font class=strong>设定时间</font></td>
  731.                     <td width="140" align="center"><font class=strong>部门</font></td>
  732.                     <td width="140" align="center"><font class=strong>主管</font></td>
  733.                     <td width="140" align="center"> <font class=strong>职务</font></td>
  734.                     <td width="10" align="center"> <font class=strong>主</font></td>
  735.             </tr>
  736.     <%
  737.         String bgcolor = null;
  738.         int color_i = 0;
  739.         Iterator iter = pageColl.iterator();
  740.         %>
  741.         <input type = hidden name = "ifAddedDuty" value = "<%=iter.hasNext()?"Yes":"No"%>">
  742.         <%
  743.         while ( iter.hasNext() )
  744.         {
  745.             MemberDutyInfo mdi = (MemberDutyInfo)iter.next();
  746.             color_i++;
  747.             if( color_i%2==0 )
  748.             {
  749.                 bgcolor = "#e0e0e0";
  750.             }
  751.             else
  752.             {
  753.                 bgcolor = "#fafafa";
  754.             }
  755.     %>
  756.                   <tr bgcolor="<%= bgcolor %>"> 
  757.                     <td width="40" align="center"><font class=strongw> 
  758.                       <input type="checkbox" name="delId" value="<%= hrProxyBean.isValidForDel(mdi.getDutyId(),emp_id)?"Y":"N"%><%= mdi.getDutyId() %>" onclick = "checkIfValidForDel(this,'<%= mdi.getDivisionName() %>','<%= mdi.getDutyName() %>')">
  759.                 </font></td>
  760.                     <td width="140" align="center"><%= MyDateFormat.myDate(mdi.getAssignDate()) %></td>
  761.                     <td align="center" width="140"><%= mdi.getDivisionName() %></td>
  762.                     <td width="140" align="center"><%= mdi.getManagerName() %></td>
  763.                     <td width="140" align="center"><%= mdi.getDutyName() %></td>
  764.                     <td width="10" align="center"><input type="radio"  name="radio<%=mdi.getDutyId()%>" value="<%=mdi.getIsMainDuty()?"Y":"N"%>" <% if( mdi.getIsMainDuty() == true ) out.print("checked");%> onclick = "domodifyMainDuty(this,'<%= mdi.getDutyId() %>','<%=mdi.getDivisionId()%>','<%=emp_id%>')" ></td>
  765.             </tr>
  766.     <%
  767.         }
  768.     %>
  769.           </table>
  770.                 <table class=title cellspacing=1 width="600" border=0>
  771.                   <tr> 
  772.                     <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;部门:</font></td>
  773.                     <td bgcolor="#fafafa" width="79%"> 
  774.                     <!--部门列表开始-->
  775.                     <select name="divisionId" class=choice onChange=change(this)>
  776.                     <option value="-1">------------请选择部门------------</option>
  777.                     <org:DivisionList>
  778.                     <vnex:items select='<%= deIdTemp+"" %>' >
  779.                     <option value=<org:DivisionAttribute attribute="id"/> <org:DivisionAttribute attribute="isSelected"/> >
  780.                     <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/></option>
  781.                     </vnex:items>
  782.                     </org:DivisionList>
  783.                     </select>
  784.                     <!--部门列表结束-->
  785.                     </td>
  786.                   </tr>
  787.                   <tr bgcolor="#e0e0e0"> 
  788.                     <td width="21%"><font class=strong>&nbsp;职位:</font></td>
  789.                     <td width="79%"> 
  790.                     <select name="dutyId">
  791.                     <%
  792.                     try
  793.                     {
  794.                      System.out.println("deIdTemp:"+deIdTemp);
  795.                     %>
  796.                     <hr:DutyList divisionId='<%= deIdTemp %>'>                          
  797.             <vnex:items >
  798.             <option value="<hr:DutyAttribute attribute="id" />"  >
  799.             <hr:DutyAttribute attribute='<%= null %>' /></option>
  800.             </vnex:items>            
  801.      </hr:DutyList> 
  802.      <%
  803.      }
  804.      catch(Exception e)
  805.      {
  806.       System.out.println("Error at Employee_role_setting.jsp at the DutyList tag:"+e.getMessage());
  807.      }
  808.      %>            
  809.             </select>
  810.                     </td>
  811.                   </tr>
  812.                   <tr bgcolor="#fafafa"> 
  813.                     <td width="21%"><font class=strong>&nbsp;主要职务:</font></td>
  814.                     <td width="79%"> 
  815.                       <input type="checkbox" name="isMainDuty" value=true >
  816.                     </td>
  817.                   </tr>
  818.                   <tr bgcolor="#fafafa" align="center"> 
  819.                     <td colspan="2" height="30"> 
  820.                       <input type=button value=新增职务 name=B3 class=text onclick="submitAdd()" >*&nbsp;&nbsp;
  821.                     </td>
  822.                   </tr>
  823.                 </table>
  824.             </td>
  825.             </tr>
  826.             <!-- end role seting-->
  827.                   <tr bgcolor="#fafafa"> 
  828.                     <td colspan="3" align="center" height="30"> 
  829.                       <input type="reset" value="返回" name="B2" class=text onclick="location='/mainctrl/intranet/hr/search_result'">
  830.                     </td>
  831.                   </tr> 
  832.     <%
  833.         }
  834.     %>
  835.                 </table>
  836.            </td>
  837.             </tr>
  838.           </table>
  839.           <br><br>
  840.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  841.         </TD>
  842.     </TR>
  843.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  844.     </TBODY> 
  845.     </TABLE>
  846.   <BR>
  847.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  848.     
  849.   </form></DIV>
  850. </BODY></HTML>