print_all.blade.php 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <title>成本审计汇总表</title>
  7. <meta name="description" content="">
  8. <meta name="keywords" content="">
  9. <style type="text/css">
  10. .heads_tr td {
  11. font-size: 11pt;
  12. font-weight: 700;
  13. line-height: 26px;
  14. }
  15. body {
  16. font-family: font-family: Micosoft YaHei, simsun, WenQuanYi MicoHei;
  17. }
  18. .btn {
  19. margin-top: 15px;
  20. }
  21. .print_button {
  22. height: 40px;
  23. background: #369 none repeat scroll 0 0;
  24. border: 2px solid #efefef;
  25. border-radius: 5px;
  26. width: 100px;
  27. color: #fff;
  28. font-size: 13px;
  29. font-weight: 700;
  30. }
  31. </style>
  32. </head>
  33. <body>
  34. <div id="vue">
  35. <div id="print">
  36. <table cellspacing="0" cellpadding="0" width="990" align="center">
  37. <tbody>
  38. <tr>
  39. <td colspan="4">
  40. <table cellspacing="0" cellpadding="0" width="900" align="center">
  41. <tbody>
  42. <tr>
  43. <td>
  44. <h2 class="orderTitle1">
  45. <center>街坊项目拆迁成本统计表</center>
  46. </h2>
  47. </td>
  48. <td>
  49. <span style="float:right"><h2 class="orderTitle1"></h2></span>
  50. </td>
  51. </tr>
  52. </tbody>
  53. </table>
  54. </td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. <table cellspacing="0" cellpadding="0" width="900" align="center">
  59. <tbody>
  60. <tr>
  61. <td width="79" align="right" valign="top"></td>
  62. <td width="185" valign="top"></td>
  63. <td colspan="2"></td>
  64. </tr>
  65. <tr>
  66. <td align="right" valign="top"></td>
  67. <td valign="top"></td>
  68. <td align="right" valign="top"> 单位:㎡、元、套</td>
  69. </tr>
  70. </tbody>
  71. </table>
  72. <table id="page_one" border="1" cellspacing="0" cellpadding="0" width="990" align="center"
  73. class="t1" style="font-size:14px; margin-top:15px;min-height:600px">
  74. <tbody>
  75. <tr class="heads_tr">
  76. @for($i=1;$i<12;$i++)
  77. <td width="90" align="center">{{ $i }}</td>
  78. @endfor
  79. </tr>
  80. <tr class="heads_tr">
  81. @foreach($th as $value)
  82. <td width="90" align="center">{{ $value }}</td>
  83. @endforeach
  84. </tr>
  85. <template v-for="value of list">
  86. <tr>
  87. <td width="100" align="center">@{{ value.num }}</td>
  88. <td width="100" align="center">@{{ value.bzc_name }}</td>
  89. <td width="100" align="center">@{{ value.bzc_addr }}</td>
  90. <td width="100" align="center">@{{ value.bzc_cardid }}</td>
  91. <td width="100" align="center">@{{ value.bzc_tel }}</td>
  92. <td width="100" align="center">@{{ value.youzheng_area }}</td>
  93. <td width="100" align="center">@{{ value.wuzheng_area }}</td>
  94. <td width="100" align="center">@{{ value.fangbu }}</td>
  95. <td width="100" align="center"></td>
  96. <td width="100" align="center">@{{ value.tingyuan }} @{{value.kongyuan}}</td>
  97. <td width="100" align="center">@{{ value.zhuangxiu }}</td>
  98. </tr>
  99. </template>
  100. </tbody>
  101. </table>
  102. <table id="page_two" border="1" cellspacing="0" cellpadding="0" width="990" align="center" class="t1"
  103. style="font-size:14px; margin-top: 97px;min-height: 700px;">
  104. <tbody>
  105. <tr class="heads_tr">
  106. @for($k=12;$k<23;$k++)
  107. <td width="90" align="center">{{ $k }}</td>
  108. @endfor
  109. </tr>
  110. <tr class="heads_tr">
  111. @foreach($th1 as $value)
  112. <td width="90" align="center">{{$value}}</td>
  113. @endforeach
  114. </tr>
  115. <template v-for="value of list">
  116. <tr>
  117. <td width="100" align="center">@{{ value.gouzhu}}</td>
  118. <td width="100" align="center">@{{ value.tingchan }} @{{ value.tingye }}</td>
  119. <td width="100" align="center">@{{ value.linshibu }} @{{ value.anzhi }}</td>
  120. <td width="100" align="center">@{{ value.banqianbu }} @{{ value.anzhi }}</td>
  121. <td width="100" align="center">@{{ value.dibu }}</td>
  122. <td width="100" align="center">@{{ value.quanj }}</td>
  123. <td width="100" align="center">@{{ value.chaj }}</td>
  124. <td width="100" align="center">@{{ value.chaichuje }}</td>
  125. <td width="100" align="center">@{{ value.canbu }} @{{ value.other }}</td>
  126. <td width="100"
  127. align="center">@{{ value.total_money }} @{{ value.total }} @{{ value.zongj }} @{{ value.yuqij }} @{{ value.chaiqian }}</td>
  128. <td width="100" align="center">@{{ value.hours }}</td>
  129. </tr>
  130. </template>
  131. </tbody>
  132. </table>
  133. <table id="page_three" border="1" cellspacing="0" cellpadding="0" width="990" align="center" class="t1"
  134. style="font-size:14px; margin-top: 97px;min-height: 700px;">
  135. <tbody>
  136. <tr class="heads_tr">
  137. @for($j=23;$j<32;$j++)
  138. <td width="90" align="center">{{ $j }}</td>
  139. @endfor
  140. </tr>
  141. <tr class="heads_tr">
  142. @foreach($th2 as $value)
  143. <td width="90" align="center">{{ $value }}</td>
  144. @endforeach
  145. </tr>
  146. <template v-for="value of list">
  147. <tr>
  148. <td width="100" align="center">@{{ value.huiqian_area }}</td>
  149. <td width="100" align="center">@{{ value.huiqian_home_area }}</td>
  150. <td width="100" align="center">@{{ value.huiqian_shang_area }}</td>
  151. <td width="100" align="center">@{{ value.huiqian }}</td>
  152. <td width="100" align="center">@{{ value.money_home_jchae }} @{{ value.yingjiao }}</td>
  153. <td width="100" align="center">@{{ value.money_home_tchae }} @{{ value.yingtui }}</td>
  154. <td width="100" align="center">@{{ value.created_at }}</td>
  155. <td width="100" align="center"></td>
  156. <td width="100" align="center">@{{ value.sub_description }}</td>
  157. </tr>
  158. </template>
  159. </tbody>
  160. </table>
  161. </div>
  162. <div align="center" class="btn">
  163. <input class="print_button" type="button" value="上一页" v-on:click="prev()" v-if="has_prev">
  164. <input class="print_button" type="button" id="datasubmit" value="确认打印" name="submit" onclick="printed()">
  165. <input class="print_button" type="button" value="下一页" v-on:click="next()" v-if="has_next">
  166. </div>
  167. </div>
  168. <script type="text/javascript">
  169. function printed() {
  170. var head = "<html><head><title></title></head><body>";
  171. var foot = "</body>";
  172. var news = document.all.item('print').innerHTML;
  173. var old = document.body.innerHTML;
  174. document.body.innerHTML = head + news + foot;
  175. window.print();
  176. document.body.innerHTML = old;
  177. return false;
  178. }
  179. </script>
  180. <script src="{{ asset('js/vue.min.js') }}"></script>
  181. <script>
  182. var table = JSON.parse('{!! json_encode($table) !!}');
  183. var count_list = [], show_list = [], state = 0;
  184. for (var t in table)for (var v in table[t])count_list.push(table[t][v]);
  185. var vm = new Vue({
  186. el: '#vue',
  187. data: {
  188. list: show_list,
  189. has_prev: false,
  190. has_next: false
  191. },
  192. methods: {
  193. next: function () {
  194. vm.has_prev = true;
  195. if (state % 20 == 0 && state != 0) {
  196. show_list.splice(0, show_list.length);
  197. }
  198. for (var i = 0; i < 20 && state < count_list.length - 1; i++) {
  199. state++;
  200. show_list.push(count_list[state]);
  201. }
  202. if (count_list.length > 20)vm.has_next = true;
  203. },
  204. prev: function () {
  205. if(state<=20)return ;
  206. show_list.splice(0, show_list.length);
  207. for (var i = 0; i < 20 && state >= 0; i++) {
  208. state--;
  209. show_list.push(count_list[state]);
  210. }
  211. }
  212. }
  213. });
  214. vm.next();
  215. </script>
  216. </body>
  217. </html>