maintenanceReport.jsp 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
  5. <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  7. <html>
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  10. <title>车辆维保统计</title>
  11. <script type="text/javascript"src="${pageContext.request.contextPath }/controls/print/plugPrint.js"></script>
  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. body {
  23. font-size: 12pt;
  24. }
  25. .auditOpionin_left_td {
  26. border-left: 1px solid #000000;
  27. border-bottom: 0px solid #000000;
  28. border-right: 1px solid #000000;
  29. }
  30. .auditOpionin_right_td {
  31. border-bottom: 0px solid #000000;
  32. border-right: 1px solid #000000;
  33. }
  34. .auditOpionin_div {
  35. padding-left: 10px;
  36. padding-top: 10px;
  37. margin-bottom: 10px;
  38. }
  39. .auditOpionin_content_left_td {
  40. border-left: 1px solid #000000;
  41. border-bottom: 1px solid #000000;
  42. border-right: 1px solid #000000;
  43. padding-left: 10px;
  44. }
  45. .auditOpionin_content_right_td {
  46. border-bottom: 1px solid #000000;
  47. border-right: 1px solid #000000;
  48. padding-left: 10px;
  49. }
  50. .ctd {
  51. margin: 5px;
  52. padding: 5px;
  53. }
  54. .tdp {
  55. border-bottom: 1 2px solid #000000 #000000;
  56. border-left: 1 2px solid #000000 #000000;
  57. border-right: 0 2px solid #000000 #ffffff;
  58. border-top: 0 2px solid #000000 #ffffff;
  59. }
  60. .tabp {
  61. border-color: #000000 #000000 #000000 #000000;
  62. border: 2px solid #000000;
  63. border-top-width: 2px;
  64. border-right-width: 2px;
  65. border-bottom-width: 1px;
  66. border-left-width: 1px;
  67. }
  68. .NOPRINT {
  69. font-family: "宋体";
  70. font-size: 9pt;
  71. }
  72. ul {
  73. list-style: none;
  74. margin: 0;
  75. padding: 0;
  76. }
  77. ul li {
  78. line-height: 28px;
  79. }
  80. #mdA table,#mdA table td,#mdA table th{border:1px solid #000000;border-collapse:collapse;}
  81. </style>
  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>
  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="factory" viewastext style="display: none"
  138. classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
  139. codebase="${pageContext.request.contextPath}/controls/print/smsx.cab#Version=7,0,0,8">
  140. </object> <input type=button value="选择打印" onclick="formPrintit(false, true)">
  141. <input type=button value="直接打印" onclick="formPrintit(true, false)">
  142. <input type=button value="页面设置" onclick="formPageSetup()"> <input
  143. type=button value="打印预览" onclick="formPreview()">
  144. </td>
  145. </tr>
  146. </table>
  147. <br />
  148. <div id="mdA" style="margin-top: 4px">
  149. <table class="print" width="1200" style="border-collapse: collapse; margin: 0px auto;text-align: center;" border="1">
  150. <tr height="100px;">
  151. <th colspan="10"><font size="6">车辆维保统计报表</font></th>
  152. </tr>
  153. <tr height="30px;">
  154. <c:if test="${requestScope.start_time == '' && requestScope.end_time == ''}">
  155. <th colspan="20" style="text-align: left;">统计日期:&nbsp;&nbsp; /至/</th>
  156. </c:if>
  157. <c:if test="${requestScope.start_time != '' && requestScope.end_time == ''}">
  158. <th colspan="20" style="text-align: left;">统计日期:&nbsp;&nbsp; ${requestScope.start_time }至/</th>
  159. </c:if>
  160. <c:if test="${requestScope.start_time == '' && requestScope.end_time != ''}">
  161. <th colspan="20" style="text-align: left;">统计日期:&nbsp;&nbsp; /至${requestScope.end_time }</th>
  162. </c:if>
  163. <c:if test="${requestScope.start_time != '' && requestScope.end_time != ''}">
  164. <th colspan="20" style="text-align: left;">统计日期:&nbsp;&nbsp; ${requestScope.start_time }至${requestScope.end_time }</th>
  165. </c:if>
  166. </tr>
  167. <c:if test="${requestScope.fees != null}">
  168. <c:forEach var="list" items="${requestScope.fees}" varStatus="index">
  169. <c:forEach var="listO" items="${list.lists}" varStatus="status">
  170. <tr>
  171. <td width="100px">车牌号:<br/><br/>${listO['plate_number']}</td>
  172. <td width="100px;">是否保养:<br/><br/>
  173. <c:if test="${1==listO['if_maintain']}">
  174. </c:if>
  175. <c:if test="${2==listO['if_maintain']}">
  176. </c:if>
  177. </td>
  178. <td width="100px;">送修时间:<br/><br/><c:out value="${fn:substring(listO['repair_date'],0,16)}"/></td>
  179. <td width="100px;">取车时间:<br/><br/><c:out value="${fn:substring(listO['take_date'],0,16)}"/></td>
  180. <td width="100px;">维修费用:<br/><br/>
  181. <fmt:formatNumber value="${listO['money']}" pattern="#.##" minFractionDigits="2" />
  182. </td>
  183. <td width="170px;">送修原因:<br/><br/>${listO['repair_reason']}</td>
  184. <td>维修配件
  185. <table class="print" style="border-collapse: collapse; margin: 0px auto;text-align: center;" border="1">
  186. <tr>
  187. <td width="50px;">序号</td>
  188. <td width="100px;">维修项目</td>
  189. <td width="100px;">配件名称</td>
  190. <td width="50px;">单价</td>
  191. <td width="50px;">数量</td>
  192. <td width="100px;">计量单位</td>
  193. <td width="50px;">工时费</td>
  194. <td width="50px;">小计</td>
  195. </tr>
  196. <c:set var="idMountings" value="xx${listO['universalid']}"></c:set>
  197. <c:set var="total" value="0"></c:set>
  198. <c:forEach items="${list[idMountings]}" var="mountings" varStatus="i">
  199. <tr>
  200. <td width="50px;">${i.index+1}</td>
  201. <td width="100px;">${mountings.service_project}</td>
  202. <td width="100px;">${mountings.mountings_name}</td>
  203. <td width="50px;"><fmt:formatNumber value="${mountings.unit_price}" pattern="#.##" minFractionDigits="2" /></td>
  204. <td width="50px;">${mountings.number}</td>
  205. <td width="50px;">${mountings.unit}</td>
  206. <td width="50px;"><fmt:formatNumber value="${mountings.work_fee}" pattern="#.##" minFractionDigits="2" /></td>
  207. <td width="50px;"><fmt:formatNumber value="${mountings.unit_price*mountings.number+mountings.work_fee}" pattern="#.##" minFractionDigits="2" /></td>
  208. <c:set var="total" value="${total+mountings.sum}"></c:set>
  209. </tr>
  210. </c:forEach>
  211. <tr>
  212. <td colspan="7">总计:</td>
  213. <td><fmt:formatNumber value="${total}" pattern="#.##" minFractionDigits="2" /></td>
  214. </tr>
  215. </table>
  216. </td>
  217. </tr>
  218. </c:forEach>
  219. </c:forEach>
  220. </c:if>
  221. <c:if test="${fn:length(requestScope.fees)==0}">
  222. <tr>
  223. <th colspan="10" style="text-align: content: ;">没有找到数据</th>
  224. </tr>
  225. </c:if>
  226. </table>
  227. </div>
  228. </body>
  229. </html>