123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- {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="javascript:void(0)" id="exportBtn" 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('repairWorkload',['mode'=>$mode])}">
- <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('repairWorkload',['mode'=>$mode])}",
- datatype: "json",
- colModel:[
- {label:'姓名',name:'user_name',index:'user_name', width:80,sortable: false},
- {label:'总数',name:'nums',index:'nums', width:80,sortable: false},
- {label:'待领取',name:'nums1',index:'nums1', width:80,sortable: false},
- {label:'已接单',name:'nums2',index:'nums2', width:80,sortable: false},
- {label:'已完成',name:'nums3',index:'nums3', width:80,sortable: false},
- {label:'被员工驳回',name:'nums4',index:'nums4', width:80,sortable: false},
- {label:'客观原因无法完成',name:'nums5',index:'nums5', width:80,sortable: false},
- {label:'已取消',name:'nums6',index:'nums6', width:80,sortable: false},
- ],
- sortname: 'id',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "asc",
- caption:"{$title}",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- $('#exportBtn').click(function (){
- var start = $('#start').val();
- var end = $('#end').val();
- var mode = '{$mode}';
- console.log(start,end);
- window.location.href = "{:url('OrderStatistics/repairWorkloadExport')}?start="+start+'&end='+end+'&mode='+mode;
- })
- </script>
- {/block}
|