index.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. <span class="input-group-btn">
  10. <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  11. </span>
  12. </div>
  13. </form>
  14. </div>
  15. </div>
  16. </div>
  17. <div class="ibox-content">
  18. <div class="jqGrid_wrapper">
  19. <table id="table" style="border-collapse: collapse"></table>
  20. <div id="pager"></div>
  21. </div>
  22. </div>
  23. </div>
  24. {/block}
  25. {block name="script"}
  26. <script>
  27. $(function () {
  28. $(window).bind("resize",function(){
  29. var width=$(".jqGrid_wrapper").width();
  30. $("#table").setGridWidth(width);
  31. });
  32. $.jgrid.defaults.styleUI="Bootstrap";
  33. $("#table").jqGrid({
  34. url:"{:url('index')}",
  35. datatype: "json",
  36. colModel:[
  37. {label:'ID',name:'id',index:'id', width:30,sortable: false},
  38. {label:'退款单号',name:'sn',index:'sn',width:150,editable: false,sortable: false},
  39. {label:'订单id',name:'order_id',index:'order_id',width:80,sortable: true},
  40. {label:'退款金额',name:'money',index:'money',width:80,sortable: true},
  41. {label:'操作人',name:'userName',index:'userName',width:80,sortable: true},
  42. {label:'操作时间',name:'create_time',index:'create_time',width:80,sortable: true},
  43. ],
  44. rowNum:10,
  45. rowList:[10,20,30,50,100],
  46. pager: '#pager',
  47. sortname: 'id',
  48. viewrecords: true,
  49. autowidth:true,
  50. mtype: 'post',
  51. height: 'auto',
  52. emptyrecords: "暂无数据",
  53. sortorder: "asc",
  54. caption:"退款列表",
  55. loadComplete: function (xhr) {
  56. if(xhr.code==0){
  57. layer.msg(xhr.msg);
  58. return false;
  59. }
  60. },
  61. });
  62. });
  63. </script>
  64. {/block}