@extends('layouts.admin')

@section('content')
<div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">二维码导入</h1>
    </div>
    <!-- /.col-lg-12 -->
</div>
<div class="panel">
<!-- 
    <form action=''>
        <div class="form-group">
            <label>选择时间：</label>
            <input  name="start" onClick="WdatePicker()" value=""> -
            <input name="end" onClick="WdatePicker()" value="">
        </div>
        <button type="submit" class="btn btn-success">查询</button>
    </form>
  -->
    <br>
	<form action="qrcode_upload" method="POST" enctype="multipart/form-data">
        <label for="msg" style='color:red'><?php echo isset($_GET['msg'])?$_GET['msg']:$msg;?></label><br>
        <div class="form-group">
            <label>分类(srjsjl、gxkc等)</label><br>
            <input type="text" name="category">
        </div>
        <div class="form-group">
            <label>文件名（以 分类简称+下划线+群序列号 命名，比如 srjsjl_20）</label><br>
            <input type="text" name="file_name">
        </div>
        <div class="form-group">
            <label>序列号（建议跟群的序列号一致，只展示数字最高的那一个图片二维码，
            比如序列号3，5，7这几个图片，只展示序列7的那个到h5页面扫描）</label><br>
            <input type="text" name="sort_no">
        </div>
        <input type="file" name="file"><br>
        <button type="submit" name="submit" class="btn btn-success">导入(图片jpg、png格式)</button>
     </form>
     
</div>

<div class="panel panel-default">
    
    <div class="panel-heading">
        列表
    </div>
    <!-- /.panel-heading -->
    <div class="panel-body">
        <div class="dataTable_wrapper">
            <table class="table table-striped table-bordered table-hover" id="dataTables-example" style="text-align: center">
                <tr>
                    <th>分类</th>
                    <th>名称</th>
                    <th>群序列</th>
                    <th>二维码</th>
                    <th>导入时间</th>
                </tr>
                @foreach ($group_qrcodes as $group_qrcode)
                <tr>
                    <td>{{ $group_qrcode->category }}</td>
                    <td>{{ $group_qrcode->file_name }}</td>
                    <td>{{ $group_qrcode->sort_no }}</td>
                    <td><img style='width:120px;height:120px;' src='{{ $group_qrcode->qrcode_path }}'></td>
                    <td>{{ $group_qrcode->updated_at }}</td>
                </tr>
                @endforeach

            </table>
        </div>
        
        <div class="paging">
            总计：{{ $group_qrcodes->total() }}
            {!! $group_qrcodes->appends($params)->links() !!}
         </div>
         
    </div>
</div>
<!-- Modal -->


<script type="text/javascript" src="{{ asset('admin/js/My97DatePicker/WdatePicker.js') }}"></script>
<script>


</script>
@endsection
