<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="renderer" content="webkit">
    <!-- 移动设备 viewport -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <jsp:include page="../../common.jsp"/>
    <script type="text/javascript">
        require("qrCode/qrCodeList.js");
    </script>

    <style>
        .layui-table th {
            text-align: center;
        }
    </style>
</head>
<body>
<div class="row animated fadeInRight" style="margin: 0;">
    <div class="wrapper wrapper-content mt5 right-content ml5 mr5">
        <div class="toolbar-panel bdd">
            <div class="toolbar-box">
                <div class="toolbar-head clearfix lgraybg pt5 pb10 pl10 bdbd">
                    <!-- 顶部按钮 -->
                    <div class="buttons fl">
                        <a class="layui-btn layui-btn-sm fa fa-search f13" href="javascript:void(0);"
                           onclick="qrCodeQueryInit()"><span>搜索</span></a>
                        <a class="layui-btn layui-btn-sm fa fa-plus f13 add" href="javascript:void(0);"
                           onclick="initAddQrCode()"><span>添加</span></a>
                        <a class="layui-btn layui-btn-sm fa fa-plus f13 add" href="javascript:void(0);"
                           onclick="initBatchAddQrde()"><span>批量添加</span></a>
                        <a class="layui-btn layui-btn-sm layui-btn-danger fa fa-remove f13 delete" href="javascript:void(0);"
                           onclick="initBatchDeleteCode()"><span>删除</span></a>
                    </div>
                    <div class="tools fr">
                        <a href="javascript:void(0);" class="collapse dblock f14 dgray mr5">
                            <i class="fa-2x fa fa-angle-double-up"></i>
                        </a>
                    </div>
                </div>
            </div>

            <!--搜索条件 -->
            <div class="toolbar-body">
                <form class="layui-form" action="" style="margin-top: 10px">
                    <div class="layui-form-item">
                        <!-- <span class="dlblock w100 textr">ID：</span>
                        <span class="bdc pt6 pb6 pl6 pr5 w180 dlblock">
                            <input type="text" placeholder="请输入内容" id="searchId">
                        </span>  -->
                        <div class="layui-inline">
                            <label class="layui-form-label">二维码编号</label>
                            <div class="layui-input-inline">
                                <input type="text" id="qrNo" placeholder="请输入二维码编号" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-inline">
                            <label class="layui-form-label">状态</label>
                            <div class="layui-input-inline">
                                <select class="form-control f12 w180 textc" id="status">
                                    <option value="">请选择</option>
                                    <option value="1">未出售</option>
                                    <option value="2">已出售</option>
                                    <option value="3">已激活</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!-- 表单数据 -->
    <div class="mb20 mt10">
        <div class="whitebg pl10 pr10">
            <table class="layui-table">
                <thead>
                <tr>
                    <th class="textc">
                        <div class="checker" id="allCheck">
                            <span class=""><input type="checkbox" value=""></span>
                        </div>
                    </th>
                    <th class="textc ">序号</th>
                    <th class="textc ">二维码编号</th>
                    <!-- <th class="textc "></th> -->
                    <th class="textc wp15">设备单号</th>
                    <th class="textc ">购买商家ID</th>
                    <th class="textc ">购买商家名称</th>
                    <th class="textc ">激活商家ID</th>
                    <th class="textc ">激活商家名称</th>
                    <th class="textc ">状态</th>
                    <th class="textc ">创建时间</th>
                    <th class="textc">操作</th>
                </tr>
                </thead>
                <!-- 数据体 -->
                <tbody id="data_content">
                </tbody>
            </table>

            <!-- footer -->
            <div class="clearfix mb10 pb20">
                <div class="layui-tab-item fr">
                    <span class="dlblock vm">当前第<span class="now" id="currPage"></span>页 , </span>
                    <span class="dlblock vm">共<span class="count" id="pageCount"></span>页 </span>
                    <div class="pagination dlblock vm" id="pagination"></div>
                    <span class="dlblock vm ml10">总记录数<span class="now" id="totalCount"></span>条</span>
                </div>
            </div>

        </div>
    </div>
</div>

<script type="text/html" id="addContent">
    <form class="layui-form" id="addForm" action="">
        <div class="layui-form-item">
            <label class="layui-form-label">二维码编号</label>
            <div class="layui-input-block">
                <input type="text" name="qrNo" id="qrNoInput" required maxlength="10" lay-verify="required"
                       style="width:160px;" placeholder="请输入二维码编号" autocomplete="off" class="layui-input">
            </div>
        </div>
    </form>
</script>

<script type="text/html" id="addBathContent">
    <form class="layui-form" id="addBathForm" action="">
        <div class="layui-inline">
            <label class="layui-form-label">编号范围</label>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" name="qrNoStartInput" id="qrNoStartInput" maxlength="10" autocomplete="off"
                       placeholder="请输入开始值" class="layui-input">
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" name="qrNoEndInput" id="qrNoEndInput" maxlength="10" autocomplete="off"
                       placeholder="请输入结束值" class="layui-input">
            </div>
        </div>
    </form>
</script>

<script type="text/javascript">
    //form表单样式
    layui.use(['layer', 'form'], function () {
        var form = layui.form;
        form.render();
    });
</script>
</body>
</html>

