employee_contract.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:17k
源码类别:
电子政务应用
开发平台:
Java
- <%
- /**
- * $RCSfile: employee_contract.jsp,v $
- * $Revision: 1.0 $
- * $Date: 2001/05/17 20:57:46 $
- * /mainctrl/intranet/hr/manage_contract
- */
- %>
- <%@ 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" %>
- <%@ page import="java.text.DecimalFormat" %>
- <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:useBean id="contractBean" class="com.vnex.intranet.hr.employer_info.value.MemberContract" scope="page" />
- <jsp:setProperty name="contractBean" property="*" />
- <%
- boolean isExist = false;
- int emp_id = -1;
- DecimalFormat dFormat = new DecimalFormat("##.##");
- String str = request.getParameter("emp_id");
- if ( str != null )
- {
- emp_id = Integer.parseInt( str );
- contractBean.setEmployerId( emp_id );
- session.setAttribute("contractBean", contractBean);
- }
- String start = request.getParameter("start");
- //MemberContractDAO mi = new MemberContractDAO();
- if ( request.getParameter("doAdd") != null && memberInfoBean.getId() > 0 )
- {
- hrProxyBean.contractCreate( contractBean );
- isExist = true;
- }
- else if ( request.getParameter("doSave") != null && memberInfoBean.getId() > 0 )
- {
- hrProxyBean.contractStore( contractBean );
- isExist = true;
- }
- else
- {
- contractBean = hrProxyBean.contractFind( memberInfoBean.getId() );
- if ( contractBean != null )
- {
- isExist = true;
- session.setAttribute( "contractBean", contractBean );
- }
- }
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
- <script language="JavaScript" src="/vnex/validate.js"></script>
- <script language="javascript" src="/vnex/util/strUtil.js"></script>
- <script language=JavaScript >
- function checkdata()
- {
- if ( form1.conStartDateS.value.length < 1 )
- {
- alert("你必须输入开始时间!");
- form1.conStartDateS.focus();
- return false;
- }
- if ( form1.conEndDateS.value.length < 1 )
- {
- alert("你必须输入结束时间!");
- form1.conEndDateS.focus();
- return false;
- }
- if ( form1.conSalary.value.length < 1 || isEmptyStr(form1.conSalary.value) )
- {
- alert("你必须输入年薪!(不能为空或空格)");
- form1.conSalary.focus();
- return false;
- }
- if ( form1.conPosLev.value.length < 1 || isEmptyStr(form1.conPosLev.value) )
- {
- alert("你必须输入岗位级别!(不能为空或空格)");
- form1.conPosLev.focus();
- return false;
- }
- if ( form1.conSalLev.value.length < 1 || isEmptyStr(form1.conSalLev.value) )
- {
- alert("你必须输入工资级别!(不能为空或空格)");
- form1.conSalLev.focus();
- return false;
- }
- if ( form1.conNote.value.length < 1 || isEmptyStr(form1.conNote.value) )
- {
- alert("你必须输入备注!(不能为空或空格)");
- form1.conNote.focus();
- return false;
- }
- if ( form1.conNote.value.length > 100 )
- {
- alert("你输入备注字数过多!(<100)");
- form1.conNote.focus();
- return false;
- }
- if( form1.conStartDateS.value > form1.conEndDateS.value )
- {
- alert("开始时间必须小于结束时间!");
- form1.conStartDateS.focus();
- return false;
- }
- return true;
- }
- function checkSalaryNum( thefield )
- {
- if ( !isSignedFloat(thefield.value, false) )
- {
- alert("请输入正确的数字类型!");
- thefield.focus();
- thefield.select();
- return false;
- }
- if ( thefield.value <0 )
- {
- alert("你输入的金额必须>0!");
- thefield.focus()
- thefield.select()
- return false;
- }
- if ( thefield.value >9999999 )
- {
- alert("你输入的金额太大!(不能超过9999999)");
- thefield.focus()
- thefield.select()
- return false;
- }
- return true;
- }
- </script>
- <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>
- <DIV align=center>
- <form name="form1" method="post" action="/mainctrl/intranet/hr/manage_contract?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>
- <%
- if ( isExist == false )
- {
- %>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 合同种类:</font></td>
- <td colspan="2" width="79%">
- <select style="WIDTH: 120px" name="conType">
- <%
- Iterator iterT = MemberContractType.getAllCType().iterator();
- while ( iterT.hasNext() )
- {
- MemberContractType mp = (MemberContractType)iterT.next();
- %>
- <option value="<%= mp.getTypeId() %>" ><%= mp.getTypeName() %></option>
- <%
- }
- %>
- </select> *( 注:带 * 的为必填内容)
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 状态:</font></td>
- <td colspan="2" width="79%">
- <select style="WIDTH: 120px" name="conState">
- <%
- Iterator iterS = MemberContractState.getAllSType().iterator();
- while ( iterS.hasNext() )
- {
- MemberContractState mp = (MemberContractState)iterS.next();
- %>
- <option value="<%= mp.getTypeId() %>" ><%= mp.getTypeName() %></option>
- <%
- }
- %>
- </select> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 期间:</font></td>
- <td colspan="2" width="79%">
- 从 <input type="text" name="conStartDateS" readonly class=text size="20" value="">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(conStartDateS);return false"> *<br>
- 至 <input type="text" name="conEndDateS" readonly class=text size="20" value="">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(conEndDateS);return false"> *</td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 年薪:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="conSalary" onChange="checkSalaryNum(this)" class=text size="24" maxlength=9 > *
- <select style="WIDTH: 70px" name="conCurrency">
- <%
- Iterator iterC = MemberCurrency.getAllType().iterator();
- while ( iterC.hasNext() )
- {
- MemberCurrency mp = (MemberCurrency)iterC.next();
- %>
- <option value="<%= mp.getTypeId() %>" ><%= mp.getTypeName() %></option>
- <%
- }
- %>
- </select> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 岗位级别:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="conPosLev" class=text size="24" maxlength=10> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 工资级别:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="conSalLev" class=text size="24" maxlength=10> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 备注:</font></td>
- <td colspan="2" width="79%">
- <textarea name="conNote" rows="6" cols="59"></textarea> *
- </td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" colspan="3" height="30" align="center">
- <input type="submit" value="保存" name="B3" onClick="return checkdata()" class=text>
- <input type=hidden name=doAdd value=<%= emp_id %>>
- <input type="reset" value="重置" name="B2" class=text>
- <input type="button" value="放弃" name="B22" onClick="location='/mainctrl/intranet/hr/search_result?start=<%= start %>'" class=text>
- </td>
- </tr>
- <%
- }
- else
- {
- %>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 合同种类:</font></td>
- <td colspan="2" width="79%">
- <select style="WIDTH: 120px" name="conType">
- <%
- Iterator iterT = MemberContractType.getAllCType().iterator();
- while ( iterT.hasNext() )
- {
- MemberContractType mp = (MemberContractType)iterT.next();
- %>
- <option value="<%= mp.getTypeId() %>" <% if ( mp.getTypeId() == contractBean.getConType() ) out.print("selected"); %> ><%= mp.getTypeName() %></option>
- <%
- }
- %>
- </select> *( 注:带 * 的为必填内容)
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 状态:</font></td>
- <td colspan="2" width="79%">
- <select style="WIDTH: 120px" name="conState">
- <%
- Iterator iterS = MemberContractState.getAllSType().iterator();
- while ( iterS.hasNext() )
- {
- MemberContractState mp = (MemberContractState)iterS.next();
- %>
- <option value="<%= mp.getTypeId() %>" <% if ( mp.getTypeId() == contractBean.getConState() ) out.print("selected"); %>><%= mp.getTypeName() %></option>
- <%
- }
- %>
- </select> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 期间:</font></td>
- <td colspan="2" width="79%">
- 从<input type="text" name="conStartDateS" readonly class=text size="20" value="<%= MyDateFormat.myDate(contractBean.getConStartDate()) %>">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(conStartDateS);return false"> *<br>
- 至<input type="text" name="conEndDateS" readonly class=text size="20" value="<%= MyDateFormat.myDate(contractBean.getConEndDate()) %>">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(conEndDateS);return false"> *</td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 年薪:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="conSalary" onChange="checkSalaryNum(this)" class=text size="24" maxlength=9 value="<%= dFormat.format(contractBean.getConSalary()) %>" > *
- <select style="WIDTH: 70px" name="conCurrency">
- <%
- Iterator iterC = MemberCurrency.getAllType().iterator();
- while ( iterC.hasNext() )
- {
- MemberCurrency mp = (MemberCurrency)iterC.next();
- %>
- <option value="<%= mp.getTypeId() %>" <% if ( mp.getTypeId() == contractBean.getConCurrency() ) out.print("selected"); %>><%= mp.getTypeName() %></option>
- <%
- }
- %>
- </select> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 岗位级别:</font></td>
- <td colspan="2" width="79%">
- <input type="text" value="<%= contractBean.getConPosLev() %>" name="conPosLev" class=text size="24" maxlength=10> *
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="21%"><font class=strong> 工资级别:</font></td>
- <td colspan="2" width="79%">
- <input type="text" name="conSalLev" class=text value="<%= contractBean.getConSalLev() %>" size="24" maxlength=10> *
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="21%"><font class=strong> 备注:</font></td>
- <td colspan="2" width="79%">
- <textarea name="conNote" rows="6" cols="59"><%= contractBean.getConNote() %></textarea> *
- </td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" colspan="3" height="30" align="center">
- <input type="submit" value="保存" name="B3" onClick="return checkdata()" class=text>
- <input type=hidden name=start value=<%= start %> >
- <input type=hidden name=doSave value=<%= emp_id %>>
- <input type="reset" value="重置" name="B2" class=text>
- <input type="button" value="放弃" name="B22" onClick="location='/mainctrl/intranet/hr/search_result'" 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" />
- <input type=hidden name=emp_id value=<%= emp_id %>>
- </form></DIV>
- </BODY></HTML>