123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- {extend name="common/common2" /}
- {block name="main"}
- <style>
- </style>
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-3">
- <div class="btn-group pull-left">
- <a href="javascript:;" onclick="printer()" class="btn btn-sm btn btn-primary"><i class="glyphicon glyphicon-print"></i> 打印</a>
- <a href="{:url('consumablesExport',['month'=>$month,'goodsIds'=>$goodsIds])}" class="btn btn-sm btn-danger"><i class="fa fa-cloud-download"> 导出</i></a>
- </div>
- </div>
- <div class="col-xs-9" style="text-align: right;">
- <form class="form-inline" action="{:url('consumables')}">
- <div class="input-group">
- {:widget_view('common/multiselect',['name'=>'goodsIds','lists' => $mateGoods, 'val' =>isset($goodsIds2)?$goodsIds2:[]])}
- </div>
- <div class="input-group">
- <input placeholder="月份" type="text" class="form-control" readonly id="month" name="month" value="{$month}">
- </div>
- <div class="input-group">
- <span class="input-group-btn">
- <button class="btn-sm btn-primary" type="submit" id ="search-btn" ><i class="fa fa-search"></i></button>
- </span>
- <!-- <span class="input-group-btn">-->
- <!-- <button class="btn-sm btn-warning" type="submit" id="search-clear"><i class="fa fa-undo"></i></button>-->
- <!-- </span>-->
- </div>
- </form>
- </div>
- </div>
- <div class="panel-group" id="printer" style="margin-top: 10px;overflow-y: auto">
- <div class="panel panel-default" style="border: 0px !important;">
- <div class="panel-body">
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>日期</th>
- {if isset($mate)}
- {foreach $mate as $k=>$v}
- <th>{$v.title}</th>
- {/foreach}
- {/if}
- </tr>
- </thead>
- {foreach $lists as $k=>$v}
- <tbody>
- <tr>
- <td>{$v['title']}</td>
- {foreach $mate as $kk=>$vv}
- <td>{$v['type'.$vv['id']]}</td>
- {/foreach}
- </tr>
- </tbody>
- {/foreach}
- <tr>
- <td><strong>小计</strong></td>
- {foreach $subtotal as $k=>$v}
- <td>{$v}</td>
- {/foreach}
- </tr>
- </table>
- </div>
- <div class="type-bottom" style="width: 100%;height: 50px;line-height: 50px;padding-left: 20px;">
- <span style="margin-right: 20px"><strong>合计:</strong></span>
- <span>{$total}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script src="/static/layDate-v5.0.9/laydate.js"></script>
- <script src="/static/browser.js"></script>
- <script src="/static/jquery.jqprint-0.3.js"></script>
- <script>
- laydate.render({
- elem: '#month',
- type: 'month',
- trigger: 'click' ,
- format:'yyyy-MM',
- theme:'#1d519c'
- });
- function printer(){
- $('#printer').jqprint();
- }
- </script>
- {/block}
|