show2.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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('show2')}">
  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="1">已缴费</option>
  30. <option value="2">审核中</option>
  31. <option value="3">已返销</option>
  32. </select>
  33. </div>
  34. <div class="input-group">
  35. <span class="input-group-btn">
  36. <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
  37. </span> &nbsp;
  38. <span class="input-group-btn">
  39. <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  40. </span>&nbsp;
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="ibox-content">
  47. <div class="jqGrid_wrapper">
  48. <table id="table" style="border-collapse: collapse"></table>
  49. <div id="pager"></div>
  50. </div>
  51. </div>
  52. </div>
  53. {/block}
  54. {block name="script"}
  55. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  56. <script>
  57. $(function () {
  58. laydate.render({
  59. elem: '#start',
  60. trigger: 'click' ,
  61. theme: '#284a94'
  62. });
  63. laydate.render({
  64. elem: '#end',
  65. trigger: 'click' ,
  66. theme: '#284a94'
  67. });
  68. laydate.render({
  69. elem: '#wstart',
  70. trigger: 'click' ,
  71. theme: '#284a94'
  72. });
  73. laydate.render({
  74. elem: '#wend',
  75. trigger: 'click' ,
  76. theme: '#284a94'
  77. });
  78. $(window).bind("resize",function(){
  79. var width=$(".jqGrid_wrapper").width();
  80. $("#table").setGridWidth(width);
  81. });
  82. $.jgrid.defaults.styleUI="Bootstrap";
  83. $("#table").jqGrid({
  84. url:"{:url('show2',[],'')}",
  85. datatype: "json",
  86. colModel:[
  87. {label:'单据号',name:'sn',index:'sn', width:40,sortable: false},
  88. {label:'业主',name:'full_name',index:'full_name',width:30,editable: false,sortable: false},
  89. {label:'应收',name:'money',index:'money',width:30,editable: false,sortable: false},
  90. {label:'实收',name:'true_money',index:'true_money',width:30,editable: false,sortable: false},
  91. {label:'预付款',name:'pre_money',index:'pre_money',width:30,editable: false,sortable: false},
  92. {label:'状态',name:'status',index:'status',width:40,editable: false,sortable: false,formatter:function (a,b,c){
  93. var tt = '';
  94. if(a == 2){
  95. tt+='<span class="label label-danger">待审核</span>';
  96. }
  97. if(a == 0){
  98. tt+='未缴费';
  99. }
  100. if(a == 1){
  101. tt+='已缴费';
  102. }
  103. if(a == 3){
  104. tt+= '<span style="color: blue">(已返销)</span>';
  105. }
  106. if(a == 1 && c.is_cancel==1){
  107. tt+= '<span style="color: red">(拒绝)</span>';
  108. }
  109. return tt;
  110. }},
  111. {label:'备注',name:'remark',index:'remark',width:40,editable: false,sortable: false},
  112. {label:'处理时间',name:'cancel_time',index:'cancel_time',width:40,editable: false,sortable: false},
  113. {label:'返销原因',name:'cancel_reason',index:'cancel_reason',width:40,editable: false,sortable: false},
  114. {label:'支付方式',name:'pay_type',index:'pay_type',width:30,editable: false,sortable: false,formatter:function (a,b,c){
  115. var tt = '';
  116. if(a == 1){
  117. tt+='现金';
  118. }
  119. if(a == 3){
  120. tt+='支付宝';
  121. }
  122. if(a == 4){
  123. tt+='银行托收';
  124. }
  125. if(a == 5){
  126. tt+='微信';
  127. }
  128. if(a == 6){
  129. tt+='组合付款';
  130. }
  131. return tt;
  132. }},
  133. {label:'创建日期',name:'create_time',index:'create_time',width:50,editable: false,sortable: false},
  134. {label:'操作',width:30,sortable: false,formatter: function (a, b, c) {
  135. // var editurl = "{:url('add',[],'')}/id/"+c.id;
  136. // var delurl = "{:url('del',[],'')}/id/"+c.id;
  137. var detail_url = "{:url('detail2',[],'')}/id/"+c.id;
  138. var btn = '<a href="'+detail_url+'" ><span class="label label-primary" >详情</span></a>';
  139. return btn;
  140. }},
  141. ],
  142. rowNum:10,
  143. rowList:[10,20,30,50,100],
  144. pager: '#pager',
  145. sortname: 'id',
  146. viewrecords: true,
  147. autowidth:true,
  148. mtype: 'post',
  149. height: 'auto',
  150. emptyrecords: "暂无数据",
  151. sortorder: "desc",
  152. caption:"返销单",
  153. loadComplete: function (xhr) {
  154. if(xhr.code==0){
  155. layer.msg(xhr.msg);
  156. return false;
  157. }
  158. var dsh = xhr.dsh;
  159. $('#pager_left').html('<span style="color:red;font-size: 10px;">待审核:'+dsh);
  160. },
  161. });
  162. });
  163. </script>
  164. {/block}