detailPrint.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "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. @page {
  9. size: A4 landscape;
  10. margin: 19mm 25mm 15mm 25mm;
  11. }
  12. .print-btn {
  13. color: white;
  14. background: #2D8CF0;
  15. border: none;
  16. border-radius: 3px;
  17. padding: 5px 10px;
  18. font-size: 10px;
  19. margin: 10px 20px;
  20. cursor: pointer;
  21. }
  22. .content-box {
  23. text-align: center;
  24. /* width: 1123px; */
  25. height: 794px;
  26. margin: 0 auto;
  27. }
  28. table {
  29. border-collapse: collapse;
  30. border-spacing: 0;
  31. border-left: 1px solid #888;
  32. border-top: 1px solid #888;
  33. }
  34. th,
  35. td {
  36. border-right: 1px solid #888;
  37. border-bottom: 1px solid #888;
  38. word-break: break-all;
  39. padding: 0 2px;
  40. }
  41. th {
  42. /* font-weight: bold; */
  43. }
  44. .title-top {
  45. margin-top: 248px;
  46. }
  47. </style>
  48. <link rel="stylesheet" href="../../static/sa.css">
  49. <script src="../../static/kj/vue.min.js"></script>
  50. <script src="../../static/kj/element-ui/index.js"></script>
  51. <script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
  52. <script src="../../static/print/print2.js" type="text/javascript"></script>
  53. <script src="../../static/kj/layer/layer.js"></script>
  54. <script src="../../static/sa.js"></script>
  55. </head>
  56. <body>
  57. <div>
  58. <div class="box">
  59. <button class="print-btn" @click="printFn">打印</button>
  60. <div id="myPrintArea" style="position: relative;">
  61. <div class="content-box" style="position: relative;"
  62. v-for="(item,index) in dataList" :class="index>0?'title-top':''" :key="index">
  63. <div class="header-title" style="text-align: center;" v-if="index==0">
  64. <span style="font-size: 20px;">东兴口岸(二桥)进口货物集散区 (A1地块)收费记录明细</span>
  65. </div>
  66. <table style="margin: 0 auto;margin-top: 20px;text-align: center;width: 1123px;">
  67. <tr style="height: 60px;">
  68. <th colspan="8">单位:广西东兴北投口岸投资有限公司</th>
  69. <th colspan="5">金额单位:元</th>
  70. <th colspan="6">期间:{{item.time}}</th>
  71. </tr>
  72. <tr style="height: 40px;font-size:10px;">
  73. <th style="min-width: 30px;">序号</th>
  74. <th style="min-width: 60px;">车牌号</th>
  75. <th style="min-width: 50px;"> 收费项目</th>
  76. <th style="min-width: 70px;">业务类型</th>
  77. <th style="min-width: 90px;">车型</th>
  78. <th style="width: 25px;">数量</th>
  79. <th style="width: 30px;">单价</th>
  80. <th style="width: 60px;">总价</th>
  81. <th style="width: 70px;">税 款</th>
  82. <th style="width: 75px;">不含税金额</th>
  83. <th style="width: 30px;">税率</th>
  84. <th style="min-width: 50px;">结算状态</th>
  85. <th style="width: 65px;">收款方式</th>
  86. <th style="width: 90px;">业务单号</th>
  87. <th style="width: 90px;">作业公司</th>
  88. <th style="width: 60px;">开单员</th>
  89. <th style="width: 60px;">复核员</th>
  90. <th style="width: 65px;">统计稽查员</th>
  91. </tr>
  92. <tr v-for="cel in item.list" :key="cel.index" style="height: 55px;font-size: 10px;">
  93. <td>{{cel.index}}</td>
  94. <td>{{cel.carNo}}</td>
  95. <td>{{cel.feeType}}</td>
  96. <td>{{cel.itemTypeName}}</td>
  97. <td>{{cel.itemName}}</td>
  98. <td>{{cel.num}}</td>
  99. <td>{{cel.unitPrice}}</td>
  100. <td>{{cel.itemPrice}}</td>
  101. <td>{{cel.taxPrice}}</td>
  102. <td>{{cel.noTaxPrice}}</td>
  103. <td>{{cel.taxRate}}</td>
  104. <td>{{cel.settle}}</td>
  105. <td>{{cel.payMode}}</td>
  106. <td>{{cel.businessNo}}</td>
  107. <td>{{cel.pickCustomerName}}</td>
  108. <td>{{cel.kaiDanPerson}}</td>
  109. <td>{{cel.diaoDuPerson}}</td>
  110. <td>{{cel.jiChaPerson}}</td>
  111. </tr>
  112. <tr style="height: 60px;padding: 0 0.5px;" v-if="index==dataList.length-1">
  113. <td>合计</td>
  114. <td></td>
  115. <td></td>
  116. <td></td>
  117. <td></td>
  118. <td></td>
  119. <td></td>
  120. <td>{{allDayFee}}</td>
  121. <td>{{(allDayTaxes).toFixed(2)}}</td>
  122. <td>{{(allDayNoTaxFee).toFixed(2)}}</td>
  123. <td></td>
  124. <td></td>
  125. <td></td>
  126. <td></td>
  127. <td></td>
  128. <td></td>
  129. <td></td>
  130. <td></td>
  131. </tr>
  132. </table>
  133. <span style="position: absolute;top: 780px;left: 1050px">{{index+1}}/{{dataList.length}}</span>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. <script type="text/javascript">
  139. var app = new Vue({
  140. el: '.box',
  141. data: {
  142. p: {
  143. "beginTime": sa.p('beginTime', ''),
  144. "endTime": sa.p('endTime', ''),
  145. "feeType": sa.p('feeType', ''),
  146. "itemTypeName": sa.p('itemTypeName', ''),
  147. "ids": sa.p('ids', '')
  148. },
  149. dataList: [],
  150. allDayFee: 0,
  151. allDayTaxes: 0,
  152. allDayNoTaxFee: 0
  153. },
  154. methods: {
  155. getDataList() {
  156. sa.ajax('/TbFeeDetails/prePrint', this.p, function(resp) {
  157. let data = resp.data;
  158. this.allDayFee = data.allDayFee;
  159. this.allDayTaxes = data.allDayTaxes;
  160. this.allDayNoTaxFee = data.allDayNoTaxFee;
  161. var list = data.list;
  162. let len = list.length;
  163. let child = [];
  164. let dataList = [];
  165. for (i = 0; i < len; i++) {
  166. let item = list[i];
  167. child.push(item);
  168. if(child.length == 11&&dataList.length==0){
  169. let title = {
  170. time: this.p.ids ? "勾选打印" : this.p.beginTime ? this.p.beginTime +
  171. '至' + this.p.endTime : '所有时间',
  172. list: child
  173. }
  174. dataList.push(title);
  175. child = [];
  176. }
  177. if (child.length == 12 || i == len - 1) {
  178. let title = {
  179. time: this.p.ids ? "勾选打印" : this.p.beginTime ? this.p.beginTime +
  180. '至' + this.p.endTime : '所有时间',
  181. list: child
  182. }
  183. dataList.push(title);
  184. child = [];
  185. }
  186. }
  187. this.dataList = dataList;
  188. sa.loading("准备打印...");
  189. setTimeout(() => {
  190. this.printFn();
  191. sa.hideLoading();
  192. }, 2000)
  193. }.bind(this))
  194. },
  195. printFn() {
  196. Print('#myPrintArea', {
  197. noPrint: '.noPrint'
  198. });
  199. }
  200. },
  201. mounted() {
  202. this.getDataList();
  203. }
  204. })
  205. </script>
  206. </body>
  207. </html>