printDeviceList.jsp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <%@ page language="java" contentType="text/html; charset=GBK"
  2. pageEncoding="GBK"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  4. <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  6. <html>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=GBK">
  9. <script type="text/javascript"
  10. src="${pageContext.request.contextPath }/controls/print/plugPrint.js"></script>
  11. <!--media=print 这个属性可以在打印时有效-->
  12. <style media=print>
  13. .Noprint {
  14. display: none;
  15. }
  16. .PageNext {
  17. page-break-after: always;
  18. }
  19. </style>
  20. <style type="text/css">
  21. body {
  22. font-size: 12pt;
  23. }
  24. .auditOpionin_left_td {
  25. border-left: 1px solid #000000;
  26. border-bottom: 0px solid #000000;
  27. border-right: 1px solid #000000;
  28. }
  29. .auditOpionin_right_td {
  30. border-bottom: 0px solid #000000;
  31. border-right: 1px solid #000000;
  32. }
  33. .auditOpionin_div {
  34. padding-left: 10px;
  35. padding-top: 10px;
  36. margin-bottom: 10px;
  37. }
  38. .auditOpionin_content_left_td {
  39. border-left: 1px solid #000000;
  40. border-bottom: 1px solid #000000;
  41. border-right: 1px solid #000000;
  42. padding-left: 10px;
  43. }
  44. .auditOpionin_content_right_td {
  45. border-bottom: 1px solid #000000;
  46. border-right: 1px solid #000000;
  47. padding-left: 10px;
  48. }
  49. .ctd {
  50. margin: 5px;
  51. padding: 5px;
  52. }
  53. .tdp {
  54. border-bottom: 1 2px solid #000000 #000000;
  55. border-left: 1 2px solid #000000 #000000;
  56. border-right: 0 2px solid #000000 #ffffff;
  57. border-top: 0 2px solid #000000 #ffffff;
  58. }
  59. .tabp {
  60. border-color: #000000 #000000 #000000 #000000;
  61. border: 2px solid #000000;
  62. border-top-width: 2px;
  63. border-right-width: 2px;
  64. border-bottom-width: 1px;
  65. border-left-width: 1px;
  66. }
  67. .NOPRINT {
  68. font-family: "宋体";
  69. font-size: 9pt;
  70. }
  71. ul {
  72. list-style: none;
  73. margin: 0;
  74. padding: 0;
  75. }
  76. ul li {
  77. line-height: 28px;
  78. }
  79. #mdA table,#mdA table td,#mdA table th{border:1px solid #000000;border-collapse:collapse;}
  80. </style>
  81. <title>设备台帐列表</title>
  82. <script language="javascript" type="text/javascript">
  83. //****************************************************************
  84. //* 名  称:formPrintit
  85. //* 功 能:打印
  86. //* 作 者: 章家明
  87. //* 入口参数:
  88. //* 出口参数:
  89. //*****************************************************************
  90. function formPrintit(isZong, isSelectPrinter) {
  91. setupHeaderAndFooter("", "");
  92. setupMargin("1", "28", "28", "28", "28");
  93. printit(isZong, isSelectPrinter);
  94. }
  95. //****************************************************************
  96. //* 名  称:formPageSetup
  97. //* 功 能:打印设置
  98. //* 作 者: 章家明
  99. //* 入口参数:
  100. //* 出口参数:
  101. //*****************************************************************
  102. function formPageSetup() {
  103. setupHeaderAndFooter("", "");
  104. setupMargin("1", "28", "28", "28", "28");
  105. popPageSetup();
  106. }
  107. //****************************************************************
  108. //* 名  称:formPreview
  109. //* 功 能:打印预览
  110. //* 作 者: 章家明
  111. //* 入口参数:
  112. //* 出口参数:
  113. //*****************************************************************
  114. function formPreview() {
  115. setupHeaderAndFooter("", "");
  116. setupMargin("1", "28", "28", "28", "28");
  117. popPreview();
  118. }
  119. function printWindow() {
  120. factory.printing.header = "This is MeadCo";
  121. factory.printing.footer = "Printing by ScriptX";
  122. factory.printing.portrait = false;
  123. factory.printing.leftMargin = 1.0;
  124. factory.printing.topMargin = 1.0;
  125. factory.printing.rightMargin = 1.0;
  126. factory.printing.bottomMargin = 1.0;
  127. // factory.printing.Print(false);
  128. factory.printing.Preview();
  129. }
  130. </script>
  131. </head>
  132. <body onload="">
  133. <table width="100%" cellpadding="0" cellspacing="0" class="hl hr"
  134. bordercolor="#000000" align="center">
  135. <tr class="Noprint">
  136. <td align="center">
  137. <%-- <object id="xprint" name="xprint" style="display:none" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="${pageContext.request.contextPath }/controls/print/smsx.cab#version=6,5,439,72"></object> --%>
  138. <object id="factory" viewastext style="display: none"
  139. classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
  140. codebase="${pageContext.request.contextPath}/controls/print/smsx.cab#Version=7,0,0,8">
  141. </object> <input type=button value="选择打印" onclick="formPrintit(false, true)">
  142. <input type=button value="直接打印" onclick="formPrintit(true, false)">
  143. <input type=button value="页面设置" onclick="formPageSetup()"> <input
  144. type=button value="打印预览" onclick="formPreview()">
  145. </td>
  146. </tr>
  147. </table>
  148. <br />
  149. <div align="center"><font size="5">设备台帐列表</font></div>
  150. <div id="mdA" style="margin-top: 4px">
  151. <table cellpadding="0" width="90%" cellspacing="0" align="center" class="print">
  152. <tr align="center">
  153. <td>设备类别</td>
  154. <td>设备编码</td>
  155. <td>设备名称</td>
  156. <td>价格</td>
  157. <td>规格型号</td>
  158. <td>品牌</td>
  159. <td>采购日期</td>
  160. <td>入库日期</td>
  161. <td>设备状态</td>
  162. </tr>
  163. <c:forEach items="${deviceList }" var="device">
  164. <tr align="center">
  165. <td>${device.dev_type_name }</td>
  166. <td>${device.dev_code }</td>
  167. <td>${device.dev_name }</td>
  168. <td>${device.dev_price }</td>
  169. <td>${device.dev_model }</td>
  170. <td>${device.dev_brand }</td>
  171. <td>${device.dev_buy_date }</td>
  172. <td>${device.dev_stock_date }</td>
  173. <td>${device.dev_status_name }</td>
  174. </tr>
  175. </c:forEach>
  176. </table>
  177. </div>
  178. </body>
  179. </html>