<!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">
                    <!-- 修改 -->
                    <div class="layui-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>地区</span>
                            </label>
                            <div class="layui-input-inline">
                                <div class="layui-input-inline">
                                    <div id="regionProvince"></div>
                                </div>
                            </div>
                            <div class="layui-input-inline">
                                <div class="layui-input-inline">
                                    <div id="regionCity"></div>
                                </div>
                            </div>
                            <div class="layui-input-inline">
                                <div class="layui-input-inline">
                                    <div id="regionArea" name="residentialArea"></div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>小区</span>
                            </label>
                            <div class="layui-input-inline">
                                <div class="layui-input-inline">
                                    <div id="residential" name="residentialId" th:value="${adAdsense.residentialId}"></div>
                                </div>
                            </div>
                        </div>
                        <!--广告位类别 -->
                        <div class="layui-form-item" lay-filter="adType_entity">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>广告位类别</span>
                            </label>
                            <div class="layui-input-inline">
                                <select name="adsenseType" id="adsenseType" class="select" lay-verify="required" lay-filter="adsenseType">
                                    <option value=""></option>
                                    <option value="1" th:selected="${adAdsense.adsenseType == '1'}">设备</option>
                                    <option value="2" th:selected="${adAdsense.adsenseType == '2'}">门体灯箱</option>
                                    <option value="3" th:selected="${adAdsense.adsenseType == '3'}">围栏灯箱</option>
                                </select>
                            </div>
                        </div>
                        <!-- 门体编号 -->
                        <div class="layui-form-item" id="doorNumberDiv">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>门体编号</span>
                            </label>
                            <div class="layui-input-inline">
                                <input type="text" name="doorNumber"  class="layui-input" th:value="${adAdsense.doorNumber}">
                            </div>
                        </div>
                        <!-- 设备 -->
                        <div class="layui-form-item" id="deviceIdDiv">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>设备</span>
                            </label>
                            <div class="layui-input-inline">
                                <div class="layui-input-inline">
                                    <div id="diviceId" name="deviceId" th:value="${adAdsense.deviceId}"></div>
                                </div>
                            </div>
                        </div>

                        <!-- 广告位编号 (后台自动生成)-->
<!--                        <div class="layui-form-item">-->
<!--                            <label class="layui-form-label">-->
<!--                                <span class="must">*</span>-->
<!--                                <span>广告位编号</span>-->
<!--                            </label>-->
<!--                            <div class="layui-input-inline">-->
<!--                                <input type="text" name="adsenseNumber" lay-verify="required|specialCharacters|length" class="layui-input">-->
<!--                            </div>-->
<!--                        </div>-->
                        <!-- 广告-->

                        <!-- 广告类别 -->
                        <div class="layui-form-item" lay-filter="adType_entity">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>广告类别</span>
                            </label>
                            <div class="layui-input-inline">
                                <select name="adType" id="adType" lay-verify="required" lay-search="" th:value="${adAdsense.adType}">
                                    <option></option>
                                    <option value="1" th:selected="${adAdsense.adType == '1'}">图片</option>
                                    <option value="2" th:selected="${adAdsense.adType == '2'}">视频</option>
                                </select>
                            </div>
                        </div>

                        <!--广告位名称 -->
                        <div class="layui-form-item" lay-filter="adType_entity">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>广告位名称</span>
                            </label>
                            <div class="layui-input-inline">
                                <input disabled type="text" name="adsenseNamePre" id="adsenseNamePre" lay-verify="required|specialCharacters|length" class="layui-input" th:value="${adAdsense.residentialName}">
                            </div>
                            <div class="layui-input-inline">
                                <input type="text" name="adsenseNameSuf" id="adsenseNameSuf" lay-verify="required|specialCharacters|length" class="layui-input" >
                            </div>
                        </div>
                        <!--广告数量 -->
                        <div class="layui-form-item" lay-filter="adType_entity">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>广告数量</span>
                            </label>
                            <div class="layui-input-inline">
                                <input type="number" name="adCount"  class="layui-input" th:value="${adAdsense.adCount}">
                            </div>
                        </div>
                        <!--广告尺寸 -->
                        <div class="layui-form-item" lay-filter="adType_entity">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>广告尺寸</span>
                            </label>
                            <div class="layui-input-inline">
                                <input type="text" name="adsenseSize"  class="layui-input" th:value="${adAdsense.adsenseSize}">
                            </div>
                        </div>

                        <!--广告位状态-->
                        <div class="layui-form-item" lay-filter="adType_entity">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>广告位状态</span>
                            </label>
                            <div class="layui-input-inline">
                                <select name="adsenseStatus" id="adsenseStatus" lay-verify="required" lay-search="" th:value="${adAdsense.adsenseStatus}">
                                    <option></option>
                                    <option value="1" th:selected="${adAdsense.adsenseStatus == '1'}">启用</option>
                                    <option value="0" th:selected="${adAdsense.adsenseStatus == '0'}">停用</option>
                                </select>
                            </div>
                        </div>
                        <input type="hidden" name="id" th:value="${adAdsense.id}">



                        <!-- 按钮 -->
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-filter="addConfirm" lay-submit>提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">取消</button>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

<!-- javascript -->
<script th:src="@{'/layui/layui.js'}" charset="utf-8"></script>
<script>
    layui.config({
        base: '/' //静态资源所在路径
    });
</script>
<script th:src="@{'/js/ad/ad-adsense-add.js'}" charset="utf-8"></script>
<!--编辑图片样式-->
<link xmlns:th="http://www.thymeleaf.org" rel="stylesheet" th:href="@{'/css/ad/ad.css'}" media="all">
</html>
