AssetInOutManage.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. <%
  5. Session m_session = new Session(session);
  6. int intUserID = m_session.GetInt("UserID");
  7. Request m_request = new Request(request);
  8. String strOperation = m_request.GetString("OperationType");
  9. int iSysDirID = m_request.GetInt("SysDirID");
  10. %>
  11. <html>
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  14. <title>资产出入库管理-- GForce OA 2.0</title>
  15. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  16. <script language="JavaScript" src="/js/changestyle.js"></script>
  17. </head>
  18. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  19.   <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  20.     <tr>
  21.     <td align="center" valign="top">
  22.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  23.         <tr>
  24.           <td height="50" valign="top" background="../images/dy-back.gif">
  25.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  26.               <tr valign="middle">
  27.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  28.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">申请</font></strong></td>
  29.                 <td align="right" nowrap="nowrap" valign="bottom">
  30.                    <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59">&nbsp;-->
  31.                  <a href="AddAssetInOut.jsp?SysDirID=<%=iSysDirID%>&OperationType=<%=strOperation%>"><img src="/images/Single.gif" onMouseOver="this.src='/images/Single_a.gif';" onMouseOut="this.src='/images/Single.gif';" border="0" height="22" width="59" alt=""></a>&nbsp;
  32.                   <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59">&nbsp;-->
  33.                   <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59">&nbsp;-->
  34.                   <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59">&nbsp;-->
  35.                   <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79">&nbsp;-->
  36.                 </td>
  37.               </tr>
  38.             </table>
  39.           </td>
  40.         </tr>
  41.       </table><br>
  42. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  43.     <tr>
  44.         <td align="center" valign="top"><p>&nbsp;</p>
  45.             <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  46.                 <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  47.                     <th width="6%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  48.                     <th width="8%" nowrap><font color="#000000">序号</font></th>
  49.                                     <%
  50. if (strOperation.equalsIgnoreCase("BuyApply"))
  51. {
  52.   out.println("<th width="40%" nowrap><font color="#000000">申请购买资产</font></th>");
  53. }else
  54. if (strOperation.equalsIgnoreCase("InStorage"))
  55. {
  56.   out.println("<th width="30%" nowrap><font color="#000000">入库资产</font></th>");
  57. }else
  58. if (strOperation.equalsIgnoreCase("OutStorage"))
  59. {
  60.   out.println("<th width="30%" nowrap><font color="#000000">出库资产</font></th>");
  61. }else
  62. if (strOperation.equalsIgnoreCase("UseApply"))
  63. {
  64.   out.println("<th width="40%" nowrap><font color="#000000">申请使用资产</font></th>");
  65. }
  66.                 %>
  67.                     <th width="6%" nowrap><font color="#000000">数量</font></th>
  68.                 <%
  69. if (strOperation.equalsIgnoreCase("BuyApply"))
  70. {
  71.   out.println("<th width="8%" nowrap><font color="#000000">预计使用时间</font></th>");
  72. }else
  73. if (strOperation.equalsIgnoreCase("InStorage"))
  74. {
  75.   out.println("<th width="8%" nowrap><font color="#000000">入库时间</font></th>");
  76. }else
  77. if (strOperation.equalsIgnoreCase("OutStorage"))
  78. {
  79.   out.println("<th width="8%" nowrap><font color="#000000">出库时间</font></th>");
  80. }else
  81. if (strOperation.equalsIgnoreCase("UseApply"))
  82. {
  83.   out.println("<th width="8%" nowrap><font color="#000000">预计领用时间</font></th>");
  84.   out.println("<th width="8%" nowrap><font color="#000000">预计归还时间</font></th>");
  85. }
  86.                 %>
  87.                     <th width="8%" nowrap><font color="#000000">申请时间</font></th>
  88. <%if(strOperation.equalsIgnoreCase("BuyApply")||strOperation.equalsIgnoreCase("UseApply"))
  89.     {%>
  90.                     <th width="8%" nowrap><font color="#000000">审批状态</font></th>
  91. <%}%>
  92.                     <th width="8%" nowrap><font color="#000000">申请人</font></th>
  93. <%
  94.     if ((strOperation.equalsIgnoreCase("InStorage"))||(strOperation.equalsIgnoreCase("OutStorage")))
  95.     out.println("<th width="15%" nowrap><font color="#000000">备注</font></th>");
  96. %>
  97.                     <th width="8%" nowrap><font color="#000000">修改</font></th>
  98.                     <th width="8%" nowrap><font color="#000000">删除</font></th>
  99.                 </tr>
  100. <%
  101. int iPageSize = 15;
  102. int iPage = m_request.GetInt("Page");
  103. Vector vt = AssetInOutManager.getByOperationRecord(iSysDirID,strOperation);
  104. if(iPage<1)iPage=1;
  105. int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  106. if(iPage>iPageCount) iPage=1;
  107. for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  108. {
  109.     String strID = ((Vector)vt.get(i)).get(0).toString();
  110.     if(i % 2 == 0)
  111.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  112.     else
  113.     out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  114.     out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  115.     out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  116.     if ((strOperation.equalsIgnoreCase("InStorage"))||(strOperation.equalsIgnoreCase("OutStorage")))
  117.     out.println("<td align="center" valign="middle" nowrap>" +  AssetManager.getAssetNameByID(Integer.parseInt(((Vector)vt.get(i)).get(7).toString())) + "</td>");
  118.     else
  119.     out.println("<td align="center" valign="middle" nowrap>" +  ((Vector)vt.get(i)).get(5).toString() + "</td>");
  120.     out.println("<td align="center" valign="middle" nowrap>" +  ((Vector)vt.get(i)).get(8).toString() + "</td>");
  121.     out.println("<td align="center" valign="middle" nowrap>" +  StringNew.GetDateString(((Vector)vt.get(i)).get(2).toString(),"yyyy年MM月dd日") + "</td>");
  122.     if (strOperation.equalsIgnoreCase("UseApply")) out.println("<td align="center" valign="middle" nowrap>" +  StringNew.GetDateString(((Vector)vt.get(i)).get(3).toString(),"yyyy年MM月dd日") + "</td>");
  123.     out.println("<td align="center" valign="middle" nowrap>" + StringNew.GetDateString(((Vector)vt.get(i)).get(6).toString(),"yyyy年MM月dd日HH时m分") + "</td>");
  124.     String strApproveType = "";
  125.     if(strOperation.equalsIgnoreCase("BuyApply")||strOperation.equalsIgnoreCase("UseApply"))
  126.     {
  127.       if(strOperation.equalsIgnoreCase("BuyApply"))
  128.       {
  129.         strApproveType="采购申请";
  130.       }
  131.       else if(strOperation.equalsIgnoreCase("UseApply"))
  132.       {
  133.         strApproveType="领用申请";
  134.       }
  135.       //****************************审批状态
  136.       Vector vtApproveRecord = ApproveRecordManager.getRecordByRecordID(Integer.parseInt(strID),strApproveType);
  137.       out.println("<td align="center" valign="middle" nowrap>");
  138.       if (vtApproveRecord.size() > 0 )
  139.       for (int j = 0; j < vtApproveRecord.size() ;j++)
  140.       {
  141.         if (((Vector)vtApproveRecord.get(j)).get(4).toString().equalsIgnoreCase(""))
  142.         {
  143.           out.println("未审批");
  144.         }
  145.         else
  146.         if (((Vector)vtApproveRecord.get(j)).get(4).toString().equalsIgnoreCase("true"))
  147.         {
  148.           out.println("同意");
  149.         }
  150.         else
  151.         if (((Vector)vtApproveRecord.get(j)).get(4).toString().equalsIgnoreCase("false"))
  152.         {
  153.           out.println("不同意");
  154.         }
  155.         out.println("["+UserManager.getPersonnelNameByUserID(Integer.parseInt(((Vector)vtApproveRecord.get(j)).get(3).toString())) + "]<br>");
  156.       }
  157.       else
  158.       {
  159.         out.println("&nbsp;");
  160.       }
  161.     out.println("</td>");
  162.     //******************************审批状态完
  163.     }
  164.     out.println("<td align="center" valign="middle" nowrap>" + UserManager.getPersonnelNameByUserID(Integer.parseInt(((Vector)vt.get(i)).get(4).toString())) + "</td>");
  165.     if ((strOperation.equalsIgnoreCase("InStorage"))||(strOperation.equalsIgnoreCase("OutStorage")))
  166.     out.println("<td align="center" valign="middle" nowrap>" +  ((Vector)vt.get(i)).get(5).toString() + "&nbsp;</td>");
  167. //********是否显示编辑状态
  168.   if(ApproveRecordManager.getISConfirmByRecordID(strApproveType,Integer.parseInt(strID)))
  169.   {
  170.     out.println("<td align="center" valign="middle" nowrap>&nbsp;</td>");
  171.     out.println("<td align="center" valign="middle" nowrap>&nbsp;</td>");
  172.   }
  173.   else
  174.   {
  175.     out.println("<td align="center" valign="middle" nowrap><a href="EditAssetInOut.jsp?SysDirID="+ iSysDirID +"&OperationType="+ strOperation +"&ID=" + strID + "">修改</a></td>");
  176.     out.println("<td align="center" valign="middle" nowrap><a href="DelAssetInOut.jsp?SysDirID="+ iSysDirID +"&OperationType="+ strOperation +"&ID=" + strID + "" onclick="return confirm('您确实要删除该记录吗?');">删除</a></td>");
  177.   }
  178. }
  179. //*******
  180.     out.println("<tr>");
  181. if (strOperation.equalsIgnoreCase("BuyApply"))
  182. {
  183.     out.println("<th align="center" valign="top" colspan="10">");
  184. }else
  185. {
  186.     out.println("<th align="center" valign="top" colspan="11">");
  187. }
  188. String strCurrentPageURL = request.getRequestURI();
  189. if(iPage<2)
  190. {
  191.   out.print("首页&nbsp;&nbsp;上页");
  192. }
  193. else
  194. {
  195.   out.print("<a href=""+ strCurrentPageURL+"?SysDirID="+iSysDirID+"&OperationType="+strOperation+ "&Page=" + 1 + "">首页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?SysDirID="+iSysDirID+"&OperationType="+strOperation+ "&Page=" + (iPage-1) + "">上页</a>");
  196. }
  197. out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  198. if(iPage>=iPageCount)
  199. {
  200.   out.print("下页&nbsp;&nbsp;末页");
  201. }
  202. else
  203. {
  204.   out.print("<a href=""+ strCurrentPageURL+"?SysDirID="+iSysDirID+"&OperationType="+strOperation+ "&Page=" + (iPage+1) + "">下页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?SysDirID="+iSysDirID+"&OperationType="+ strOperation + "&Page=" + iPageCount + "">末页</a>");
  205. }
  206. out.println("</th>");
  207. %>
  208.     </tr>
  209.     </table>
  210.     </td>
  211.     </tr>
  212. </table>
  213. </body>
  214. </html>