123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- {extend name="common/common2" /}
- {block name="main"}
- <style>
- </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('addrWorkHourExport',['start'=>$start,'end'=>$end,'addrIds'=>$addrIds])}" 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" action="{:url('addrWorkHour')}">
- <div class="input-group">
- {:widget_view('common/multiselect',['name'=>'addrIds','lists' => $addrList, 'val' =>isset($addrIds2)?$addrIds2:[]])}
- </div>
- <div class="input-group">
- <input placeholder="开始时间" type="text" class="form-control" readonly id="start" name="start" value="{$start}">
- </div>
- <div class="input-group">
- <input placeholder="结束时间" type="text" class="form-control" readonly id="end" name="end" value="{$end}">
- </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="submit" id="search-clear"><i class="fa fa-undo"></i></button>-->
- <!-- </span>-->
- </div>
- </form>
- </div>
- </div>
- <div class="panel-group" id="printer" style="margin-top: 10px">
- <div class="panel panel-default">
- <div class="panel-body">
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>地点</th>
- <th>工单数</th>
- <th>所需工时</th>
- </tr>
- </thead>
- {foreach $list as $k=>$v}
- <tbody>
- <tr>
- <td>{$v.title}</td>
- <td>{$v.count}</td>
- <td>{$v.count2}</td>
- </tr>
- </tbody>
- {/foreach}
- </table>
- <div class="type-bottom" style="width: 100%;height: 50px;line-height: 50px;padding-left: 20px;">
- <span style="margin-right: 50px"><strong>合计</strong></span>
- <span style="margin-right: 50px">总共单数:{$total}</span>
- <span style="margin-right: 50px">总工时:{$total2}</span>
- <span style="margin-right: 50px">平均工时:{if ($total >0)}{$total2/$total}{else}0{/if}</span>
- </div>
- </div>
- </div>
- </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>
- laydate.render({
- elem: '#start',
- type: 'month',
- trigger: 'click' ,
- format:'yyyy-MM',
- theme:'#1d519c'
- });
- laydate.render({
- elem: '#end',
- type: 'month',
- trigger: 'click' ,
- format:'yyyy-MM',
- theme:'#1d519c'
- });
- function printer(){
- $('#printer').jqprint();
- }
- </script>
- {/block}
|