equipment_detail.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:10k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ page import="java.lang.*"%>
  3. <%@ page import="java.sql.Timestamp"%>
  4. <%@ page import="com.vnex.intranet.util.FieldUtil"%>
  5. <%@ page import="com.vnex.intranet.equipment.value.EquipmentValueBean"%>
  6. <jsp:useBean id="equipmentProxy" class="com.vnex.intranet.equipment.proxy.EquipmentProxyBean" scope="session" /> 
  7. <%!
  8. String sId = null;
  9. int equipmentId;
  10. EquipmentValueBean equipmentValue;
  11. int iYear,iMonth,iDay;
  12. String buyDate="";
  13. String simple = "";
  14. String start = "1";
  15. HttpSession sess;
  16. %>
  17. <%
  18. sess=request.getSession(false);
  19. if (request.getParameter("simple") == null)
  20. simple = (String)sess.getAttribute("simple");
  21. else
  22. {
  23. simple = request.getParameter("simple");
  24. sess.setAttribute("simple",simple);
  25. }
  26. if (request.getParameter("start") != null)
  27. {
  28. start = (request.getParameter("start"));
  29. sess.setAttribute("start",start);
  30. }
  31. else
  32. start = (String)sess.getAttribute("start");
  33. sId = request.getParameter("equipmentId");
  34. equipmentId = (new Integer(sId)).intValue();
  35. System.out.println("id" + equipmentId);
  36. equipmentValue = equipmentProxy.getEquipmentDetail(equipmentId);
  37. Timestamp tDate = equipmentValue.getBuyDate();
  38. if (tDate != null)
  39. {
  40. iYear = tDate.getYear() + 1900;
  41. iMonth = tDate.getMonth() + 1;
  42. iDay = tDate.getDate();
  43. buyDate = "" + iYear + "-" + iMonth + "-" + iDay;
  44. }
  45. System.out.println("id" + equipmentValue.getId());
  46. %>
  47. <script language=JavaScript>
  48. function toDelete()
  49. {
  50. if (!confirm("真的删除这条记录吗?"))
  51. return false;
  52. myForm.action="/mainctrl/equipmentDeleteSuccess?equipmentId=<%= sId%>";
  53. myForm.submit();
  54. }
  55. function toModify()
  56. {
  57. myForm.action="/mainctrl/equipmentModify?equipmentId=<%= sId%>&fromSelf=0";
  58. myForm.submit();
  59. }
  60. function toUseList()
  61. {
  62. myForm.action="/mainctrl/equipmentUseList?equipmentId=<%= sId%>";
  63. myForm.submit();
  64. }
  65. function toRepairList()
  66. {
  67. myForm.action="/mainctrl/equipmentRepairList?equipmentId=<%= sId%>";
  68. myForm.submit();
  69. }
  70. function toBack()
  71. {
  72. if ("true" == "<%=simple%>")
  73. myForm.action="/mainctrl/equipmentSearchResult?cache=true&start=<%=start%>";
  74. else
  75. myForm.action="/mainctrl/equipmentAdvancedSearchResult?start=<%=start%>";
  76. myForm.submit();
  77. }
  78. </script>
  79. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  80. <HTML><jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  81. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  82. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  83. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  84. <DIV align=center>
  85. <form name="myForm" method="post" action="">
  86.    
  87.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  88.     <TBODY> 
  89.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  90.     <TR> 
  91.         <TD colSpan=3 align="center"><br>
  92.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  93.             <tr bgcolor="#FAFAFA"> 
  94.               <td> 
  95.                 <table width="600" border="0" cellspacing="0" cellpadding="2">
  96.                   <tr>
  97.                     <td colspan="3" height="15" bgcolor="#666666"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>&gt;&gt;<a href = "/mainctrl/equipmentSearchResult"><font color="#FFFFFF">固定资产管理</font></a>&gt;&gt;固定资产详细信息</font>
  98.                     </td>
  99.                   </tr>
  100.                 </table>
  101.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  102.                   <tr bgcolor="#fafafa"> 
  103.                     <td width="125"><font class="strong">&nbsp;资产类别:</font></td>
  104. <td width="424"><%= FieldUtil.filterScriptTag(equipmentValue.getCategoryName())%></td>
  105.                   </tr>
  106.                   <tr bgcolor="#e0e0e0"> 
  107.                     <td width="125"> 
  108.                       <div align="left"><font class="strong" >&nbsp;名称:</font> </div>
  109.                     </td>
  110.                     <td width="424"> <%= FieldUtil.filterScriptTag(equipmentValue.getEquipmentName())%> </td>
  111.                   </tr>
  112.                   <tr bgcolor="#fafafa"> 
  113.                     <td width="125"> 
  114.                       <div align="left"><font  class="strong">&nbsp;用途: </font></div>
  115.                     </td>
  116.                     <td width="424"><%= FieldUtil.filterScriptTag(equipmentValue.getPurpose())%></td>
  117.                   </tr>
  118.                   <tr bgcolor="#e0e0e0"> 
  119.                     <td width="125"> 
  120.                       <div align="left"><font  class="strong"><font  class="strong">&nbsp;型号:<font  class="strong"> 
  121.                         </font> </font></font></div>
  122.                     </td>
  123.                     <td width="424"><%= FieldUtil.filterScriptTag(equipmentValue.getModel())%></td>
  124.                   </tr>
  125.                   <tr bgcolor="#fafafa"> 
  126.                     <td width="125"> 
  127.                       <div align="left"><font  class="strong"><font  class="strong">&nbsp;资产编号:<font  class="strong"> 
  128.                         </font> </font></font></div>
  129.                     </td>
  130.                     <td width="424"><%= FieldUtil.filterScriptTag(equipmentValue.getEquipmentCode())%></td>
  131.                   </tr>
  132.                   <tr bgcolor="#e0e0e0"> 
  133.                     <td width="125"><font  class="strong">&nbsp;配置:</font><font  class="strong"> 
  134.                       </font></td>
  135.                     <td width="424"><%= FieldUtil.filterScriptTag(equipmentValue.getConfigure())%></td>
  136.                   </tr>
  137.                   <tr bgcolor="#fafafa"> 
  138.                     <td width="125"> 
  139.                       <div align="left"><font  class="strong">&nbsp;使用者:</font></div>
  140.                     </td>
  141.                     <td width="424"> <%= FieldUtil.filterScriptTag(equipmentValue.getUseDeptName())%> <%= FieldUtil.filterScriptTag(equipmentValue.getUsePersonName())%> 
  142.                     </td>
  143.                   </tr>
  144.                   <tr bgcolor="#e0e0e0"> 
  145.                     <td width="125"> 
  146.                       <div align="left"><font  class="strong">&nbsp;购买价格:</font></div>
  147.                     </td>
  148.                     <td width="424"><font  class="strong"><font  class="strong"> 
  149.                       </font></font><%= equipmentValue.getPrice()%>元</td>
  150.                   </tr>
  151.                   <tr bgcolor="#fafafa"> 
  152.                     <td width="125"> 
  153.                       <div align="left"><font  class="strong">&nbsp;购买日期:</font></div>
  154.                     </td>
  155.                     <td width="424" ><%= buyDate%> </td>
  156.                   </tr>
  157.                   <tr bgcolor="#e0e0e0"> 
  158.                     <td width="125"><font  class="strong">&nbsp;购买者:</font></td>
  159.                     <td width="424"><%= FieldUtil.filterScriptTag(equipmentValue.getBuyDeptName())%> <%= FieldUtil.filterScriptTag(equipmentValue.getBuyPersonName())%> 
  160.                     </td>
  161.                   </tr>
  162.                   <tr bgcolor="#fafafa"> 
  163.                     <td width="125"><font  class="strong">&nbsp;供应者:</font></td>
  164.                     <td width="424"><%= FieldUtil.filterScriptTag(equipmentValue.getSupplier())%></td>
  165.                   </tr>
  166.                   <tr bgcolor="#e0e0e0"> 
  167.                     <td width="125"> 
  168.                       <div align="left"><font  class="strong">&nbsp;估计使用年限:</font></div>
  169.                     </td>
  170.                     <td width="424"><%= equipmentValue.getTerm()%>月</td>
  171.                   </tr>
  172.                   
  173.                   <tr bgcolor="#fafafa"> 
  174.                     <td width="125"> 
  175.                       <div align="left"><font  class="strong">&nbsp;放置地点:</font></div>
  176.                     </td>
  177.                     <td width="424"> <%= FieldUtil.filterScriptTag(equipmentValue.getPlace())%> </td>
  178.                   </tr>
  179.                   <tr bgcolor="#e0e0e0"> 
  180.                     <td width="125"><font  class="strong">&nbsp;其他说明:</font></td>
  181.                     <td width="424"><%= FieldUtil.filterScriptTag(equipmentValue.getRemark())%></td>
  182.                   </tr>
  183.                   <tr bgcolor="#fafafa"> 
  184.                     <td width="125"><font  class="strong">&nbsp;维修记录:</font></td>
  185.                     <td width="424"><a href="/mainctrl/equipmentRepairList?equipmentId=<%= sId%>">查看维修记录</a></td>
  186.                   </tr>
  187.                   <tr bgcolor="#e0e0e0"> 
  188.                     <td width="125"><font  class="strong">&nbsp;使用记录:</font></td>
  189.                     <%
  190.                     if (equipmentValue.getEquipmentCode().equals(""))
  191.                     {
  192.                     %>
  193.                     <td width="424">还未增加资产编号和使用者信息</td>
  194.                     <%
  195.                     }
  196.                     else
  197.                     {
  198.                     %>
  199.                     <td width="424"><a href="/mainctrl/equipmentUseList?equipmentId=<%= sId%>">查看使用记录</a></td>
  200.                    <%}%>
  201.                   </tr>
  202.                   <tr bgcolor="#fafafa" height="30"> 
  203.                     <td colspan="2"> 
  204.                       <div align="center"> 
  205.                         <input type="button" name="Submit2" value="删除" class="file" onClick=toDelete()>&nbsp;&nbsp;
  206.                         <input type="button" name="Submit22" value="修改" class="file" onClick=toModify()>&nbsp;&nbsp;                        
  207.                         <input type="button" name="Submit25" value="返回" class="file" onClick="toBack()">
  208.                       </div>
  209.                     </td>
  210.                   </tr>
  211.                 </table>
  212.               </td>
  213.             </tr>
  214.           </table>
  215.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  216.        </TD>
  217.      </TR>
  218.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  219.     </TBODY> 
  220.   </TABLE>
  221.     <BR>
  222.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  223. </form>
  224. </DIV>
  225. </BODY>
  226. </HTML>