<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <script th:replace="common/head"></script>
    <!-- 省市区样式 -->
    <link rel="stylesheet" th:href="@{'/layui/lay/mymodules/region.css'}">
    <link rel="stylesheet" th:href="@{'/css/common/formSelects-v4.css'}">
</head>
<body>
<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">
                            <label class="layui-form-label"><span class="must">*</span>姓名</label>
                            <div class="layui-input-inline">
                                <input type="text" name="name" lay-verify="required" placeholder="" autocomplete="off"
                                       class="layui-input" th:value="${serverUser?.name}">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"><span class="must">*</span>性别</label>
                            <div class="layui-input-inline">
                                <div id="sex_dic"></div>
                                <input type="hidden" id="sexValue" th:value="${serverUser?.sex}">
                                <!--<input type="radio" name="sex" value="1" title="男"  checked>
                                <input type="radio" name="sex" value="2" title="女" th:checked="${serverUser?.sex==2}" >-->
                            </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">
                                    <input type="text" name="idCard" lay-verify="identity" placeholder="" autocomplete="off"
                                           class="layui-input" th:value="${serverUser?.idCard}">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"><span class="must">*</span>籍贯</label>
                            <div class="layui-input-inline" id="region_body">
                                <input type="hidden"  name="regionProvince" th:value="${serverUser?.regionProvince}"/>
                                <input type="hidden"  name="regionCity" th:value="${serverUser?.regionCity}"/>
                                <input type="hidden"  name="regionArea" th:value="${serverUser?.regionArea}"/>
                                <input type="text" id="region" name="birthPlace" th:value="${serverUser?.birthPlace}" readonly="readonly" placeholder="请选择" autocomplete="off" class="layui-input" />
                                <div th:replace="common/region"></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="tel" lay-verify="phone" placeholder="" autocomplete="off"
                                       class="layui-input" th:value="${serverUser?.tel}">
                            </div>
                        </div>
                        <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">
<!--                                    <select id="residential_id" lay-search="" name="residentialId" lay-filter="residential_event"></select>-->
                                    <div id="residential_id"></div>
                                    <input id="residential_name" name="residentialName" type="hidden" />
                                </div>
<!--                                <input type="hidden" id="residential_name" name="residentialName"th:value="${serverUser?.residentialName}" >-->
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-form" lay-filter="">
                                <label class="layui-form-label">所属单元</label>
                                <div class="layui-input-inline">
                                    <select id="unit_id" lay-search="" name="unitIds" lay-filter="" xm-select="select1"  xm-select-skin="normal">
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">人员类型</label>
                            <div class="layui-input-inline">
                                <div id="type"></div>
                                <input type="hidden" id="typeValue" th:value="${serverUser?.type}">
                                <!--<select id="type_id" name="type">
                                    <option  th:selected="${serverUser?.type==0}" value="0">保安</option>
                                    <option  th:selected="${serverUser?.type==1}" value="1">快递</option>
                                    <option  th:selected="${serverUser?.type==2}" value="2">外卖</option>
                                    <option  th:selected="${serverUser?.type==3}" value="3">保洁</option>
                                    <option  th:selected="${serverUser?.type==4}" value="4">其他</option>
                                </select>-->
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">备注</label>
                            <div class="layui-input-block">
                                <textarea name="remark" placeholder="请输入200字以内介绍" class="layui-textarea w500" th:text="${serverUser?.remark}"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <input type="hidden" name="id"  class="layui-input" th:value="${serverUser?.id}">
                                <input type="hidden" name="isEnable"  class="layui-input" th:value="${serverUser?.isEnable}">
                                <input type="hidden" id="residentialId"   th:value="${serverUser?.residentialId}">
                                <input type="hidden" id="unitIds"   th:value="${serverUser?.unitIds}">
                                <button class="layui-btn" lay-submit lay-filter="submitButton">提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary" id="cancel_btn">取消</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- javascript -->
<script th:src="@{'/layui/layui.js'}"></script>
<script>
    layui.config({
        base: '/' //静态资源所在路径
    });
</script>
<script th:src="@{'/js/estate/server-user-add.js'}"></script>
</body>
</html>