balance-print.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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 portrait;
  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. height: 1123px;
  25. width: 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. .hide-border{
  48. border-bottom-style:none;
  49. border-left-style:none;
  50. border-right-style: none;
  51. }
  52. tr td:first-child {
  53. border-left: none;
  54. }
  55. </style>
  56. <link rel="stylesheet" href="../../static/sa.css">
  57. <script src="../../static/kj/vue.min.js"></script>
  58. <script src="../../static/kj/element-ui/index.js"></script>
  59. <script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
  60. <script src="../../static/print/print2.js" type="text/javascript"></script>
  61. <script src="../../static/kj/layer/layer.js"></script>
  62. <script src="../../static/sa.js"></script>
  63. </head>
  64. <body>
  65. <div>
  66. <div class="box">
  67. <button class="print-btn" @click="printFn">打印</button>
  68. <div id="myPrintArea" style="position: relative;">
  69. <div class="content-box" style="position: relative;" v-for="(item,index) in dataList"
  70. :key="index" :class="index>0?'title-top':''" >
  71. <div class="header-title" style="text-align: center;" v-if="index==0">
  72. <span
  73. style="font-size: 20px;font-weight: 500;font-family: 黑体;">东兴口岸(二桥)进口货物集散区(A1地块)预存款余额表</span>
  74. </div>
  75. <table style="margin: 0 auto;text-align: center;width: 790px;" >
  76. <div
  77. style="text-align: left;width: 790px;margin: auto;padding: 5px 0;font-family: 黑体;font-weight: 500;">
  78. <span colspan="9">单位:广西东兴北投口岸投资有限公司
  79. <span style="margin-left: 10px;">期间:{{item.time}}</span>
  80. <span style="margin-left: 10px;">金额单位:元</span></span>
  81. </div>
  82. <tr style="height: 60px;font-size:10px;">
  83. <th style="min-width: 30px;">序号</th>
  84. <th style="width: 180px;">企业名称</th>
  85. <th style="min-width: 60px;"> 期初余额</th>
  86. <th style="min-width: 60px;">本期充值</th>
  87. <th style="min-width: 60px;">本期扣除</th>
  88. <th style="min-width: 60px;">余额退款</th>
  89. <th style="min-width: 60px;">异常退款</th>
  90. <th style="width: 70px;">期末余额</th>
  91. </tr>
  92. <tr v-for="(cel,i) in item.list" :key="cel.index" style="height:60px;font-size: 10px;">
  93. <td>{{i+1}}</td>
  94. <td>{{cel.customerName}}</td>
  95. <td>{{cel.beginMoney}}</td>
  96. <td>{{cel.chargeMoney}}</td>
  97. <td>{{cel.deuctionMoney}}</td>
  98. <td>{{cel.balanceRefundMoney}}</td>
  99. <td>{{cel.errorRefundMoney}}</td>
  100. <td>{{cel.endMoney}}</td>
  101. </tr>
  102. <tr style="height: 40px;padding: 0 0.5px;" v-if="index==dataList.length-1">
  103. <td></td>
  104. <td>合计</td>
  105. <td>{{totalInit}}</td>
  106. <td>{{totalCharge}}</td>
  107. <td>{{totalDeuctionMoney}}</td>
  108. <td>{{totalRefundMoney}}</td>
  109. <td>{{totalErrorRefund}}</td>
  110. <td>{{totalEnd}}</td>
  111. </tr>
  112. <!-- <tr style="height: 40px;padding: 0 0.5px;" v-if="index==dataList.length-1">
  113. <td class="hide-border"></td>
  114. <td class="hide-border"></td>
  115. <td class="hide-border">统计稽核员:</td>
  116. <td class="hide-border"></td>
  117. <td class="hide-border">复核员:</td>
  118. <td class="hide-border"></td>
  119. <td class="hide-border">开单员:</td>
  120. <td class="hide-border"></td>
  121. </tr> -->
  122. </table>
  123. <div>
  124. <div style="display: flex;margin-top: 15px;">
  125. <div style="flex: 2;text-align: right;margin-right: 50px;">统计稽核员:</div>
  126. <div style="flex: 1;">复核员:</div>
  127. <div style="flex: 1;margin-right: 20px;">开单员:</div>
  128. </div>
  129. </div>
  130. <span style="position: absolute;top: 1250px;left: 750px">{{index+1}}/{{dataList.length}}</span>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <script type="text/javascript">
  136. var app = new Vue({
  137. el: '.box',
  138. data: {
  139. p: {
  140. "beginTime": sa.p('bDay', ''),
  141. "endTime": sa.p('eDay', ''),
  142. "customerName": sa.p('customerName', '')
  143. },
  144. dataList: [],
  145. allDayFee: 0,
  146. allDayTaxes: 0,
  147. allDayNoTaxFee: 0,
  148. totalCharge:0,
  149. totalInit:0,
  150. totalDeuctionMoney:0,
  151. totalRefundMoney:0,
  152. totalErrorRefund:0,
  153. totalEnd:0
  154. },
  155. methods: {
  156. getDataList() {
  157. sa.ajax('/TbAccount/getBalance/list', this.p, function(resp) {
  158. var list = resp.data;
  159. let len = list.length;
  160. let child = [];
  161. let dataList = [];
  162. let totalCharge=0;
  163. let totalInit=0;
  164. let totalDeuctionMoney=0;
  165. let totalRefundMoney=0;
  166. let totalErrorRefund=0;
  167. let totalEnd=0;
  168. for (i = 0; i < len; i++) {
  169. let item = list[i];
  170. child.push(item);
  171. totalInit+=item.beginMoney;
  172. totalCharge+=item.chargeMoney;
  173. totalDeuctionMoney+=item.deuctionMoney;
  174. totalRefundMoney+=item.balanceRefundMoney;
  175. totalErrorRefund+=item.errorRefundMoney;
  176. totalEnd+=item.endMoney;
  177. if (child.length == 18 || i == len - 1) {
  178. let title = {
  179. time: this.p.beginTime + '至' + this.p.endTime,
  180. list: child
  181. }
  182. dataList.push(title);
  183. child = [];
  184. }
  185. }
  186. this.dataList = dataList;
  187. this.totalCharge=totalCharge;
  188. this.totalInit=totalInit;
  189. this.totalDeuctionMoney=totalDeuctionMoney;
  190. this.totalErrorRefund=totalErrorRefund;
  191. this.totalRefundMoney=totalRefundMoney;
  192. this.totalEnd=totalEnd;
  193. // sa.loading("准备打印...");
  194. // setTimeout(() => {
  195. // this.printFn();
  196. // sa.hideLoading();
  197. // }, 2000)
  198. }.bind(this))
  199. },
  200. printFn() {
  201. Print('#myPrintArea', {
  202. noPrint: '.noPrint'
  203. });
  204. }
  205. },
  206. mounted() {
  207. this.getDataList();
  208. }
  209. })
  210. </script>
  211. </body>
  212. </html>