| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <!DOCTYPE html>
- <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
- <head>
- <th:block th:include="include :: header('复制数据')" />
- </head>
- <body class="white-bg">
- <div class="wrapper wrapper-content animated fadeInRight ibox-content">
- <form class="form-horizontal m" id="form-modelEntity-copy">
- <input type="hidden" id="projectId" name="projectId" th:value="${modelProject.id}">
- <input type="hidden" id="orgEntityId" name="orgEntityId" th:value="${modelProject.orgEntityid}">
- <div class="form-group">
- <label class="col-sm-3 control-label is-required">表名称:</label>
- <div class="col-sm-8">
- <input id="entityName" name="entityName" th:field="*{entityName}" placeholder="表名称" class="form-control" type="text" required>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label is-required">表逻辑名:</label>
- <div class="col-sm-8">
- <input id="entityCode" name="entityCode" th:field="*{entityCode}" placeholder="m_tablename" class="form-control" type="text" required>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">描述:</label>
- <div class="col-sm-8">
- <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
- </div>
- </div>
- </form>
- </div>
- <th:block th:include="include :: footer" />
- <script th:inline="javascript">
- var prefix = ctx + "model/modelEntity"
- $("#form-modelEntity-add").validate({
- onkeyup: false,
- rules:{
- entityCode:{
- maxlength: 50,
- remote: {
- url: prefix + "/checkEntityCodeUnique",
- type: "post",
- dataType: "json",
- data: {
- "projectId":$("#projectId").val(),
- "entityCode": function() {
- return $.common.trim($("#entityCode").val());
- }
- },
- dataFilter: function(data, type) {
- return $.validate.unique(data);
- }
- }
- },
- entityName:{
- maxlength: 25
- },
- remark:{
- maxlength: 100
- },
- },
- messages: {
- "entityCode": {
- remote: "数据表已经存在"
- },
- },
- focusCleanup: true
- });
- function submitHandler() {
- if ($.validate.form()) {
- $.operate.save(prefix + "/copy", $('#form-modelEntity-copy').serialize());
- }
- }
- </script>
- </body>
- </html>
|