addr_work.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="ibox">
  4. <div class="ibox-title">
  5. <h5>{$meta_title} </h5>
  6. <div class="ibox-tools">
  7. </div>
  8. </div>
  9. <div class="ibox-content">
  10. <div class="row">
  11. <div class="col-xs-12" style="text-align: left;">
  12. <form class="form-inline" id="search_form" action="{:url('addrWork',['mode'=>$mode])}">
  13. <div class="input-group" style="width: 200px">
  14. {:widget_view('common/laydate',['name'=>'day','title' => '日期', 'val' => $day, 'type'=>'date'])}
  15. </div>
  16. <div class="input-group">
  17. <span class="input-group-btn">
  18. <button class="btn-sm btn-primary" type="submit" id ="search-btn" ><i class="fa fa-search"></i></button>
  19. </span> &nbsp;
  20. <span class="input-group-btn">
  21. <button class="btn-sm btn-warning" type="reset" id="search-clear" onclick="empty_search()"><i class="fa fa-undo"></i></button>
  22. </span> &nbsp;
  23. <!-- <span class="input-group-btn">-->
  24. <!-- <button class="btn-sm btn-info" type="button" onclick="printer()"><i class="glyphicon glyphicon-print"></i>打印</button>-->
  25. <!-- </span> &nbsp;-->
  26. <!-- <span class="input-group-btn">-->
  27. <!-- <button class="btn-sm btn-danger" type="button" onclick="exportExcel()"><i class="glyphicon glyphicon-download"></i>导出</button>-->
  28. <!-- </span>-->
  29. </div>
  30. </form>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="panel-group">
  35. <div class="panel panel-default">
  36. <div class="panel-heading clearfix">
  37. <div class="btn-group pull-left">
  38. {$meta_title}
  39. </div>
  40. <div class="btn-group pull-right">
  41. <a href="javascript:;" onclick="printer()" class="btn btn-sm btn btn-primary"><i class="glyphicon glyphicon-print"></i>打印</a>
  42. <a href="javascript:;" onclick="exportExcel()" class="btn btn-success btn-sm"><i class="glyphicon glyphicon-download"></i>导出</a>
  43. </div>
  44. </div>
  45. <div class="panel-body" id="printer">
  46. <table class="table table-bordered">
  47. <thead>
  48. <tr>
  49. <th>地点</th>
  50. <th>总数</th>
  51. <th>本月</th>
  52. <th>本周</th>
  53. <th>今天</th>
  54. <th>昨日未完成</th>
  55. <th>今日未完成</th>
  56. </tr>
  57. </thead>
  58. <tbody>
  59. {foreach $data as $k=>$v}
  60. <tr>
  61. <td>{$v['addr']}</td>
  62. <td>{$v['count']}</td>
  63. <td>{$v['num']}</td>
  64. <td>{$v['num1']}</td>
  65. <td>{$v['num2']}</td>
  66. <td>{$v['num3']}</td>
  67. <td>{$v['num4']}</td>
  68. </tr>
  69. {/foreach}
  70. </tbody>
  71. </table>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. {/block}
  77. {block name="script"}
  78. <script src="/static/browser.js"></script>
  79. <script src="/static/jquery.jqprint-0.3.js"></script>
  80. <script>
  81. function empty_search(){
  82. window.location.href = "{:url('addrWork')}?mode={$mode}";
  83. }
  84. function printer(){
  85. $('#printer').jqprint();
  86. }
  87. function exportExcel() {
  88. window.location.href = "{:url('addrWorkExport',[],false,false)}?"+$('#search_form').serialize()+'&mode={$mode}';
  89. }
  90. </script>
  91. {/block}