BuildPayManage.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:7k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="java.util.*,com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  7. <title>生成月工资管理-- GForce OA 2.0</title>
  8. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  9. <script language="JavaScript" src="/js/changestyle.js"></script>
  10. <script language="JavaScript" type="text/javascript">
  11. function checkBuildPay()
  12. {
  13.     if(document.BuildPay.Year.value=='')
  14.     {
  15.         alert("请输入年份!");
  16.         document.BuildPay.Year.focus();
  17.         return false;
  18.     }
  19.     if(isNaN(parseInt(document.BuildPay.Year.value)))
  20.     {
  21.       alert("请输入正确的年份!");
  22.       document.BuildPay.Year.select();
  23.       document.BuildPay.Year.focus();
  24.       return false;
  25.     }
  26. esave.style.visibility="visible";
  27. }
  28. </script>
  29. </head>
  30. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  31.    <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  32.     <tr>
  33.     <td align="center" valign="top">
  34.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  35.         <tr>
  36.           <td height="50" valign="top" background="../images/dy-back.gif">
  37.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  38.               <tr valign="middle">
  39.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  40.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">生成月工资</font></strong></td>
  41.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  42.                    <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59">&nbsp;-->
  43.                   <!--单增<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59">&nbsp;-->
  44.                   <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59">&nbsp;-->
  45.                   <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59">&nbsp;-->
  46.                   <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59">&nbsp;-->
  47.                   <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79">&nbsp;-->
  48.                 </td>
  49.               </tr>
  50.             </table>
  51.           </td>
  52.         </tr>
  53.       </table>
  54. <div id="esave" style="filter:alpha(opacity=80); position:absolute; top:50; left:40; z-index:10; visibility:hidden">
  55. <TABLE WIDTH=90% BORDER=0 CELLSPACING=0 CELLPADDING=0 align="center">
  56. <TR><td width=20%> </td>
  57. <TD bgcolor='<%=m_session.GetString("TopBackColor")%>' width="60%">
  58. <TABLE WIDTH=100% height=300 BORDER=0 CELLSPACING=2 CELLPADDING=0>
  59. <TR>
  60. <td bgcolor='<%=m_session.GetString("TopBackColor")%>' align=center id=textmsg>正在生成月工资,请稍候...</td>
  61. </tr>
  62. </table>
  63. </td>
  64. <td width=20%> </td>
  65. </tr></table></div>
  66. <%
  67. Request m_request = new Request(request);
  68. String strDelete = m_request.GetString("action");
  69. int iMonth=m_request.GetInt("Month");
  70. int iYear=m_request.GetInt("Year");
  71. if (strDelete.equals("delete")&&iMonth>0&&iMonth<13&&iYear>0)
  72. {
  73.   if (PayManager.delPayByYearMonth(iYear,iMonth)>0)
  74.   {
  75.    out.println("<script>alert('" + iYear+ "年" + iMonth+ "月工资删除成功!')</script>");
  76.   }else
  77.   {
  78.    out.println("<script>alert('" + iYear+ "年" + iMonth+ "月工资删除失败!')</script>");
  79.   }
  80. }
  81. if (strDelete.equals("savedefault")&&iMonth>0&&iMonth<13&&iYear>0)
  82. {
  83.   if (PayManager.updateBasePayByYearMonth(iYear,iMonth)>0)
  84.   {
  85.    out.println("<script>alert('将" + iYear+ "年" + iMonth+ "月工资保存为基本工资信息成功!')</script>");
  86.   }else
  87.   {
  88.    out.println("<script>alert('将" + iYear+ "年" + iMonth+ "月工资保存为基本工资信息失败!')</script>");
  89.   }
  90. }
  91. %>
  92. <table width="95%" border="0" cellspacing="0">
  93.   <form name="BuildPay" method="post" action="BuildPayAction.jsp" onSubmit="checkBuildPay()">
  94.     <tr>
  95.       <td align="right">&nbsp;</td>
  96.       <td>&nbsp;</td>
  97.       <td rowspan="6">&nbsp;</td>
  98.     </tr>
  99.     <tr>
  100.       <td align="right">&nbsp;</td>
  101.       <td>&nbsp;</td>
  102.     </tr>
  103.     <tr>
  104.       <td align="right">年份:</td>
  105.       <td>
  106.         <%java.util.Date t_Date = new java.util.Date();%>
  107.         <input type="text" name="Year" size="4" maxlength="4" value="<%=StringNew.GetDateString(t_Date,"yyyy")%>">
  108.       </td>
  109.     </tr>
  110.     <tr>
  111.       <td align="right">月份:</td>
  112.       <td> <select name="Month">
  113.           <option value="<%=StringNew.GetDateString(t_Date,"M")%>" selected><%=StringNew.GetDateString(t_Date,"M")%></option>
  114.           <option value="1">1</option>
  115.           <option value="2">2</option>
  116.           <option value="3">3</option>
  117.           <option value="4">4</option>
  118.           <option value="5">5</option>
  119.           <option value="6">6</option>
  120.           <option value="7">7</option>
  121.           <option value="8">8</option>
  122.           <option value="9">9</option>
  123.           <option value="10">10</option>
  124.           <option value="11">11</option>
  125.           <option value="12">12</option>
  126.         </select> </td>
  127.     </tr>
  128.     <tr>
  129.       <td height="16" align="right">&nbsp;</td>
  130.       <td>&nbsp; </td>
  131.     </tr>
  132.     <tr>
  133.       <td align="right">&nbsp;</td>
  134.       <td><input name="Submit" type="submit" value="生成月工资" onClick="document.BuildPay.action='BuildPayAction.jsp';textmsg.innerText='正在生成月工资,请稍候...';return confirm('您确实要生成月工资吗?');">
  135.         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  136.         <input type="submit" value="删除该月工资记录" onClick="document.BuildPay.action='BuildPayManage.jsp?action=delete';textmsg.innerText='正在删除月工资,请稍候...';return confirm('您确实要删除该月工资记录吗?');">
  137.         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  138.         <input type="submit" value="将该月工资记录保存为基本工资信息" onClick="document.BuildPay.action='BuildPayManage.jsp?action=savedefault';textmsg.innerText='正在将该月工资记录保存为基本工资信息,请稍候...';return confirm('您确实要将该月工资记录保存为基本工资信息吗?');"> </td>
  139.     </tr>
  140.   </form>
  141. </table>
  142. </body>
  143. </html>