<!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="${car.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="${car.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="hidden" id="typeValue" th:value="${car.type}">
                                <div id="car_type"></div>
                                <!--<select id="type" name="type" lay-verify="required" th:value="${car.type}">
                                    <option value=""  th:selected="${car.type == null}">请选择</option>
                                    <option value="0" th:selected="${car.type == 0}">轿车</option>
                                    <option value="1" th:selected="${car.type == 1}">货车</option>
                                    <option value="2" th:selected="${car.type == 2}">客车</option>
                                    <option value="3" th:selected="${car.type == 3}">挂车</option>
                                    <option value="4" th:selected="${car.type == 4}">摩托车</option>
                                    <option value="5" th:selected="${car.type == 5}">非完整车辆</option>
                                    <option value="6" th:selected="${car.type == 6}">电动车辆</option>
                                </select>-->
                            </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="propertiesValue" th:value="${car.properties}">
                                <div id="car_properties"></div>
                                <!--<select id="properties" name="properties" lay-verify="required" th:value="${car.properties}">
                                    <option value=""  th:selected="${car.properties == null}">请选择</option>
                                    <option value="0" th:selected="${car.properties == 0}">货运</option>
                                    <option value="1" th:selected="${car.properties == 1}">客运</option>
                                    <option value="2" th:selected="${car.properties == 2}">营运</option>
                                    <option value="3" th:selected="${car.properties == 3}">非运营</option>
                                    <option value="4" th:selected="${car.properties == 4}">出租</option>
                                </select>-->
                            </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="model" lay-verify="required" placeholder="" autocomplete="off"
                                       class="layui-input" th:value="${car.model}">
                            </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="fuelCategoryValue" th:value="${car.fuelCategory}">
                                <div id="fuel_category"></div>
                                <!--<select id="fuelCategory" name="fuelCategory" lay-verify="required" th:value="${car.fuelCategory}">
                                    <option value=""  th:selected="${car.fuelCategory == null}">请选择</option>
                                    <option value="0" th:selected="${car.fuelCategory == '0'}">汽油</option>
                                    <option value="1" th:selected="${car.fuelCategory == '1'}">柴油</option>
                                    <option value="2" th:selected="${car.fuelCategory == '2'}">乙醇</option>
                                    <option value="3" th:selected="${car.fuelCategory == '3'}">液化天然气(LNG)</option>
                                    <option value="4" th:selected="${car.fuelCategory == '4'}">压缩天然气(CNG)</option>
                                    <option value="5" th:selected="${car.fuelCategory == '5'}">电动</option>
                                </select>-->
                            </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="color" lay-verify="required" placeholder="" autocomplete="off"
                                       class="layui-input" th:value="${car.color}">
                            </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="carImg" lay-verify="required" placeholder="" autocomplete="off"
                                       class="layui-input" th:value="${car.carImg}">
                            </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="carStatus" lay-verify="required" placeholder="" autocomplete="off" class="layui-input" th:value="${car.carStatus}">
                            </div>
                        </div>-->
                        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                            <legend>车主信息</legend>
                        </fieldset>
                        <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="agencyName" lay-verify="required" placeholder=""
                                           autocomplete="off" class="layui-input" th:value="${car.agencyName}" disabled>
                                    <!--                                            <div id="agency_id" style="display: none"></div>-->
                                </div>
                            </div>

                            <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=""
                                           autocomplete="off" class="layui-input" th:value="${car.residentialName}"
                                           disabled>
                                    <!--                                            <div id="residential_id" style="display: none"></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="personName" lay-verify="required|specialCharacters|length"
                                       placeholder="" autocomplete="off" class="layui-input"
                                       th:value="${car.personName}">
                            </div>
                            <label class="layui-form-label"><span class="must">*</span>手机号</label>
                            <div class="layui-input-inline">
                                <input type="number" name="personPhone" placeholder="" autocomplete="off"
                                       class="layui-input" lay-verify="phoneNum" th:value="${car.personPhone}">
                            </div>
                        </div>
                        <input id="fastDfsServer" type="hidden" th:value="${fastDfsServer}">
                        <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/car-edit.js'}"></script>
</body>
</html>
