sta_all.blade.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. @extends('layouts.datatable')
  2. @section('table')
  3. <link rel="stylesheet" href="{{asset('css/style.css')}}">
  4. <style>
  5. table {
  6. max-width: 100%;
  7. }
  8. td {
  9. word-wrap: break-word;
  10. word-break: break-all;
  11. }
  12. </style>
  13. <div id="vue">
  14. <div class="row">
  15. <div class="col-md-12" id="print">
  16. <div class="box box-primary">
  17. <div class="box-header with-border" style="text-align: center">
  18. <h1 class="box-title">成本审计汇总表</h1>
  19. </div>
  20. <div class="box-body" style="overflow: scroll;height: 600px;">
  21. <table class="table table-bordered table-striped" style="width: 3500px;">
  22. <thead>
  23. {{--<tr>--}}
  24. {{--<td colspan="31" style="font-size: 25px; text-align: center">街坊项目拆迁统计表</td>--}}
  25. {{--</tr>--}}
  26. <tr>
  27. @for($i=1;$i<32;$i++)
  28. <td>{{ $i }}</td>
  29. @endfor
  30. </tr>
  31. <tr>
  32. <th>合同编号</th>
  33. <th>姓名</th>
  34. <th>房栋号</th>
  35. <th>身份证号</th>
  36. <th>联系电话</th>
  37. <th>有证面积</th>
  38. <th>无证面积</th>
  39. <th>房屋补偿金</th>
  40. <th>庭院面积</th>
  41. <th>庭院补偿</th>
  42. <th>装修</th>
  43. <th>构筑物及其它</th>
  44. <th>停产停业损失补偿(临街路补偿)</th>
  45. <th>临时安置</th>
  46. <th>搬迁</th>
  47. <th>低保</th>
  48. <th>全额奖励</th>
  49. <th>整栋奖励</th>
  50. <th>违章自行拆除费</th>
  51. <th>残疾及其它</th>
  52. <th>补偿总额</th>
  53. <th>回迁套数</th>
  54. <th>回迁小区楼栋号</th>
  55. <th>回迁住宅面积</th>
  56. <th>回迁商铺面积</th>
  57. <th>回迁楼房金额</th>
  58. <th>应缴差价</th>
  59. <th>应退差价</th>
  60. <th>签约日期</th>
  61. <th>交房日期</th>
  62. <th>备注</th>
  63. </tr>
  64. </thead>
  65. <tbody>
  66. <template v-for="value of list">
  67. <tr>
  68. <td>@{{ value.num }}</td>
  69. <td>@{{ value.bzc_name }}</td>
  70. <td>@{{ value.bzc_addr }}</td>
  71. <td>@{{ value.bzc_cardid }}</td>
  72. <td>@{{ value.bzc_tel }}</td>
  73. <td>@{{ value.youzheng_area }}</td>
  74. <td>@{{ value.wuzheng_area }}</td>
  75. <td>@{{ value.fangbu }}</td>
  76. <td></td>
  77. <td>@{{ value.tingyuan | isNaN + value.kongyuan | isNaN}}</td>
  78. <td>@{{ value.zhuangxiu }}</td>
  79. <td>@{{ value.gouzhu }}</td>
  80. <td>@{{ value.tingchan | isNaN + value.tingye| isNaN }}</td>
  81. <td>@{{ value.linshibu | isNaN + value.anzhi | isNaN }}</td>
  82. <td>@{{ value.banqianbu }}</td>
  83. <td>@{{ value.dibu }}</td>
  84. <td>@{{ value.quanj }}</td>
  85. <td>@{{ value.chaj }}</td>
  86. <td></td>
  87. <td>@{{ value.chaichuje | isNaN +value.canbu | isNaN + value.other | isNaN + value.chaiqian| isNaN }}</td>
  88. <td>@{{ value.total_money | isNaN value.total | isNaN value.zongj | isNaN value.yuqij | isNaN + value.total | isNaN }}</td>
  89. <td>@{{ value.hours }}</td>
  90. <td>@{{ value.huiqian_area }}</td>
  91. <td>@{{ value.huiqian_home_area }}</td>
  92. <td>@{{ value.huiqian_shang_area }}</td>
  93. <td>@{{ value.huiqian }}</td>
  94. <td>@{{ value.money_home_jchae | isNaN + value.yingjiao | isNaN }}</td>
  95. <td>@{{ value.money_home_tchae | isNaN + value.yingtui | isNaN }}</td>
  96. <td>@{{ value.table_time }}</td>
  97. <td></td>
  98. <td>@{{ value.sub_description }}</td>
  99. </tr>
  100. </template>
  101. </tbody>
  102. </table>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <div align="center" class="btn">
  108. <button class="btn btn-primary" value="上一页" v-on:click="prev()" v-if="has_prev"></button>
  109. <a class="btn btn-success" target="_blank" href="{{ url('/print/10') }}">打印</a>
  110. <button class="btn btn-primary" value="下一页" v-on:click="next()" v-if="has_next"></button>
  111. </div>
  112. </div>
  113. <script src="{{ asset('js/vue.min.js') }}"></script>
  114. <script>
  115. var table = JSON.parse('{!! json_encode($table) !!}');
  116. var count_list = [], show_list = [], state = 0;
  117. var count_length = 0;
  118. //数组合并
  119. for (var t in table)
  120. for (var v in table[t]) {
  121. if (typeof (count_list[table[t][v].num]) != 'undefined') count_list[table[t][v].num] = Object.assign(count_list[table[t][v].num], table[t][v]);
  122. else {
  123. count_list[table[t][v].num] = table[t][v];
  124. count_length++;
  125. }
  126. }
  127. //数组重排
  128. var tmp_arr = [];
  129. for (var key in count_list)
  130. tmp_arr.push(count_list[key]);
  131. count_list = tmp_arr;
  132. var vm = new Vue({
  133. el: '#vue',
  134. data: {
  135. list: show_list,
  136. has_prev: false,
  137. has_next: false
  138. },
  139. methods: {
  140. next: function () {
  141. if (state % 20 == 0 && state != 0) {
  142. show_list.splice(0, show_list.length);
  143. vm.has_prev = true;
  144. }
  145. for (var i = 0; i < 20 && state < count_list.length - 1; i++) {
  146. state++;
  147. show_list.push(count_list[state]);
  148. }
  149. if (count_list.length > 20)vm.has_next = true;
  150. },
  151. prev: function () {
  152. if (state <= 20)return;
  153. show_list.splice(0, show_list.length);
  154. for (var i = 0; i < 20 && state >= 0; i++) {
  155. state--;
  156. show_list.push(count_list[state]);
  157. }
  158. }
  159. },
  160. filters: {
  161. isNaN: function (value) {
  162. if (!value) return 0;
  163. return value;
  164. }
  165. }
  166. });
  167. vm.next();
  168. </script>
  169. @endsection