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

电子政务应用

开发平台:

Java

  1. <%
  2. /**
  3.  * $RCSfile: employee_create_degree_info.jsp,v $
  4.  * $Revision: 1.0 $
  5.  * $Date: 2001/05/17 20:57:46 $
  6.  * /mainctrl/intranet/hr/add_degree_info
  7.  */
  8. %>
  9. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  10. <%@ page import="com.vnex.intranet.hr.employer_info.value.*"%>
  11. <%@ page import="com.vnex.intranet.hr.employer_info.process.*"%>
  12. <%@ page import="com.vnex.intranet.hr.util.*"%>
  13. <%@ page import="java.util.*" %>
  14. <jsp:useBean id="hrProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.MemberInfoProxyBean" scope="application" />
  15. <jsp:useBean id="memberInfoBean" class="com.vnex.intranet.hr.employer_info.value.MemberInfo" scope="session" />
  16. <jsp:useBean id="degreeInfoBean" class="com.vnex.intranet.hr.employer_info.value.MemberEducationalInfo" scope="page" />
  17. <jsp:setProperty name="degreeInfoBean" property="*" />
  18. <%
  19.     int emp_id = -1;
  20.     String str = request.getParameter("emp_id");
  21.     if ( str != null )
  22.     {
  23.         emp_id = Integer.parseInt( str );
  24.     }
  25. %>
  26. <%
  27.     Collection pageColl = new ArrayList();
  28.     //MemberEducationalInfoDAO mi = new MemberEducationalInfoDAO();
  29.     if ( request.getParameter("doAdd") != null && memberInfoBean.getId() > 0 )
  30.     {
  31.         degreeInfoBean.setEmployerId( memberInfoBean.getId() );
  32.         hrProxyBean.educationalInfoCreate( degreeInfoBean );
  33.     }
  34.     if ( request.getParameter("doDel") != null && memberInfoBean.getId() > 0 )
  35.     {
  36.         String[] delId = request.getParameterValues("delId");
  37.         for ( int i=0; i<delId.length; i++ )
  38.         {
  39.             hrProxyBean.educationalInfoRemoveSchool( Integer.parseInt(delId[i]) );
  40.         }
  41.     }
  42.    pageColl = hrProxyBean.educationalInfoFind( memberInfoBean.getId() );
  43. %>
  44. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  45. <HTML>
  46. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  47. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  48. <script language="JavaScript" src="/vnex/validate.js"></script>
  49. <script language="javascript" src="/vnex/util/strUtil.js"></script>
  50. <script language=JavaScript>
  51. function checkdata() 
  52. {
  53.     if ( form1.schoolName.value.length < 1 || isEmptyStr(form1.schoolName.value) )
  54.     {
  55.         alert("你必须输入学校名称!(不能为空或空格)");
  56.         form1.schoolName.focus();
  57.         return false;
  58.     }
  59.   //  if ( form1.subject.value.length < 1 || isEmptyStr(form1.subject.value) )
  60.   //  {
  61.   //      alert("你必须输入专业名称!(不能为空或空格)");
  62.   //      form1.subject.focus();
  63.   //      return false;
  64.   //  }
  65.     if ( form1.startDateS.value.length < 1 )
  66.     {
  67.         alert("你必须输入开始日期!");
  68.         form1.startDateS.focus();
  69.         return false;
  70.     }
  71.     if ( form1.endDateS.value.length < 1 )
  72.     {
  73.         alert("你必须输入结束日期!");
  74.         form1.endDateS.focus();
  75.         return false;
  76.     }
  77.   //  if ( form1.special.value.length < 1 || isEmptyStr(form1.special.value) )
  78.   //  {
  79.   //      alert("你必须输入专业技能!(不能为空或空格)");
  80.   //      form1.special.focus();
  81.   //      return false;
  82.   //  }
  83.     if( form1.eduLevelId.value == "-1" ) 
  84.     {
  85.          alert("你必须选择学历!");
  86.          form1.eduLevelId.focus();
  87.          return false;
  88.     
  89.     }
  90.     if ( form1.special.value.length > 50 )
  91.     {
  92.         alert("你输入专业技能字数过多!(<50)");
  93.         form1.special.focus();
  94.         return false;
  95.     }
  96.     if( form1.startDateS.value > form1.endDateS.value )
  97.     {
  98.         alert("开始时间必须小于结束时间!");
  99.         form1.startDateS.focus();
  100.         return false;
  101.     }
  102.     return true;
  103. }
  104. </script>
  105. <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
  106. <script language=JavaScript>
  107. function submitAdd()
  108. {
  109.     if ( !checkdata() )
  110.     {
  111.         return false;
  112.     }
  113.     form1.action= "/mainctrl/intranet/hr/add_degree_info?doAdd=1";
  114.     form1.submit();
  115. }
  116. function submitDel()
  117. {
  118.     if(form1.delId == null)
  119.     {
  120.        alert("目前没有数据可供删除!");
  121.        return false;
  122.     }
  123.     if(!isChecked(form1.delId))
  124.     {
  125.        alert("您没有选择要删除的项!");
  126.        return false;
  127.     }
  128.     if ( confirm("你确认要删除您选中的项吗?") )
  129.     {
  130.         form1.action= "/mainctrl/intranet/hr/add_degree_info?doDel=1";
  131.         form1.submit();
  132.     }
  133.     else return false;
  134. }
  135. </script>
  136. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff 
  137. topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  138. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_hr.js"></script>
  139. <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
  140. <DIV align=center>
  141. <form name="form1" method="post" action="/mainctrl/intranet/hr/add_degree_info">
  142.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  143.     <TBODY>
  144.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  145.     <TR> 
  146.         <TD colSpan=3 align="center"> 
  147.           <br>
  148.            <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  149.             <tr>
  150.               <td bgcolor="#fafafa"> 
  151.                 <table class=title cellspacing=1 width="600" border=0>
  152.                   <tr bgcolor="#666666">
  153.                     <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>
  154.                   </tr>
  155.             <tr> 
  156.               <td bgcolor="#fafafa" colspan="3" height="30"> 
  157.                 <input type="button" value="基本信息" onClick="location='/mainctrl/intranet/hr/add_basic_info?emp_id=<%= memberInfoBean.getId() %>'" name="B32" class=text>
  158.                   
  159.                 <input type="button" value="个人信息" onClick="location='/mainctrl/intranet/hr/add_personal_info?emp_id=<%= memberInfoBean.getId() %>'" name="B32" class=text>
  160.                   
  161.                 <input type="button" value="学历信息" onClick="location='/mainctrl/intranet/hr/add_degree_info?emp_id=<%= memberInfoBean.getId() %>'" name="B32" class=text>
  162.                   
  163.                 <input type="button" value="履历信息" onClick="location='/mainctrl/intranet/hr/add_resume_info?emp_id=<%= memberInfoBean.getId() %>'" name="B32" class=text>
  164.               </td>
  165.                 </table>
  166.                 <table width="600" border="0" cellspacing="1" cellpadding="2" class=title>
  167.                   <tr bgcolor="#fafafa"> 
  168.                     <td colspan="6">&nbsp;
  169.                       <input type="button" value="删除" name="B23" onClick="return submitDel()"  class=text>
  170.                     </td>
  171.                   </tr>
  172.                   <tr> 
  173.                     <td width="36" align="center"><font class=strong>选择</font></td>
  174.                     <td width="73" align="center"><font class=strong>学校</font></td>
  175.                     <td width="113" align="center"><font class=strong>专业</font></td>
  176.                     <td width="107" align="center"><font class=strong>时间</font></td>
  177.                     <td width="68" align="center"><font class=strong>学历</font></td>
  178.                     <td width="166" align="center"><font class=strong>特殊技能/资格</font></td>
  179.                   </tr>
  180.     <%
  181.         String bgcolor = null;
  182.         int color_i = 0;
  183.         int displayCount = pageColl.size();
  184.         Iterator iterD = pageColl.iterator();
  185.         while ( iterD.hasNext() )
  186.         {
  187.             MemberEducationalInfo mei = (MemberEducationalInfo)iterD.next();
  188.             color_i++;
  189.             if( color_i%2==0 )
  190.             {
  191.                 bgcolor = "#e0e0e0";
  192.             }
  193.             else
  194.             {
  195.                 bgcolor = "#fafafa";
  196.             }
  197.     %>
  198.                   <tr bgcolor="<%= bgcolor %>"> 
  199.                     <td width="36" align="center"> 
  200.                       <input type="checkbox" name="delId" value="<%= mei.getSchoolId() %>">
  201.                     </td>
  202.                     <td width="73" align="center"><%= mei.getSchoolName() %></td>
  203.                     <td width="113" align="center"><%= mei.getSubject() %></td>
  204.                     <td width="107" align="center"><%= MyDateFormat.myDate(mei.getStartDate()) %>至<%= MyDateFormat.myDate(mei.getEndDate()) %></td>
  205.                     <td width="68" align="center"><%= MemberEducationLevel.getInstance(mei.getEduLevelId()) %></td>
  206.                     <td width="166" align="center"><%= mei.getSpecial() %></td>
  207.                   </tr>
  208.     <%
  209.         }
  210.     %>
  211.     <%
  212.         if ( displayCount > 0 )
  213.         {
  214.     %>
  215.                   <tr> 
  216.                     <td width="36" align="center" bgcolor="#e0e0e0"> 
  217.                       <input type="checkbox" name="chkall" value="ON" onclick="CheckAll(this.form)">
  218.                     </td>
  219.                     <td colspan="5" bgcolor="#e0e0e0">&nbsp;&nbsp;全选</td>
  220.                   </tr>
  221.     <%
  222.         }
  223.     %>
  224.                 </table>
  225.                 <table class=title cellspacing=1 width="600" border=0>
  226.                   <tr> 
  227.                     <td width="21%" bgcolor="#fafafa"><font class=strong>&nbsp;姓名:</font></td>
  228.                     <td colspan="2" width="79%" bgcolor="#fafafa"><%= memberInfoBean.getName() %></td>
  229.                   </tr>
  230.                   <tr> 
  231.                     <td bgcolor="#e0e0e0" width="21%"><font class=strong>&nbsp;学校:</font></td>
  232.                     <td bgcolor="#e0e0e0" colspan="2" width="79%"> 
  233.                       <input type="text" name="schoolName" class=text size="24" maxlength="40">&nbsp;*( 注:带 * 的为必填内容)
  234.                     </td>
  235.                   </tr>
  236.                   <tr> 
  237.                     <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;专业:</font></td>
  238.                     <td bgcolor="#fafafa" colspan="2" width="79%"> 
  239.                       <input type="text" name="subject" class=text size="24" maxlength="40">&nbsp;<!--*-->
  240.                     </td>
  241.                   </tr>
  242.                   <tr> 
  243.                     <td width="21%" bgcolor="#e0e0e0"><font class=strong>&nbsp;时间:</font></td>
  244.                     <td colspan="2" width="79%" bgcolor="#e0e0e0"> 
  245.                       从&nbsp;<input type="text" name="startDateS" readonly class=text size="24" >
  246.                       &nbsp;<img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(startDateS);return false">&nbsp;*<br>
  247.                       至&nbsp;<input type="text" name="endDateS" readonly class=text size="24" >
  248.                       &nbsp;<img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(endDateS);return false">&nbsp;*</td>
  249.                   </tr>
  250.                   <tr> 
  251.                     <td bgcolor="#fafafa" width="21%"><font class=strong>&nbsp;学历:</font></td>
  252.                     <td bgcolor="#fafafa" colspan="2" width="79%"> 
  253.                       <select style="WIDTH: 121px" size=1 name=eduLevelId>
  254.                       <option value = "-1" > --请选择-- </option>
  255.          <%
  256.             Iterator iterDD  = MemberEducationLevel.getAllEType().iterator();
  257.             while ( iterDD.hasNext() )
  258.             {
  259.                 MemberEducationLevel mp = (MemberEducationLevel)iterDD.next();
  260.          %>
  261.                   <option value="<%= mp.getTypeId() %>" ><%= mp.getTypeName() %></option>
  262.          <%
  263.             }
  264.          %>
  265.                       </select>&nbsp;*
  266.                     </td>
  267.                   </tr>
  268.                   <tr> 
  269.                     <td width="21%" bgcolor="#e0e0e0"><font class=strong>&nbsp;特殊技能/资格:</font></td>
  270.                     <td colspan="2" width="79%" bgcolor="#e0e0e0"> 
  271.                       <textarea name="special" class="text" cols="59" rows="5"></textarea>&nbsp;<!--*-->
  272.                     </td>
  273.                   </tr>
  274.                   <tr> 
  275.                     <td colspan="3" height="30" align="center" bgcolor="#fafafa"> 
  276.                       <input type="submit" value="增加"  onClick="return submitAdd()" name="B332" class=text>&nbsp;&nbsp; 
  277.                       <input type="reset" value="重置" name="B222" class=text>&nbsp;&nbsp; 
  278.                       <input type="button" value="放弃" name="B24" onClick="location='/mainctrl/intranet/hr/search_result'" class=text>
  279.                     </td>
  280.                   </tr>
  281.                 </table>
  282.               </td>
  283.             </tr>
  284.           </table> 
  285.           <br><br>
  286.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  287.         </TD>
  288.     </TR>
  289.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  290.     </TBODY> 
  291.     </TABLE>
  292.   <BR>
  293.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  294.     <input type=hidden name=emp_id value=<%= emp_id %>>
  295.   </form></DIV>
  296. </BODY></HTML>