<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/css/bootstrap-datepicker.standalone.min.css">
<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>

<div class="content_wrapper">
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <form class="form-inline" role="form" method="POST" action="#statistics/treasureRewardSta" name="stanpform">
                                        <span class="gap"></span>
                                        <div class="form-group">
                                            <label>时间</label>
                                            <input type="text" class="form-control datetimepicker" value="<?php if($date) echo $date;?>" placeholder="开始时间" name="date" />
                                        </div>
                                        <button type="submit" class="btn btn-primary">查询</button>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>宝藏探索产出消耗统计</header>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="table-responsive">
                                        <table id="reportTable" class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
                                            <thead>
                                            <tr>
                                                <th rowspan="2"  style="text-align: center;vertical-align: middle;">进度</th>
                                                <th colspan="<?php echo count($props); ?>" style="text-align: center;vertical-align: middle;">道具</th>
                                            </tr>
                                            <tr>
                                            	<?php
                                                	foreach ($props as $row) {
                                                		echo '<th style="text-align: center;vertical-align: middle;">'.$row['msg'].'</th>';
                                                	}
                                                ?>	
                                            </tr>
                                            
                                            </thead>
                                            <tbody id="reportBody" style="overflow-y: scroll;">
                                            <?php
                                            if(is_array($data)){
                                                foreach ($data as $key => $val) {
                                                    ?>
                                                    <tr>
                                                        <?php echo '<td style="text-align: center;vertical-align: middle;">'.$key.'</td>'; ?>
                                                        <?php
                                                        
                                                        foreach ($props as $row) {
                                                            echo '<td>'.(empty($val['task'][$row['id']])?0:$val['task'][$row['id']]).'</td>';
                                                        }
                                                        ?>
                                                    </tr>
                                                   
                                                <?php } } else{?>
                                                <tr>
                                                    <td colspan="10">暂无数据</td>
                                                </tr>
                                            <?php } ?>
                                            </tbody>

                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>
</div>
</div>
<script type="text/javascript" src="<?php echo base_url();?>public/js/highcharts/highcharts.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>public/js/highcharts/modules/exporting.js"></script>
<script type="text/javascript">
    //选择日期
    $('.datetimepicker').datepicker({
        language:'zh-CN',
        format:'yyyy-mm-dd',
        zIndexOffset:906  //控制z-index
    });
</script>