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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>新增厂商或者集成商</title>
 
 
</head>
<body class="edit_txt_body">
[#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("2","操作",
                         {},
                         {"width":40,"height":40},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
                         return true;
        }});
 
 
 
     $("#zh_name").formValidator({empty:false,onShow:"请输入公司全称!",onFocus:"请输入公司全称!"})
            .inputValidator({min:6,max:40,onError:"公司全称全称6-40个字符或者3-20个汉字!"});
 
 
     $("#manufacturername").formValidator({empty:false,onShow:"请输入公司简称!",onFocus:"公司简称不能为空!"})
            .inputValidator({min:2,max:20,onError:"公司简称2-20个字符或者1-10个汉字!"})
            .ajaxValidator({
                dataType: "html",
                async: true,
                url: "${base}/business/pages/customerconfig/cuscs/checkCsJsc.html?type=${RequestParameters.type}&id=${RequestParameters.id}&customerId=${RequestParameters.customerId}",
                success: function (data) {
                    if(data=='true'){
                        return false;
                    }
                  return true;
                },
                buttons: $("#dosubmit"),
                error: function (jqXHR, textStatus, errorThrown) {
                    alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown);
                },
                onError: "该名称已存在,请更换",
                onWait: "正在对名称进行校验,请稍候..."
            });
     $("#phone").formValidator({empty:false,onFocus:"请输入电话"}).inputValidator({min:1,max:11,onError:"电话必须为1到11位"}).regexValidator({regExp:"intege1", dataType:"enum", onError:"电话必须为数字"});
    $("#web_url").formValidator({empty:true,onShow:"请输入网址,如:http://!",onFocus:"请输入网址,如:http://!"})
           .regexValidator({regExp:"^http[s]?:\\/\\/([\\w-]+\\.)*[\\w-]*([\\w-./?%&=]*)?$",onError:"您输入的网址格式不正确,正确格式如:http://!"})
            .inputValidator({min:1,max:100,onError:"网址输入最多100个字符!"});
 
})
</script>
 
<div class="edit_txt">
    <form id="myform" action="" method="post">
        <input type="hidden" value="${RequestParameters.customerId}" name="customer_id"/>
        <input type="hidden" value="${RequestParameters.type}" name="type"/>
         <table class="edit_layout2">
 
                <tr><th><label class="required">公司全称:</label></th>
                    <td  style="width:500px;">
                    <input class="general" type="text" name="zh_name" id="zh_name" value="${cs.ZH_NAME}"/>
                    <div id="zh_nameTip" style="display:inline-block;"></div>
                    </td>
                </tr>
 
                <tr><th><label class="required">公司简称:</label></th>
                    <td  style="width:500px;">
                    <input class="general" type="text" name="manufacturername" id="manufacturername" value="${cs.MANUFACTURERNAME}"/>
                    <div id="manufacturernameTip" style="display:inline-block;"></div>
                    </td>
                </tr>
 
                <tr><th><label class="required">电话:</label></th>
                    <td  style="width:400px;">
                    <input class="general" type="text" name="phone" id="phone"  value="${cs.PHONE}"/>
                    <div id="phoneTip" style="display:inline-block;"></div>
                    </td>
                </tr>
 
                <tr><th><label>公司网址:</label></th>
                    <td  style="width:400px;">
                    <input class="general" type="text" name="web_url" id="web_url" value="${cs.WEB_URL}"/>
                    <div id="web_urlTip" style="display:inline-block;"></div>
                    </td>
                </tr>
 
 
                <tr><th><label>简介:</label></th>
                    <td ><textarea class="general" style="width:360px;" name="note" id="note" />${cs.NOTE}</textarea>
                    </td>
                </tr>
            </table>
     </form>
</div>
 
 
 
<script type="text/javascript">
function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            $("#myform").submit();
        }
    }
</script>
 
</body>
</html>