<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <script th:replace="common/head"></script>
    </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">
                                <input type="hidden" lay-verify="required" name="id" th:value="${unit.id}" />
                                <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" th:value="${unit.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="text" name="unitNumber" th:value="${unit.unitNumber}" lay-verify="required" 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 name="residentialName" th:value="${unit.residentialName}" readonly type="text" placeholder="" autocomplete="off" class="layui-input">
                                        <input name="residentialId" th:value="${unit.residentialId}" lay-verify="required" type="hidden" />
                                    </div>
                                    <label class="layui-form-label"><span class="must">*</span>所属楼栋</label>
                                    <div class="layui-input-inline">
                                        <input name="buildingName" th:value="${unit.buildingName}" readonly type="text" placeholder="" autocomplete="off" class="layui-input">
                                        <input name="buildingId" th:value="${unit.buildingId}" lay-verify="required" type="hidden" />
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label"><span class="must">*</span>社区机构</label>
                                    <div class="layui-input-inline">
                                        <input name="orgPidName" th:value="${unit.orgPidName}" readonly type="text" placeholder="" autocomplete="off" class="layui-input">
                                        <input name="orgPid" th:value="${unit.orgPid}" lay-verify="required" type="hidden" />
                                    </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" th:value="${unit.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" name="personTel" th:value="${unit.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" th:value="${unit.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"  th:value="${unit.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"  th:value="${unit.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" placeholder="" autocomplete="off" class="layui-input" th:value="${unit.serial}">
                                    </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" th:text="${unit.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-edit.js'}"></script>
    </body>
</html>
