addr_work_hour.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. </style>
  5. <div class="ibox">
  6. <div class="ibox-content">
  7. <div class="row">
  8. <div class="col-xs-3">
  9. <div class="btn-group pull-left">
  10. <a href="javascript:;" onclick="printer()" class="btn btn-sm btn btn-primary"><i class="glyphicon glyphicon-print"></i> 打印</a>
  11. <a href="{:url('addrWorkHourExport',['start'=>$start,'end'=>$end,'addrIds'=>$addrIds])}" class="btn btn-sm btn-danger"><i class="fa fa-cloud-download"> 导出</i></a>
  12. </div>
  13. </div>
  14. <div class="col-xs-9" style="text-align: right;">
  15. <form class="form-inline" action="{:url('addrWorkHour')}">
  16. <div class="input-group">
  17. {:widget_view('common/multiselect',['name'=>'addrIds','lists' => $addrList, 'val' =>isset($addrIds2)?$addrIds2:[]])}
  18. </div>
  19. <div class="input-group">
  20. <input placeholder="开始时间" type="text" class="form-control" readonly id="start" name="start" value="{$start}">
  21. </div>
  22. <div class="input-group">
  23. <input placeholder="结束时间" type="text" class="form-control" readonly id="end" name="end" value="{$end}">
  24. </div>
  25. <div class="input-group">
  26. <span class="input-group-btn">
  27. <button class="btn-sm btn-primary" type="submit" id ="search-btn" ><i class="fa fa-search"></i></button>
  28. </span> &nbsp;
  29. <!-- <span class="input-group-btn">-->
  30. <!-- <button class="btn-sm btn-warning" type="submit" id="search-clear"><i class="fa fa-undo"></i></button>-->
  31. <!-- </span>-->
  32. </div>
  33. </form>
  34. </div>
  35. </div>
  36. <div class="panel-group" id="printer" style="margin-top: 10px">
  37. <div class="panel panel-default">
  38. <div class="panel-body">
  39. <table class="table table-bordered">
  40. <thead>
  41. <tr>
  42. <th>地点</th>
  43. <th>工单数</th>
  44. <th>所需工时</th>
  45. </tr>
  46. </thead>
  47. {foreach $list as $k=>$v}
  48. <tbody>
  49. <tr>
  50. <td>{$v.title}</td>
  51. <td>{$v.count}</td>
  52. <td>{$v.count2}</td>
  53. </tr>
  54. </tbody>
  55. {/foreach}
  56. </table>
  57. <div class="type-bottom" style="width: 100%;height: 50px;line-height: 50px;padding-left: 20px;">
  58. <span style="margin-right: 50px"><strong>合计</strong></span>
  59. <span style="margin-right: 50px">总共单数:{$total}</span>
  60. <span style="margin-right: 50px">总工时:{$total2}</span>
  61. <span style="margin-right: 50px">平均工时:{if ($total >0)}{$total2/$total}{else}0{/if}</span>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. {/block}
  69. {block name="script"}
  70. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  71. <script src="/static/browser.js"></script>
  72. <script src="/static/jquery.jqprint-0.3.js"></script>
  73. <script>
  74. laydate.render({
  75. elem: '#start',
  76. type: 'month',
  77. trigger: 'click' ,
  78. format:'yyyy-MM',
  79. theme:'#1d519c'
  80. });
  81. laydate.render({
  82. elem: '#end',
  83. type: 'month',
  84. trigger: 'click' ,
  85. format:'yyyy-MM',
  86. theme:'#1d519c'
  87. });
  88. function printer(){
  89. $('#printer').jqprint();
  90. }
  91. </script>
  92. {/block}