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

电子政务应用

开发平台:

Java

  1. <%
  2. /**
  3.  * $RCSfile: salary_item_modify.jsp,v $
  4.  * $Revision: 1.0 $
  5.  * $Date: 2001/05/17 20:57:46 $
  6.  * /mainctrl/intranet/hr/salary_component_modify
  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.FieldUtil" %>
  14. <%@ page import="java.util.*" %>
  15. <jsp:useBean id="salaryProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.SalaryProxyBean" scope="application" />
  16. <%
  17.     String tmpStr = request.getParameter("id");
  18.     int id = Integer.parseInt( tmpStr );
  19.     SalaryComponent sc = new SalaryComponent();
  20.     if ( request.getParameter("doModify") != null )
  21.     {
  22.         id = Integer.parseInt( request.getParameter("id") );
  23.         sc.setId( id );
  24.         String name = request.getParameter("name");
  25.         sc.setName( name );
  26.         //修改类型
  27.         if ( request.getParameter("comType") != null && request.getParameter("comType").equals("1") )
  28.             sc.setType(MemberDbTable.SALARY_TYPE);
  29.         else if ( request.getParameter("comType") != null && request.getParameter("comType").equals("2") )
  30.             sc.setType(MemberDbTable.INSURANCE_TYPE);
  31.         else sc.setType(MemberDbTable.WELFARE_TYPE);
  32.         //修改方式
  33.         if ( request.getParameter("state") != null && request.getParameter("state").equals("1") )
  34.             sc.setState(MemberDbTable.COMPONENT_USE);
  35.         else
  36.             sc.setState(MemberDbTable.COMPONENT_UNUSE);
  37.         if ( request.getParameter("calcType") != null && request.getParameter("calcType").equals("1") )
  38.             sc.setCalcType(MemberDbTable.INCREASE_TYPE);
  39.         else
  40.             sc.setCalcType(MemberDbTable.DECREASE_TYPE);
  41.         sc.setCalcNum(0f);
  42.         salaryProxyBean.comStore( sc );
  43.         response.sendRedirect("/mainctrl/intranet/hr/salary_component_list");
  44.     }
  45.     else
  46.     {
  47.         sc = salaryProxyBean.comFind( id );
  48.     }
  49. %>
  50. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  51. <HTML>
  52. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  53. <script Language="JavaScript" src="/vnex/validate.js"></script>
  54. <script language=JavaScript   >
  55. function checkdata() 
  56. {
  57.     if ( form1.name.value.length < 1 )
  58.     {
  59.         alert("你必须输入工资项名称!");
  60.         return false;
  61.     }
  62.     if ( isWhitespace(form1.name.value) )
  63.     {
  64.         alert("你输入的名称不能为空格!");
  65.         return false;
  66.     }
  67.     return true;
  68. }
  69. </script>
  70. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  71. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_hr.js"></script>
  72. <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
  73. <DIV align=center>
  74. <form name="form1" method="post" action="/mainctrl/intranet/hr/salary_component_modify">
  75.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  76.     <TBODY>
  77.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  78.     <TR> 
  79.         <TD colSpan=3 align="center"> 
  80.           <br>
  81.            <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  82.             <tr>
  83.               <td bgcolor="#fafafa">
  84.                 <table class=title cellspacing=1 width="600" border=0>
  85.                   <tr bgcolor="#666666"> 
  86.                     <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/salary_component_list"><font color="#FFFFFF">工资项目设置</font></a>&gt;&gt;修改工资项目</font></td>
  87.                   </tr>
  88.                   <tr> 
  89.                     <td bgcolor="#e0e0e0" width="13%"><font class=strong>&nbsp;名称:</font></td>
  90.                     <td bgcolor="#e0e0e0" colspan="2" width="87%"> 
  91.                       <input type="text" name="name" class=text maxlength="10" size="24" value="<%= FieldUtil.filterQuotTag(sc.getName()) %>">
  92.                     </td>
  93.                   </tr>
  94.                   <tr> 
  95.                     <td bgcolor="#fafafa" width="13%"><font class=strong>&nbsp;方式:</font></td>
  96.                     <td bgcolor="#fafafa" colspan="2" width="87%"> 
  97.               <%
  98.                 if ( sc.getCalcType() == MemberDbTable.DECREASE_TYPE )
  99.                 {
  100.               %>
  101.                 <input type="radio" name="calcType" value="1" >
  102.                 增项  
  103.                 <input type="radio" name="calcType" value="-1" checked >
  104.                 减项 </td>
  105.               <%
  106.                 }
  107.               else
  108.               {
  109.               %>
  110.                 <input type="radio" name="calcType" value="1" checked>
  111.                 增项  
  112.                 <input type="radio" name="calcType" value="-1">
  113.                 减项 </td>
  114.               <%
  115.               }
  116.               %>
  117.                   </tr>
  118.                   <tr> 
  119.                     <td bgcolor="#e0e0e0" width="13%"><font class=strong>&nbsp;类型:</font></td>
  120.                     <td bgcolor="#e0e0e0" colspan="2" width="87%"> 
  121.               <%
  122.                 if ( sc.getType() == MemberDbTable.SALARY_TYPE )
  123.                 {
  124.               %>
  125.                       <input type="radio" name="comType" value="1" checked>
  126.                       工资项 
  127.                       <input type="radio" name="comType" value="2">
  128.                       保险项 
  129.                       <input type="radio" name="comType" value="3">
  130.                       福利项 
  131.               <%
  132.                 }
  133.               else if ( sc.getType() == MemberDbTable.INSURANCE_TYPE )
  134.               {
  135.               %>
  136.                       <input type="radio" name="comType" value="1">
  137.                       工资项 
  138.                       <input type="radio" name="comType" value="2" checked>
  139.                       保险项 
  140.                       <input type="radio" name="comType" value="3">
  141.                       福利项 
  142.               <%
  143.               } else{
  144.               %>
  145.                       <input type="radio" name="comType" value="1">
  146.                       工资项 
  147.                       <input type="radio" name="comType" value="2">
  148.                       保险项 
  149.                       <input type="radio" name="comType" value="3" checked>
  150.                       福利项 
  151.               <%
  152.               } 
  153.               %>
  154.               </td>
  155.                   </tr>
  156.                   <tr> 
  157.                     <td bgcolor="#fafafa" width="13%"><font class=strong>&nbsp;状态:</font></td>
  158.                     <td bgcolor="#fafafa" colspan="2" width="87%"> 
  159.                 <input type="checkbox" name="state" value="1"  <% if ( sc.getState() == MemberDbTable.COMPONENT_USE ) out.print("checked"); %> >
  160.                 正在使用</td>
  161.                   </tr>
  162.                   <tr bgcolor="#e0e0e0"> 
  163.                     <td colspan="3" align="center" height="30">&nbsp; 
  164.           <input type="hidden" value="1" name="doModify" class=button>
  165.           <input type="hidden" value="<%= id %>" name="id" class=button>
  166.                       <input type="submit" value="保存" name="B7" onClick="return checkdata()" class=text>&nbsp;&nbsp;
  167.                       <input type="reset" value="重置" name="B8" class=text>&nbsp;&nbsp;
  168.                       <input type="button" name="Button3" value="放弃" class="file" onClick="location='/mainctrl/intranet/hr/salary_component_list'">
  169.                     </td>
  170.                   </tr>
  171.                 </table>
  172.            </td>
  173.             </tr>
  174.           </table><br>
  175.           <br>
  176.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  177.         </TD>
  178.     </TR>
  179.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  180.     </TBODY> 
  181.     </TABLE>
  182.   <BR>
  183.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  184.   </form></DIV>
  185. </BODY></HTML>