waste_years.html 4.7 KB

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