cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>kpi模板</title>
 
[#include "/business/pages/include/static.html" /]
<style type="text/css">
    html{_overflow-y:scroll}
</style>
 <script type="text/javascript">
        $(document).ready(function() {    
                $.formValidator.initConfig({formID:"myform",onError:function(msg){alert(msg)},onSuccess:function(){
                        document.getElementById("myform").target = window.top.openDialog("1","操作",
                         {},
                         {"width":40,"height":40,"noclose":true},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
                         return true;
                }});
                $("#template_name").formValidator({empty:false,onShow:"模板名称不能为空!",onFocus:"模板名称不能为空!"}).inputValidator({min:1,max:32,onError:"模板名称为1到32个字符!"});
                $("#version").formValidator({empty:false,onShow:"唯一的版本号",onFocus:"唯一的版本号"}).inputValidator({min:1,max:20,onCorrect:"123",onError:"输入唯一的版本号"})
                .ajaxValidator({
                    dataType : "html",
                    async : true,
                    url : "checkkpiVersion.html",
                    data :{"type":function(){return $("#template_type").val();},"version":function(){return $("#version").val();},"id":'${map.ID}'},
                    success : function(data){
                        if( data == 0 ) return true;
                        if( data == 1 ) return false;
                        return false;
                    },
                    buttons: $("#dosubmit"),
                    error: function(jqXHR, textStatus, errorThrown){alert("服务器没有返回数据,可能服务器忙,请重试"+errorThrown);},
                    onError : "该版本号已存在,请更换版本号",
                    onWait : "正在对版本号进行合法性校验,请稍候..."
                });
                
        });
    </script>
  </head>
  <body>
   <div class="pad_10" style="margin-top: 10px;">
<div class="col-tab">
<div id="div_setting_1" class="contentList pad_10">
  <form action="" method="post"  id="myform" name="myform" enctype="multipart/form-data">
  <table align="center" width="98%"  class="edit_layout2">
      <tr>
          <th width="20%" align="right"><label class="required" >模板名称:</label></th>
          <td>
              <input type="text" class="general" value="${map.TEMPLATE_NAME}" name="template_name" id="template_name" />
              <div id="template_nameTip" style="display:inline-block;width: 200px;"></div>
          </td>    
    </tr>
    <tr>
          <th width="20%" align="right"><label class="required" >版本号:</label></th>
          <td>
              <input type="text" class="general" value="${map.VERSION}" name="version" id="version" />
              <div id="versionTip" style="display:inline-block;width: 250px;"></div>
          </td>    
    </tr>
    <tr>
          <th width="20%" align="right">备注:</th>
          <td>
              <textarea id="note" name="note" style="width:400px;" class="general">${map.NOTE}</textarea>
              
          </td>    
    </tr>
  </table>
  </form>
    </div>
</div>
</div>
  </body>
 <script type="text/javascript">
    function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            $("#myform").submit();
        }
    }
</script>
</html>