monthStatsPrint.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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 portrait;
  9. margin: 1.9cm 2.5cm 1.5cm 2.5cm;
  10. } */
  11. @page {
  12. size: A4 landscape;
  13. margin: 19mm 25mm 15mm 25mm;
  14. }
  15. .print-btn {
  16. color: white;
  17. background: #2D8CF0;
  18. border: none;
  19. border-radius: 3px;
  20. padding: 5px 10px;
  21. font-size: 10px;
  22. margin: 10px 20px;
  23. cursor: pointer;
  24. }
  25. /* .content-box {
  26. text-align: center;
  27. height: 1123px;
  28. width: 794px;
  29. margin: 0 auto;
  30. position: relative;
  31. } */
  32. .content-box {
  33. text-align: center;
  34. height: 794px;
  35. width: 1123px;
  36. margin: 0 auto;
  37. }
  38. table {
  39. border-collapse: collapse;
  40. border-spacing: 0;
  41. border-left: 1px solid #888;
  42. border-top: 1px solid #888;
  43. }
  44. th,
  45. td {
  46. border-right: 1px solid #888;
  47. border-bottom: 1px solid #888;
  48. word-break: break-all;
  49. }
  50. th {
  51. font-weight: bold;
  52. }
  53. .title-top {
  54. margin-top: 248px;
  55. }
  56. </style>
  57. <link rel="stylesheet" href="../../static/sa.css">
  58. <script src="../../static/kj/vue.min.js"></script>
  59. <script src="../../static/kj/element-ui/index.js"></script>
  60. <script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
  61. <script src="../../static/print/print2.js" type="text/javascript"></script>
  62. <script src="../../static/kj/layer/layer.js"></script>
  63. <script src="../../static/sa.js"></script>
  64. </head>
  65. <body>
  66. <div>
  67. <div class="box">
  68. <button class="print-btn" @click="printFn">打印</button>
  69. <div id="myPrintArea">
  70. <div class="content-box" style="position: relative;" v-for="(item,index) in dataList"
  71. :class="index>0?'title-top':''" :key="index">
  72. <div class="header-title" style="text-align: center;" v-if="index==0">
  73. <h2 style="font-size: 20px;">东兴口岸(二桥)进口货物集散区 (A1地块)(月)统计表</h2>
  74. </div>
  75. <div style="width: 1123px;display: flex;text-align: left;padding-top: 10px;">
  76. <div style="flex: 2;">单位:广西东兴北投口岸投资有限公司</div>
  77. <div style="flex: 3;">金额单位:元</div>
  78. </div>
  79. <table style="margin-top: 10px;text-align: center;width: 1123px;">
  80. <tr style="font-weight: 500;padding: 0 0.5px;">
  81. <th style="width: 30px;" rowspan="2">月份</th>
  82. <th style="width: 64px;" rowspan="2"> 收费项目</th>
  83. <th colspan="4">收款方式</th>
  84. <th style="width: 30px;" rowspan="2">数量</th>
  85. <th style="width: 55px;" rowspan="2">总价</th>
  86. <th style="width: 55px;" rowspan="2">不含税金额</th>
  87. <th style="width: 30px;" rowspan="2">税率</th>
  88. <th style="width: 50px;" rowspan="2">税款</th>
  89. <td style="width: 65px;" rowspan="2">统计稽查员</td>
  90. <td style="width: 60px;" rowspan="2">复核员</td>
  91. <td style="width: 60px;" rowspan="2">开单员</td>
  92. </tr>
  93. <tr style="font-weight: 500;padding: 0 0.5px;">
  94. <th style="width: 50px;">微信</th>
  95. <th style="width: 35px;">支付宝</th>
  96. <th style="width: 30px;">银联</th>
  97. <th style="width: 45px;">预存金额</th>
  98. </tr>
  99. <tr v-for="cel in item.list" :key="cel.index" style="height: 60px;padding: 0 0.5px;">
  100. <td>{{cel.dayTime.split('-')[1]}}</td>
  101. <td>{{cel.feeType}}</td>
  102. <td>{{cel.wxPrice}}</td>
  103. <td>{{cel.aliPrice}}</td>
  104. <td>{{cel.cardPrice}}</td>
  105. <td>{{cel.yuePrice}}</td>
  106. <td>{{cel.num}}</td>
  107. <td>{{cel.taxMoney}}</td>
  108. <td>{{cel.noTaxMoney}}</td>
  109. <td>{{cel.taxRate}}</td>
  110. <td>{{cel.taxes}}</td>
  111. <td>{{cel.jiChaPerson}}</td>
  112. <td>{{cel.diaoDuPerson}}</td>
  113. <td>{{cel.kaiDanPerson}}</td>
  114. </tr>
  115. <tr style="height: 60px;padding: 0 0.5px;" v-if="index==dataList.length-1">
  116. <td colspan="2">合计</td>
  117. <td>{{(total.totalWxPrice)}}</td>
  118. <td>0</td>
  119. <td>0</td>
  120. <td>{{total.totalYuePrice}}</td>
  121. <td>{{total.num}}</td>
  122. <td>{{total.totalMoney}}</td>
  123. <td>{{(total.totalNoTaxMoney).toFixed(2)}}</td>
  124. <td>-</td>
  125. <td>{{(total.totalTaxes).toFixed(2)}}</td>
  126. <td>{{total.jiChaPerson}}</td>
  127. <td>{{total.diaoDuPerson}}</td>
  128. <td>{{total.kaiDanPerson}}</td>
  129. </tr>
  130. </table>
  131. <div style="display: flex;text-align: left;margin-top: 20px;" v-if="index+1==dataList.length">
  132. <div style="flex: 1;">运营部负责人</div>
  133. <div style="flex: 1;">运营分管领导</div>
  134. </div>
  135. <span style="position: absolute;top: 780px;left: 1050px">{{index+1}}/{{dataList.length}}</span>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. <script type="text/javascript">
  141. var app = new Vue({
  142. el: '.box',
  143. data: {
  144. p: {
  145. "beginDay": sa.p('beginDay', ''),
  146. "endDay": sa.p('endDay', ''),
  147. "feeType": sa.p('feeType', ''),
  148. "beginMonth": sa.p('beginMonth', ''),
  149. "endMonth": sa.p('endMonth', '')
  150. },
  151. dataList: [],
  152. total: {
  153. totalAliPrice: 0,
  154. totalCardPrice: 0,
  155. totalMoney: 0,
  156. totalNoTaxMoney: 0,
  157. totalTaxes: 0,
  158. totalWxPrice: 0,
  159. totalYuePrice: 0,
  160. num: 0
  161. }
  162. },
  163. methods: {
  164. getDataList() {
  165. let data = {
  166. isMonth: 1,
  167. isYear: '',
  168. year: '',
  169. beginMonth: this.p.beginMonth,
  170. endMonth: this.p.endMonth,
  171. beginDay: '',
  172. endDay: '',
  173. feeType: this.p.feeType
  174. }
  175. sa.ajax('/TbFeeStatistics/prePrint', data, function(resp) {
  176. this.total = resp.data;
  177. var list = resp.data.list;
  178. let len = list.length;
  179. let child = [];
  180. let dataList = [];
  181. let wxTotal = 0;
  182. let yuePrice = 0;
  183. let totalNum = 0;
  184. let totalMoney = 0;
  185. let totalTaxMoney = 0;
  186. let totalNoTaxMoney = 0;
  187. for (i = 0; i < len; i++) {
  188. let item = list[i];
  189. wxTotal += item.wxPrice;
  190. yuePrice += item.yuePrice;
  191. totalNum = parseFloat(totalNum) + parseFloat(item.num);
  192. totalMoney += item.taxMoney;
  193. totalTaxMoney += item.taxes;
  194. totalNoTaxMoney += item.noTaxMoney;
  195. child.push(item);
  196. if (child.length == 10 || i == len - 1) {
  197. let title = {
  198. time: this.p.beginDay ? this.p.beginDay + '至' + this.p.endDay :
  199. '所有时间',
  200. list: child,
  201. wxTotal: wxTotal,
  202. yuePrice: yuePrice,
  203. totalNum: totalNum,
  204. totalMoney: totalMoney,
  205. totalTaxMoney: totalTaxMoney,
  206. totalNoTaxMoney: totalNoTaxMoney
  207. }
  208. dataList.push(title);
  209. child = [];
  210. }
  211. }
  212. this.total.num = totalNum;
  213. this.dataList = dataList;
  214. sa.loading("准备打印...");
  215. setTimeout(() => {
  216. this.printFn();
  217. sa.hideLoading();
  218. }, 1000)
  219. }.bind(this))
  220. },
  221. printFn() {
  222. Print('#myPrintArea', {
  223. noPrint: '.noPrint'
  224. });
  225. }
  226. },
  227. mounted() {
  228. this.getDataList();
  229. }
  230. })
  231. </script>
  232. </body>
  233. </html>