dayStatsPrint.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. @page {
  8. size: A4 landscape;
  9. margin: 19mm 25mm 15mm 25mm;
  10. }
  11. .print-btn {
  12. color: white;
  13. background: #2D8CF0;
  14. border: none;
  15. border-radius: 3px;
  16. padding: 5px 10px;
  17. font-size: 10px;
  18. margin: 10px 20px;
  19. cursor: pointer;
  20. }
  21. .content-box {
  22. text-align: center;
  23. height: 794px;
  24. width: 1123px;
  25. margin: 0 auto;
  26. }
  27. table {
  28. border-collapse: collapse;
  29. border-spacing: 0;
  30. border-left: 1px solid #888;
  31. border-top: 1px solid #888;
  32. }
  33. th,
  34. td {
  35. border-right: 1px solid #888;
  36. border-bottom: 1px solid #888;
  37. word-break: break-all;
  38. }
  39. th {
  40. font-weight: bold;
  41. }
  42. .title-top {
  43. margin-top: 248px;
  44. }
  45. </style>
  46. <link rel="stylesheet" href="../../static/sa.css">
  47. <script src="../../static/kj/vue.min.js"></script>
  48. <script src="../../static/kj/element-ui/index.js"></script>
  49. <script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
  50. <script src="../../static/print/print2.js" type="text/javascript"></script>
  51. <script src="../../static/kj/layer/layer.js"></script>
  52. <script src="../../static/sa.js"></script>
  53. </head>
  54. <body>
  55. <div>
  56. <div class="box">
  57. <button class="print-btn" @click="printFn">打印</button>
  58. <div id="myPrintArea" style="position: absolute;">
  59. <div class="content-box" v-for="(item,index) in dataList" :class="index>0?'title-top':''"
  60. :key="index">
  61. <div class="header-title" style="text-align: center;">
  62. <h2 style="font-size: 20px;">东兴口岸(二桥)进口货物集散区 (A1地块)(日)统计表</h2>
  63. </div>
  64. <table style="margin-top: 20px;text-align: center;width: 1123px;">
  65. <tr style="height: 60px;">
  66. <th colspan="7">单位:广西东兴北投口岸投资有限公司</th>
  67. <th colspan="4">金额单位:元</th>
  68. <th colspan="6" style="padding: 0 1px;">期间:{{item.time}}</th>
  69. </tr>
  70. <tr style="font-weight: 500;">
  71. <th style="width: 75px;" rowspan="2">日期</th>
  72. <th style="width: 80px;" rowspan="2"> 收费项目</th>
  73. <th style="width: 30px;" rowspan="2">数量</th>
  74. <th style="width: 40px;" rowspan="2">总价</th>
  75. <th style="width: 80px;" rowspan="2">不含税金额</th>
  76. <th style="width: 30px;" rowspan="2">税率</th>
  77. <th style="width: 40px;" rowspan="2">税款</th>
  78. <th colspan="4">收费方式</th>
  79. <th style="width: 60px;" rowspan="2">开单员</th>
  80. <th style="width: 60px;" rowspan="2">复核员</th>
  81. <th style="width: 75px;" rowspan="2">统计稽查员</th>
  82. <th style="width: 75px;" rowspan="2">部门审核人</th>
  83. </tr>
  84. <tr style="font-weight: 500;">
  85. <th style="width: 40px;">微信</th>
  86. <th style="width: 40px;">支付宝</th>
  87. <th style="width: 40px;">银联</th>
  88. <th style="width: 55px;">预存金额</th>
  89. </tr>
  90. <tr v-for="cel in item.list" :key="cel.index" style="height: 52px;">
  91. <td>{{cel.dayTime}}</td>
  92. <td>{{cel.feeType}}</td>
  93. <td>{{cel.num}}</td>
  94. <td>{{cel.taxMoney}}</td>
  95. <td>{{cel.noTaxMoney}}</td>
  96. <td>{{cel.taxRate}}</td>
  97. <td>{{cel.taxes}}</td>
  98. <td>{{cel.wxPrice}}</td>
  99. <td>{{cel.aliPrice}}</td>
  100. <td>{{cel.cardPrice}}</td>
  101. <td>{{cel.yuePrice}}</td>
  102. <td>{{cel.kaiDanPerson}}</td>
  103. <td>{{cel.diaoDuPerson}}</td>
  104. <td>{{cel.jiChaPerson}}</td>
  105. <td>{{cel.judgeBy}}</td>
  106. </tr>
  107. </table>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <script type="text/javascript">
  113. var app = new Vue({
  114. el: '.box',
  115. data: {
  116. p: {
  117. "beginDay": sa.p('beginDay', ''),
  118. "endDay": sa.p('endDay', ''),
  119. "feeType": sa.p('feeType', '')
  120. },
  121. dataList: []
  122. },
  123. methods: {
  124. getDataList() {
  125. let data = {
  126. isMonth: '',
  127. isYear: '',
  128. year: '',
  129. beginMonth: '',
  130. endMonth: '',
  131. beginDay: this.p.beginDay,
  132. endDay: this.p.endDay,
  133. feeType: this.p.feeType
  134. }
  135. sa.ajax('/TbFeeStatistics/prePrint', data, function(resp) {
  136. var list = resp.data.list;
  137. let len = list.length;
  138. let child = [];
  139. let dataList = [];
  140. for (i = 0; i < len; i++) {
  141. child.push(list[i]);
  142. if (child.length == 12 || i == len - 1) {
  143. let title = {
  144. time: this.p.beginDay ? this.p.beginDay + '至' + this.p.endDay :
  145. '所有时间',
  146. list: child
  147. }
  148. dataList.push(title);
  149. child = [];
  150. }
  151. }
  152. this.dataList = dataList;
  153. sa.loading("准备打印...");
  154. setTimeout(() => {
  155. this.printFn();
  156. sa.hideLoading();
  157. }, 2000)
  158. }.bind(this))
  159. },
  160. printFn() {
  161. Print('#myPrintArea', {
  162. noPrint: '.noPrint'
  163. });
  164. }
  165. },
  166. mounted() {
  167. this.getDataList();
  168. }
  169. })
  170. </script>
  171. </body>
  172. </html>