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

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/><%
  4. Session m_session = new Session(session);
  5. String strCurrentPageURL = request.getRequestURI();
  6. Request m_request = new Request(request);
  7. int iPageSize = 18;
  8. int iPage = m_request.GetInt("Page");
  9. int iPactType = m_request.GetInt("PactType");
  10. String strTempletName=m_request.GetString("TempletName");
  11. String strTempletContent=m_request.GetString("TempletContent");
  12. String strBuildTimeFrom=m_request.GetString("BuildTimeFrom");
  13. String strBuildTimeTo=m_request.GetString("BuildTimeTo");
  14. String strBuildUserName=m_request.GetString("BuildUserName");
  15. String strOrderBy=m_request.GetString("OrderBy");
  16. String strSort=m_request.GetString("Sort");
  17. boolean bIsDesc=false;
  18. if(strSort.equalsIgnoreCase("desc"))
  19.   bIsDesc=true;
  20. %>
  21. <html>
  22. <head>
  23. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  24. <title>合同管理-- GForce OA 2.0</title>
  25. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  26. <script language="JavaScript" src="/js/changestyle.js"></script>
  27. <script language="JavaScript">
  28. function changeorder(orderBy)
  29. {
  30.   with(document.pacttempletmanage)
  31.   {
  32.     if(OrderBy.value==orderBy)
  33.     {
  34.       if(Sort.value=="")
  35.         Sort.value="desc";
  36.       else
  37.         Sort.value="";
  38.     }
  39.     else
  40.     {
  41.       OrderBy.value=orderBy;
  42.       Sort.value="";
  43.       Page.value="1";
  44.     }
  45.   }
  46.   document.pacttempletmanage.submit();
  47. }
  48. function changepage(pageNum)
  49. {
  50.   with(document.pacttempletmanage)
  51.   {
  52.     Page.value=pageNum;
  53.   }
  54.   document.pacttempletmanage.submit();
  55. }
  56. </script>
  57. </head>
  58. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  59. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  60.     <tr>
  61.         <td align="center" valign="top"><p>&nbsp;</p>
  62.         <form name="pacttempletmanage" action="<%=strCurrentPageURL%>" method="post">
  63.         <input name="PactType" type="hidden" value="<%=iPactType%>">
  64.         <input name="TempletName" type="hidden" value="<%=strTempletName%>">
  65.         <input name="TempletContent" type="hidden" value="<%=strTempletContent%>">
  66.         <input name="BuildTimeFrom" type="hidden" value="<%=strBuildTimeFrom%>">
  67.         <input name="BuildTimeTo" type="hidden" value="<%=strBuildTimeTo%>">
  68.         <input name="BuildUserName" type="hidden" value="<%=strBuildUserName%>">
  69.         <input name="OrderBy" type="hidden" value="<%=strOrderBy%>">
  70.         <input name="Sort" type="hidden" value="<%=strSort%>">
  71.         <input name="Page" type="hidden" value="<%=iPage%>">
  72.         <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  73.         <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  74.           <th width="3%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  75.           <th width="6%" nowrap><font color="#000000">序号</font></th>
  76.           <th width="40%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.TempletName');return false;">名称</a><%
  77.           if(strOrderBy.equalsIgnoreCase("a.TempletName"))
  78.           {
  79.             if(bIsDesc)
  80.               out.print("↓");
  81.             else
  82.               out.print("↑");
  83.           }
  84.           %></font></th>
  85.           <th width="20%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.BuildTime');return false;">建立时间</a><%
  86.           if(strOrderBy.equalsIgnoreCase("a.BuildTime"))
  87.           {
  88.             if(bIsDesc)
  89.               out.print("↓");
  90.             else
  91.               out.print("↑");
  92.           }
  93.           %></font></th>
  94.           <th width="10%" nowrap><font color="#000000"><a href="" onclick="changeorder('c.Name');return false;">建立用户</a><%
  95.           if(strOrderBy.equalsIgnoreCase("c.Name"))
  96.           {
  97.             if(bIsDesc)
  98.               out.print("↓");
  99.             else
  100.               out.print("↑");
  101.           }
  102.           %></font></th>
  103.           <th width="10%" nowrap><font color="#000000">修改</font></th>
  104.           <th width="10%" nowrap><font color="#000000">删除</font></th>
  105.         </tr>
  106. <%
  107. Vector vt = PactTempletManager.getRecordByPactType(strTempletName,strTempletContent,strBuildTimeFrom,strBuildTimeTo,strBuildUserName,iPactType,strOrderBy,bIsDesc);
  108. if(iPage<1)iPage=1;
  109. int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  110. if(iPage>iPageCount) iPage=1;
  111. for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  112. {
  113.     String strID = ((Vector)vt.get(i)).get(0).toString();
  114.     if(i % 2 == 0)
  115.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  116.     else
  117.         out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  118.     out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  119.     out.println("<td align="Center" valign="middle">" + (i+1) + "</td>");
  120.     out.println("<td align="left" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(1).toString() + ""><a href="ShowPactTemplet.jsp?ID=" + strID + "" target="_blank">" + ((Vector)vt.get(i)).get(1).toString() + "</a>&nbsp;</td>");
  121.     out.println("<td align="center" valign="middle" nowrap>" + StringNew.GetDateString(((Vector)vt.get(i)).get(3).toString(),"yyyy年MM月dd日 HH时mm分") + "&nbsp;</td>");
  122.     out.println("<td align="center" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(5).toString() + "&nbsp;</td>");
  123.     out.println("<td align="center" valign="middle" nowrap><a href="EditPactTemplet.jsp?PactType=" + iPactType + "&ID=" + strID + "">修改</a></td>");
  124.     out.println("<td align="center" valign="middle" nowrap><a href="DelPactTemplet.jsp?PactType=" + iPactType + "&ID=" + strID + "" onclick="return confirm('您确实要删除该合同模板吗?');">删除</a></td>");
  125.     out.println("</tr>");
  126. }
  127. %>
  128.         <tr>
  129.           <th align="center" valign="top" colspan="5">
  130. <%
  131. if(iPage<2)
  132. out.print("首页&nbsp;&nbsp;上页");
  133. else
  134. out.print("<a href="" onclick="changepage(" + 1 + ")">首页</a>&nbsp;&nbsp;<a href="" onlick="changepage(" + (iPage-1) + ")">上页</a>");
  135. out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  136. if(iPage>=iPageCount)
  137. out.print("下页&nbsp;&nbsp;末页");
  138. else
  139. out.print("<a href="" onclick="changepage(" + (iPage+1) + ")">下页</a>&nbsp;&nbsp;<a href="" onclick="changepage(" + iPageCount + ")">末页</a>");
  140. %>
  141. </th>
  142.         <th colspan="3"> <a href="AddPactTemplet.jsp?PactType=<%=iPactType%>"><font color="#0A0A0A"><strong>新增</strong></font></a></th>
  143.         </tr>
  144.       </table>
  145.       </form>
  146.      </td>
  147.     </tr>
  148. </table>
  149. </body>
  150. </html>