123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- {extend name="common/common2" /}
- {block name="main"}
- <style>
- .combined{
- width: 100%;
- height: auto;
- font-size: 22px;
- padding: 10px;
- background: #fff;
- }
- </style>
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-3">
- <div class="btn-group pull-left">
- <a href="javascript:;" onclick="printer()" class="btn btn-sm btn btn-primary"><i class="glyphicon glyphicon-print"></i> 打印</a>
- <a href="{:url('conveyCateWorkloadExport',['start'=>$start,'end'=>$end])}" class="btn btn-sm btn-danger"><i class="fa fa-cloud-download"> 导出</i></a>
- </div>
- </div>
- <div class="col-xs-9" style="text-align: right;">
- <form class="form-inline" id="form-search" action="{:url('conveyCateWorkload')}">
- <div class="input-group">
- <input class="form-control" value="{$start}" id="start" readonly placeholder="开始时间" name="start" >
- </div>
- <div class="input-group">
- <input class="form-control" value="{$end}" id="end" readonly placeholder="结束时间" name="end" >
- </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>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="ibox-content">
- <div class="jqGrid_wrapper" id="printer">
- <table id="table" style="border-collapse: collapse"></table>
- <div id="pager"></div>
- </div>
- <!-- <div class="combined">合计:</div>-->
- </div>
- </div>
- {/block}
- {block name="script"}
- <script src="/static/layDate-v5.0.9/laydate.js"></script>
- <script src="/static/browser.js"></script>
- <script src="/static/jquery.jqprint-0.3.js"></script>
- <script>
- $(function () {
- laydate.render({
- elem: '#start',
- trigger: 'click' ,
- theme: '#284a94'
- });
- laydate.render({
- elem: '#end',
- trigger: 'click' ,
- theme: '#284a94'
- });
- });
- function printer(){
- $('#printer').jqprint();
- }
- $(function () {
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('conveyCateWorkload')}",
- datatype: "json",
- colModel:[
- {label:'运送地点',name:'title',index:'title', width:80,sortable: false},
- {label:'标本',name:'nums',index:'nums', width:80,sortable: false},
- ],
- sortname: 'id',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "asc",
- caption:"运送地点工作量统计",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- </script>
- {/block}
|