index.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="ibox">
  4. <div class="ibox-content">
  5. <div class="row">
  6. <div class="col-xs-12" style="text-align: right;">
  7. <form class="form-inline" id="form-search" action="{:url('index')}">
  8. <div class="input-group">
  9. <input type="text" class="form-control" name="sn" placeholder="订单号">
  10. </div>
  11. <div class="input-group">
  12. <input type="text" class="form-control" name="name" placeholder="业主">
  13. </div>
  14. <div class="input-group">
  15. <input class="form-control" id="start" readonly placeholder="开始时间" name="start" >
  16. </div>
  17. <div class="input-group">
  18. <input class="form-control" id="end" readonly placeholder="结束时间" name="end" >
  19. </div>
  20. <div class="input-group">
  21. <input class="form-control" id="wstart" readonly placeholder="周期开始时间" name="wstart" >
  22. </div>
  23. <div class="input-group">
  24. <input class="form-control" id="wend" readonly placeholder="周期结束时间" name="wend" >
  25. </div>
  26. <div class="input-group">
  27. <select name="status" class="form-control">
  28. <option value="">选择状态</option>
  29. <option value="0">未缴费</option>
  30. <option value="1">已缴费</option>
  31. <option value="2">审核中</option>
  32. <option value="3">已返销</option>
  33. </select>
  34. </div>
  35. <div class="input-group">
  36. <span class="input-group-btn">
  37. <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
  38. </span> &nbsp;
  39. <span class="input-group-btn">
  40. <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  41. </span>&nbsp;
  42. <span class="input-group-btn">
  43. <button class="btn-sm btn-primary" data-url="{:url('export')}" type="button" id ="export" ><i class="fa fa-download"></i></button>
  44. </span>
  45. </div>
  46. </form>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="ibox-content">
  51. <div class="jqGrid_wrapper">
  52. <table id="table" style="border-collapse: collapse"></table>
  53. <div id="pager"></div>
  54. </div>
  55. </div>
  56. </div>
  57. {/block}
  58. {block name="script"}
  59. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  60. <script>
  61. $(function () {
  62. laydate.render({
  63. elem: '#start',
  64. trigger: 'click' ,
  65. theme: '#148d8f'
  66. });
  67. laydate.render({
  68. elem: '#end',
  69. trigger: 'click' ,
  70. theme: '#148d8f'
  71. });
  72. laydate.render({
  73. elem: '#wstart',
  74. trigger: 'click' ,
  75. theme: '#148d8f'
  76. });
  77. laydate.render({
  78. elem: '#wend',
  79. trigger: 'click' ,
  80. theme: '#148d8f'
  81. });
  82. $(window).bind("resize",function(){
  83. var width=$(".jqGrid_wrapper").width();
  84. $("#table").setGridWidth(width);
  85. });
  86. $.jgrid.defaults.styleUI="Bootstrap";
  87. $("#table").jqGrid({
  88. url:"{:url('index',[],'')}",
  89. datatype: "json",
  90. colModel:[
  91. {label:'单据号',name:'sn',index:'sn', width:40,sortable: false},
  92. {label:'业主',name:'full_name',index:'full_name',width:30,editable: false,sortable: false},
  93. {label:'应收',name:'money',index:'money',width:30,editable: false,sortable: false},
  94. {label:'实收',name:'true_money',index:'true_money',width:30,editable: false,sortable: false},
  95. {label:'预付款',name:'pre_money',index:'pre_money',width:30,editable: false,sortable: false},
  96. {label:'状态',name:'status',index:'status',width:40,editable: false,sortable: false,formatter:function (a,b,c){
  97. var tt = '';
  98. if(a == 2){
  99. tt+='<span class="label label-danger">待审核</span>';
  100. }
  101. if(a == 0){
  102. tt+='未缴费';
  103. }
  104. if(a == 1){
  105. tt+='已缴费';
  106. }
  107. if(a == 3){
  108. tt+= '<span style="color: blue">(已返销)</span>';
  109. }
  110. if(a == 1 && c.is_cancel==1){
  111. tt+= '<span style="color: red">(拒绝)</span>';
  112. }
  113. return tt;
  114. }},
  115. {label:'备注',name:'remark',index:'remark',width:40,editable: false,sortable: false},
  116. {label:'支付方式',name:'pay_type',index:'pay_type',width:30,editable: false,sortable: false,formatter:function (a,b,c){
  117. var tt = '';
  118. if(a == 1){
  119. tt+='现金';
  120. }
  121. if(a == 3){
  122. tt+='支付宝';
  123. }
  124. if(a == 4){
  125. tt+='银行托收';
  126. }
  127. if(a == 5){
  128. tt+='微信';
  129. }
  130. if(a == 6){
  131. tt+='组合付款';
  132. }
  133. return tt;
  134. }},
  135. {label:'最晚缴费时间',name:'last_time',index:'last_time',width:40,editable: false,sortable: false},
  136. {label:'催款',name:'pay_type',index:'pay_type',width:30,editable: false,sortable: false,formatter:function (a,b,c){
  137. if(a==1){
  138. return '已催款';
  139. }else {
  140. return '未催款';
  141. }
  142. }},
  143. {label:'创建日期',name:'create_time',index:'create_time',width:50,editable: false,sortable: false},
  144. {label:'操作',width:30,sortable: false,formatter: function (a, b, c) {
  145. // var editurl = "{:url('add',[],'')}/id/"+c.id;
  146. // var delurl = "{:url('del',[],'')}/id/"+c.id;
  147. var detail_url = "{:url('detail',[],'')}/id/"+c.id;
  148. var btn = '<a href="'+detail_url+'" ><span class="label label-primary" >详情</span></a>';
  149. return btn;
  150. }},
  151. ],
  152. rowNum:10,
  153. rowList:[10,20,30,50,100],
  154. pager: '#pager',
  155. sortname: 'id',
  156. viewrecords: true,
  157. autowidth:true,
  158. mtype: 'post',
  159. height: 'auto',
  160. emptyrecords: "暂无数据",
  161. sortorder: "desc",
  162. caption:"缴费单管理",
  163. loadComplete: function (xhr) {
  164. if(xhr.code==0){
  165. layer.msg(xhr.msg);
  166. return false;
  167. }
  168. var zys = xhr.zys;
  169. var zsh = xhr.zsh;
  170. var zyfk = xhr.zyfk;
  171. $('#pager_left').html('<span style="color:red;font-size: 10px;">总应收:'+zys+' 元&nbsp;&nbsp;&nbsp;总实收:'+zsh+' 元&nbsp;&nbsp;&nbsp;总预付款:'+zyfk);
  172. },
  173. });
  174. });
  175. </script>
  176. {/block}