bzwx.html 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="ibox-content">
  4. <div class="ibox">
  5. <div class="alert">
  6. <form action="bzwx" method="GET" id='search_form' class="form-inline">
  7. <div class="input-group" style="width: 200px">
  8. <span class="input-group-addon">开始时间</span>
  9. <input class="form-control dialog-datetime" id="startTime" name="start" type="text" data-date-format="yyyy-mm-dd" value="{$start}" placeholder="" readonly/>
  10. </div>
  11. <div class="input-group" style="width: 200px">
  12. <span class="input-group-addon">结束时间</span>
  13. <input class="form-control dialog-datetime" id="endTime" name="end" type="text" data-date-format="yyyy-mm-dd" value="{$end}" placeholder="" readonly/>
  14. </div>
  15. <div class="input-group" style="width: 200px">
  16. <input class="form-control" name="title" type="text" value="{$title}" placeholder="部门名称"/>
  17. </div>
  18. <div class="input-group">
  19. <span class="input-group-btn">
  20. <button class="btn-sm btn-primary" type="submit" ><i class="fa fa-search"></i></button>
  21. </span>&nbsp;
  22. <span class="input-group-btn">
  23. <button class="btn-sm btn-warning" type="reset" onclick="empty_search()"><i class="fa fa-undo"></i></button>
  24. </span>
  25. </div>
  26. </form>
  27. </div>
  28. <div class="panel-group">
  29. <div class="panel panel-default">
  30. <div class="panel-heading clearfix">
  31. <div class="btn-group pull-left">
  32. 部门维修工作量统计表
  33. </div>
  34. <div class="btn-group pull-right">
  35. <a href="javascript:;" onclick="printer()" class="btn btn-sm btn btn-primary"><i class="glyphicon glyphicon-print"></i>打印</a>
  36. <a href="javascript:;" onclick="exportExcel()" class="btn btn-success btn-sm"><i class="glyphicon glyphicon-download"></i>导出</a>
  37. </div>
  38. </div>
  39. <div class="panel-body" id="printer">
  40. <table class="table table-bordered">
  41. <thead>
  42. <tr>
  43. <th>部门名称</th>
  44. <th>接工量</th>
  45. <th>完工量</th>
  46. <th>未完工量</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. {foreach $data as $k=>$v}
  51. <tr>
  52. <td>{$v['title']}</td>
  53. <td>{$v['accepted']}</td>
  54. <td>{$v['num']}</td>
  55. <td>{$v['nFinish']}</td>
  56. </tr>
  57. {/foreach}
  58. </tbody>
  59. </table>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. {/block}
  66. {block name="script"}
  67. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  68. <script src="/static/browser.js"></script>
  69. <script src="/static/jquery.jqprint-0.3.js"></script>
  70. <script>
  71. $(function () {
  72. laydate.render({
  73. elem: '#startTime',
  74. trigger: 'click',
  75. theme: '#148d8f'
  76. });
  77. laydate.render({
  78. elem: '#endTime',
  79. trigger: 'click',
  80. theme: '#148d8f'
  81. });
  82. });
  83. function empty_search(){
  84. window.location.href = 'bzwx';
  85. }
  86. function printer(){
  87. $('#printer').jqprint();
  88. }
  89. function exportExcel() {
  90. window.location.href = "bzwxExport?"+$('#search_form').serialize();
  91. }
  92. </script>
  93. {/block}