<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sptg="http://www.thymeleaf.org">
<head>
    <script th:replace="common/head"></script>
    <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
    <script type="text/javascript">
        window.onload = function () {
            document.getElementById("ip").value = returnCitySN["cip"];
        }
    </script>
</head>

<body>
<input type="hidden" name="createIp" id="ip" class="layui-input"/>
    <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">
                            <input type="text"id="selectedName"  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"id="selectedTel"  placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">认证状态</label>
                        <div class="layui-input-block">
                            <select id="selectedState" lay-verify="" lay-search="">
                                <option value="" selected>全部</option>
                                <option value="0" >未认证</option>
                                <option value="1" >待审核</option>
                                <option value="2" >已认证</option>
                            </select>
                        </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">
                    <div style="padding-bottom: 10px;">
                        <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="add" sptg:security="estate:member:add">添加会员</button>
                    </div>
                    <table id="table-id" lay-filter="table_event"></table>
                </div>
            </div>
        </div>
    </div>

    <script type="text/html" id="table-useradmin-webuser">
<!--        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail">详情</a>-->
        <a class="layui-btn layui-btn-xs layui-bg-black" data-dropdown="#dropUser{{d.LAY_INDEX}}" lay-event="more" no-shade="true">
            更多<i class="layui-icon layui-icon-drop" style="font-size: 12px;margin-right: 0;"></i></a>
        <!-- 下拉菜单 -->
        <ul class="dropdown-menu-nav dropdown-bottom-right layui-hide" id="dropUser{{d.LAY_INDEX}}">
            <div class="dropdown-anchor"></div>
            <li><a  lay-event="password" sptg:security="estate:member:manager:psw">修改账号密码</a></li>
            <li><a  lay-event="Tel" sptg:security="estate:member:manager:tel">更换绑定手机</a></li>
            <li><a  lay-event="room" sptg:security="estate:member:manager:room">查看认证房屋</a></li>
            <li><a  lay-event="access" sptg:security="estate:member:manager:access">管理门禁授权</a></li>
        </ul>
    </script>

    <!-- 认证状态 -->
    <script type="text/html" id="state">
        {{#  if(d.state == 0){ }}
        <span style="color: red" >未认证</span>
        {{#  } else if(d.state == 1){ }}
        <span style="color: #1f26ff">待审核</span>
        {{#  } else if(d.state == 2){ }}
        <span style="color: green">已认证</span>
        {{#  }  }}
    </script>

    <!-- 性别 -->
    <script type="text/html" id="sex">
        {{#  if(d.sex == 0){ }}
        <span style="color: red" >未定义</span>
        {{#  } else if(d.sex == 1){ }}
        <span style="color: #1f26ff">男</span>
        {{#  } else if(d.sex == 2){ }}
        <span style="color: green">女</span>
        {{#  }  }}
    </script>

    <!-- 机构状态 -->
    <script type="text/html" id="entity_is_enable">
        <input type="checkbox" name="enable" value="{{d.id}}" lay-skin="switch" lay-text="启用|禁用" lay-filter="enable" {{ d.enable == 1 ? 'checked' : '' }}>
    </script>

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

</html>
