stockStatis.jsp 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  3. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/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=GBK">
  8. <title>存货价值统计报表</title>
  9. <script type="text/javascript" src="${pageContext.request.contextPath }/controls/print/plugPrint.js"></script>
  10. <!--media=print 这个属性可以在打印时有效-->
  11. <style media=print>
  12. .Noprint {
  13. display: none;
  14. }
  15. .PageNext {
  16. page-break-after: always;
  17. }
  18. </style>
  19. <style type="text/css">
  20. body {
  21. font-size: 12pt;
  22. }
  23. .auditOpionin_left_td {
  24. border-left: 1px solid #000000;
  25. border-bottom: 0px solid #000000;
  26. border-right: 1px solid #000000;
  27. }
  28. .auditOpionin_right_td {
  29. border-bottom: 0px solid #000000;
  30. border-right: 1px solid #000000;
  31. }
  32. .auditOpionin_div {
  33. padding-left: 10px;
  34. padding-top: 10px;
  35. margin-bottom: 10px;
  36. }
  37. .auditOpionin_content_left_td {
  38. border-left: 1px solid #000000;
  39. border-bottom: 1px solid #000000;
  40. border-right: 1px solid #000000;
  41. padding-left: 10px;
  42. }
  43. .auditOpionin_content_right_td {
  44. border-bottom: 1px solid #000000;
  45. border-right: 1px solid #000000;
  46. padding-left: 10px;
  47. }
  48. .ctd {
  49. margin: 5px;
  50. padding: 5px;
  51. }
  52. .tdp {
  53. border-bottom: 1 2px solid #000000 #000000;
  54. border-left: 1 2px solid #000000 #000000;
  55. border-right: 0 2px solid #000000 #ffffff;
  56. border-top: 0 2px solid #000000 #ffffff;
  57. }
  58. .tabp {
  59. border-color: #000000 #000000 #000000 #000000;
  60. border: 2px solid #000000;
  61. border-top-width: 2px;
  62. border-right-width: 2px;
  63. border-bottom-width: 1px;
  64. border-left-width: 1px;
  65. }
  66. .NOPRINT {
  67. font-family: "宋体";
  68. font-size: 9pt;
  69. }
  70. ul {
  71. list-style: none;
  72. margin: 0;
  73. padding: 0;
  74. }
  75. ul li {
  76. line-height: 28px;
  77. }
  78. #mdA table,#mdA table td,#mdA table th{border:1px solid #000000;border-collapse:collapse;}
  79. </style>
  80. <script language="javascript" type="text/javascript">
  81. //****************************************************************
  82. //* 名  称:formPrintit
  83. //* 功 能:打印
  84. //* 作 者: 章家明
  85. //* 入口参数:
  86. //* 出口参数:
  87. //*****************************************************************
  88. function formPrintit(isZong, isSelectPrinter) {
  89. setupHeaderAndFooter("", "");
  90. setupMargin("1", "28", "28", "28", "28");
  91. printit(isZong, isSelectPrinter);
  92. }
  93. //****************************************************************
  94. //* 名  称:formPageSetup
  95. //* 功 能:打印设置
  96. //* 作 者: 章家明
  97. //* 入口参数:
  98. //* 出口参数:
  99. //*****************************************************************
  100. function formPageSetup() {
  101. setupHeaderAndFooter("", "");
  102. setupMargin("1", "28", "28", "28", "28");
  103. popPageSetup();
  104. }
  105. //****************************************************************
  106. //* 名  称:formPreview
  107. //* 功 能:打印预览
  108. //* 作 者: 章家明
  109. //* 入口参数:
  110. //* 出口参数:
  111. //*****************************************************************
  112. function formPreview() {
  113. setupHeaderAndFooter("", "");
  114. setupMargin("1", "28", "28", "28", "28");
  115. popPreview();
  116. }
  117. function printWindow() {
  118. factory.printing.header = "This is MeadCo";
  119. factory.printing.footer = "Printing by ScriptX";
  120. factory.printing.portrait = false;
  121. factory.printing.leftMargin = 1.0;
  122. factory.printing.topMargin = 1.0;
  123. factory.printing.rightMargin = 1.0;
  124. factory.printing.bottomMargin = 1.0;
  125. // factory.printing.Print(false);
  126. factory.printing.Preview();
  127. }
  128. </script>
  129. </head>
  130. <body>
  131. <table width="100%" cellpadding="0" cellspacing="0" class="hl hr"
  132. bordercolor="#000000" align="center">
  133. <tr class="Noprint">
  134. <td align="center">
  135. <%-- <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> --%>
  136. <object id="factory" viewastext style="display: none"
  137. classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
  138. codebase="${pageContext.request.contextPath}/controls/print/smsx.cab#Version=7,0,0,8">
  139. </object> <input type=button value="选择打印" onclick="formPrintit(false, true)">
  140. <input type=button value="直接打印" onclick="formPrintit(true, false)">
  141. <input type=button value="页面设置" onclick="formPageSetup()"> <input
  142. type=button value="打印预览" onclick="formPreview()">
  143. </td>
  144. </tr>
  145. </table>
  146. <br />
  147. <div id="mdA" style="margin-top: 4px">
  148. <table cellpadding="0" width="1000" cellspacing="0" align="center" class="print">
  149. <tr>
  150. <th>存货名称</th>
  151. <th>存货类别</th>
  152. <th>规格型号</th>
  153. <th>存货编码</th>
  154. <th>仓库</th>
  155. <th>单位</th>
  156. <th>数量</th>
  157. <th>单价</th>
  158. <th>库存价值(单价)</th>
  159. <th>成本价</th>
  160. <th>库存价值(成本价)</th>
  161. </tr>
  162. <c:forEach items="${stockStatisList }" var="ssl">
  163. <tr>
  164. <td>${ssl.product_name }</td>
  165. <td>${ssl.ptype_name }</td>
  166. <td>${ssl.product_mode }</td>
  167. <td>${ssl.product_num }</td>
  168. <td>${ssl.depot_name }</td>
  169. <td>${ssl.product_unit }</td>
  170. <td>${ssl.stock_product_count }</td>
  171. <td><fmt:formatNumber value="${ssl.product_buy_price }" pattern="#.##" minFractionDigits="2" /></td>
  172. <td><fmt:formatNumber value="${ssl.price_total }" pattern="#.##" minFractionDigits="2" /></td>
  173. <td><fmt:formatNumber value="${ssl.product_cost }" pattern="#.##" minFractionDigits="2" /></td>
  174. <td><fmt:formatNumber value="${ssl.cost_total }" pattern="#.##" minFractionDigits="2" /></td>
  175. </tr>
  176. </c:forEach>
  177. <tr>
  178. <td colspan="10" align="right">总计(单价)</td>
  179. <td><fmt:formatNumber value="${sumPriceTotal}" pattern="#.##" minFractionDigits="2" /></td>
  180. </tr>
  181. <tr>
  182. <td colspan="10" align="right">总计(成本价)</td>
  183. <td><fmt:formatNumber value="${sumCostTotal}" pattern="#.##" minFractionDigits="2" /></td>
  184. </tr>
  185. </table>
  186. </div>
  187. </body>
  188. </html>