123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox-title">
- <h5>各项目营业报表</h5>
- <div class="ibox-tools">
- </div>
- </div>
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <div class="tab-content">
- <form action="{:url('orgasdinner',['cate'=>$cate])}" method="GET" id="ss" class="form-inline">
- <div class="input-group">
- <select name="org_id" class="form-control">
- <option value="0">选择项目</option>
- {foreach $orgList as $k=>$v}
- <option value="{$v.id}">{$v.name}</option>
- {/foreach}
- </select>
- </div>
- <div class="input-group">
- <select name="type" class="form-control">
- <option value="0">按天统计</option>
- <option value="1">按项目统计</option>
- </select>
- </div>
- <div class="input-group" style="width: 200px">
- {:widget_view('common/laydate',['name'=>'start','title' => '开始日期','type' => 'date','val'=>$start])}
- </div>
- <div class="input-group" style="width: 200px">
- {:widget_view('common/laydate',['name'=>'end','title' => '结束日期','type' => 'date','val'=>$end])}
- </div>
- <div class="input-group">
- <span class="input-group-btn">
- <button class="btn-sm btn-primary" type="submit" ><i class="fa fa-search"></i></button>
- </span> <span class="input-group-btn">
- <button class="btn-sm btn-warning" type="button" onclick="empty_search()"><i class="fa fa-undo"></i></button>
- </span> <span class="input-group-btn">
- <button class="btn-sm btn-info" type="button" onclick="printer()"><i class="glyphicon glyphicon-print"></i>打印</button>
- </span>
- <span class="input-group-btn">
- <button class="btn-sm btn-danger" type="button" onclick="exportExcel()"><i class="glyphicon glyphicon-download"></i>导出</button>
- </span>
- </div>
- </form>
- </div>
- </div>
- <div class="ibox-content" style="overflow-y: auto">
- <div id="visaReport">
- <table class="table table-bordered" >
- <thead>
- <tr>
- {if $type==0}
- <th nowrap="nowrap" class="text-center">订餐日期</th>
- {else}
- <th nowrap="nowrap" class="text-center">项目</th>
- {/if}
- <th nowrap="nowrap" class="text-center">订单金额(元)</th>
- <th nowrap="nowrap" class="text-center">微信支付(元)</th>
- <th nowrap="nowrap" class="text-center">食堂卡(元)</th>
- <th nowrap="nowrap" class="text-center">现金(元)</th>
- <th nowrap="nowrap" class="text-center">订单数</th>
- </tr>
- </thead>
- <tbody>
- {foreach $data as $k=>$v}
- <tr>
- <th nowrap="nowrap" class="text-center">{$v.title}</th>
- <th nowrap="nowrap" class="text-center">{$v.a0}</th>
- <th nowrap="nowrap" class="text-center">{$v.a1}</th>
- <th nowrap="nowrap" class="text-center">{$v.a2}</th>
- <th nowrap="nowrap" class="text-center">{$v.a3}</th>
- <th nowrap="nowrap" class="text-center">{$v.a4}</th>
- </tr>
- {/foreach}
- <tr>
- <th nowrap="nowrap" class="text-center">合计:</th>
- <th nowrap="nowrap" class="text-center">{$total.b0}</th>
- <th nowrap="nowrap" class="text-center">{$total.b1}</th>
- <th nowrap="nowrap" class="text-center">{$total.b2}</th>
- <th nowrap="nowrap" class="text-center">{$total.b3}</th>
- <th nowrap="nowrap" class="text-center">{$total.b4}</th>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script src="/static/browser.js"></script>
- <script src="/static/jquery.jqprint-0.3.js"></script>
- <script>
- function empty_search(){
- window.location.href = "{:url('orgasdinner',['cate'=>$cate])}";
- }
- function printer() {
- $("#visaReport").jqprint({});
- }
- function exportExcel() {
- var url = "{:url('exportorgasdinner',['cate'=>$cate])}";
- var param = $('#ss').serialize();
- window.location.href = url+'?'+param;
- }
- $(document).ready(function(){
- formSetValue("type", {$type|default=0});
- formSetValue("org_id", {$orgId|default=0});
- });
- </script>
- {/block}
|