add.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. .custom-table.table{
  5. width: 100%;
  6. }
  7. .custom-table th,.custom-table td{
  8. padding: 10px;
  9. }
  10. .custom-table th{
  11. width: 120px;
  12. text-align: right;
  13. }
  14. .text {
  15. width: 200px;
  16. display: inline-block;
  17. }
  18. .num {
  19. margin-left: 20px;
  20. }
  21. </style>
  22. <div class="col-sm-12">
  23. <div class="panel panel-default">
  24. <div class="panel-heading clearfix">
  25. 交款申请
  26. <div class="btn-group pull-right">
  27. <a href="javascript:history.go(-1);">返回</a>
  28. </div>
  29. </div>
  30. <div class="panel-body">
  31. <form action="add" method="get">
  32. {if $data}
  33. <div style="margin-bottom: 20px">
  34. <input type="hidden" name="start" id="start" value="{$start}">
  35. 上次到期时间:{$start};
  36. 交款结束时间:<input type="text" name="end" readonly id="end" value="{$end}">
  37. 备注:<input type="text" name="remark"> <br>
  38. <p></p>
  39. <button type="submit" class="btn btn-primary btn-sm">查询</button>
  40. <a href="javascript:;" onclick="onSave(this)" class="btn btn-warinig btn-sm">确定交款</a>
  41. </div>
  42. {else}
  43. <div style="margin-bottom: 20px">
  44. {$error}
  45. </div>
  46. {/if}
  47. </form>
  48. </div>
  49. </div>
  50. {if $data}
  51. <div class="panel panel-default">
  52. <!-- nav tabs -->
  53. <ul class="nav nav-tabs" role="tablist">
  54. <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">基本汇总</a></li>
  55. <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">基本明细</a></li>
  56. <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">科目明细</a></li>
  57. </ul>
  58. <div class="tab-content">
  59. <div role="tabpanel" class="tab-pane active" id="home">
  60. <table class="table table-bordered">
  61. <tr>
  62. <th>总金额</th>
  63. <th>总预付款</th>
  64. <th>总实收</th>
  65. <th>现金</th>
  66. <th>支付宝</th>
  67. <th>银行托收</th>
  68. <th>微信</th>
  69. </tr>
  70. <tr>
  71. <td>{$data['data']['money']}</td>
  72. <td>{$data['data']['pre_money']}</td>
  73. <td>{$data['data']['true_money']}</td>
  74. <td>{$data['data']['pay_money1']}</td>
  75. <td>{$data['data']['pay_money3']}</td>
  76. <td>{$data['data']['pay_money4']}</td>
  77. <td>{$data['data']['pay_money5']}</td>
  78. </tr>
  79. </table>
  80. <table class="table table-bordered">
  81. <tr>
  82. <th>收费科目</th>
  83. <th>金额</th>
  84. </tr>
  85. {foreach $data['fees'] as $k=>$v}
  86. <tr>
  87. <td>{$v['fee_title']}</td>
  88. <td>{$v['money']}</td>
  89. </tr>
  90. {/foreach}
  91. </table>
  92. </div>
  93. <div role="tabpanel" class="tab-pane" id="profile">
  94. <table class="table table-bordered">
  95. <tr>
  96. <th>单据号</th>
  97. <th>业主</th>
  98. <th>应收</th>
  99. <th>实收</th>
  100. <th>预付款</th>
  101. <th>支付方式</th>
  102. <th>收款日期</th>
  103. <th>收款人</th>
  104. </tr>
  105. {foreach $data['list'] as $k=>$v}
  106. <tr>
  107. <td>{$v['sn']}</td>
  108. <td>{$v['name']}</td>
  109. <td>{$v['money']}</td>
  110. <td>{$v['true_money']}</td>
  111. <td>{$v['pre_money']}</td>
  112. <td>
  113. {if $v['pay_type'] == 1}现金{/if}
  114. {if $v['pay_type'] == 3}支付宝{/if}
  115. {if $v['pay_type'] == 4}银行托收{/if}
  116. {if $v['pay_type'] == 5}微信{/if}
  117. {if $v['pay_type'] == 6}组合付款{/if}
  118. </td>
  119. <td>{$v['pay_time']}</td>
  120. <td>{$v['payee']}</td>
  121. </tr>
  122. {/foreach}
  123. </table>
  124. </div>
  125. <div role="tabpanel" class="tab-pane" id="messages">
  126. <table class="table table-bordered">
  127. <tr>
  128. <th>单据号</th>
  129. <th>业主</th>
  130. <th>小区</th>
  131. <th>资源名称</th>
  132. <th>资源属性</th>
  133. <th>类型</th>
  134. <th>收费科目</th>
  135. <th>金额</th>
  136. <th>起止日期</th>
  137. <th>收款日期</th>
  138. <th>收款人</th>
  139. </tr>
  140. {foreach $data['logs'] as $k=>$v}
  141. <tr>
  142. <td>{$v['sn']}</td>
  143. <td>{$v['name']}</td>
  144. <td>{$v['area_title']}</td>
  145. <td>{$v['title']}</td>
  146. <td>
  147. {if $v['cate'] == 1}住房{/if}
  148. {if $v['cate'] == 2}商铺{/if}
  149. {if $v['cate'] == 3}营业房{/if}
  150. {if $v['cate'] == 4}储藏室{/if}
  151. {if $v['cate'] == 5}停车位{/if}
  152. </td>
  153. <td>{$v['c_type_name']}</td>
  154. <td>{$v['fee_title']}</td>
  155. <td>{$v['money']}</td>
  156. <td>
  157. {if $v['start']}
  158. {$v['start']} ~ {$v['end']}
  159. {/if}
  160. </td>
  161. <td>{$v['pay_time']}</td>
  162. <td>{$v['payee']}</td>
  163. </tr>
  164. {/foreach}
  165. </table>
  166. </div>
  167. </div>
  168. </div>
  169. {/if}
  170. </div>
  171. {/block}
  172. {block name="script"}
  173. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  174. <script>
  175. $(function(){
  176. laydate.render({
  177. elem: '#end',
  178. theme: '#0061b3',
  179. type: 'datetime'
  180. });
  181. });
  182. function onSave(_self) {
  183. var flag = $(_self).attr('data-flag');
  184. if(flag == true){
  185. return ;
  186. }
  187. $(_self).attr('data-flag',true);
  188. var start = $('#start').val();
  189. var end = $('#end').val();
  190. var remark = $('#remark').val();
  191. var url = '{:url("addSave")}';
  192. $.post(url,{start:start,end:end,remark:remark},function (res) {
  193. if(res.code == 1){
  194. window.location.href = '{:url("index")}';
  195. }else{
  196. layer.msg(res.msg);
  197. }
  198. });
  199. }
  200. </script>
  201. {/block}