personal_stipend_statistic.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:11k
源码类别:
电子政务应用
开发平台:
Java
- <%
- /**
- * $RCSfile: employee_stipend_statistic.jsp,v $
- * $Revision: 1.0 $
- * $Date: 2001/05/17 20:57:46 $
- * /mainctrl/intranet/hr/salary_statistic
- */
- %>
- <%@ 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" %>
- <jsp:useBean id="salaryProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.SalaryProxyBean" scope="application" />
- <jsp:useBean id="proxyBean" class="com.vnex.intranet.hr.employer_info.proxy.MemberInfoProxyBean" scope="application" />
- <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <%
- int emp_id = -1;
- if ( BusinessName.getEmpId() > 0)
- emp_id = BusinessName.getEmpId();
- %>
- <%
- 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">
- 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;
- }
- 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_person.js"></script>
- <script language="JavaScript1.2" 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/personal/salary/query?doSearch=1">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <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/personal/main"><font color="#FFFFFF">个人办公</font></a>>><font color="#FFFFFF">个人工资福利保险</font></font></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>
- 月
- <%
- // 输出起止年月结束
- %>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td align="center" valign="middle" height="30"><font class=strong> </font>
- <input type="button" value="统计" name="Submit" class=text onClick = "do_submit()">
- </td>
- </tr>
- </table>
- <table class=title cellspacing=1 cellpadding=2 width="600" border=0 >
- <%
- double sCount = 0;
- Iterator iterAll = pageAllColl.iterator();
- try
- {
- while ( iterAll.hasNext() )
- {
- pageColl = (MemberDateSalary)iterAll.next();
- %>
- <tr>
- <td align="center" valign="top"><font class=strong>时间</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>总额</font></td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" align="center"><%= pageColl.getSDate().substring(0,4) %>-<%=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 bgcolor="#fafafa" align="center"><%= sc.getCount() %></td>
- <%
- }
- %>
- <td bgcolor="#fafafa" align="center"><%= sCount %></td>
- </tr>
- <%
- }
- }
- catch(Exception e)
- {
- //throw new Exception("您所选择的月份还没有生成工资信息.");
- // out.println("Exception"+e);
- }
- %>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>