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

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. String strPactNumber=m_request.GetString("PactNumber");
  10. String strIntrustFund=m_request.GetString("IntrustFund");
  11. String strPactTermStart=m_request.GetString("PactTermStart");
  12. String strPactTermEnd=m_request.GetString("PactTermEnd");
  13. String strFirstSideName=m_request.GetString("FirstSideName");
  14. String strFirstSideIDCardNumber=m_request.GetString("FirstSideIDCardNumber");
  15. String strFirstSideCorporation=m_request.GetString("FirstSideCorporation");
  16. String strFirstSideAddress=m_request.GetString("FirstSideAddress");
  17. String strFirstSideTel=m_request.GetString("FirstSideTel");
  18. String strFirstSideDeputy=m_request.GetString("FirstSideDeputy");
  19. String strFirstSideSignTime=m_request.GetString("FirstSideSignTime");
  20. String strSecondSideName=m_request.GetString("SecondSideName");
  21. String strSecondSideIDCardNumber=m_request.GetString("SecondSideIDCardNumber");
  22. String strSecondSideCorporation=m_request.GetString("SecondSideCorporation");
  23. String strSecondSideAddress=m_request.GetString("SecondSideAddress");
  24. String strSecondSideTel=m_request.GetString("SecondSideTel");
  25. String strSecondSideDeputy=m_request.GetString("SecondSideDeputy");
  26. String strSecondSideSignTime=m_request.GetString("SecondSideSignTime");
  27. String strPactTitle=m_request.GetString("PactTitle");
  28. String strPactContent=m_request.GetString("PactContent");
  29. String strAddTime=m_request.GetString("AddTime");
  30. String strBuildTimeFrom=m_request.GetString("BuildTimeFrom");
  31. String strBuildTimeTo=m_request.GetString("BuildTimeTo");
  32. String strBuildUserName=m_request.GetString("BuildUserName");
  33. String strOrderBy=m_request.GetString("OrderBy");
  34. String strSort=m_request.GetString("Sort");
  35. boolean bIsDesc=false;
  36. if(strSort.equalsIgnoreCase("desc"))
  37.   bIsDesc=true;
  38. out.println(strBuildUserName);
  39. %>
  40. <html>
  41. <head>
  42. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  43. <title>合同管理-- GForce OA 2.0</title>
  44. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  45. <script language="JavaScript" src="/js/changestyle.js"></script>
  46. <script language="JavaScript">
  47. function changeorder(orderBy)
  48. {
  49.   with(document.pactmanage)
  50.   {
  51.     if(OrderBy.value==orderBy)
  52.     {
  53.       if(Sort.value=="")
  54.         Sort.value="desc";
  55.       else
  56.         Sort.value="";
  57.     }
  58.     else
  59.     {
  60.       OrderBy.value=orderBy;
  61.       Sort.value="";
  62.       Page.value="1";
  63.     }
  64.   }
  65.   document.pactmanage.submit();
  66. }
  67. function changepage(pageNum)
  68. {
  69.   with(document.pactmanage)
  70.   {
  71.     Page.value=pageNum;
  72.   }
  73.   document.pactmanage.submit();
  74. }
  75. </script>
  76. </head>
  77. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  78. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  79.     <tr>
  80.         <td align="center" valign="top"><p>&nbsp;</p>
  81.         <form name="pactmanage" action="<%=strCurrentPageURL%>" method="post">
  82.         <input name="PactNumber" type="hidden" value="<%=strPactNumber%>">
  83.         <input name="IntrustFund" type="hidden" value="<%=strIntrustFund%>">
  84.         <input name="PactTermStart" type="hidden" value="<%=strPactTermStart%>">
  85.         <input name="PactTermEnd" type="hidden" value="<%=strPactTermEnd%>">
  86.         <input name="FirstSideName" type="hidden" value="<%=strFirstSideName%>">
  87.         <input name="FirstSideIDCardNumber" type="hidden" value="<%=strFirstSideIDCardNumber%>">
  88.         <input name="FirstSideCorporation" type="hidden" value="<%=strFirstSideCorporation%>">
  89.         <input name="FirstSideAddress" type="hidden" value="<%=strFirstSideAddress%>">
  90.         <input name="FirstSideTel" type="hidden" value="<%=strFirstSideTel%>">
  91.         <input name="FirstSideDeputy" type="hidden" value="<%=strFirstSideDeputy%>">
  92.         <input name="FirstSideSignTime" type="hidden" value="<%=strFirstSideSignTime%>">
  93.         <input name="SecondSideName" type="hidden" value="<%=strSecondSideName%>">
  94.         <input name="SecondSideIDCardNumber" type="hidden" value="<%=strSecondSideIDCardNumber%>">
  95.         <input name="SecondSideCorporation" type="hidden" value="<%=strSecondSideCorporation%>">
  96.         <input name="SecondSideAddress" type="hidden" value="<%=strSecondSideAddress%>">
  97.         <input name="SecondSideTel" type="hidden" value="<%=strSecondSideTel%>">
  98.         <input name="SecondSideDeputy" type="hidden" value="<%=strSecondSideDeputy%>">
  99.         <input name="SecondSideSignTime" type="hidden" value="<%=strSecondSideSignTime%>">
  100.         <input name="PactTitle" type="hidden" value="<%=strPactTitle%>">
  101.         <input name="PactContent" type="hidden" value="<%=strPactContent%>">
  102.         <input name="BuildTimeFrom" type="hidden" value="<%=strBuildTimeFrom%>">
  103.         <input name="BuildTimeTo" type="hidden" value="<%=strBuildTimeTo%>">
  104.         <input name="BuildUserName" type="hidden" value="<%=strBuildUserName%>">
  105.         <input name="OrderBy" type="hidden" value="<%=strOrderBy%>">
  106.         <input name="Sort" type="hidden" value="<%=strSort%>">
  107.         <input name="Page" type="hidden" value="<%=iPage%>">
  108.         <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  109.         <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  110.           <th width="3%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  111.           <th width="6%" nowrap><font color="#000000">序号</font></th>
  112.           <th width="40%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.PactTitle');return false;">名称</a><%
  113.           if(strOrderBy.equalsIgnoreCase("a.PactTitle"))
  114.           {
  115.             if(bIsDesc)
  116.               out.print("↓");
  117.             else
  118.               out.print("↑");
  119.           }
  120.           %></font></th>
  121.           <th width="40%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.FirstSideName');return false;">甲方</a><%
  122.           if(strOrderBy.equalsIgnoreCase("a.FirstSideName"))
  123.           {
  124.             if(bIsDesc)
  125.               out.print("↓");
  126.             else
  127.               out.print("↑");
  128.           }
  129.           %></font></th>
  130.           <th width="20%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.SecondSideName');return false;">乙方</a><%
  131.           if(strOrderBy.equalsIgnoreCase("a.SecondSideName"))
  132.           {
  133.             if(bIsDesc)
  134.               out.print("↓");
  135.             else
  136.               out.print("↑");
  137.           }
  138.           %></font></th>
  139.           <th width="20%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.AddTime');return false;">建立时间</a><%
  140.           if(strOrderBy.equalsIgnoreCase("a.AddTime"))
  141.           {
  142.             if(bIsDesc)
  143.               out.print("↓");
  144.             else
  145.               out.print("↑");
  146.           }
  147.           %></font></th>
  148.           <th width="10%" nowrap><font color="#000000"><a href="" onclick="changeorder('c.Name');return false;">建立用户</a><%
  149.           if(strOrderBy.equalsIgnoreCase("c.Name"))
  150.           {
  151.             if(bIsDesc)
  152.               out.print("↓");
  153.             else
  154.               out.print("↑");
  155.           }
  156.           %></font></th>
  157.           <th width="10%" nowrap><font color="#000000">修改</font></th>
  158.           <th width="10%" nowrap><font color="#000000">删除</font></th>
  159.         </tr>
  160. <%
  161. Vector vt = PactManager.getRecordByPactType(strPactNumber, strIntrustFund, strPactTermStart, strPactTermEnd,
  162.                                             strFirstSideName, strFirstSideIDCardNumber, strFirstSideCorporation, strFirstSideAddress,
  163.                                             strFirstSideTel, strFirstSideDeputy, strFirstSideSignTime,
  164.                                             strSecondSideName, strSecondSideIDCardNumber, strSecondSideCorporation, strSecondSideAddress,
  165.                                             strSecondSideTel, strSecondSideDeputy, strSecondSideSignTime,
  166.                                             strPactTitle, strPactContent, strBuildTimeFrom, strBuildTimeTo,
  167.                                             strBuildUserName, strOrderBy, bIsDesc);
  168. if(iPage<1)iPage=1;
  169. int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  170. if(iPage>iPageCount) iPage=1;
  171. for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  172. {
  173.     String strID = ((Vector)vt.get(i)).get(0).toString();
  174.     if(i % 2 == 0)
  175.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  176.     else
  177.         out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  178.     out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  179.     out.println("<td align="Center" valign="middle">" + (i+1) + "</td>");
  180.     out.println("<td align="left" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(19).toString() + ""><a href="ShowPact.jsp?ID=" + strID + "" target="_blank">" + ((Vector)vt.get(i)).get(19).toString() + "</a>&nbsp;</td>");
  181.     out.println("<td align="left" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(5).toString() + "&nbsp;</td>");
  182.     out.println("<td align="left" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(12).toString() + "&nbsp;</td>");
  183.     out.println("<td align="center" valign="middle" nowrap>" + StringNew.GetDateString(((Vector)vt.get(i)).get(21).toString(),"yyyy年MM月dd日 HH时mm分") + "&nbsp;</td>");
  184.     out.println("<td align="center" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(23).toString() + "&nbsp;</td>");
  185.     out.println("<td align="center" valign="middle" nowrap><a href="EditPact.jsp?ID=" + strID + "">修改</a></td>");
  186.     out.println("<td align="center" valign="middle" nowrap><a href="DelPact.jsp?ID=" + strID + "" onclick="return confirm('您确实要删除该合同吗?');">删除</a></td>");
  187.     out.println("</tr>");
  188. }
  189. %>
  190.         <tr>
  191.           <th align="center" valign="top" colspan="7">
  192. <%
  193. if(iPage<2)
  194. out.print("首页&nbsp;&nbsp;上页");
  195. else
  196. out.print("<a href=""+ strCurrentPageURL+"?Page=" + 1 + "">首页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?Page=" + (iPage-1) + "">上页</a>");
  197. out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  198. if(iPage>=iPageCount)
  199. out.print("下页&nbsp;&nbsp;末页");
  200. else
  201. out.print("<a href=""+ strCurrentPageURL+"?Page=" + (iPage+1) + "">下页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?Page=" + iPageCount + "">末页</a>");
  202. %>
  203. </th>
  204.         <th colspan="3"> <a href="AddPact.jsp"><font color="#0A0A0A"><strong>新增</strong></font></a></th>
  205.         </tr>
  206.       </table>
  207.      </td>
  208.     </tr>
  209. </table>
  210. </body>
  211. </html>