123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- <!DOCTYPE html>
- <html xmlns:th="http://www.thymeleaf.org"
- xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
- <head th:replace="admin/common/html/tableHead :: tableHead(~{::title},~{::link},~{::style})">
- <title th:text=${title}></title>
- <!-- 这儿引用单独的css link -->
- <!-- Ladda for Bootstrap 3按钮加载进度插件 -->
- <link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
- <!-- bootstrap-table表单样式 -->
- <link th:href="@{/static/admin/assets/js/bootstrap/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
- <!-- 用户界面自定义css -->
- <link th:href="@{/static/admin/user/css/user-add.css}" rel="stylesheet"/>
- <style type="text/css"></style>
- </head>
- <body>
-
- <div class="content-wrap">
- <div class="row">
- <div class="col-sm-12">
- <div class="nest" id="elementClose">
- <div class="">
- </div>
- <div class="body-nest" id="element">
- <div class="panel-body">
- <form class="form-horizontal m" id="form-edit" th:object="${SysProvince}">
- <input id="id" name="id" type="hidden" th:field="*{id}"/>
-
- <div class="form-group">
- <label class="col-sm-3 control-label ">省份代码:</label>
- <div class="col-sm-8">
- <input class="form-control" type="text" id="provinceCode" name="provinceCode" th:value="*{provinceCode}"/>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label ">省份名称:</label>
- <div class="col-sm-8">
- <input class="form-control" type="text" id="provinceName" name="provinceName" th:value="*{provinceName}"/>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label ">简称:</label>
- <div class="col-sm-8">
- <input class="form-control" type="text" id="shortName" name="shortName" th:value="*{shortName}"/>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label ">经度:</label>
- <div class="col-sm-8">
- <input class="form-control" type="text" id="lng" name="lng" th:value="*{lng}"/>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label ">纬度:</label>
- <div class="col-sm-8">
- <input class="form-control" type="text" id="lat" name="lat" th:value="*{lat}"/>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label ">排序:</label>
- <div class="col-sm-8">
- <input class="form-control" type="number" id="sort" name="sort" th:value="*{sort}"/>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label ">创建时间:</label>
- <div class="col-sm-8">
- <input class="form-control MyDate" type="text" id="gmtCreate" name="gmtCreate" th:value="*{#dates.format(gmtCreate,'yyyy-MM-dd HH:mm:ss')}"/>
- </div>
- </div>
-
-
- <div class="form-group">
- <label class="col-sm-3 control-label ">修改时间:</label>
- <div class="col-sm-8">
- <input class="form-control MyDate" type="text" id="gmtModified" name="gmtModified" th:value="*{#dates.format(gmtModified,'yyyy-MM-dd HH:mm:ss')}"/>
- </div>
- </div>
-
-
- <div class="form-group">
- <label class="col-sm-3 control-label ">备注:</label>
- <div class="col-sm-8">
- <input class="form-control" type="text" id="memo" name="memo" th:value="*{memo}"/>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-sm-3 control-label ">状态:</label>
- <div class="col-sm-8">
- <select name="dataState" id="dataState" class="form-control m-b" th:with="type=${@dict.getType('sys_province_state')}" th:field="*{dataState}">
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </div>
- </div>
-
- <div class="form-group">
- <div class="form-control-static col-sm-offset-9">
- <button type="submit" class="btn btn-primary">提交</button>
- <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 通用js -->
- <div th:include="admin/common/html/js :: onload_js">
-
- </div>
- <!-- bootstarp 表格 -->
- <script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/bootstrap-table.min.js}" type="text/javascript"></script>
- <script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}" type="text/javascript"></script>
- <script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>
- <!-- 弹窗 -->
- <script th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
- <!-- 遮罩层 -->
- <script th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>
- <script type="text/javascript">
- $(function(){
- $(".MyDate").datetimepicker({
- format: "yyyy-mm-dd hh:00:00",
- startDate: new Date(),
- autoclose: true,
- todayBtn: true,
- language: 'zh-CN',
- initialDate:new Date(),
- minView: 1
- });
-
- })
- $("#form-edit").validate({
- submitHandler : function(form) {
- edit();
- }
- });
- function edit() {
- var dataFormJson = $("#form-edit").serialize();
- $.ajax({
- cache : true,
- type : "POST",
- url : rootPath + "/SysProvinceController/edit",
- data : dataFormJson,
- async : false,
- error : function(request) {
- $.modal.alertError("系统错误");
- },
- success : function(data) {
- $.operate.saveSuccess(data);
- }
- });
- }
- </script>
- </body>
- </html>
|