<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <script th:replace="common/head"></script>
    </head>
    <body>
        <input type="hidden" name="selectTreeId" id="selectTreeId" th:value="${selectTreeId}" />
        <input type="hidden" name="residentialId" id="residentialId" th:value="${residentialId}" />
        <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">
                                <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="unitNumber" lay-verify="required|number" placeholder="" autocomplete="off"-->
<!--                                               class="layui-input">-->
<!--                                    </div>-->
<!--                                    <div class="layui-form-mid layui-word-aux">提示：只能输入数字</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">
                                            <div id="residential_id"></div>
                                        </div>
                                    </div>
                                </div>

                                <div id="building_input" class="layui-form-item" >
                                    <div class="layui-form" lay-filter="building_filter">
                                        <label class="layui-form-label"><span class="must"></span>所属楼栋</label>
                                        <div class="layui-input-inline">
                                            <select id="building_id" lay-search="" name="buildingId" lay-filter="building_event">
                                            </select>
                                        </div>
                                    </div>
                                </div>
<!--                                <div id="org_pid_input" class="layui-form-item" >-->
<!--                                    <div class="layui-form" lay-filter="org_pid_filter">-->
<!--                                        <label class="layui-form-label"><span class="must"></span>社区机构</label>-->
<!--                                        <div class="layui-input-inline">-->
<!--                                            <select id="org_pid" lay-search="" name="orgPid" lay-filter="org_pid_event">-->
<!--                                            </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="personName" placeholder="" autocomplete="off" class="layui-input" lay-verify="personName">
                                    </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" lay-verify="phoneNum" name="personTel" placeholder="" autocomplete="off"
                                               class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">建筑年代</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="builtYear" lay-verify="" placeholder="" autocomplete="off"
                                               class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">产权性质</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="propertyNature" lay-verify="" placeholder="" autocomplete="off"
                                               class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">有无电梯</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="includingElevator" lay-verify="" placeholder="" autocomplete="off"
                                               class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">序号</label>
                                    <div class="layui-input-inline">
                                        <input type="number" name="serial" lay-verify="serial" value="1" placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">提示：只能输入正整数,排序从1开始</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="请输入300字以内的备注介绍" class="layui-textarea w500"></textarea>
                                    </div>
                                </div>
                                <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 -->
        <!--去掉input type="number"后面的箭头-->
        <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/unit-add.js'}"></script>
    </body>
</html>