day.html 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="ibox-title">
  4. <h5>订餐日统计</h5>
  5. <div class="ibox-tools">
  6. </div>
  7. </div>
  8. <div class="row">
  9. <div class="col-sm-12">
  10. <div class="ibox float-e-margins">
  11. <div class="ibox-content">
  12. <ul class="nav nav-tabs" id="myTab">
  13. <li class="{$cate==0?'active':''}">
  14. <a href="{:url('day')}?cate=0">
  15. 普通订单
  16. </a>
  17. </li>
  18. <li class="{$cate==1?'active':''}">
  19. <a href="{:url('day')}?cate=1">
  20. 特殊订单
  21. </a>
  22. </li>
  23. </ul>
  24. </div>
  25. <div class="ibox-content">
  26. <div class="tab-content">
  27. <form action="{:url('day',['cate'=>$cate])}" method="GET" class="form-inline">
  28. <div class="input-group">
  29. {:widget_view('common/laydate',['name'=>'start','title' => '下单日期','type' => 'date','val'=>$start])}
  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-info" type="button" onclick="printer()"><i class="glyphicon glyphicon-print"></i>打印</button>
  37. </span>
  38. </div>
  39. </form>
  40. </div>
  41. </div>
  42. <div class="ibox-content" style="overflow-y: auto">
  43. <div id="visaReport">
  44. <table class="table table-bordered" >
  45. <thead>
  46. <tr>
  47. {foreach $type as $k=>$v}
  48. <th nowrap="nowrap" class="text-center">{$v.dinner_type_name}</th>
  49. <th nowrap="nowrap" class="text-center">¥{$v.total}</th>
  50. {/foreach}
  51. </tr>
  52. </thead>
  53. <tbody>
  54. {foreach $data as $k=>$v}
  55. <tr>
  56. {foreach $type as $k1=>$v1}
  57. <th nowrap="nowrap" class="text-center">{$v['name'.$v1['id']]}</th>
  58. <th nowrap="nowrap" class="text-center">{$v['price'.$v1['id']]}</th>
  59. {/foreach}
  60. </tr>
  61. {/foreach}
  62. </tbody>
  63. </table>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. {/block}
  70. {block name="script"}
  71. <script src="/static/browser.js"></script>
  72. <script src="/static/jquery.jqprint-0.3.js"></script>
  73. <script>
  74. function printer() {
  75. $("#visaReport").jqprint({});
  76. }
  77. </script>
  78. {/block}