<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <script th:replace="common/head"></script>
        <!-- 省市区样式 -->
        <link rel="stylesheet" th:href="@{'/layui/lay/mymodules/region.css'}" media="all">
<!--        <link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css"/>-->
        <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=cbb265e2a60bbbc04a52eec4eecdeb12&plugin=AMap.Autocomplete,AMap.PlaceSearch"></script>
        <script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script>
    </head>
    <body>
        <input type="hidden" name="selectTreeId" id="selectTreeId" th:value="${selectTreeId}" />
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <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">
                                    <input type="text" name="agencyName" lay-verify="required|specialCharacters|length" autocomplete="off" class="layui-input" >
                                </div>
                            </div>
                            <!-- 上级机构 -->
                            <!--<div class="layui-form-item">
                                <div class="layui-form" lay-filter="">
                                    <label class="layui-form-label"><span class="must">*</span>所属机构</label>
                                    <div class="layui-input-inline">
                                        <div id="orgPid"></div>
                                    </div>
                                    <input type="hidden" id="parent_name" name="parentName" >
                                </div>
                            </div>-->
                            <!-- 地址 -->
                            <div class="layui-form-item">
                                <label class="layui-form-label">
                                    <span class="must">*</span>
                                    <span>选择地区</span>
                                </label>
                                <div class="layui-input-inline" id="region_body">
                                    <input type="hidden" lay-verify="required" name="regionProvince" />
                                    <input type="hidden" lay-verify="required" name="regionCity" />
                                    <input type="hidden" lay-verify="required" name="regionArea" />
                                    <input type="hidden" lay-verify="required" name="provinceName" />
                                    <input type="hidden" lay-verify="required" name="cityName" />
                                    <input type="hidden" lay-verify="required" name="areaName" />
                                    <input type="text" name="region" lay-verify="required" autocomplete="off" class="layui-input" id="region" />
                                    <div th:replace="common/region"></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" id="regionStreet" style="width: 350px">
                                </div>
                                <input type="hidden" lay-verify="required" name="streetName" />

                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label"><span class="must">*</span>经度</label>
                                <div class="layui-input-inline">
                                    <input type="text" lay-verify="required" name="longitude" class="layui-input" />
                                </div>
                                <label class="layui-form-label"><span class="must">*</span>纬度</label>
                                <div class="layui-input-inline">
                                    <input type="text" lay-verify="required" name="latitude" class="layui-input" />
                                </div>
                                <div id="myPageTop" style="padding-left: 80%">
                                    <input id="tipinput" class="layui-input" placeholder="输入名称，查询位置"/>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div id="container1" style="width: 100%;height: 340px;padding-left: 12px;padding-top:200px;"></div>
                            </div>
                            <!-- 详细地址 -->
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">
                                    <span>详细地址</span>
                                </label>
                                <div class="layui-input-block">
                                    <textarea name="address" class="layui-textarea w500"></textarea>
                                </div>
                            </div>
                            <!-- 机构负责人 -->
                            <div class="layui-form-item">
                                <label class="layui-form-label">社区负责人</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="personName" 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" lay-verify="phoneNum" name="personPhone" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <!-- 备注 -->
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">备注</label>
                                <div class="layui-input-block">
                                    <textarea name="remark" 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">取消</button>
                                </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/agency-add.js'}"></script>


    </body>
</html>