<?php include_once(mvc::$cfg['PATH_TPL'].'public/headBase2.php');?>
<div class="layui-card">
    <div class="layui-card-body">
        <div style="padding:0 10px 10px 0;">
            <form class="layui-form">
				<div class="layui-inline">
                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-block">
                        <select name="taa_status">
                            <option value="">不限</option>
                            <option value="1" <?php if (isset($Params['taa_status']) && $Params['taa_status'] == 1){echo 'selected';}?>>完结</option>
                            <option value="0" <?php if (isset($Params['taa_status']) && $Params['taa_status'] === '0'){echo 'selected';}?>>未完结</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">统计时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="betime" id="betime" class="layui-input" value="<?php echo $Params['betime'];?>" placeholder=" ~ "  autocomplete="off">
                    </div>
                </div>
                <div class="layui-inline">
                    <button class="layui-btn act-btn" type="submit">
                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                    </button>
                </div>
            </form>
        </div>
        <table class="layui-table" style="width:1100px">
            <thead>
				<tr>
					<th rowspan="2">日期</th>
					<th rowspan="2">状态</th>
					<th colspan="2" class="center tdbg0">注册用户</th>
					<th colspan="2" class="center tdbg1">邀请用户</th>
					<th colspan="2" class="center tdbg0">订单</th>
					<th colspan="2" class="center tdbg1">号码查询</th>
					<th colspan="2" class="center tdbg0">图片查询</th>
				</tr>
				<tr>
					
					<th class="tdbg0">累计</th>
					<th class="tdbg0">新增</th>
					<th class="tdbg1">累计</th>
					<th class="tdbg1">新增</th>
					<th class="tdbg0">累计</th>
					<th class="tdbg0">新增</th>
					<th class="tdbg1">累计</th>
					<th class="tdbg1">新增</th>
					<th class="tdbg0">累计</th>
					<th class="tdbg0">新增</th>
				</tr>
            </thead>
            <tbody>
            <?php foreach($lists as $k => $v ){ ?>
                <tr>
                    <td><?php echo date('Y-m-d', strtotime($v['taa_date']));?></td>
                    <td><?php if($v['taa_status'] == 1) echo '<span class="green">完结</span>'; else echo '<span class="gray">未完结</span>'?></td>
                    <td class="tdbg0"><?php if($v['taa_user'] > 0)  echo $v['taa_user'];?></td>
                    <td class="tdbg0"><?php if($v['taa_user_add'] > 0)  echo $v['taa_user_add'];?></td>
                    <td class="tdbg1"><?php if($v['taa_tuijian'] > 0)  echo $v['taa_tuijian'];?></td>
                    <td class="tdbg1"><?php if($v['taa_tuijian_add'] > 0)  echo $v['taa_tuijian_add'];?></td>
                    <td class="tdbg0"><?php if($v['taa_money'] > 0)  echo sprintf('%.2f', $v['taa_money']);?></td>
                    <td class="tdbg0"><?php if($v['taa_money_add'] > 0)  echo sprintf('%.2f', $v['taa_money_add']);?></td>
                    <td class="tdbg1"><?php if($v['taa_search'] > 0)  echo $v['taa_search'];?></td>
                    <td class="tdbg1"><?php if($v['taa_search_add'] > 0)  echo $v['taa_search_add'];?></td>
					<td class="tdbg0"><?php if($v['taa_imgsearch'] > 0)  echo $v['taa_imgsearch'];?></td>
                    <td class="tdbg0"><?php if($v['taa_imgsearch_add'] > 0)  echo $v['taa_imgsearch_add'];?></td>
                </tr>
            <?php }?>
            </tbody>
			<tfoot>
				<tr>
                    <th colspan="2">当前条件统计</th>
                    <th></th>
                    <th><?php echo $total['taa_user_add'];?></th>
					<th></th>
                    <th><?php echo $total['taa_tuijian_add'];?></th>
					<th></th>
                    <th><?php echo sprintf('%.2f', $total['taa_money_add']);?></th>
					<th></th>
                    <th><?php echo $total['taa_search_add'];?></th>
					<th></th>
                    <th><?php echo $total['taa_imgsearch_add'];?></th>
                </tr>
			</tfoot>
        </table>
		<?php echo $Page;?>
    </div>
</div>
<style>

</style>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footBase.php');?>
<script>
    layui.use(['table', 'form','laydate'], function(){
        var table = layui.table,form = layui.form,laydate = layui.laydate;

        laydate.render({
            elem: '#betime'
            ,range: '~'
            ,max:0
        });
    });
</script>