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

电子政务应用

开发平台:

Java

  1. <%
  2. /**
  3.  * $RCSfile: employee_contract.jsp,v $
  4.  * $Revision: 1.0 $
  5.  * $Date: 2001/05/17 20:57:46 $
  6.  * /mainctrl/intranet/hr/manage_contract
  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. <%@ page import="java.text.DecimalFormat" %>
  16. <jsp:useBean id="hrProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.MemberInfoProxyBean" scope="application" />
  17. <jsp:useBean id="memberInfoBean" class="com.vnex.intranet.hr.employer_info.value.MemberInfo" scope="session" />
  18. <jsp:useBean id="contractBean" class="com.vnex.intranet.hr.employer_info.value.MemberContract" scope="page" />
  19. <jsp:setProperty name="contractBean" property="*" />
  20. <%
  21.     boolean isExist = false;
  22.     int emp_id = -1;
  23.     DecimalFormat dFormat = new DecimalFormat("##.##");
  24.     String str = request.getParameter("emp_id");
  25.     if ( str != null )
  26.     {
  27.         emp_id = Integer.parseInt( str );
  28.         contractBean.setEmployerId( emp_id );
  29.         session.setAttribute("contractBean", contractBean);
  30.     }
  31.     String start = request.getParameter("start");
  32.     //MemberContractDAO mi = new MemberContractDAO();
  33.     if ( request.getParameter("doAdd") != null && memberInfoBean.getId() > 0 )
  34.     {
  35.         hrProxyBean.contractCreate( contractBean );
  36.         isExist = true;
  37.     }
  38.     else if ( request.getParameter("doSave") != null && memberInfoBean.getId() > 0 )
  39.     {
  40.         hrProxyBean.contractStore( contractBean );
  41.         isExist = true;
  42.     }
  43.     else
  44.     {
  45.         contractBean = hrProxyBean.contractFind( memberInfoBean.getId() );
  46.         if ( contractBean != null )
  47.         {
  48.             isExist = true;
  49.             session.setAttribute( "contractBean", contractBean );
  50.         }
  51.     }
  52. %>
  53. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  54. <HTML>
  55. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  56. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  57. <script language="JavaScript" src="/vnex/validate.js"></script>
  58. <script language="javascript" src="/vnex/util/strUtil.js"></script>
  59. <script language=JavaScript   >
  60. function checkdata() 
  61. {
  62.     if ( form1.conStartDateS.value.length < 1 )
  63.     {
  64.         alert("你必须输入开始时间!");
  65.         form1.conStartDateS.focus();
  66.         return false;
  67.     }
  68.     if ( form1.conEndDateS.value.length < 1 )
  69.     {
  70.         alert("你必须输入结束时间!");
  71.         form1.conEndDateS.focus();
  72.         return false;
  73.     }
  74.     if ( form1.conSalary.value.length < 1 || isEmptyStr(form1.conSalary.value) )
  75.     {
  76.         alert("你必须输入年薪!(不能为空或空格)");
  77.         form1.conSalary.focus();
  78.         return false;
  79.     }
  80.     if ( form1.conPosLev.value.length < 1 || isEmptyStr(form1.conPosLev.value)  )
  81.     {
  82.         alert("你必须输入岗位级别!(不能为空或空格)");
  83.         form1.conPosLev.focus();
  84.         return false;
  85.     }
  86.     if ( form1.conSalLev.value.length < 1 || isEmptyStr(form1.conSalLev.value)  )
  87.     {
  88.         alert("你必须输入工资级别!(不能为空或空格)");
  89.         form1.conSalLev.focus();
  90.         return false;
  91.     }
  92.     if ( form1.conNote.value.length < 1 || isEmptyStr(form1.conNote.value)  )
  93.     {
  94.         alert("你必须输入备注!(不能为空或空格)");
  95.         form1.conNote.focus();
  96.         return false;
  97.     }
  98.     if ( form1.conNote.value.length > 100 )
  99.     {
  100.         alert("你输入备注字数过多!(<100)");
  101.         form1.conNote.focus();
  102.         return false;
  103.     }
  104.     if( form1.conStartDateS.value > form1.conEndDateS.value )
  105.     {
  106.         alert("开始时间必须小于结束时间!");
  107.         form1.conStartDateS.focus();
  108.         return false;
  109.     }
  110.     return true;
  111. }
  112. function checkSalaryNum( thefield )
  113. {
  114.     if ( !isSignedFloat(thefield.value, false) )
  115.     {
  116.         alert("请输入正确的数字类型!");
  117.         thefield.focus();
  118.         thefield.select();
  119.         return false;
  120.     }
  121.     if ( thefield.value <0 )
  122.     {
  123.         alert("你输入的金额必须>0!");
  124.         thefield.focus()
  125.         thefield.select()
  126.         return false;
  127.     }
  128.     if ( thefield.value >9999999 )
  129.     {
  130.         alert("你输入的金额太大!(不能超过9999999)");
  131.         thefield.focus()
  132.         thefield.select()
  133.         return false;
  134.     }
  135.     return true;
  136. }
  137. </script>
  138. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  139. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_hr.js"></script>
  140. <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
  141. <DIV align=center>
  142. <form name="form1" method="post" action="/mainctrl/intranet/hr/manage_contract?emp_id=<%= emp_id %>">
  143.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  144.     <TBODY>
  145.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  146.     <TR> 
  147.         <TD colSpan=3 align="center"> 
  148.            <br>
  149.            <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  150.             <tr>
  151.               <td bgcolor="#fafafa">              
  152.                 <table class=title cellspacing=1 width="600" border=0>
  153.                   <tr bgcolor="#666666"> 
  154.                     <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>
  155.                   </tr>
  156.                   <tr bgcolor="#fafafa"> 
  157.                     <td colspan="3" height="30">&nbsp; 
  158.                       <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;
  159.                       <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;
  160.                       <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;
  161.                       <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;
  162.                       <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;
  163.                       <input type="button" style="width:60px" value="合同管理" onClick="location='/mainctrl/intranet/hr/manage_contract?emp_id=<%= memberInfoBean.getId() %>&start=<%= start %>'" name="B322" class=text>
  164.                     </td>
  165.                   </tr>
  166.     <%
  167.         if ( isExist == false )
  168.         {
  169.     %>
  170.                   <tr bgcolor="#e0e0e0"> 
  171.                     <td width="21%"><font class=strong>&nbsp;合同种类:</font></td>
  172.                     <td colspan="2" width="79%"> 
  173.                       <select style="WIDTH: 120px" name="conType">
  174.          <%
  175.             Iterator iterT  = MemberContractType.getAllCType().iterator();
  176.             while ( iterT.hasNext() )
  177.             {
  178.                 MemberContractType mp = (MemberContractType)iterT.next();
  179.          %>
  180.                   <option value="<%= mp.getTypeId() %>" ><%= mp.getTypeName() %></option>
  181.          <%
  182.             }
  183.          %>
  184.                       </select>&nbsp;*( 注:带 * 的为必填内容)
  185.                     </td>
  186.                   </tr>
  187.                   <tr bgcolor="#fafafa"> 
  188.                     <td width="21%"><font class=strong>&nbsp;状态:</font></td>
  189.                     <td colspan="2" width="79%"> 
  190.                       <select style="WIDTH: 120px" name="conState">
  191.          <%
  192.             Iterator iterS  = MemberContractState.getAllSType().iterator();
  193.             while ( iterS.hasNext() )
  194.             {
  195.                 MemberContractState mp = (MemberContractState)iterS.next();
  196.          %>
  197.                   <option value="<%= mp.getTypeId() %>" ><%= mp.getTypeName() %></option>
  198.          <%
  199.             }
  200.          %>
  201.                       </select>&nbsp;*
  202.                     </td>
  203.                   </tr>
  204.                   <tr bgcolor="#e0e0e0"> 
  205.                     <td width="21%"><font class=strong>&nbsp;期间:</font></td>
  206.                     <td colspan="2" width="79%"> 
  207.                       从&nbsp;<input type="text" name="conStartDateS" readonly class=text size="20" value="">
  208.                       &nbsp;<img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(conStartDateS);return false">&nbsp;*<br>
  209.                       至&nbsp;<input type="text" name="conEndDateS" readonly class=text size="20" value="">
  210.                       &nbsp;<img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(conEndDateS);return false">&nbsp;*</td>
  211.                   </tr>
  212.                   <tr bgcolor="#fafafa"> 
  213.                     <td width="21%"><font class=strong>&nbsp;年薪:</font></td>
  214.                     <td colspan="2" width="79%"> 
  215.                       <input type="text" name="conSalary" onChange="checkSalaryNum(this)" class=text size="24"  maxlength=9 >&nbsp;*
  216.                       <select style="WIDTH: 70px" name="conCurrency">
  217.          <%
  218.             Iterator iterC  = MemberCurrency.getAllType().iterator();
  219.             while ( iterC.hasNext() )
  220.             {
  221.                 MemberCurrency mp = (MemberCurrency)iterC.next();
  222.          %>
  223.                   <option value="<%= mp.getTypeId() %>" ><%= mp.getTypeName() %></option>
  224.          <%
  225.             }
  226.          %>
  227.                       </select>&nbsp;*
  228.                     </td>
  229.                   </tr>
  230.                   <tr bgcolor="#e0e0e0"> 
  231.                     <td width="21%"><font class=strong>&nbsp;岗位级别:</font></td>
  232.                     <td colspan="2" width="79%"> 
  233.                       <input type="text" name="conPosLev" class=text size="24"  maxlength=10>&nbsp;*
  234.                     </td>
  235.                   </tr>
  236.                   <tr bgcolor="#fafafa"> 
  237.                     <td width="21%"><font class=strong>&nbsp;工资级别:</font></td>
  238.                     <td colspan="2" width="79%"> 
  239.                       <input type="text" name="conSalLev" class=text size="24" maxlength=10>&nbsp;*
  240.                     </td>
  241.                   </tr>
  242.                   <tr bgcolor="#e0e0e0"> 
  243.                     <td width="21%"><font class=strong>&nbsp;备注:</font></td>
  244.                     <td colspan="2" width="79%"> 
  245.                       <textarea name="conNote" rows="6" cols="59"></textarea>&nbsp;*
  246.                     </td>
  247.                   </tr>
  248.                   <tr> 
  249.                     <td bgcolor="#fafafa" colspan="3" height="30" align="center"> 
  250.                       <input type="submit" value="保存" name="B3" onClick="return checkdata()" class=text>&nbsp;&nbsp;
  251.                     <input type=hidden name=doAdd value=<%= emp_id %>>
  252.                       <input type="reset" value="重置" name="B2" class=text>&nbsp;&nbsp;
  253.                       <input type="button" value="放弃" name="B22" onClick="location='/mainctrl/intranet/hr/search_result?start=<%= start %>'"  class=text>
  254.                     </td>
  255.                   </tr>
  256.     <%
  257.         }
  258.         else
  259.         {
  260.     %>
  261.                   <tr bgcolor="#e0e0e0"> 
  262.                     <td width="21%"><font class=strong>&nbsp;合同种类:</font></td>
  263.                     <td colspan="2" width="79%"> 
  264.                       <select style="WIDTH: 120px" name="conType">
  265.          <%
  266.             Iterator iterT  = MemberContractType.getAllCType().iterator();
  267.             while ( iterT.hasNext() )
  268.             {
  269.                 MemberContractType mp = (MemberContractType)iterT.next();
  270.          %>
  271.                   <option value="<%= mp.getTypeId() %>" <% if ( mp.getTypeId() == contractBean.getConType() ) out.print("selected"); %> ><%= mp.getTypeName() %></option>
  272.          <%
  273.             }
  274.          %>
  275.                       </select>&nbsp;*( 注:带 * 的为必填内容)
  276.                     </td>
  277.                   </tr>
  278.                   <tr bgcolor="#fafafa"> 
  279.                     <td width="21%"><font class=strong>&nbsp;状态:</font></td>
  280.                     <td colspan="2" width="79%"> 
  281.                       <select style="WIDTH: 120px" name="conState">
  282.          <%
  283.             Iterator iterS  = MemberContractState.getAllSType().iterator();
  284.             while ( iterS.hasNext() )
  285.             {
  286.                 MemberContractState mp = (MemberContractState)iterS.next();
  287.          %>
  288.                   <option value="<%= mp.getTypeId() %>"  <% if ( mp.getTypeId() == contractBean.getConState() ) out.print("selected"); %>><%= mp.getTypeName() %></option>
  289.          <%
  290.             }
  291.          %>
  292.                       </select>&nbsp;*
  293.                     </td>
  294.                   </tr>
  295.                   <tr bgcolor="#e0e0e0"> 
  296.                     <td width="21%"><font class=strong>&nbsp;期间:</font></td>
  297.                     <td colspan="2" width="79%"> 
  298.                       从<input type="text" name="conStartDateS" readonly class=text size="20" value="<%= MyDateFormat.myDate(contractBean.getConStartDate()) %>">
  299.                       &nbsp;<img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(conStartDateS);return false">&nbsp;*<br>
  300.                       至<input type="text" name="conEndDateS" readonly class=text size="20" value="<%= MyDateFormat.myDate(contractBean.getConEndDate()) %>">
  301.                       &nbsp;<img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(conEndDateS);return false">&nbsp;*</td>
  302.                   </tr>
  303.                   <tr bgcolor="#fafafa"> 
  304.                     <td width="21%"><font class=strong>&nbsp;年薪:</font></td>
  305.                     <td colspan="2" width="79%"> 
  306.                       <input type="text" name="conSalary" onChange="checkSalaryNum(this)" class=text size="24"  maxlength=9 value="<%= dFormat.format(contractBean.getConSalary()) %>" >&nbsp;*
  307.                       <select style="WIDTH: 70px" name="conCurrency">
  308.          <%
  309.             Iterator iterC  = MemberCurrency.getAllType().iterator();
  310.             while ( iterC.hasNext() )
  311.             {
  312.                 MemberCurrency mp = (MemberCurrency)iterC.next();
  313.          %>
  314.                   <option value="<%= mp.getTypeId() %>"   <% if ( mp.getTypeId() == contractBean.getConCurrency() ) out.print("selected"); %>><%= mp.getTypeName() %></option>
  315.          <%
  316.             }
  317.          %>
  318.                       </select>&nbsp;*
  319.                     </td>
  320.                   </tr>
  321.                   <tr bgcolor="#e0e0e0"> 
  322.                     <td width="21%"><font class=strong>&nbsp;岗位级别:</font></td>
  323.                     <td colspan="2" width="79%"> 
  324.                       <input type="text" value="<%= contractBean.getConPosLev() %>" name="conPosLev" class=text size="24"  maxlength=10>&nbsp;*
  325.                     </td>
  326.                   </tr>
  327.                   <tr bgcolor="#fafafa"> 
  328.                     <td width="21%"><font class=strong>&nbsp;工资级别:</font></td>
  329.                     <td colspan="2" width="79%"> 
  330.                       <input type="text" name="conSalLev" class=text value="<%= contractBean.getConSalLev() %>" size="24" maxlength=10>&nbsp;*
  331.                     </td>
  332.                   </tr>
  333.                   <tr bgcolor="#e0e0e0"> 
  334.                     <td width="21%"><font class=strong>&nbsp;备注:</font></td>
  335.                     <td colspan="2" width="79%"> 
  336.                       <textarea name="conNote" rows="6" cols="59"><%= contractBean.getConNote() %></textarea>&nbsp;*
  337.                     </td>
  338.                   </tr>
  339.                   <tr> 
  340.                     <td bgcolor="#fafafa" colspan="3" height="30" align="center"> 
  341.                       <input type="submit" value="保存" name="B3" onClick="return checkdata()" class=text>&nbsp;&nbsp;
  342.                     <input type=hidden name=start value=<%= start %> >
  343.                     <input type=hidden name=doSave value=<%= emp_id %>>
  344.                       <input type="reset" value="重置" name="B2" class=text>&nbsp;&nbsp;
  345.                       <input type="button" value="放弃" name="B22" onClick="location='/mainctrl/intranet/hr/search_result'"  class=text>
  346.                     </td>
  347.                   </tr>
  348.     <%
  349.         }
  350.     %>
  351.                 </table>
  352.                  </td>
  353.             </tr>
  354.           </table> 
  355.           <br>
  356.           <br>
  357.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  358.         </TD>
  359.     </TR>
  360.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  361.     </TBODY> 
  362.     </TABLE>
  363.   <BR>
  364.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  365.     <input type=hidden name=emp_id value=<%= emp_id %>>
  366.   </form></DIV>
  367. </BODY></HTML>