<?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:850px">
            <thead>
				<tr>
					<th rowspan="2">日期</th>
					<th rowspan="2">状态</th>
					<th colspan="3" class="center tdbg0">配件商</th>
					<th colspan="2" class="center tdbg1">询价单</th>
					<th colspan="2" class="center tdbg0">报价单</th>
					<th colspan="2" class="center tdbg0">询价单打电话</th>
				</tr>
				<tr>
					<th class="tdbg0">运行中</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>
					<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_shop'] > 0)  echo $v['taa_shop'];?></td>
                    <td class="tdbg0"><?php if($v['taa_shop_add'] > 0)  echo $v['taa_shop_add'];?></td>
                    <td class="tdbg0"><?php if($v['taa_shop_add_ok'] > 0)  echo $v['taa_shop_add_ok'];?></td>
                    <td class="tdbg1"><?php if($v['taa_purchase'] > 0)  echo $v['taa_purchase'];?></td>
                    <td class="tdbg1"><?php if($v['taa_purchase_add'] > 0)  echo $v['taa_purchase_add'];?></td>
                    <td class="tdbg0"><?php if($v['taa_offer'] > 0)  echo $v['taa_offer'];?></td>
                    <td class="tdbg0"><?php if($v['taa_offer_add'] > 0)  echo $v['taa_offer_add'];?></td>
                    <td class="tdbg0"><?php if($v['taa_purchase_call'] > 0)  echo $v['taa_purchase_call'];?></td>
                    <td class="tdbg0"><?php if($v['taa_purchase_call_add'] > 0)  echo $v['taa_purchase_call_add'];?></td>
                </tr>
            <?php }?>
            </tbody>
			<tfoot>
				<tr>
                    <th colspan="2">当前条件统计</th>
                    <th></th>
                    <th><?php echo $total['taa_shop_add'];?></th>
                    <th><?php echo $total['taa_shop_add_ok'];?></th>
                    <th></th>
                    <th><?php echo $total['taa_purchase_add'];?></th>
					<th></th>
                    <th><?php echo $total['taa_offer_add'];?></th>
					<th></th>
                    <th><?php echo $total['taa_purchase_call_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>