1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <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('record',['id'=>$id,'s'=>$s,'e'=>$e])}",
- datatype: "json",
- colModel:[
- {label:'编号',name:'id',index:'id', width:40,sortable: false},
- {label:'任务地点名称',name:'title',index:'title', width:80,sortable: false},
- {label:'任务详情',name:'daily_details',index:'daily_details', width:120,sortable: false},
- {label:'工作人员',name:'user_name',index:'user_name', width:100,sortable: false},
- {label:'时间',name:'create_time',index:'create_time', width:80,sortable: false},
- {label:'操作',width:60,sortable: false,formatter: function (a, b, c) {
- var details = "{:url('DailyRecord/details',[],'')}/id/"+c.id;
- var btn = '<a href="'+details+'"><span class="label label-primary" title="详情">详情</span></a>';
- return btn;
- }},
- ],
- 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}
|