| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 | {extend name="common/common2" /}{block name="main"}<div class="ibox">    <div class="ibox-title">        <h5>{$meta_title} </h5>        <div class="ibox-tools">        </div>    </div>    <div class="ibox-content">        <div class="row">            <div class="col-xs-12" style="text-align: left;">                <form class="form-inline" id="search_form" action="{:url('addrWork',['mode'=>$mode])}">                    <div class="input-group" style="width: 200px">                        {:widget_view('common/laydate',['name'=>'day','title' => '日期', 'val' => $day, 'type'=>'date'])}                    </div>                    <div class="input-group">                        <span class="input-group-btn">                            <button class="btn-sm btn-primary" type="submit" id ="search-btn" ><i class="fa fa-search"></i></button>                        </span>                          <span class="input-group-btn">                            <button class="btn-sm btn-warning" type="reset" id="search-clear" onclick="empty_search()"><i class="fa fa-undo"></i></button>                        </span>  <!--                        <span class="input-group-btn">--><!--                            <button class="btn-sm btn-info" type="button" onclick="printer()"><i class="glyphicon glyphicon-print"></i>打印</button>--><!--                        </span>  -->                        <span class="input-group-btn">                            <button class="btn-sm btn-danger" type="button" onclick="exportExcel()"><i class="glyphicon glyphicon-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 src="/static/browser.js"></script><script src="/static/jquery.jqprint-0.3.js"></script><script>    $(function () {        $(window).bind("resize",function(){            var width=$(".jqGrid_wrapper").width();            $("#table").setGridWidth(width);        });        $.jgrid.defaults.styleUI="Bootstrap";        $("#table").jqGrid({            url:"{:url('addrWork',['mode'=>$mode])}",            datatype: "json",            colModel:[                {label:'地点',name:'addr',index:'addr', width:100,sortable: false},                {label:'总数',name:'count',index:'count', width:60,sortable: false},                {label:'本月',name:'num',index:'num', width:60,sortable: false},                {label:'本周',name:'num1',index:'num1', width:60,sortable: false},                {label:'今天',name:'num2',index:'num2', width:60,sortable: false},                {label:'昨日未完成',name:'num3',index:'num3', width:60,sortable: false},                {label:'今日未完成',name:'num4',index:'num4', 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;                }            },        });    });    function empty_search(){        window.location.href = "{:url('addrWork')}?mode={$mode}";    }    function printer(){        $('#printer').jqprint();    }    function exportExcel() {        window.location.href = "{:url('addrWorkExport',[],false,false)}?"+$('#search_form').serialize()+'&mode={$mode}';    }</script>{/block}
 |