mate_items_details.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-3">
  7. </div>
  8. <div class="col-xs-9" style="text-align: right;">
  9. <div class="ibox-tools">
  10. <a class="toback" href="{:url('mateItems',['month' => $month])}">
  11. 返回上一页
  12. </a>
  13. </div>
  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('mateItemsDetails',['id'=>$id,'month'=>$month])}",
  35. datatype: "json",
  36. colModel:[
  37. {label:'使用人',name:'nickname',index:'nickname',width:80,editable: false,sortable: false},
  38. {label:'使用时间',name:'create_time',index:'create_time',width:80,editable: false,sortable: false},
  39. {label:'物品名称',name:'title',index:'title',width:80,editable: false,sortable: false},
  40. {label:'使用数量',name:'total',index:'total',width:80,editable: false,sortable: false},
  41. {label:'单个价格',name:'money',index:'money',width:80,editable: false,sortable: false},
  42. {label:'总价钱',name:'total_money',index:'total_money',width:80,editable: false,sortable: false},
  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: "desc",
  54. caption:"{$meta_title}",
  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}