orgasdinner.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. <div class="tab-content">
  13. <form action="{:url('orgasdinner',['cate'=>$cate])}" method="GET" id="ss" class="form-inline">
  14. <div class="input-group">
  15. <select name="org_id" class="form-control">
  16. <option value="0">选择项目</option>
  17. {foreach $orgList as $k=>$v}
  18. <option value="{$v.id}">{$v.name}</option>
  19. {/foreach}
  20. </select>
  21. </div>
  22. <div class="input-group">
  23. <select name="type" class="form-control">
  24. <option value="0">按天统计</option>
  25. <option value="1">按项目统计</option>
  26. </select>
  27. </div>
  28. <div class="input-group" style="width: 200px">
  29. {:widget_view('common/laydate',['name'=>'start','title' => '开始日期','type' => 'date','val'=>$start])}
  30. </div>
  31. <div class="input-group" style="width: 200px">
  32. {:widget_view('common/laydate',['name'=>'end','title' => '结束日期','type' => 'date','val'=>$end])}
  33. </div>
  34. <div class="input-group">
  35. <span class="input-group-btn">
  36. <button class="btn-sm btn-primary" type="submit" ><i class="fa fa-search"></i></button>
  37. </span> &nbsp; <span class="input-group-btn">
  38. <button class="btn-sm btn-warning" type="button" onclick="empty_search()"><i class="fa fa-undo"></i></button>
  39. </span> &nbsp; <span class="input-group-btn">
  40. <button class="btn-sm btn-info" type="button" onclick="printer()"><i class="glyphicon glyphicon-print"></i>打印</button>
  41. </span> &nbsp;
  42. <span class="input-group-btn">
  43. <button class="btn-sm btn-danger" type="button" onclick="exportExcel()"><i class="glyphicon glyphicon-download"></i>导出</button>
  44. </span>
  45. </div>
  46. </form>
  47. </div>
  48. </div>
  49. <div class="ibox-content" style="overflow-y: auto">
  50. <div id="visaReport">
  51. <table class="table table-bordered" >
  52. <thead>
  53. <tr>
  54. {if $type==0}
  55. <th nowrap="nowrap" class="text-center">订餐日期</th>
  56. {else}
  57. <th nowrap="nowrap" class="text-center">项目</th>
  58. {/if}
  59. <th nowrap="nowrap" class="text-center">订单金额(元)</th>
  60. <th nowrap="nowrap" class="text-center">微信支付(元)</th>
  61. <th nowrap="nowrap" class="text-center">食堂卡(元)</th>
  62. <th nowrap="nowrap" class="text-center">现金(元)</th>
  63. <th nowrap="nowrap" class="text-center">订单数</th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. {foreach $data as $k=>$v}
  68. <tr>
  69. <th nowrap="nowrap" class="text-center">{$v.title}</th>
  70. <th nowrap="nowrap" class="text-center">{$v.a0}</th>
  71. <th nowrap="nowrap" class="text-center">{$v.a1}</th>
  72. <th nowrap="nowrap" class="text-center">{$v.a2}</th>
  73. <th nowrap="nowrap" class="text-center">{$v.a3}</th>
  74. <th nowrap="nowrap" class="text-center">{$v.a4}</th>
  75. </tr>
  76. {/foreach}
  77. <tr>
  78. <th nowrap="nowrap" class="text-center">合计:</th>
  79. <th nowrap="nowrap" class="text-center">{$total.b0}</th>
  80. <th nowrap="nowrap" class="text-center">{$total.b1}</th>
  81. <th nowrap="nowrap" class="text-center">{$total.b2}</th>
  82. <th nowrap="nowrap" class="text-center">{$total.b3}</th>
  83. <th nowrap="nowrap" class="text-center">{$total.b4}</th>
  84. </tr>
  85. </tbody>
  86. </table>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. {/block}
  93. {block name="script"}
  94. <script src="/static/browser.js"></script>
  95. <script src="/static/jquery.jqprint-0.3.js"></script>
  96. <script>
  97. function empty_search(){
  98. window.location.href = "{:url('orgasdinner',['cate'=>$cate])}";
  99. }
  100. function printer() {
  101. $("#visaReport").jqprint({});
  102. }
  103. function exportExcel() {
  104. var url = "{:url('exportorgasdinner',['cate'=>$cate])}";
  105. var param = $('#ss').serialize();
  106. window.location.href = url+'?'+param;
  107. }
  108. $(document).ready(function(){
  109. formSetValue("type", {$type|default=0});
  110. formSetValue("org_id", {$orgId|default=0});
  111. });
  112. </script>
  113. {/block}