employee_stipend_statistic_personal.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:13k
源码类别:
电子政务应用
开发平台:
Java
- <%
- /**
- * $RCSfile: employee_stipend_statistic_personal.jsp,v $
- * $Revision: 1.0 $
- * $Date: 2001/05/17 20:57:46 $
- * /mainctrl/intranet/hr/salary_statistic_personal
- */
- %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.hr.employer_info.value.*"%>
- <%@ page import="com.vnex.intranet.hr.employer_info.process.*"%>
- <%@ page import="com.vnex.intranet.hr.util.*"%>
- <%@ page import="java.sql.*"%>
- <%@ page import="java.util.*" %>
- <%@ page import="java.sql.Timestamp" %>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
- <%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
- <jsp:useBean id="salaryProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.SalaryProxyBean" scope="application" />
- <%
- int emp_id = -1;
- int deIdTemp = -1;
- if ( request.getParameter("emp_id") != null )
- {
- emp_id = Integer.parseInt( request.getParameter("emp_id") );
- }
- if ( request.getParameter("doChange") != null )
- {
- if ( request.getParameter("devisionId") != null )
- deIdTemp = Integer.parseInt( request.getParameter("devisionId") );
- }
- %>
- <%
- Collection pageAllColl = new ArrayList();
- MemberDateSalary pageColl = new MemberDateSalary();
- String sDate = request.getParameter("sYear") + "-" + request.getParameter("sMonth") + "-01";
- String eDate = request.getParameter("eYear")+ "-" + request.getParameter("eMonth") + "-30";
- String curDate = com.vnex.intranet.hr.util.MyDateFormat.myNow();
- if ( sDate != null && sDate.length()>5 && eDate != null && eDate.length()>5 && emp_id >0 && request.getParameter("doSearch") != null )
- {
- pageAllColl = salaryProxyBean.dateFind( emp_id, sDate ,eDate );
- }
- %>
- <script language="JavaScript" src="/vnex/validate.js"></script>
- <script language = "JavaScript">
- function do_submit()
- {
- var OptionSYear = document.form1.sYear.selectedIndex;
- var OptionEYear = document.form1.eYear.selectedIndex;
- var OptionSMonth = document.form1.sMonth.selectedIndex;
- var OptionEMonth = document.form1.eMonth.selectedIndex;
- var ValueSYear = document.form1.sYear.options[OptionSYear].value;
- var ValueEYear = document.form1.eYear.options[OptionEYear].value;
- var ValueSMonth = document.form1.sMonth.options[OptionSMonth].value;
- var ValueEMonth = document.form1.eMonth.options[OptionEMonth].value;
- if ( ValueSYear > ValueEYear )
- {
- alert("您选择的起始时间早于结束时间,请重新选择统计起止日期.");
- return false;
- }
- if ( ValueSYear == ValueEYear && ValueSMonth > ValueEMonth )
- {
- alert("您选择的起始时间早于结束时间,请重新选择统计起止日期.");
- return false;
- }
- if ( document.form1.emp_id.selectedIndex < 1 )
- {
- alert("您没有选择员工,请重新选择员工.");
- return false;
- }
- form1.action="/mainctrl/intranet/hr/salary_statistic_personal?doSearch=1";
- form1.submit();
- }
- function change(select)
- {
- form1.action="/mainctrl/intranet/hr/salary_statistic_personal?doChange=1";
- form1.submit();
- }
- </script>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_hr.js"></script>
- <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
- <DIV align=center>
- <form name="form1" method="post" action="/mainctrl/intranet/hr/salary_statistic_personal">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center">
- <br>
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr>
- <td bgcolor="#fafafa">
- <table class=title cellspacing=1 width="100%" border=0>
- <tr bgcolor="#666666">
- <td><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/hr/main"><font color="#FFFFFF">人力资源</font></a>>><a href="/mainctrl/intranet/hr/salary_statistic_main"><font color="#FFFFFF">薪酬统计</font></a>>>个人薪酬统计</font></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td><font class="strong"> 选择部门:</font>
- <!--部门列表开始-->
- <select name="devisionId" class=choice onChange=change(this)>
- <org:DivisionList>
- <option value='0'>请选择部门</option>
- <vnex:items select='<%= deIdTemp+"" %>' >
- <option value=<org:DivisionAttribute attribute="id"/> <org:DivisionAttribute attribute="isSelected"/> >
- <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/></option>
- </vnex:items>
- </org:DivisionList>
- </select>
- <font class="strong"> 选择员工:</font>
- <select name="emp_id">
- <option value=-1>请选择员工</option>
- <hr:EmployeeList divisionId='<%= deIdTemp %>'>
- <vnex:items >
- <option value="<hr:EmployeeAttribute attribute="id" />" >
- <hr:EmployeeAttribute attribute='<%= null %>' /></option>
- </vnex:items>
- </hr:EmployeeList>
- </select>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td align="left" valign="middle" height="30"><font class=strong> 统计起始年月:</font>
- <%
- //在此四个下拉框分别输出起止年月.
- //得到当前日期年月日
- Calendar nowTime=Calendar.getInstance();
- int nowYear = nowTime.get( Calendar.YEAR);
- int nowMonth = nowTime.get(Calendar.MONTH)+1;
- String ifSelect = "";
- //输出起始年下拉框并默认选中当前年.
- %>
- <select name = "sYear">
- <%
- for(int sYear = 1930;sYear < 2099 ; sYear++ )
- {
- if (sYear == nowYear)
- {
- ifSelect = "selected";
- }
- else
- {
- ifSelect = "";
- }
- %>
- <option value = "<%=sYear%>" <%=ifSelect%>><%=sYear%></option>
- <%
- }
- %>
- </select>
- 年
- <select name = "sMonth">
- <%
- //按照两位的格式输出起始月下拉框并默认选中当前月.
- String strSMonth = "";
- for(int sMonth = 1;sMonth <= 12 ; sMonth++ )
- {
- if(sMonth < 10)
- {
- strSMonth = "0"+String.valueOf(sMonth);
- }
- else
- {
- strSMonth = String.valueOf(sMonth);
- }
- if (sMonth == nowMonth)
- {
- ifSelect = "selected";
- }
- else
- {
- ifSelect = "";
- }
- %>
- <option value = "<%=strSMonth%>" <%=ifSelect%>><%=strSMonth%></option>
- <%
- }
- %>
- </select>
- 月 <font class=strong>结束年月:</font>
- <select name = "eYear">
- <%
- //输出结束年下拉框并默认选中当前年.
- for(int eYear = 1930;eYear < 2099 ; eYear++ )
- {
- if (eYear== nowYear)
- {
- ifSelect = "selected";
- }
- else
- {
- ifSelect = "";
- }
- %>
- <option value = "<%=eYear%>" <%=ifSelect%>><%=eYear%></option>
- <%
- }
- %>
- </select>
- 年
- <select name = "eMonth">
- <%
- //输出结束月下拉框并默认选中当前月.
- String strEMonth = "";
- for(int eMonth = 1;eMonth <= 12 ; eMonth++ )
- {
- if(eMonth < 10)
- {
- strEMonth = "0"+String.valueOf(eMonth);
- }
- else
- {
- strEMonth = String.valueOf(eMonth);
- }
- if (eMonth == nowMonth)
- {
- ifSelect = "selected";
- }
- else
- {
- ifSelect = "";
- }
- %>
- <option value = "<%=strEMonth%>" <%=ifSelect%>><%=strEMonth%></option>
- <%
- }
- %>
- </select>
- 月
- <%
- // 输出起止年月结束
- %>
-
- <input type="button" value="统计" name="Submit" class=text onClick = "do_submit()">
- <input type="button" value="返回" name="B2" onClick="location='/mainctrl/intranet/hr/salary_statistic_main'" class=text>
- </td>
- </tr>
- </table>
- <table class=title cellspacing=1 cellpadding=2 width="600" border=0 >
- <%
- String bgcolor = null;
- int color_i = 0;
- double sCount = 0;
- Iterator iterAll = pageAllColl.iterator();
- try
- {
- while ( iterAll.hasNext() )
- {
- pageColl = (MemberDateSalary)iterAll.next();
- color_i++;
- if( color_i%2==0 )
- {
- bgcolor = "#e0e0e0";
- }
- else
- {
- bgcolor = "#fafafa";
- }
- %>
- <tr>
- <td align="center" valign="top"><font class=strong>时<br>间</font></td>
- <%
- // out.println(pageColl.getComponent().size());
- Iterator iter = pageColl.getComponent().iterator();
- while ( iter.hasNext() )
- {
- DateComponentBean sc = (DateComponentBean)iter.next();
- %>
- <td align="center" valign="top"><font class=strong><%= sc.getName() %>
- <input type=hidden name=component_id value=<%= sc.getId() %>>
- </font></td>
- <%
- }
- %>
- <td align="center" valign="top"><font class=strong>总<br>额</font></td>
- </tr>
- <tr bgcolor="<%= bgcolor %>">
- <td align="center"><%= pageColl.getSDate().substring(0,4) %><br><%=pageColl.getSDate().substring(5,7)%></td>
- <%
- sCount = 0;
- //out.println(pageColl.getComponent().size());
- iter = pageColl.getComponent().iterator();
- while ( iter.hasNext() )
- {
- DateComponentBean sc = (DateComponentBean)iter.next();
- sCount += sc.getCount();
- %>
- <td align="center"><%= sc.getCount() %></td>
- <%
- }
- %>
- <td align="center"><%= sCount %></td>
- </tr>
- <%
- }
- }
- catch(Exception e)
- {
- //throw new Exception("您所选择的月份还没有生成工资信息.");
- // out.println("Exception"+e);
- }
- %>
- </table>
- </td>
- </tr>
- </table>
- <br>
- <br>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>