<?php include_once(mvc::$cfg['PATH_TPL'].'public/headBase2.php');?>
<style>
    html {
        background-color: #ffffff;
    }
    body{
        background-color: #ffffff !important;
    }
    .layui-form-label {
      width: 24px;
       padding: 9px;
    }
</style>
<form method="get" style="margin-top: 10px;background: #ffffff;" class="layui-form">
    <div class="layui-inline ">
        <label class="layui-form-label" lay-search>用户</label>
        <div class="layui-input-inline w100">
            <select id="user" name="user">
                <option value="0">全部</option>
                <option <?php if ($param['user'] == '2') {
                     echo "selected";
                } ?> value="2">已注册</option>
                <option <?php if ($param['user'] == '1') {
                     echo "selected";
                } ?> value="1">未注册</option>
            </select>
        </div>
    </div>

    <div class="layui-inline ">
        <label class="layui-form-label" lay-search>时间</label>
        <div class="layui-input-inline w200">
           <input class="layui-input" type="text" autocomplete="off" name="time" value="<?php echo $param['time'];?>" id="yl_pay_time" placeholder="时间筛选">
        </div>
    </div>

    <div class="layui-inline ">
        <label class="layui-form-label" lay-search>排序</label>
        <div class="layui-input-inline w100">
            <select id="order_name" name="order_name">
                <option value="">请选择</option>
                <?php foreach($config as $index => $item){ ?>
                    <option <?php if($index == $param['order_name']){echo "selected";} ?>  value="<?php echo $index;?>"><?php echo $item; ?></option>
                <?php } ?>
            </select>
        </div>
    </div>
    <button class="layui-btn" id="demoReload" data-type="reload">搜索</button>
</form>
<table style="max-width:40%;margin:3px 3px;background-color: #ffffff;"  class="layui-table" style="margin-bottom: 10px;">
    <thead>
<!--    排序: 总PV  跑街PV   宜配PV  VIN数  号码数  EPC数-->
<!---->
    <tr>
        <th style="width:20px !important;">用户</th>
        <th style="width:20px !important;">总PV</th>
        <th style="width:50px !important;">跑街PV</th>
        <th style="width:60px !important;">宜配PV</th>
        <th style="width:60px !important;">VIN数</th>
        <th style="width:60px !important;" >号码数</th>
        <th style="width:60px !important;">EPC数</th>
    </tr>
    </thead>
    <tbody>
    <?php if(!empty($lists)){ ?>
        <?php foreach($lists as $k => $v ){ ?>
            <tr>
                <?php if ($v['uid'] > 0) { ?>
                  <td><?php echo isset($user[$v['uid']]) ? ($user[$v['uid']]['u_name'] ? $user[$v['uid']]['u_name'] : $user[$v['uid']]['u_nickname']) : ''; ?></td>
                <?php }else{ ?>
                    <td>未注册</td>
                <?php } ?>
                
                <td><?php echo $v['ud_pv']; ?></td>
                <td><?php echo $v['plj_pv']; ?></td>
                <td><?php echo $v['yp_pv']; ?></td>
                <td><?php echo $v['vin_pv']; ?></td>
                <td><?php echo $v['number_count']; ?></td>
                <td><?php echo $v['epc_count']; ?></td>
            </tr>
        <?php } ?>
    <?php } ?>
    </tbody>
</table>
</div>


<?php echo $Page;?>
<script>
    layui.use(['table', 'laydate'], function() {
        var table = layui.table;
        var laydate = layui.laydate;
        laydate.render({
            elem: '#yl_pay_time'
            , range: '~'
        });
    });
    function index(id,that){
        $('#'+id).val($(that).attr('data-value'));
        $('#demoReload').trigger('click');
    }
</script>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footBase.php');?>
