waste_day.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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="wasteDay" 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>{$v['title']}</td>
  73. {if !empty($v['data'])}
  74. {foreach $v['data'] as $k1=>$v1}
  75. <td>{$v1}</td>
  76. {/foreach}
  77. {/if}
  78. <td></td>
  79. </tr>
  80. {/foreach}
  81. <tr>
  82. <td>共计:</td>
  83. {if !empty($data) && isset($data[0]['total'])}
  84. {foreach $data[0]['total'] as $k1=>$v1}
  85. <td>{$v1}</td>
  86. {/foreach}
  87. {/if}
  88. <td></td>
  89. </tr>
  90. </tbody>
  91. </table>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. {/block}
  98. {block name="script"}
  99. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  100. <script src="/static/browser.js"></script>
  101. <script src="/static/jquery.jqprint-0.3.js"></script>
  102. <script>
  103. $(function () {
  104. laydate.render({
  105. elem: '#startTime',
  106. trigger: 'click',
  107. theme: '#284a94'
  108. });
  109. laydate.render({
  110. elem: '#endTime',
  111. trigger: 'click',
  112. theme: '#284a94'
  113. });
  114. });
  115. function empty_search(){
  116. window.location.href = 'wasteDay';
  117. }
  118. function printer(){
  119. $('#printer').jqprint();
  120. }
  121. function exportExcel() {
  122. window.location.href = "wasteDayExport?"+$('#search_form').serialize();
  123. }
  124. </script>
  125. {/block}