0
0

apply.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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-3" >
  7. </div>
  8. <div class="col-xs-9" style="text-align: right;">
  9. <form class="form-inline" id="form-search" action="{:url('apply')}">
  10. <div class="input-group">
  11. <input class="form-control" id="start" readonly placeholder="开始时间" name="start" >
  12. </div>
  13. <div class="input-group">
  14. <input class="form-control" id="end" readonly placeholder="结束时间" name="end" >
  15. </div>
  16. <div class="input-group">
  17. <select name="status" class="form-control">
  18. <option value="">状态</option>
  19. <option value="0">待审核</option>
  20. <option value="1">同意</option>
  21. <option value="2">拒绝</option>
  22. <option value="3">已取消</option>
  23. </select>
  24. </div>
  25. <div class="input-group">
  26. <span class="input-group-btn">
  27. <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
  28. </span> &nbsp;
  29. <span class="input-group-btn">
  30. <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  31. </span>
  32. </div>
  33. </form>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="ibox-content">
  38. <div class="jqGrid_wrapper">
  39. <table id="table" style="border-collapse: collapse"></table>
  40. <div id="pager"></div>
  41. </div>
  42. </div>
  43. </div>
  44. {/block}
  45. {block name="script"}
  46. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  47. <script>
  48. $(function () {
  49. laydate.render({
  50. elem: '#start',
  51. trigger: 'click' ,
  52. theme: '#148d8f'
  53. });
  54. laydate.render({
  55. elem: '#end',
  56. trigger: 'click' ,
  57. theme: '#148d8f'
  58. });
  59. $(window).bind("resize",function(){
  60. var width=$(".jqGrid_wrapper").width();
  61. $("#table").setGridWidth(width);
  62. });
  63. $.jgrid.defaults.styleUI="Bootstrap";
  64. $("#table").jqGrid({
  65. url:"{:url('apply')}",
  66. datatype: "json",
  67. colModel:[
  68. {label:'交款人',name:'real_name',index:'real_name', width:40,sortable: false},
  69. {label:'开始时间',name:'start',index:'start',width:40,editable: false,sortable: false},
  70. {label:'结束时间',name:'end',index:'end',width:40,editable: false,sortable: false},
  71. {label:'交款总金额',name:'true_money',index:'true_money',width:30,editable: false,sortable: false},
  72. {label:'状态',name:'status',index:'status',width:30,editable: false,sortable: false,formatter:function (a,b,c){
  73. if(a===0){
  74. return '待审核';
  75. }else if (a===1){
  76. return '同意';
  77. }else if (a===2){
  78. return '拒绝';
  79. }else if (a===3){
  80. return '已取消';
  81. }
  82. }},
  83. {label:'财务收款人',name:'deal_real_name',index:'deal_real_name',width:30,editable: false,sortable: false},
  84. {label:'处理时间',name:'update_time',index:'update_time',width:50,editable: false,sortable: false},
  85. {label:'操作',width:30,sortable: false,formatter: function (a, b, c) {
  86. var detail_url = "{:url('detail2',[],'')}/id/"+c.id;
  87. var btn = '';
  88. btn+= '<a href="'+detail_url+'" ><span class="label label-primary" >详情</span></a>';
  89. return btn;
  90. }},
  91. ],
  92. rowNum:10,
  93. rowList:[10,20,30,50,100],
  94. pager: '#pager',
  95. sortname: 'id',
  96. viewrecords: true,
  97. autowidth:true,
  98. mtype: 'post',
  99. height: 'auto',
  100. emptyrecords: "暂无数据",
  101. sortorder: "desc",
  102. caption:"扎帐列表",
  103. loadComplete: function (xhr) {
  104. if(xhr.code==0){
  105. layer.msg(xhr.msg);
  106. return false;
  107. }
  108. },
  109. });
  110. });
  111. </script>
  112. {/block}