detailPrint.html 7.6 KB

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