EditBasePay.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:5k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312"%>
- <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
- <jsp:include page="/CheckLogin1.jsp" flush="true"/> <% Session m_session = new Session(session); %>
- <%
- Request m_request = new Request(request);
- int intPersonnelID = m_request.GetInt("ID");
- if(intPersonnelID<1)
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("请选择正确的记录,修改失败!");
- //history.back();
- window.close();
- </script>
- <%
- }
- else
- {
- Vector vt = BasePayManager.getRecordByPersonnelID(intPersonnelID);
- if(vt.size()>1)
- {
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
- <title>基本工资管理-- GForce OA 2.0</title>
- <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
- <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
- <script language="JavaScript" type="text/javascript">
- function checkEditBasePay()
- {
- var sum1=0,sum2=0;
- <%
- for (int i=0;i<vt.size();i++)
- {
- String strPayTypeName=PayTypeManager.getPayTypeNameByID(Integer.parseInt(((Vector)vt.get(i)).get(2).toString(),10));
- out.println("if(isNaN(parseInt(document.EditBasePay.Name"+((Vector)vt.get(i)).get(2).toString()+".value))){");
- out.println("alert("请输入正确的数量!");");
- out.println("document.EditBasePay.Name"+ ((Vector)vt.get(i)).get(2).toString() +".select();");
- out.println("document.EditBasePay.Name"+ ((Vector)vt.get(i)).get(2).toString() +".focus();");
- out.println("return false;}");
- if(strPayTypeName.indexOf("*")>=0)
- {
- out.println("sum1+=parseFloat(document.EditBasePay.Name"+((Vector)vt.get(i)).get(2).toString()+".value);");
- }
- else
- {
- out.println("sum2+=parseFloat(document.EditBasePay.Name"+((Vector)vt.get(i)).get(2).toString()+".value);");
- }
- }
- %>
- if(sum1>0&&Math.round(sum1 * 100) !=Math.round(sum2 * 100))
- {
- alert("带“*”的工资条目总和(" + (Math.round(sum1 * 100)/100.0) + "元)应该等于不带“*”的工资条目总和(" + (Math.round(sum2 * 100)/100.0) + "元)!");
- return false;
- }
- }
- </script>
- </head>
- <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
- <table width="100%" height="100%" border="0" align="center" cellspacing="0">
- <tr>
- <td align="center" valign="top"><p> </p>
- <form name="EditBasePay" action="/Pay/EditBasePayAction.jsp?PersonnelID=<%=intPersonnelID%>" method="post" onSubmit="javascript:return checkEditBasePay();">
- <table border="0" cellpadding="0" cellspacing="0" width="90%">
- <%
- Vector vt1=PersonnelManager.getRecordByID(intPersonnelID);
- if(vt1.size()==1)
- {
- out.println("<tr>");
- out.println("<td align="right" valign="middle">员工姓名:</td>");
- out.println("<td align="left" valign="middle" nowrap>");
- out.println(((Vector)vt1.get(0)).get(1).toString());
- out.println("</td>");
- out.println("</tr>");
- out.println("<tr>");
- out.println("<td align="right" valign="middle">员工编号:</td>");
- out.println("<td align="left" valign="middle" nowrap>");
- out.println(((Vector)vt1.get(0)).get(4).toString());
- out.println("</td>");
- out.println("</tr>");
- }
- for (int i=0;i<vt.size();i++)
- {
- out.println("<tr>");
- out.println("<td align="right" valign="middle">"+PayTypeManager.getPayTypeNameByID(Integer.parseInt(((Vector)vt.get(i)).get(2).toString()))+":</td>");
- out.println("<td align="left" valign="middle" nowrap>");
- out.println("<input name="Name"+((Vector)vt.get(i)).get(2).toString()+"" type="text" maxlength="15" size="20" Value=""+ ((Vector)vt.get(i)).get(3).toString() +"">");
- out.println("</td>");
- out.println("</tr>");
- }
- %>
- <tr>
- <td align="right" valign="middle"> </td>
- <td align="left" valign="middle" nowrap></td>
- </tr>
- <tr>
- <td align="right" valign="middle"> </td>
- <td align="left" valign="middle" nowrap>
- <input type="submit" value="修改"> <input type="reset" value="重填"> <input type="button" value="返回" onclick="window.close();">
- </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>
- <%
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
- window.close();
- </script>
- <%
- }
- }
- %>