reportPurchaseOrder.jsp 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  8. <title>采购综合报表</title>
  9. <object id="factory" style="display: none" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="/ynet/controls/print/smsx.cab#Version=6,3,435,20"> </object>
  10. <script type="text/javascript" src="controls/print/plugPrint.js"></script>
  11. <link rel="stylesheet" type="text/css" href="controls/print/print.css">
  12. <!--media=print 这个属性可以在打印时有效-->
  13. <style media=print>
  14. .Noprint {
  15. display: none;
  16. }
  17. .PageNext {
  18. page-break-after: always;
  19. }
  20. </style>
  21. <style type="text/css">
  22. table{
  23. width:100%;
  24. }
  25. .print td{
  26. padding-top:2px;
  27. height:30px;
  28. text-align:center;
  29. }
  30. .commont{
  31. height:30px;
  32. margin-top:30px;
  33. text-align:left;
  34. font-weight:bold;
  35. font-size:15px;
  36. }
  37. .fncBtn {
  38. width: 100%;
  39. background: #e5ecf9;
  40. height: 30px;
  41. padding-top: 3px;
  42. text-align:center;
  43. }
  44. .btn {
  45. height: 25px;
  46. line-height: 20px;
  47. }
  48. </style>
  49. <script defer>
  50. function load() {
  51. if (!factory.object) {
  52. } else {
  53. // -- advanced features
  54. factory.printing.SetMarginMeasure(2); // measure margins in inches
  55. factory.printing.printer = "HP DeskJet 870C";
  56. factory.printing.paperSize = "A4";
  57. factory.printing.paperSource = "Manual feed";
  58. factory.printing.collate = true;
  59. factory.printing.copies = 2;
  60. factory.printing.SetPageRange(false, 1, 3); // need pages from 1 to 3
  61. // -- basic features
  62. factory.printing.header = "This is MeadCo";
  63. factory.printing.footer = "Printing by ScriptX";
  64. factory.printing.portrait = true;
  65. factory.printing.leftMargin = 5.0;
  66. factory.printing.topMargin = 5.0;
  67. factory.printing.rightMargin = 5.0;
  68. factory.printing.bottomMargin = 5.0;
  69. }
  70. }
  71. </script>
  72. <script language="javascript">
  73. //****************************************************************
  74. //* 名  称:formPrintit
  75. //* 功 能:打印
  76. //* 作 者: 章家明
  77. //* 入口参数:
  78. //* 出口参数:
  79. //*****************************************************************
  80. function formPrintit(isZong, isSelectPrinter) {
  81. setupHeaderAndFooter("", "");
  82. setupMargin("1", "28", "28", "28", "28");
  83. printit(isZong, isSelectPrinter);
  84. }
  85. //****************************************************************
  86. //* 名  称:formPageSetup
  87. //* 功 能:打印设置
  88. //* 作 者: 章家明
  89. //* 入口参数:
  90. //* 出口参数:
  91. //*****************************************************************
  92. function formPageSetup() {
  93. setupHeaderAndFooter("", "");
  94. setupMargin("1", "28", "28", "28", "28");
  95. popPageSetup();
  96. }
  97. //****************************************************************
  98. //* 名  称:formPreview
  99. //* 功 能:打印预览
  100. //* 作 者: 章家明
  101. //* 入口参数:
  102. //* 出口参数:
  103. //*****************************************************************
  104. function formPreview() {
  105. setupHeaderAndFooter("", "");
  106. setupMargin("1", "28", "28", "28", "28");
  107. popPreview();
  108. }
  109. </script>
  110. </head>
  111. <body onload="load()">
  112. <div class="fncBtn Noprint">
  113. <input type="button" class="l-button" value="选择打印" onclick="formPrintit(false, true)">
  114. <input type="button" class="l-button" value="直接打印" onclick="formPrintit(true, false)">
  115. <input type="button" class="l-button" value="页面设置" onclick="formPageSetup()">
  116. <input type="button" class="l-button" value="打印预览" onclick="formPreview()">
  117. </div>
  118. <table class="print" style="border-collapse: collapse; margin: 0px auto; text-align: center;" border="1">
  119. <tr >
  120. <th colspan="8">
  121. <span>
  122. <font size="6">采购综合报表报表</font>
  123. </span>
  124. </th>
  125. </tr>
  126. <tr>
  127. <td width="12.5%">采购单号</td>
  128. <td width="12.5%">采购单主题</td>
  129. <td width="12.5%">供应商名称 </td>
  130. <td width="12.5%">采购日期</td>
  131. <td width="12.5%">采购负责人</td>
  132. <td width="12.5%">采购总额 </td>
  133. <td width="12.5%">采购状态</td>
  134. <td width="12.5%">付款状态</td>
  135. </tr>
  136. <c:forEach items="${requestScope.purchaseOrderList }" var="purchaseOrder">
  137. <tr>
  138. <td width="12.5%">${purchaseOrder.purchase_number }</td>
  139. <td width="12.5%">${purchaseOrder.purchase_theme }</td>
  140. <td width="12.5%">${purchaseOrder.purchase_suppliers_name }</td>
  141. <td width="12.5%">${purchaseOrder.purchase_date }</td>
  142. <td width="12.5%">${purchaseOrder.purchase_assigned_user_name }</td>
  143. <td width="12.5%">${purchaseOrder.purchase_after_amount }</td>
  144. <td width="12.5%">
  145. <c:forEach items="${requestScope.purchase_status}" var="purchase_status">
  146. <c:if test="${purchase_status.dvalue==purchaseOrder.purchase_status}">
  147. ${purchase_status.dname }
  148. </c:if>
  149. </c:forEach>
  150. </td>
  151. <td width="12.5%">
  152. <c:forEach items="${requestScope.purchase_payment_method}" var="purchase_payment_method">
  153. <c:if test="${purchase_payment_method.dvalue==purchaseOrder.purchase_payment_method}">
  154. ${purchase_payment_method.dname }
  155. </c:if>
  156. </c:forEach>
  157. </td>
  158. </tr>
  159. </c:forEach>
  160. </table>
  161. </body>
  162. </html>