0
0

waste_month.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. .table th{
  5. text-align: center;
  6. background: #ffffff;
  7. }
  8. .table tr{
  9. background: #ffffff;
  10. }
  11. .table td{
  12. text-align: center;
  13. }
  14. </style>
  15. <div class="ibox-content">
  16. <div class="ibox">
  17. <div class="alert">
  18. <form action="wasteMonth" method="GET" id='search_form' class="form-inline">
  19. <div class="input-group" style="width: 200px">
  20. <span class="input-group-addon">选择日期</span>
  21. <input class="form-control dialog-datetime" id="startTime" name="start" type="text" data-date-format="yyyy-mm-dd" value="{$start}" placeholder="" readonly/>
  22. </div>
  23. <div class="input-group" style="width: 200px">
  24. <span class="input-group-addon">选择类型</span>
  25. {:widget_view('common/multiselect',['name'=>'type_id','lists' =>$typeList1, 'val' => $type_id])}
  26. </div>
  27. <div class="input-group" style="width: 200px">
  28. <span class="input-group-addon">选择地点</span>
  29. {:widget_view('common/multiselect',['name'=>'addr_id','lists' =>$addressList, 'val' => $addr_id])}
  30. </div>
  31. <div class="input-group">
  32. <span class="input-group-btn">
  33. <button class="btn-sm btn-primary" type="submit" ><i class="fa fa-search"></i></button>
  34. </span>&nbsp;
  35. <span class="input-group-btn">
  36. <button class="btn-sm btn-warning" type="reset" onclick="empty_search()"><i class="fa fa-undo"></i></button>
  37. </span>
  38. </div>
  39. </form>
  40. </div>
  41. <div class="panel-group">
  42. <div class="panel panel-default">
  43. <div class="panel-heading clearfix">
  44. <div class="btn-group pull-left">
  45. 医废每月统计
  46. </div>
  47. <div class="btn-group pull-right">
  48. <a href="javascript:;" onclick="printer()" class="btn btn-sm btn btn-primary"><i class="glyphicon glyphicon-print"></i>打印</a>
  49. <a href="javascript:;" onclick="exportExcel()" class="btn btn-success btn-sm"><i class="glyphicon glyphicon-download"></i>导出</a>
  50. </div>
  51. </div>
  52. <div class="panel-body" id="printer">
  53. <table class="table table-bordered">
  54. <thead>
  55. <tr>
  56. <th rowspan="2">日期</th>
  57. {foreach $typeList as $k=>$v}
  58. <th colspan="2">{$v['title']}</th>
  59. {/foreach}
  60. <th rowspan="2">备注</th>
  61. </tr>
  62. <tr>
  63. {foreach $typeList as $k=>$v}
  64. <th>件数/包</th>
  65. <th>重量/kg</th>
  66. {/foreach}
  67. </tr>
  68. </thead>
  69. <tbody>
  70. {foreach $data as $k=>$v}
  71. <tr>
  72. <td>{$k+1}</td>
  73. {foreach $v as $k1=>$v1}
  74. <td>{$v1}</td>
  75. {/foreach}
  76. <td></td>
  77. </tr>
  78. {/foreach}
  79. <tr>
  80. <td>共计:</td>
  81. {if !empty($totalData)}
  82. {foreach $totalData[0] as $k1=>$v1}
  83. <td>{$v1}</td>
  84. {/foreach}
  85. {/if}
  86. <td></td>
  87. </tr>
  88. </tbody>
  89. </table>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. {/block}
  96. {block name="script"}
  97. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  98. <script src="/static/browser.js"></script>
  99. <script src="/static/jquery.jqprint-0.3.js"></script>
  100. <script>
  101. $(function () {
  102. laydate.render({
  103. elem: '#startTime',
  104. trigger: 'click',
  105. theme: '#148d8f',
  106. type:'month'
  107. });
  108. laydate.render({
  109. elem: '#endTime',
  110. trigger: 'click',
  111. theme: '#148d8f'
  112. });
  113. });
  114. function empty_search(){
  115. window.location.href = 'wasteMonth';
  116. }
  117. function printer(){
  118. $('#printer').jqprint();
  119. }
  120. function exportExcel() {
  121. window.location.href = "wasteMonthExport?"+$('#search_form').serialize();
  122. }
  123. </script>
  124. {/block}