1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- {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('workList')}?user_id={$user_id}&is_normal={$is_normal}&type={$type}&start={$start}&end={$end}",
- datatype: "json",
- colModel:[
- {label:'编号',name:'id',index:'id', width:30,sortable: false},
- {label:'执行人',name:'task_user',index:'task_user', width:40,sortable: false},
- {label:'计划名称',name:'task_title',index:'task_title', width:80,sortable: false},
- {label:'地点',name:'address_title',index:'address_title', width:80,sortable: false},
- {label:'内容',name:'content',index:'content', width:60,sortable: false},
- {label:'状态',name:'is_normal',status:'is_normal',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- if(a == 0){
- return '<span title="正常">正常</span>';
- }
- if(a == 1){
- return '<span title="异常">异常</span>';
- }
- }},
- {label:'提交日期',name:'create_time',index:'create_time', width:60,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}
|