<!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>
<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="">
                        <input type="hidden" name="id" th:value="${parkingSpace.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="number" lay-verify="required" placeholder="" autocomplete="off"
                                       class="layui-input" th:value="${parkingSpace.number}">
                            </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="parkName" lay-verify="required" placeholder=""
                                       autocomplete="off" class="layui-input" th:value="${parkingSpace.parkName}">
                            </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">
                                    <input type="text" name="residentialName" lay-verify="required" placeholder="" disabled
                                           autocomplete="off" class="layui-input" th:value="${parkingSpace.residentialName}">
<!--                                    <div id="residential_id"></div>-->
                                </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="carNumber" lay-verify="required" placeholder=""
                                       autocomplete="off" class="layui-input" th:value="${parkingSpace.carNumber}">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"><span class="must">*</span>车位类型</label>
                            <div class="layui-input-inline">
                                <input type="hidden" id="typeValue" th:value="${parkingSpace.type}">
                                <div id="typeDic"></div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"><span class="must">*</span>是否收费</label>
                            <div class="layui-input-inline">
                                <select id="isFree" name="isFree" lay-verify="required">
                                    <option th:selected="${parkingSpace.isFree == null}" value="">请选择</option>
                                    <option th:selected="${parkingSpace.isFree == 0}" value="0">是</option>
                                    <option th:selected="${parkingSpace.isFree == 1}" value="1">否</option>
                                </select>
                                <!--<input type="text" name="isFree" lay-verify="required" placeholder="" autocomplete="off"
                                       class="layui-input" th:value="${parkingSpace.isFree}">-->
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"><span class="must">*</span>是否室内</label>
                            <div class="layui-input-inline">
                                <select id="isIndoor" name="isIndoor" lay-verify="required">
                                    <option th:selected="${parkingSpace.isIndoor == null}" value="" >请选择</option>
                                    <option th:selected="${parkingSpace.isIndoor == 0}" value="0">是</option>
                                    <option th:selected="${parkingSpace.isIndoor == 1}" value="1">否</option>
                                </select>
                                <!--<input type="text" name="isIndoor" lay-verify="required" placeholder=""
                                       autocomplete="off" class="layui-input" th:value="${parkingSpace.isIndoor}">-->
                            </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 -->
<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/parking-space-edit.js'}"></script>
</body>
</html>
