flist.html 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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('flist')}">
  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="area_title" placeholder="小区">
  13. </div>
  14. <div class="input-group">
  15. <input type="text" class="form-control" name="title" placeholder="名称">
  16. </div>
  17. <div class="input-group">
  18. <input type="text" class="form-control" name="name" placeholder="业主">
  19. </div>
  20. <div class="input-group">
  21. <input class="form-control" id="start" readonly placeholder="开始时间" name="start" >
  22. </div>
  23. <div class="input-group">
  24. <input class="form-control" id="end" readonly placeholder="结束时间" name="end" >
  25. </div>
  26. <div class="input-group">
  27. <input class="form-control" id="wstart" readonly placeholder="周期开始时间" name="wstart" >
  28. </div>
  29. <div class="input-group">
  30. <input class="form-control" id="wend" readonly placeholder="周期结束时间" name="wend" >
  31. </div>
  32. </br>
  33. </br>
  34. <div class="input-group">
  35. <select name="cate" class="form-control">
  36. <option value="">资源属性</option>
  37. <option value="1">住房</option>
  38. <option value="2">商铺</option>
  39. <option value="3">营业房</option>
  40. <option value="4">储藏室</option>
  41. <option value="5">停车位</option>
  42. </select>
  43. </div>
  44. <div class="input-group">
  45. <select name="fee" class="form-control">
  46. <option value="">收费科目</option>
  47. {foreach $fee as $k=>$v}
  48. <option value="{$v['id']}">[{$v['parent_title']}]{$v['title']}</option>
  49. {/foreach}
  50. </select>
  51. </div>
  52. <div class="input-group">
  53. <select name="c_type" class="form-control">
  54. <option value="">类型</option>
  55. {foreach $cType as $k=>$v}
  56. <option value="{$v['id']}">{$v['name']}</option>
  57. {/foreach}
  58. </select>
  59. </div>
  60. </br>
  61. </br>
  62. <div class="input-group">
  63. <span class="input-group-btn">
  64. <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
  65. </span> &nbsp;
  66. <span class="input-group-btn">
  67. <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  68. </span>&nbsp;
  69. <span class="input-group-btn">
  70. <button class="btn-sm btn-primary" data-url="{:url('fexport')}" type="button" id ="export" ><i class="fa fa-download"></i></button>
  71. </span>
  72. </div>
  73. </form>
  74. </div>
  75. </div>
  76. </div>
  77. <div class="ibox-content">
  78. <div class="jqGrid_wrapper">
  79. <table id="table" style="border-collapse: collapse"></table>
  80. <div id="pager"></div>
  81. </div>
  82. </div>
  83. </div>
  84. {/block}
  85. {block name="script"}
  86. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  87. <script>
  88. $(function () {
  89. laydate.render({
  90. elem: '#start',
  91. trigger: 'click' ,
  92. theme: '#284a94'
  93. });
  94. laydate.render({
  95. elem: '#end',
  96. trigger: 'click' ,
  97. theme: '#284a94'
  98. });
  99. laydate.render({
  100. elem: '#wstart',
  101. trigger: 'click' ,
  102. theme: '#284a94'
  103. });
  104. laydate.render({
  105. elem: '#wend',
  106. trigger: 'click' ,
  107. theme: '#284a94'
  108. });
  109. $(window).bind("resize",function(){
  110. var width=$(".jqGrid_wrapper").width();
  111. $("#table").setGridWidth(width);
  112. });
  113. $.jgrid.defaults.styleUI="Bootstrap";
  114. $("#table").jqGrid({
  115. url:"{:url('flist',[],'')}",
  116. datatype: "json",
  117. colModel:[
  118. {label:'单据号',name:'sn',index:'sn', width:40,sortable: false},
  119. {label:'业主',name:'name',index:'name',width:30,editable: false,sortable: false},
  120. {label:'小区',name:'area_title',index:'area_title',width:30,editable: false,sortable: false},
  121. {label:'资源名称',name:'title',index:'title',width:30,editable: false,sortable: false},
  122. {label:'资源属性',name:'cate_name',index:'cate_name',width:30,editable: false,sortable: false},
  123. {label:'类型',name:'c_type_name',index:'c_type_name',width:30,editable: false,sortable: false},
  124. {label:'收费科目',name:'fee_title',index:'fee_title',width:30,editable: false,sortable: false},
  125. {label:'金额',name:'money',index:'money',width:30,editable: false,sortable: false},
  126. {label:'退费金额',name:'refundMoney',index:'refundMoney',width:50,editable: false,sortable: false,formatter:function (a,b,c){
  127. if(a > 0){
  128. return '<span style="color: red">-'+a.toFixed(2)+'</span>';
  129. }else {
  130. return a.toFixed(2);
  131. }
  132. }},
  133. {label:'起止日期',name:'end',index:'end',width:50,editable: false,sortable: false,formatter:function (a,b,c){
  134. return c.start+'-'+c.end;
  135. }},
  136. {label:'备注',name:'remark',index:'remark',width:40,editable: false,sortable: false},
  137. {label:'创建日期',name:'create_time',index:'create_time',width:50,editable: false,sortable: false},
  138. {label:'操作',width:60,sortable: false,formatter: function (a, b, c) {
  139. // var editurl = "{:url('add',[],'')}/id/"+c.id;
  140. // var delurl = "{:url('del',[],'')}/id/"+c.id;
  141. var refund_url = "{:url('refund',[],'')}/id/"+c.id;
  142. var selfFlist2_url = "{:url('selfFlist2',[],'')}/id/"+c.pay_id;
  143. var cancel_refund_url = "{:url('cancelRefund',[],'')}/id/"+c.id;
  144. var detail_url = "{:url('detail',[],'')}/id/"+c.id;
  145. var btn = '';
  146. if(c.cur_user_id===c.create_user_id){
  147. if(c.money > c.refundMoney){
  148. btn+= '<a url="'+refund_url+'" href="javascript:;" data-title="退款" onclick="layer_open(this,1)"><span class="label label-primary" title="退款">退款</span></a>&nbsp;';
  149. }
  150. if(c.is_show_log >0){
  151. btn+= '<a href="'+selfFlist2_url+'" ><span class="label label-primary" >退款记录</span></a>';
  152. }
  153. }
  154. return btn;
  155. }},
  156. ],
  157. rowNum:10,
  158. rowList:[10,20,30,50,100],
  159. pager: '#pager',
  160. sortname: 'id',
  161. viewrecords: true,
  162. autowidth:true,
  163. mtype: 'post',
  164. height: 'auto',
  165. emptyrecords: "暂无数据",
  166. sortorder: "desc",
  167. caption:"缴费单管理",
  168. loadComplete: function (xhr) {
  169. if(xhr.code==0){
  170. layer.msg(xhr.msg);
  171. return false;
  172. }
  173. var zje = xhr.zje;
  174. $('#pager_left').html('<span style="color:red;font-size: 10px;">总金额:'+zje+' 元');
  175. },
  176. });
  177. });
  178. </script>
  179. {/block}