<!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 style="position: absolute;top:0;bottom: 0;left:0;right: 0;">
        <input type="hidden" id="org_id" th:value="${onLineUser.orgId}" />
        <input type="hidden" id="residentialId" th:value="${residentialId}" />
        <!--<input type="hidden" id="checkState" th:value="${checkState}" />-->
        <div class="layui-fluid">
            <div class="x-body">
                <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="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">
                                    <select  name="checkState" >
                                        <option value="">全部</option>
<!--                                        <option value="-1">未上传</option>-->
                                        <option value="0">待审核</option>
                                        <option value="1">审核通过</option>
                                        <option value="2">审核未通过</option>
                                    </select>
                                </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="tel" 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="idCard" placeholder="请输入" autocomplete="off" class="layui-input">
                                </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>
        </div>

        <script type="text/html" id="table-useradmin-webuser">
            {{#  if(d.checkState == 0){ }}
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="check" sptg:security="apply:user:audit">认证审核</a>
            {{#  } else{ }}
            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail">详情</a>
            {{# } }}
        </script>

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

        <!-- 住户类型 -->
        <script type="text/html" id="type">
            {{#  if(d.type == 0){ }}
            <span>业主</span>
            {{#  } else if(d.type == 1){ }}
            <span>家属</span>
            {{#  } else if(d.type == 2){ }}
            <span>租客</span>
            {{#  }  }}
        </script>

        <!-- 住户来源 -->
        <script type="text/html" id="createType">
            {{#  if(d.createType == 0){ }}
            <span>小程序</span>
            {{#  } else if(d.createType == 1){ }}
            <span>后台添加</span>
            {{#  } else if(d.createType == 2){ }}
            <span>后台导入</span>
            {{#  } else if(d.createType == 3){ }}
            <span>App添加</span>
            {{#  }  }}
        </script>

        <!-- 人脸审核状态 -->
        <script type="text/html" id="checkState">
            {{#  if(d.checkState == -1){ }}
            <span style="color:orange">未上传</span>
            {{#  }else if(d.checkState == 0){ }}
            <span style="color:blue">待审核</span>
            {{#  }else if(d.checkState == 1){ }}
            <span style="color:green">审核通过</span>
            {{# }else { }}
            <span style="color:red">审核不通过</span>
            {{# } }}
        </script>

        <!-- 人脸审核状态 -->
        <script type="text/html" id="roomDetail">
            <span >{{ d.residentialName + "，"+ d.unitName + "，" + d.roomName}}</span>
        </script>

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