detail.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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. <table class="table table-bordered">
  32. <tr>
  33. <th>资源名称</th>
  34. <th>收费科目</th>
  35. <th>金额</th>
  36. <th>起止日期</th>
  37. <th>备注</th>
  38. <th>状态</th>
  39. </tr>
  40. {foreach $info['logs'] as $key => $value}
  41. <tr>
  42. <td>
  43. {if $value['cate'] == 1}[住房]{/if}
  44. {if $value['cate'] == 2}[商铺]{/if}
  45. {if $value['cate'] == 3}[营业房]{/if}
  46. {if $value['cate'] == 4}[储藏室]{/if}
  47. {if $value['cate'] == 5}[停车位]{/if}
  48. {$value['full_title']}
  49. </td>
  50. <td>{$value['full_title']}</td>
  51. <td>{$value['money']}</td>
  52. <td>
  53. {if($value['start'])}
  54. {$value['start']} ~ {$value['end']}
  55. {/if}
  56. </td>
  57. <td>{$value['remark']}</td>
  58. <td>
  59. {if $value['status'] == 0}未退款{/if}
  60. {if $value['status'] == 1}退款中{/if}
  61. {if $value['status'] == 2}已退款{/if}
  62. </td>
  63. </tr>
  64. {/foreach}
  65. </table>
  66. <table class="table custom-table">
  67. <tr>
  68. <th>单据号</th><td>{$info['sn']}</td>
  69. </tr>
  70. <tr>
  71. <th>业主</th><td>{$info['full_name']}</td>
  72. </tr>
  73. <tr>
  74. <th>预付款</th>
  75. <td>
  76. {$info['pre_money']}
  77. </td>
  78. </tr>
  79. <tr>
  80. <th>总金额</th><td>{$info['money']}</td>
  81. </tr>
  82. {if $info['status'] == 1}
  83. <tr>
  84. <th>实收</th>
  85. <td>
  86. {$info['true_money']}
  87. </td>
  88. </tr>
  89. {/if}
  90. <tr>
  91. <th>状态</th>
  92. <td>
  93. {if $info['status'] == 0}未缴费{/if}
  94. {if $info['status'] == 1}已缴费{/if}
  95. {if $info['status'] == 2}返销待审核{/if}
  96. {if $info['status'] == 3}已返销{/if}
  97. {if $info['is_cancel'] == 1 && $info['status'] == 1}<span class="text-danger">(拒绝)</span>{/if}
  98. </td>
  99. </tr>
  100. <tr>
  101. <th>创建日期</th>
  102. <td>
  103. {$info['create_time']}
  104. </td>
  105. </tr>
  106. {if $info['status'] == 3}
  107. <tr>
  108. <th>返销日期</th>
  109. <td>
  110. {$info['cancel_time']}
  111. </td>
  112. </tr>
  113. <tr>
  114. <th>返销原因</th>
  115. <td>
  116. {$info['cancel_reason']}
  117. </td>
  118. </tr>
  119. {/if}
  120. <tr>
  121. <th>最晚缴费时间</th>
  122. <td>
  123. {$info['last_time']}
  124. </td>
  125. </tr>
  126. <tr>
  127. <th>催款状态</th>
  128. <td>
  129. {if $info['reminder'] == 0 }未催款{/if}
  130. {if $info['reminder'] == 1 }已催款{/if}
  131. </td>
  132. </tr>
  133. {if $info['status'] == 1}
  134. <tr>
  135. <th>支付方式</th>
  136. <td>
  137. {if $info['pay_type'] == 1}现金{/if}
  138. {if $info['pay_type'] == 3}支付宝{/if}
  139. {if $info['pay_type'] == 4}银行托收{/if}
  140. {if $info['pay_type'] == 5}微信{/if}
  141. {if $info['pay_type'] == 6}
  142. 组合付款(
  143. {foreach $info['pay_data'] as $key => $value }
  144. {if $key == 1}现金:{$value} {/if}
  145. {if $key == 3}支付宝:{$value} {/if}
  146. {if $key == 4}银行托收:{$value} {/if}
  147. {if $key == 5}微信:{$value} {/if}
  148. {/foreach}
  149. )
  150. {/if}
  151. </td>
  152. </tr>
  153. <tr>
  154. <th>收款人</th>
  155. <td>
  156. {$info['payee']}
  157. </td>
  158. </tr>
  159. <tr>
  160. <th>缴费日期</th>
  161. <td>
  162. {$info['pay_time']}
  163. </td>
  164. </tr>
  165. <tr>
  166. <th>收费备注</th>
  167. <td>
  168. {$info['remark']}
  169. </td>
  170. </tr>
  171. {/if}
  172. </table>
  173. <hr />
  174. {if $info['status'] == 0 && $userId == $info['create_user_id']}
  175. <form class="form-horizontal" action="{:url('pay')}" method="post">
  176. <input type="hidden" name="id" value="{$info['id']}">
  177. <div class="form-group">
  178. <label class="col-xs-2 control-label">实收 <span class="text-danger">*</span></label>
  179. <div class="col-xs-10">
  180. <input type="number" name="true_money" class="form-control">
  181. </div>
  182. </div>
  183. <div class="form-group" style="display: none;" id="prename">
  184. <label class="col-xs-2 control-label"></label>
  185. <div class="col-xs-10">
  186. <input type="number" name="pre_money" value="{$info['full_money']}" class="form-control">
  187. </div>
  188. </div>
  189. <div class="form-group">
  190. <label class="col-xs-2 control-label">收费日期 <span class="text-danger">*</span></label>
  191. <div class="col-xs-10">
  192. <input type="text" readonly placeholder="选择收费日期" id="payTime" name="pay_time" value="{$curDate}" class="form-control">
  193. </div>
  194. </div>
  195. <!-- <div class="form-group">-->
  196. <!-- <label class="col-xs-2 control-label">收款人 <span class="text-danger">*</span></label>-->
  197. <!-- <div class="col-xs-10">-->
  198. <!-- <input type="text" name="PAYEE" value="系统" class="form-control">-->
  199. <!-- </div>-->
  200. <!-- </div>-->
  201. <div class="form-group">
  202. <label class="col-xs-2 control-label">收费备注</label>
  203. <div class="col-xs-10">
  204. <input type="text" name="remark" value="" class="form-control">
  205. </div>
  206. </div>
  207. <div class="form-group">
  208. <label class="col-xs-2 control-label">支付方式</label>
  209. <div class="col-xs-10">
  210. <label style="margin-top: 5px;"><input type="radio" name="pay_type" checked value="1" onclick="selectPay(1)"> 现金 </label> &nbsp;&nbsp;
  211. <label style="margin-top: 5px;"><input type="radio" name="pay_type" value="3" onclick="selectPay(3)"> 支付宝 </label>&nbsp;&nbsp;
  212. <label style="margin-top: 5px;"><input type="radio" name="pay_type" value="4" onclick="selectPay(4)"> 银行托收 </label>&nbsp;&nbsp;
  213. <label style="margin-top: 5px;"><input type="radio" name="pay_type" value="5" onclick="selectPay(5)"> 微信 </label>&nbsp;&nbsp;
  214. <label style="margin-top: 5px;"><input type="radio" name="pay_type" value="6" onclick="selectPay(6)"> 组合付款 </label>&nbsp;&nbsp;
  215. </div>
  216. </div>
  217. <div class="form-group" id="payname" style="display:none;">
  218. <label class="col-xs-2 control-label"></label>
  219. <div class="col-xs-10">
  220. <table class="table table-bordered">
  221. <tr>
  222. <th>现金</th>
  223. <!-- <th>预付款</th>-->
  224. <th>支付宝</th>
  225. <th>银行托收</th>
  226. <th>微信</th>
  227. </tr>
  228. <tr>
  229. <th><input type="number" name="pay_data[1]"></th>
  230. <!-- <th><input type="number" name="PAY_DATA[2]"></th>-->
  231. <th><input type="number" name="pay_data[3]"></th>
  232. <th><input type="number" name="pay_data[4]"></th>
  233. <th><input type="number" name="pay_data[5]"></th>
  234. </tr>
  235. </table>
  236. </div>
  237. </div>
  238. <div class="form-group">
  239. <div class="col-xs-offset-2 col-xs-10">
  240. <button type="submit" class="btn btn-sm btn-primary">确认收费</button>
  241. <a url="{:url('cancel')}?id={$info['id']}" href="javascript:;" onclick="layer_open(this,2)"><span class="btn btn-sm btn-default">返销</span></a>
  242. </div>
  243. </div>
  244. </form>
  245. {/if}
  246. {if $info['status'] == 1}
  247. <div class="col-xs-offset-2 col-xs-10">
  248. {if $userId == $info['create_user_id']}
  249. <a url="{:url('cancel',[],'')}/id/{$info['id']}" href="javascript:;" onclick="layer_open(this,2)"><span class="btn btn-sm btn-default">返销</span></a> &nbsp;
  250. {/if}
  251. <a href="{:url('print',[],'')}/id/{$info['id']}" class="btn btn-sm btn-default">打印缴费单</a>
  252. </div>
  253. {/if}
  254. </div>
  255. </div>
  256. </div>
  257. {/block}
  258. {block name="script"}
  259. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  260. <script>
  261. function selectPre(type) {
  262. if(type == 0){
  263. $('#prename').hide();
  264. }else{
  265. $('#prename').show();
  266. }
  267. }
  268. function selectPay(type) {
  269. if(type == 6){ // 组合支付
  270. $('#payname').show();
  271. }else{
  272. $('#payname').hide();
  273. }
  274. }
  275. $(function(){
  276. laydate.render({
  277. elem: '#payTime',
  278. theme: '#284a94'
  279. });
  280. $("form").submit(function(){
  281. $("button:submit").html('确认收费...').attr("disabled", true);
  282. var self = $(this);
  283. $.post(self.attr("action"), self.serialize(), success, "json");
  284. return false;
  285. function success(data){
  286. if(data.code == 1){
  287. layer.msg('缴费成功', {time:2000},function () {
  288. window.location.reload();
  289. })
  290. } else {
  291. layer.msg(data.msg);
  292. $("button:submit").html('确认收费').attr("disabled", false);
  293. }
  294. }
  295. });
  296. });
  297. </script>
  298. {/block}