detailPrint.html 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  6. <title>打印收费明细</title>
  7. <style type="text/css">
  8. body {
  9. left: 0px;
  10. top: 0px;
  11. right: 0px;
  12. bottom: 0px;
  13. margin: 0px;
  14. font-family: Arial, Helvetica, sans-serif;
  15. font-size: 12px;
  16. overflow: hidden;
  17. white-space: nowrap;
  18. }
  19. </style>
  20. <script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
  21. <script src="../../static/print/jquery.jPrintArea.js" type="text/javascript"></script>
  22. <script src="../../static/sa.js"></script>
  23. </head>
  24. <body>
  25. <div>
  26. <input type="button" style="height: 30;" id="print_button" value="打印"/>
  27. <fieldset align="">
  28. <legend>打印区</legend>
  29. <div id="myPrintArea" style="height: 1500;">
  30. <div align="center">
  31. <SPAN style="TEXT-DECORATION: underline;font-size:25px">收费记录明细</SPAN>
  32. <br/><br/>
  33. </div>
  34. <div style="text-align:center; font-size:15px;he">
  35. <table id="dp" width="100%" style="border-collapse:collapse;border:none;">
  36. <tr height="80">
  37. <td style="border:solid #000 1px;text-align: left;" colspan="5">单位:广西东兴北投口岸投资有限公司</td>
  38. <td style="border:solid #000 1px;text-align: center;" colspan="8">金额单位:元</td>
  39. <td style="border:solid #000 1px;text-align: right;" colspan="6">
  40. <div id="time" align="right"></div>
  41. </td>
  42. </tr>
  43. <tr height="80">
  44. <td style="border:solid #000 1px; ">序号</td>
  45. <td style="border:solid #000 1px; ">车牌号</td>
  46. <td style="border:solid #000 1px; ">收费项目</td>
  47. <td style="border:solid #000 1px; ">业务类型</td>
  48. <td style="border:solid #000 1px; ">车型</td>
  49. <td style="border:solid #000 1px; ">数量</td>
  50. <td style="border:solid #000 1px; ">单价</td>
  51. <td style="border:solid #000 1px; ">总价</td>
  52. <td style="border:solid #000 1px; ">结算状态</td>
  53. <td style="border:solid #000 1px; ">税率</td>
  54. <td style="border:solid #000 1px; ">税款</td>
  55. <td style="border:solid #000 1px; ">不含税金额</td>
  56. <td style="border:solid #000 1px; ">收款方式</td>
  57. <td style="border:solid #000 1px; ">业务单号</td>
  58. <td style="border:solid #000 1px; ">企业名称</td>
  59. <td style="border:solid #000 1px; ">付款时间</td>
  60. <td style="border:solid #000 1px; ">开单员</td>
  61. <td style="border:solid #000 1px; ">复核员</td>
  62. <td style="border:solid #000 1px; ">统计稽查员</td>
  63. </tr>
  64. </table>
  65. </div>
  66. <div align="center">
  67. <br/><br/>
  68. <SPAN style=";font-size:15px">
  69. 收费统计员:
  70. &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
  71. 收费核对员:
  72. &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
  73. 收费员:
  74. </SPAN>
  75. </div>
  76. </div>
  77. </fieldset>
  78. </div>
  79. <script type="text/javascript">
  80. $(function () {
  81. $("#print_button").click(function () {
  82. $("#myPrintArea").printArea();
  83. });
  84. function getUrlParam(name) {
  85. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
  86. var r = window.location.search.substr(1).match(reg); //匹配目标参数
  87. if (r != null) return unescape(r[2]);
  88. return null; //返回参数值
  89. }
  90. var beginTime = getUrlParam('beginTime');
  91. beginTime = beginTime != '' ? beginTime : null;
  92. var endTime = getUrlParam('endTime');
  93. endTime = endTime != '' ? endTime : null;
  94. var feeType = getUrlParam('feeType');
  95. feeType = feeType != '' ? feeType : null;
  96. var itemTypeName = getUrlParam('itemTypeName');
  97. itemTypeName = itemTypeName != '' ? itemTypeName : null;
  98. console.log("beginTime" + beginTime);
  99. console.log(endTime);
  100. $.ajax({
  101. url: sa.cfg.api_url + '/TbFeeDetails/prePrint',
  102. data: {
  103. "beginTime": beginTime,
  104. "endTime": endTime,
  105. "feeType": feeType,
  106. "itemTypeName": itemTypeName
  107. },
  108. type: 'get', // 请求类型,常用的有 GET 和 POST
  109. success: function (data) { // 接口调用成功回调函数
  110. var html = [];
  111. var list = data.data.list;
  112. for (var i = 0; i < list.length; i++) {
  113. if (list[i]['itemName'] == null) {
  114. list[i]['itemName'] = "";
  115. }
  116. if (list[i]['customerName'] == null) {
  117. list[i]['customerName'] = "";
  118. }
  119. html.push(
  120. "<tr height=\"60\"><td style=\"border:solid #000 1px; \">" + list[i]['index'] +
  121. "</td><td style=\"border:solid #000 1px; \">" + list[i]['carNo'] +
  122. "</td><td style=\"border:solid #000 1px; \">" + list[i]['feeType'] +
  123. "</td><td style=\"border:solid #000 1px; \">" + list[i]['itemTypeName'] +
  124. "</td><td style=\"border:solid #000 1px; \">" + list[i]['itemName'] +
  125. "</td><td style=\"border:solid #000 1px; \">" + list[i]['num'] +
  126. "</td><td style=\"border:solid #000 1px; \">" + list[i]['unitPrice'] +
  127. "</td><td style=\"border:solid #000 1px; \">" + list[i]['itemPrice'] +
  128. "</td><td style=\"border:solid #000 1px; \">" + list[i]['settle'] +
  129. "</td><td style=\"border:solid #000 1px; \">" + list[i]['taxRate'] +
  130. "</td><td style=\"border:solid #000 1px; \">" + list[i]['taxPrice'] +
  131. "</td><td style=\"border:solid #000 1px; \">" + list[i]['noTaxPrice'] +
  132. "</td><td style=\"border:solid #000 1px; \">" + list[i]['payType'] +
  133. "</td><td style=\"border:solid #000 1px; \">" + list[i]['businessNo'] +
  134. "</td><td style=\"border:solid #000 1px; \">" + list[i]['customerName'] +
  135. "</td><td style=\"border:solid #000 1px; \">" + list[i]['payTime'] +
  136. "</td><td style=\"border:solid #000 1px; \">" + list[i]['kaiDanPerson'] +
  137. "</td><td style=\"border:solid #000 1px; \">" + list[i]['diaoDuPerson'] +
  138. "</td><td style=\"border:solid #000 1px; \">" + list[i]['jiChaPerson'] + "</td></tr>"
  139. )
  140. }
  141. var allDayFee = data.data.allDayFee;
  142. var allDayTaxes = data.data.allDayTaxes;
  143. var allDayNoTaxFee = data.data.allDayNoTaxFee;
  144. html.push(
  145. "<tr height=\"60\"><td style=\"border:solid #000 1px; \">" + "合计" +
  146. "</td><td style=\"border:solid #000 1px; \">" +
  147. "</td><td style=\"border:solid #000 1px; \">" +
  148. "</td><td style=\"border:solid #000 1px; \">" +
  149. "</td><td style=\"border:solid #000 1px; \">" +
  150. "</td><td style=\"border:solid #000 1px; \">" +
  151. "</td><td style=\"border:solid #000 1px; \">" +
  152. "</td><td style=\"border:solid #000 1px; \">" + allDayFee +
  153. "</td><td style=\"border:solid #000 1px; \">" +
  154. "</td><td style=\"border:solid #000 1px; \">" +
  155. "</td><td style=\"border:solid #000 1px; \">" + allDayTaxes +
  156. "</td><td style=\"border:solid #000 1px; \">" + allDayNoTaxFee +
  157. "</td><td style=\"border:solid #000 1px; \">" +
  158. "</td><td style=\"border:solid #000 1px; \">" +
  159. "</td><td style=\"border:solid #000 1px; \">" +
  160. "</td><td style=\"border:solid #000 1px; \">" +
  161. "</td><td style=\"border:solid #000 1px; \">" +
  162. "</td><td style=\"border:solid #000 1px; \">" +
  163. "</td><td style=\"border:solid #000 1px; \"></td></tr>"
  164. )
  165. $("#dp").append(html.join(''));
  166. $("#time").html("期间:" + data.data.time);
  167. $("#myPrintArea").printArea();
  168. }
  169. });
  170. });
  171. </script>
  172. </body>
  173. </html>