123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-12" style="text-align: right;">
- <form class="form-inline" id="form-search" action="{:url('tj')}">
- <div class="input-group">
- <input type="text" class="form-control" name="title" placeholder="会议室名称">
- </div>
- <div class="input-group">
- {:widget_view('common/laydate',['name'=>'start','title' => '开始时间'])}
- </div>
- <div class="input-group">
- {:widget_view('common/laydate',['name'=>'end','title' => '结束时间'])}
- </div>
- <div class="input-group">
- <span class="input-group-btn">
- <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
- </span>
- <span class="input-group-btn">
- <button class="btn-sm btn-warning " type="button" id="search-clear"><i class="fa fa-undo"></i></button>
- </span>
- <span class="input-group-btn">
- <button data-url="{:url('tjexport',[],'')}" title="导出" class="btn-sm btn-info" onclick="excel_download(this)" type="button" ><i class="fa fa-cloud-download"></i></button>
- </span>
- </div>
- </form>
- </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 excel_download(_self){
- var url = $(_self).attr('data-url');
- var param = $('#form-search').serialize();
- window.location.href = url+'?'+param;
- }
- $(function () {
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('tj')}",
- datatype: "json",
- colModel:[
- {label:'编号',name:'id',index:'id', width:50,sortable: false},
- {label:'会议室名称',name:'title',index:'title', width:120,sortable: false},
- {label:'预约总单数',name:'count',index:'count', width:80,sortable: false},
- {label:'待审核单数',name:'count1',index:'count1', width:80,sortable: false},
- {label:'同意单数',name:'count2',index:'count2', width:80,sortable: false},
- {label:'拒绝单数',name:'count3',index:'count3', width:80,sortable: false},
- {label:'取消单数',name:'count4',index:'count4', width:80,sortable: false},
- {label:'有效时长(已同意)',name:'hour',index:'hour',width:90,editable: false,sortable: false},
- ],
- rowNum:10000,
- rowList:[10000,20000,30000,40000,50000],
- pager: '#pager',
- sortname: 'id',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "desc",
- caption:"会议室统计",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- </script>
- {/block}
|