1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-3">
- </div>
- <div class="col-xs-9" style="text-align: right;">
- <div class="ibox-tools">
- <a class="toback" href="{:url('mateItems',['month' => $month])}">
- 返回上一页
- </a>
- </div>
- </div>
- </div>
- </div>
- <div class="ibox-content">
- <div class="jqGrid_wrapper">
- <table id="table" style="border-collapse: collapse"></table>
- <div id="pager"></div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script>
- $(function () {
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('mateItemsDetails',['id'=>$id,'month'=>$month])}",
- datatype: "json",
- colModel:[
- {label:'使用人',name:'nickname',index:'nickname',width:80,editable: false,sortable: false},
- {label:'使用时间',name:'create_time',index:'create_time',width:80,editable: false,sortable: false},
- {label:'物品名称',name:'title',index:'title',width:80,editable: false,sortable: false},
- {label:'使用数量',name:'total',index:'total',width:80,editable: false,sortable: false},
- {label:'单个价格',name:'money',index:'money',width:80,editable: false,sortable: false},
- {label:'总价钱',name:'total_money',index:'total_money',width:80,editable: false,sortable: false},
- ],
- rowNum:10,
- rowList:[10,20,30,50,100],
- pager: '#pager',
- sortname: 'id',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "desc",
- caption:"{$meta_title}",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- </script>
- {/block}
|