<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sptg="http://www.thymeleaf.org">
<head>
    <script th:replace="common/head"></script>
    <style>
        .xm-toolbar .toolbar-tag {
            width: 100%;
            display: flex;
            justify-content: center;
            background-color: #1E9FFF !important;
            color: #fff !important;
        }
    </style>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="padding:0;">
            <div class="layui-form-item border-b">
                <div class="layui-inline">
                    <label class="layui-form-label">所属小区</label>
                    <div class="layui-input-block">
                        <div id="residential_name"></div>
                        <input id="residential_id" type="hidden"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">所属单元</label>
                    <div class="layui-input-block">
                        <div id="unit_name"></div>
                        <input id="unit_id" type="hidden"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">所属房间</label>
                    <div class="layui-input-block">
                        <div id="room_name"></div>
                        <input id="room_id" type="hidden"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">姓名</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">卡号</label>
                    <div class="layui-input-block">
                        <input type="text" name="cardNo" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">卡片有效期</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input date-icon" id="card_date" placeholder="请选择"
                               autocomplete="off">
                        <input type="hidden" id="begin_date" name="beginDate"/>
                        <input type="hidden" id="end_date" name="endDate"/>
                    </div>
                </div>
                <div class="layui-inline" style="margin-left: 38px;">
                    <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="query">查询</button>
                    <button class="layui-btn  layui-btn-primary" lay-submit lay-filter="reset">重置</button>
                </div>
            </div>

            <!-- 表格+头部按钮 -->
            <div class="layui-card-body" style="padding:0;">
                <table id="table_id" lay-filter="table_event"></table>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="table-useradmin-webuser">
    {{#  if(d.isBlackCard != null){ }}
    {{# if(d.cardEnable != null && d.cardEnable == 2 && d.isBlackCard == 0){ }}
    <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="xiafa"
       sptg:security="estate:card:issue">手动下发</a>
    {{# } }}
    {{#  if(d.isBlackCard == 1){ }}
    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="cancel"
       sptg:security="estate:card:blackCard">取消黑名单</a>
    {{#  }else { }}
    <a class="layui-btn layui-bg-black layui-btn-xs" lay-event="edit"
       sptg:security="estate:card:blackCard">加入黑名单</a>
    {{# } }}
    {{# } }}
</script>

<!-- javascript -->
<script th:src="@{'/layui/layui.js'}"></script>
<script>
    layui.config({
        base: '/' //静态资源所在路径
    });
</script>
<script th:src="@{'/js/estate/card-manage.js'}"></script>
</body>
</html>
