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
81
82
83
84
85
86
87
88
89
90
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>添加知识分类</title>
 
 
</head>
<body class="end_task_body widthauto">
[#include "/business/pages/include/static.html" /]
<script type="text/javascript">
$(function() {
    $.formValidator.initConfig({formID:"myform",onError:function(msg){popupTips(msg)},onSuccess:function(){
                        document.getElementById("myform").target = window.top.openDialog("1","操作",
                         {},
                         {"width":40,"height":40},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
                         return true;
        }});
        $("#title").formValidator({empty: false, onShow: "请输入分类名称", onFocus: "请输入分类名称"}).inputValidator({min: 3,max:32, onError: "分类名称3至16个汉字或字符"})
                .ajaxValidator({
                      type:"POST",
                     url:"${base}/business/pages/knowledge/knowledgeMain/check.html?pId=${RequestParameters.pId}&id=${RequestParameters.id}",
                     datatype:"json",
                     data:{
                         "title" : function(){return $("#title").val();}
                     },
                     success:function(data){
                         if(data == "1"){
                             return true;
                         } else {
                             return false;
                         }
                     },
                     buttons: $("#btnOK"),
                     error: function(){alert("分类名称已存在,请重新输入!");},
                    onError:"分类名称已存在,请重新输入!",
                    onWait : "正在进行合法性校验,请稍候..."
            });
        $("#serial").formValidator({empty:false,onShow:"请输入顺序号!",onFocus:"请输入顺序号!"}).inputValidator({min:1,max:3,onError:"顺序号必须为1到3位数字"})
         .regexValidator({regExp:"intege1", dataType:"enum", onError:"顺序号格式不正确"});
})
</script>
 
<div class="edit_txt">
 <form id="myform" action="${base}/business/pages/knowledge/knowledgeMain/addcategory.html" method="post">
  <input type="hidden" name="TAG" id="TAG" value="${RequestParameters.pId}" />
  <input type="hidden" name="LEVEL" id="LEVEL" value="${infofather.LEVEL}" />
  <input type="hidden" name="id" id="id" value="${RequestParameters.id}" />
  <input type="hidden" name="pId" id="pId" value="${RequestParameters.pId}" />
  <table class="edit_layout2">
    <tr>
         <th >上级分类名称:</th>
          <td colspan="2"><input type="text" class="general" value="${infofather.TITLENAME}" name="titlename" id="titlename" readonly="readonly"  disabled="disabled"/>
    </tr>
    <tr>
       <th ><label class="required">分类名称:</label></th>
          <td colspan="2"><input type="text" class="general" value="${info.TITLE}" name="title" id="title" />
          <div id="titleTip" style="display:inline-block;"></div>
          </td>
    </tr>
    <tr>
       <th><label class="required">顺序号:</label></th>
          <td colspan="2"><input type="text" class="general" value="${info.SERIAL}" name="serial" id="serial" />
          <div id="serialTip" style="display:inline-block;"></div>
          </td>
    </tr>
    <tr>
       <th>备注:</th>
          <td colspan="2">
          <textarea style="width:60%;" class="general" name="note" id="note">${info.NOTE}</textarea>
          </td>
    </tr>
    
  </table>
  </form>
</div>
 
 
 
<script type="text/javascript">
  
function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){            
            $("#myform").submit();
        }
    }
</script>
 
</body>
</html>