<!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="${room.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="${room.name}" lay-verify="required|nLength" 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="houseNumber" th:value="${room.houseNumber}" lay-verify="required|number" 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="unitName" th:value="${room.residentialName}" readonly type="text" placeholder="" autocomplete="off" class="layui-input">
                                        <input name="unitId" th:value="${room.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="${room.buildingName}" readonly type="text" placeholder="" autocomplete="off" class="layui-input">
                                        <input name="buildingId" th:value="${room.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="unitName" th:value="${room.unitName}" readonly type="text" placeholder="" autocomplete="off" class="layui-input">
                                        <input name="unitId" th:value="${room.unitId}" lay-verify="required" type="hidden" />
                                    </div>
                                    <label class="layui-form-label"><span class="must">*</span>所属楼层</label>
                                    <div class="layui-input-inline">
                                        <input name="floorName" th:value="${room.floorName}" readonly type="text" placeholder="" autocomplete="off" class="layui-input">
                                        <input name="floorId" th:value="${room.floorId}" lay-verify="required" type="hidden" />
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">面积</label>
                                    <div class="layui-input-inline">
                                        <input type="number" name="area" th:value="${room.area}" 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="houseType" th:value="${room.houseType}" 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="floor" th:value="${room.floor}" 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="ornament" th:value="${room.ornament}" 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="orientation" th:value="${room.orientation}" 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" th:value="${room.serial}" lay-verify="serial" 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" th:text="${room.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/room-edit.js'}"></script>
    </body>
</html>