<!DOCTYPE html>
<html  lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <script th:replace="common/head"></script>
        <link xmlns:th="http://www.thymeleaf.org" rel="stylesheet" th:href="${'/css/estate/access.css'}" media="all">
    </head>
    <body>
        <input type="hidden" name="selectTreeId" id="selectTreeId" th:value="${selectTreeId}" />
        <input type="hidden" name="parentId" id="parentId" th:value="${parentId}" />
        <input type="hidden" name="flag" id="flag" th:value="${flag}" />
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body" pad15>
                            <div class="layui-form" lay-filter="">
                                <!--以后换成下拉树形-->
                                <div class="layui-form-item">
                                    <div class="layui-form" lay-filter="residential_filter">
                                        <label class="layui-form-label"><span class="must">*</span>所属小区</label>
                                        <div class="layui-input-inline">
                                            <div id="residential_id"></div>
                                        </div>
                                    </div>

                                    <div class="layui-form" lay-filter="unit_filter">
                                        <label class="layui-form-label"><span class="must">*</span>所属楼栋</label>
                                        <div class="layui-input-inline">
                                            <div id="building_id"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-form" lay-filter="unit_filter">
                                        <label class="layui-form-label"><span class="must">*</span>所属单元</label>
                                        <div class="layui-input-inline">
                                            <div id="unit_id"></div>
                                        </div>
                                    </div>

                                    <div class="layui-form" lay-filter="room_filter">
                                        <label class="layui-form-label"><span class="must">*</span>所属房间</label>
                                        <div class="layui-input-inline">
                                            <div id="room_id"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-form" lay-filter="type_filter">
                                        <label class="layui-form-label"><span class="must">*</span>住户类型</label>
                                        <div class="layui-input-inline">
                                            <div id="type"></div>
                                            <!--<select id='type_id' name="type" lay-filter="type_event">
                                                <option value="0" selected>业主</option>
                                                <option value="1">家属</option>
                                                <option value="2">租客</option>
                                            </select>-->
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label"><span class="must">*</span>住户姓名</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="name" lay-verify="required|specialCharacters|length" placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label"><span class="must">*</span>手机号</label>
                                    <div class="layui-input-inline">
                                        <input type="number"  name="tel" placeholder="" autocomplete="off" class="layui-input" lay-verify="phoneNum">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-form" lay-filter="">
                                        <label class="layui-form-label"><span class="must">*</span>性别</label>
                                        <div class="layui-input-inline">
                                            <div id="sex_dic"></div>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="layui-form-item">
                                    <div class="layui-form" lay-filter="">
                                        <label class="layui-form-label"><span class="must">*</span>国籍</label>
                                        <div class="layui-input-inline">
                                            <div id="nationality"></div>
                                        </div>
                                    </div>
                                </div>-->
                                <div class="layui-form-item">
                                    <label class="layui-form-label"><span class="must"></span>证件类型</label>
                                    <div class="layui-input-inline">
                                        <span id="card_name" class="detail-info">身份证</span>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label"><span class="must"></span>证件号码</label>
                                    <div class="layui-input-inline">
                                        <input  type="text" name="idCard" lay-verify="cardNum" placeholder="" autocomplete="off"
                                               class="layui-input">
                                    </div>
                                </div>
                                <!--中国大陆/港澳台-->
                                <div class="layui-form-item" id="birth_place">
                                    <label class="layui-form-label">籍贯</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="birthPlace" lay-verify="" placeholder="" autocomplete="off"
                                               class="layui-input">
                                    </div>
                                </div>
                                <!--海外-->
                                <div class="layui-form-item" id="passport_pic" style="display: none">
                                    <label class="layui-form-label"><span class="must"></span>护照图片</label>
                                    <button type="button"  id="passport_upload" class="layui-btn layui-btn-primary" ><i class="layui-icon layui-icon-upload-drag"></i>上传照片</button>
                                    <span class="detail-info" style="color:#FF5722">&nbsp基本身份信息页</span>
                                </div>
                                <div class="layui-form-item" id="entry_pic" style="display: none">
                                    <label class="layui-form-label"><span class="must"></span>入境证明</label>
                                    <button type="button" id="entry_upload" class="layui-btn layui-btn-primary"><i class="layui-icon layui-icon-upload-drag"></i>上传照片</button>
                                    <span class="detail-info" style="color:#FF5722">&nbsp入镜盖章页</span>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">备注</label>
                                    <div class="layui-input-block">
                                        <textarea name="remark" placeholder="请输入300字以内的备注介绍" class="layui-textarea w500"></textarea>
                                    </div>
                                </div>
                                <input id="fastDfsServer" type="hidden" th:value="${fastDfsServer}">
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" lay-submit lay-filter="submit_button">提交</button>
                                        <button type="reset" class="layui-btn layui-btn-primary" id="cancel_btn">取消</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- javascript -->
        <style type="text/css">
            input::-webkit-outer-spin-button,
            input::-webkit-inner-spin-button {
                -webkit-appearance: none;
            }
            input[type="number"] {
                -moz-appearance: textfield;
            }
        </style>
        <script type="text/javascript" th:src="@{'/layui/layui.js'}"></script>
        <script type="text/javascript">
            layui.config({
                base: '/' //静态资源所在路径
            });
        </script>
        <script type="text/javascript" th:src="@{'/js/estate/user-add.js'}"></script>
    </body>
</html>
