employee_create_basic_info.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:37k
源码类别:
电子政务应用
开发平台:
Java
- <%
- /**
- * $RCSfile: employee_create_basic_info.jsp,v $
- * $Revision: 1.0 $
- * $Date: 2001/05/17 20:57:46 $
- * /mainctrl/intranet/hr/add_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="com.vnex.intranet.util.CommonDBOperation"%>
- <%@ page import="java.util.*" %>
- <%@ page import="java.sql.*"%>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
- <%
- // from role setting
- %>
- <%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
- <%
- // End of from role setting
- %>
- <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="*" />
- <%
- boolean doNew = false;
- String exOfconn = null;
- // from role setting
- %>
- <jsp:useBean id="dutyInfoBean" class="com.vnex.intranet.hr.employer_info.value.MemberDutyInfo" scope="page" />
- <jsp:useBean id="businessSession" class="com.vnex.intranet.pub.BusinessSession" scope="page" />
- <jsp:setProperty name="dutyInfoBean" property="*" />
- <%
- // End of from role setting
- %>
- <%
- if ( request.getParameter("doNew") != null )
- {
- doNew = true;
- int empIdSeqNext = CommonDBOperation.getNextSequenceId("S_EMP_ID");
- session.setAttribute("empIdSeqNext",new Integer( empIdSeqNext ));
- session.setAttribute("doNewOrDoAdd","new");
- System.out.println("****doNew Status: empIdSeqNext:"+empIdSeqNext);
- memberInfoBean.setId(((Integer)session.getAttribute("empIdSeqNext")).intValue());
- memberInfoBean.setName("");
- memberInfoBean.setUserName("");
- memberInfoBean.setDevisionId(1);
- memberInfoBean.setPwd("");
- memberInfoBean.setPhone("");
- memberInfoBean.setSex(0);
- memberInfoBean.setFax("");
- memberInfoBean.setMobile("");
- memberInfoBean.setEmail("");
- memberInfoBean.setManagerId(-1);
- memberInfoBean.setAssistantId(-1);
- memberInfoBean.setTitle("");
- memberInfoBean.setNote("");
- // System.out.println("---------do init-----------");
- session.removeAttribute( "memberInfoBean" );
- session.setAttribute( "memberInfoBean", new MemberInfo() );
- session.removeAttribute( "personalInfoBean" );
- }
- //MemberInfoDAO mi = new MemberInfoDAO();
- if( request.getParameter("submitByRoleSetting") != null || request.getParameter("doAdd")!=null )
- {
- if( ((String) session.getAttribute("doNewOrDoAdd")).equals("new"))
- doNew = true;
- if( ((String) session.getAttribute("doNewOrDoAdd")).equals("add"))
- doNew = false;
- memberInfoBean.setId(((Integer)session.getAttribute("empIdSeqNext")).intValue());
- dutyInfoBean.setEmpId(((Integer)session.getAttribute("empIdSeqNext")).intValue());
- System.out.println("***the submitByRoleSetting or add status:" + ((Integer)session.getAttribute("empIdSeqNext")).intValue());
- System.out.println("***the submitByRoleSetting or add status:" + ((Integer)session.getAttribute("empIdSeqNext")).intValue());
- }
- System.out.println("memberInfoBean.getId()"+memberInfoBean.getId());
- System.out.println("memberInfoBean.getName()"+memberInfoBean.getName());
- System.out.println("memberInfoBean.getUserName()"+memberInfoBean.getUserName());
- System.out.println("memberInfoBean.getPwd()"+memberInfoBean.getPwd());
- System.out.println("dutyInfoBean.getEmpId()"+dutyInfoBean.getEmpId());
- System.out.println("dutyInfoBean.getDivisionId()"+dutyInfoBean.getDivisionId());
- if ( request.getParameter("doAdd") != null )
- {
- doNew = false;
- session.setAttribute("doNewOrDoAdd","add");
- System.out.println("***************Begin to create memberInfoBean.getId()"+memberInfoBean.getId());
- try
- {
- hrProxyBean.infoCreate( memberInfoBean );
- }
- catch(SQLException e)
- {
- System.out.println("Exception at Employee_create_basic_info.jsp:"+e);
- exOfconn = e.getMessage();
- if(!( exOfconn.substring(0,35).equals("Connection has already been closed.")))
- {
- throw new SQLException(e.getMessage());
- }
- }
- catch(Exception ex)
- {
- throw new Exception(ex.getMessage());
- }
- }
- Collection collAllP = hrProxyBean.infoFindAll();
- %>
- <%
- // from role setting
- Collection pageColl = new ArrayList();
- int emp_id = ((Integer) session.getAttribute("empIdSeqNext")).intValue();
- int chgMainDivisionId = -1;
- int chgMainDutyId = -1;
- String start = request.getParameter("start");
- //MemberDutyDAO mi = new MemberDutyDAO();
- if ( request.getParameter("doAddDuty") != null && dutyInfoBean.getEmpId() > 0 )
- {
- System.out.println("******In the role part dutyInfoBean.getEmpId()"+dutyInfoBean.getEmpId());
- dutyInfoBean.setAssignId( businessSession.getEmpId() );
- hrProxyBean.dutyCreate( dutyInfoBean );
- }
- if( request.getParameter("doDel") != null && dutyInfoBean.getEmpId() > 0 && request.getParameter("delId") != null)
- {
- String[] delId = request.getParameterValues("delId");
- for ( int i=0; i<delId.length; i++ )
- {
- hrProxyBean.dutyRemove( dutyInfoBean.getEmpId(), Integer.parseInt( delId[i].substring(1) ) );
- }
- }
- int deIdTemp = -1;
- if ( request.getParameter("doChange") != null && dutyInfoBean.getEmpId() > 0 )
- {
- if ( request.getParameter("divisionId") != null )
- deIdTemp = Integer.parseInt( request.getParameter("divisionId") );
- }
- if( request.getParameter("doModifyMainDuty") != null)
- {
- System.out.println("nn**********************Processing the if condition()");
- System.out.println("nn**********************request.getParameter("divisionId")"+request.getParameter("divisionId"));
- System.out.println("nn**********************request.getParameter("dutyId") "+request.getParameter("dutyId") );
- if( request.getParameter("divisionId") != null )
- chgMainDivisionId = Integer.parseInt(request.getParameter("divisionId") );
- if( request.getParameter("dutyId") != null )
- chgMainDutyId = Integer.parseInt( request.getParameter("dutyId") );
- if(chgMainDivisionId > 0 && chgMainDutyId > 0 && emp_id > 0)
- {
- try
- {
- System.out.println("nn********************Processing the method:hrProxyBean.modifyIsMainDuty()");
- hrProxyBean.modifyIsMainDuty( chgMainDutyId, chgMainDivisionId , emp_id);
- }
- catch(Exception e)
- {
- System.out.println("n Exception at jsp:"+e);
- throw new Exception(e.getMessage());
- }
- }
- }
- pageColl = hrProxyBean.dutyFindForCreateEmp( emp_id );
- // End of from role setting
- %>
- <!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/validate.js"></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.userName.value.length < 1 || isEmptyStr(form1.userName.value) )
- {
- alert("你必须输入职员用户名!(不能为空或空格)");
- form1.userName.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;
- // }
- if( form1.ifAddedDuty.value == "Yes" )
- {
- form1.action="/mainctrl/intranet/hr/add_basic_info?doAdd=1"
- form1.submit();
- }
- else
- {
- alert("您必须至少赋予该员工一个职位.");
- return false;
- }
- }
- </script>
- <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" src="/vnex/util/strUtil.js"></script>
- <script language=JavaScript>
- function submitAdd()
- {
- if (form1.divisionId.selectedIndex < 0)
- {
- alert("你必须选择部门!");
- form1.divisionId.focus();
- return false;
- }
- if (form1.dutyId.selectedIndex < 0)
- {
- alert("你必须选择职务!");
- form1.dutyId.focus();
- return false;
- }
- form1.action= "/mainctrl/intranet/hr/add_basic_info?doAddDuty=1&submitByRoleSetting=1";
- form1.submit();
- }
- function change(select)
- {
- form1.action="/mainctrl/intranet/hr/add_basic_info?doChange=1&submitByRoleSetting=1?empId=<%=emp_id%>";
- form1.submit();
- }
- function checkIfValidForDel(ob,division,dutyName)
- {
- if( ob.value.charAt(0)=="N" && ob.checked == true )
- {
- alert("该员工在"+division+"担任了两个或两个以上职位,您当前选中想要删除的"+dutyName+"职位是该员工在"+division+"担任的主要职位,您必须给该员工在"+division+"部门另指定一个主要职位然后再选择删除.");
- return false;
- }
- else
- {
- return false;
- }
- }
- function submitDel()
- {
- if(form1.delId == null)
- {
- alert("目前没有数据可供删除!");
- return false;
- }
- if(!isChecked(form1.delId))
- {
- alert("您没有选择要删除的项!");
- return false;
- }
- for(var i=0;i<document.form1.delId.length;i++)
- {
- if (document.form1.delId[i].checked)
- {
- if( document.form1.delId[i].value.charAt(0)=="N" )
- {
- alert("根据职位设定的原则,您必须保证每一个员工在其任职的每一个部门有而且仅有一个主要职位,n如果该员工在一个部门担任了两个或两个以上的职位(其中会有一个而且仅有一个为主要职位),当您试图去删除其在某部门担任的主要职务时,n请您先将该员工在该部门担任的主要职务标记更换到他在该部门担任的另一个职务上以后再选中删除.");
- return false;
- }
- }
- }
- if ( confirm("你确认要删除您选中的项吗?") )
- {
- form1.action= "/mainctrl/intranet/hr/add_basic_info?doDel=1&submitByRoleSetting=1";
- form1.submit();
- }
- else return false;
- }
- function domodifyMainDuty( ob, dutyId,divisionId,empId)
- {
- if(ob.value == "Y")
- {
- //alert("Y"+dutyId);
- return false;
- }
- if(ob.value == "N")
- {
- ob.checked = false;
- form1.action = "/mainctrl/intranet/hr/add_basic_info?doModifyMainDuty=1&dutyId="+dutyId+"&empId="+empId+"&divisionId="+divisionId+"&submitByRoleSetting=1";
- form1.submit();
- }
- return false;
- }
- </script>
- <DIV align=center>
- <form name="form1" 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>
- <tr>
- <td bgcolor="#666666" 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>
- <td bgcolor="#fafafa" colspan="3" height=30>
- <input type="button" value="基本信息" name="B32" class=text>
- <%
- if ( memberInfoBean.getId() > 0 && doNew == false )
- {
- %>
- <input type="button" value="个人信息" onClick="location='/mainctrl/intranet/hr/add_personal_info?emp_id=<%= memberInfoBean.getId() %>'" name="B32" class=text>
- <input type="button" value="学历信息" onClick="location='/mainctrl/intranet/hr/add_degree_info?emp_id=<%= memberInfoBean.getId() %>'" name="B32" class=text>
- <input type="button" value="履历信息" onClick="location='/mainctrl/intranet/hr/add_resume_info?emp_id=<%= memberInfoBean.getId() %>'" name="B32" class=text>
- <%
- }
- %>
- </td>
- </tr>
- <%
- if ( doNew == true )
- {
- System.out.println("nn^^^^doNew status.");
- %>
- <tr>
- <td bgcolor="#e0e0e0" width="21%"><font class=strong> 姓名:</font></td>
- <td bgcolor="#e0e0e0" colspan="2" width="79%">
- <input type="text" name="name" class=text size="20" value=<%= memberInfoBean.getName() %> >*
- </td>
- </tr>
- <!-- <tr>
- <td bgcolor="#fafafa" width="21%"><font class=strong> 员工编号:</font></td>
- <td bgcolor="#fafafa" colspan="2" width="79%"> <%= memberInfoBean.getId() %></td>
- </tr>
- -->
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 性别:</font></td>
- <td colspan="2" width="79%"><b>
- <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>
- </b></td>
- </tr>
- <tr>
- <td bgcolor="#e0e0e0" width="21%" ><font class=strong> 登录口令:</font></td>
- <td bgcolor="#e0e0e0" colspan="2" width="79%">
- <input type="password" name="pwd" class=text value ="<%=memberInfoBean.getPwd()%>" size="20" maxlength="20">*
- </td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" width="21%" ><font class=strong> 确认口令:</font></td>
- <td bgcolor="#fafafa" colspan="2" width="79%">
- <input type="password" name="checkpwd" class=text value = "<%=memberInfoBean.getPwd()%>" size="20" maxlength="20">*
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 用户名:</font></td>
- <td colspan="2" width="79%" bgcolor="#e0e0e0"> <b>
- <input type="text" name="userName" class=text size="20" value="<%= memberInfoBean.getUserName() %>"></b>*
- </td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" width="21%"><font class=strong> E_mail:</font></td>
- <td bgcolor="#fafafa" colspan="2" width="79%">
- <input type="text" name="email" class=text size="20" value="<%= memberInfoBean.getEmail() %>">*
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 电话号码:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="phone" class=text size="20" value="<%= memberInfoBean.getPhone() %>">
- </td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" width="21%"><font class=strong> 传真号码:</font></td>
- <td bgcolor="#fafafa" colspan="2" width="79%">
- <input type="text" name="fax" class=text size="20" value="<%= memberInfoBean.getFax() %>">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 手/呼机号码:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="mobile" class=text size="20" value=<%= memberInfoBean.getMobile() %>>
- </td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" width="21%"><font class=strong> 上级:</font></td>
- <td bgcolor="#fafafa" 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="#e0e0e0">
- <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>
- <td width="21%" bgcolor="#fafafa"><b><font class = strong > 职称</font></b></td>
- <td width="79%" bgcolor="#fafafa"><input type="text" name="title" class=text size="20" value="<%= memberInfoBean.getTitle() %>"></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 备注:</font></td>
- <td colspan="2" width="79%">
- <textarea name="note" rows="6" cols="36" ><%= memberInfoBean.getNote() %></textarea>
- </td>
- </tr><!-- start role seting-->
- <tr>
- <td colspan = 3>
- <table class=title cellspacing=1 width="600" border=0>
- <%
- if ( pageColl.size() > 0 )
- {
- %>
- <tr bgcolor="#fafafa">
- <td colspan="6" height="30">
- <input type="button" value="删除" name="B22" onClick="submitDel()" class=text>
- </td>
- </tr>
- <%
- }
- %> <tr>
- <td width="40" align="center"><font class=strong>选择</font></td>
- <td width="140" align="center"><font class=strong>设定时间</font></td>
- <td width="140" align="center"><font class=strong>部门</font></td>
- <td width="140" align="center"><font class=strong>主管</font></td>
- <td width="140" align="center"> <font class=strong>职务</font></td>
- <td width="10" align="center"> <font class=strong>主</font></td>
- </tr>
- <%
- String bgcolor = null;
- int color_i = 0;
- Iterator iter = pageColl.iterator();
- %>
- <input type = hidden name = "ifAddedDuty" value = "<%=iter.hasNext()?"Yes":"No"%>">
- <%
- while ( iter.hasNext() )
- {
- MemberDutyInfo mdi = (MemberDutyInfo)iter.next();
- color_i++;
- if( color_i%2==0 )
- {
- bgcolor = "#e0e0e0";
- }
- else
- {
- bgcolor = "#fafafa";
- }
- %>
- <tr bgcolor="<%= bgcolor %>">
- <td width="40" align="center"><font class=strongw>
- <input type="checkbox" name="delId" value="<%= hrProxyBean.isValidForDel(mdi.getDutyId(),emp_id)?"Y":"N"%><%= mdi.getDutyId() %>" onclick = "checkIfValidForDel(this,'<%= mdi.getDivisionName() %>','<%= mdi.getDutyName() %>')">
- </font></td>
- <td width="140" align="center"><%= MyDateFormat.myDate(mdi.getAssignDate()) %></td>
- <td align="center" width="140"><%= mdi.getDivisionName() %></td>
- <td width="140" align="center"><%= mdi.getManagerName() %></td>
- <td width="140" align="center"><%= mdi.getDutyName() %></td>
- <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>
- </tr>
- <%
- }
- %>
- </table>
- <table class=title cellspacing=1 width="600" border=0>
- <tr>
- <td bgcolor="#fafafa" width="21%"><font class=strong> 部门:</font></td>
- <td bgcolor="#fafafa" width="79%">
- <!--部门列表开始-->
- <select name="divisionId" class=choice onChange=change(this)>
- <option value="-1">------------请选择部门------------</option>
- <org:DivisionList>
- <vnex:items select='<%= deIdTemp+"" %>' >
- <option value=<org:DivisionAttribute attribute="id"/> <org:DivisionAttribute attribute="isSelected"/> >
- <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/></option>
- </vnex:items>
- </org:DivisionList>
- </select>
- <!--部门列表结束-->
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 职位:</font></td>
- <td width="79%">
- <select name="dutyId">
- <%
- try
- {
- System.out.println("deIdTemp:"+deIdTemp);
- %>
- <hr:DutyList divisionId='<%= deIdTemp %>'>
- <vnex:items >
- <option value="<hr:DutyAttribute attribute="id" />" >
- <hr:DutyAttribute attribute='<%= null %>' /></option>
- </vnex:items>
- </hr:DutyList>
- <%
- }
- catch(Exception e)
- {
- System.out.println("Error at Employee_role_setting.jsp at the DutyList tag:"+e.getMessage());
- }
- %>
- </select>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 主要职务:</font></td>
- <td width="79%">
- <input type="checkbox" name="isMainDuty" value=true >
- </td>
- </tr>
- <tr bgcolor="#fafafa" align="center">
- <td colspan="2" height="30">
- <input type=button value=新增职务 name=B3 class=text onclick="submitAdd()" >*
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <!-- end role seting-->
- <tr bgcolor="#fafafa">
- <td colspan="3" align="center" height="30">
- <input type="button" value="保存" name="B1" class=text onclick="checkdata()">
- <input type="reset" name="Button32" value="重置" class=text>
- <input type="reset" value="放弃" name="B2" class=text onclick="location='/mainctrl/intranet/hr/search_result'">
- </td>
- </tr>
- <%
- }//end of the condition ( do new status. )
- else
- {
- System.out.println("nn^^^^doAdd status.");
- %>
- <tr>
- <td bgcolor="#e0e0e0" width="21%"><font class=strong> 姓名:</font></td>
- <td bgcolor="#e0e0e0" colspan="2" width="79%">
- <input type="text" name="name" readonly class=text size="20" value=<%= memberInfoBean.getName() %> >*
- </td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" width="21%"><font class=strong> 员工编号:</font></td>
- <td bgcolor="#fafafa" colspan="2" width="79%"> <%= memberInfoBean.getId() %></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 性别:</font></td>
- <td colspan="2" width="79%"><b>
- <select style="WIDTH:65px" size="1" name="sex" disabled >
- <option value=0 <% if (memberInfoBean.getSex() == 0) out.print("selected"); %>>男</option>
- <option value=1 <% if (memberInfoBean.getSex() == 1) out.print("selected"); %>>女</option>
- </select>
- </b></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 用户名:</font></td>
- <td colspan="2" width="79%" bgcolor="#e0e0e0"> <b>
- <input type="text" name="username" readonly class=text size="20" value="<%= memberInfoBean.getUserName() %>"></b>*
- </td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" width="21%"><font class=strong> E_mail:</font></td>
- <td bgcolor="#fafafa" colspan="2" width="79%">
- <input type="text" name="email" readonly class=text size="20" value="<%= memberInfoBean.getEmail() %>">*
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 电话号码:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="phone" readonly class=text size="20" value="<%= memberInfoBean.getPhone() %>">
- </td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" width="21%"><font class=strong> 传真号码:</font></td>
- <td bgcolor="#fafafa" colspan="2" width="79%">
- <input type="text" name="fax" readonly class=text size="20" value="<%= memberInfoBean.getFax() %>">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 手/呼机号码:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="mobile" readonly class=text size="20" value=<%= memberInfoBean.getMobile() %>>
- </td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" width="21%"><font class=strong> 上级:</font></td>
- <td bgcolor="#fafafa" colspan="2" width="79%">
- <select size="1" name="managerId" disabled>
- <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="#e0e0e0">
- <td width="21%"><font class=strong> 助理:</font></td>
- <td colspan="2" width="79%">
- <select size="1" name="assistantId" disabled>
- <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>
- <td width="21%" bgcolor="#fafafa"><b><font class = strong > 职称</font></b></td>
- <td width="79%" bgcolor="#fafafa"><input type="text" name="title" readonly class=text size="20" value="<%= memberInfoBean.getTitle() %>"></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 备注:</font></td>
- <td colspan="2" width="79%">
- <textarea name="note" rows="6" cols="36" readonly><%= memberInfoBean.getNote() %></textarea>
- </td>
- </tr>
- <!-- start role seting-->
- <tr>
- <td colspan = 3>
- <table class=title cellspacing=1 width="600" border=0>
- <%
- if ( pageColl.size() > 0 )
- {
- %>
- <tr bgcolor="#fafafa">
- <td colspan="6" height="30">
- <input type="button" value="删除" name="B22" onClick="submitDel()" class=text>
- </td>
- </tr>
- <%
- }
- %> <tr>
- <td width="40" align="center"><font class=strong>选择</font></td>
- <td width="140" align="center"><font class=strong>设定时间</font></td>
- <td width="140" align="center"><font class=strong>部门</font></td>
- <td width="140" align="center"><font class=strong>主管</font></td>
- <td width="140" align="center"> <font class=strong>职务</font></td>
- <td width="10" align="center"> <font class=strong>主</font></td>
- </tr>
- <%
- String bgcolor = null;
- int color_i = 0;
- Iterator iter = pageColl.iterator();
- %>
- <input type = hidden name = "ifAddedDuty" value = "<%=iter.hasNext()?"Yes":"No"%>">
- <%
- while ( iter.hasNext() )
- {
- MemberDutyInfo mdi = (MemberDutyInfo)iter.next();
- color_i++;
- if( color_i%2==0 )
- {
- bgcolor = "#e0e0e0";
- }
- else
- {
- bgcolor = "#fafafa";
- }
- %>
- <tr bgcolor="<%= bgcolor %>">
- <td width="40" align="center"><font class=strongw>
- <input type="checkbox" name="delId" value="<%= hrProxyBean.isValidForDel(mdi.getDutyId(),emp_id)?"Y":"N"%><%= mdi.getDutyId() %>" onclick = "checkIfValidForDel(this,'<%= mdi.getDivisionName() %>','<%= mdi.getDutyName() %>')">
- </font></td>
- <td width="140" align="center"><%= MyDateFormat.myDate(mdi.getAssignDate()) %></td>
- <td align="center" width="140"><%= mdi.getDivisionName() %></td>
- <td width="140" align="center"><%= mdi.getManagerName() %></td>
- <td width="140" align="center"><%= mdi.getDutyName() %></td>
- <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>
- </tr>
- <%
- }
- %>
- </table>
- <table class=title cellspacing=1 width="600" border=0>
- <tr>
- <td bgcolor="#fafafa" width="21%"><font class=strong> 部门:</font></td>
- <td bgcolor="#fafafa" width="79%">
- <!--部门列表开始-->
- <select name="divisionId" class=choice onChange=change(this)>
- <option value="-1">------------请选择部门------------</option>
- <org:DivisionList>
- <vnex:items select='<%= deIdTemp+"" %>' >
- <option value=<org:DivisionAttribute attribute="id"/> <org:DivisionAttribute attribute="isSelected"/> >
- <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/></option>
- </vnex:items>
- </org:DivisionList>
- </select>
- <!--部门列表结束-->
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 职位:</font></td>
- <td width="79%">
- <select name="dutyId">
- <%
- try
- {
- System.out.println("deIdTemp:"+deIdTemp);
- %>
- <hr:DutyList divisionId='<%= deIdTemp %>'>
- <vnex:items >
- <option value="<hr:DutyAttribute attribute="id" />" >
- <hr:DutyAttribute attribute='<%= null %>' /></option>
- </vnex:items>
- </hr:DutyList>
- <%
- }
- catch(Exception e)
- {
- System.out.println("Error at Employee_role_setting.jsp at the DutyList tag:"+e.getMessage());
- }
- %>
- </select>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 主要职务:</font></td>
- <td width="79%">
- <input type="checkbox" name="isMainDuty" value=true >
- </td>
- </tr>
- <tr bgcolor="#fafafa" align="center">
- <td colspan="2" height="30">
- <input type=button value=新增职务 name=B3 class=text onclick="submitAdd()" >*
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <!-- end role seting-->
- <tr bgcolor="#fafafa">
- <td colspan="3" align="center" height="30">
- <input type="reset" value="返回" name="B2" class=text onclick="location='/mainctrl/intranet/hr/search_result'">
- </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>