cy
2022-06-28 2ba5c891b24d4d0cd6ce7ef833592e4f576ee5e8
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
108
109
110
111
112
<!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" /]
[#include "/component/sel.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:true,onShow:"请输入公司全称!",onFocus:"请输入公司全称!"})
            .inputValidator({min:3,max:100,onError:"中文名称最低三个汉字最多为100个汉字!"});
            
            
     $("#manufacturername").formValidator({empty:false,onShow:"请输入公司简称!",onFocus:"公司简称不能为空!"})
            .inputValidator({min:2,max:100,onError:"公司简称最低2个汉字最多为100个汉字!"})
            .ajaxValidator({
                dataType: "html",
                async: true,
                url: "${base}/business/pages/servicelist/slaproject/checkCsJsc.html?type=${RequestParameters.type}&id=${info.ID}",
                success: function (data) {
                    if(data=='true'){
                        return false;
                    }
                  return true;
                },
                buttons: $("#dosubmit"),
                error: function (jqXHR, textStatus, errorThrown) {
                    alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown);
                },
                onError: "该名称已存在,请更换",
                onWait: "正在对名称进行校验,请稍候..."
            });
            
     $("#phone").formValidator({empty:true,onShow:"请输入电话,格式为'0371-66666666'",onFocus:"请输入电话,格式为'0371-66666666'"})
                    .regexValidator({regExp:"^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$",onError:"你输入的办公电话格式不正确"});
    $("#web_url").formValidator({empty:true,onShow:"请输入网址,如:http://!",onFocus:"请输入网址,如:http://!"})
           .regexValidator({regExp:"^http[s]?:\\/\\/([\\w-]+\\.)*[\\w-]*([\\w-./?%&=]*)?$",onError:"您输入的网址格式不正确,正确格式如:http://!"});
        
})
</script>
 
<div class="edit_txt">
    <form id="myform" action="${base}/business/pages/ciadd/addManufacturerInfo.html" method="post">
        <input type="hidden" value="${info.PROJECT_ID}" name="project_id"/>
        <input type="hidden" value="${info.CUSTOMER_ID}" name="customer_id"/>
        <input type="hidden" value="${info.FLOW_ID}" name="flow_id"/>
        <input type="hidden" value="${RequestParameters.type}" name="type"/>
        <input type="hidden" value="${info.ID}" name="id"/>
         <table class="edit_layout">
                <tr><th><label class="required">公司全称:</label></th>
                    <td  style="width:500px;">
                    <input class="general" type="text" name="zh_name" id="zh_name" value="${info.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="${info.MANUFACTURERNAME}"/>
                    <div id="manufacturernameTip" style="display:inline-block;"></div>
                    </td>
                </tr>
                
                
                <tr><th><label>电话:</label></th>
                    <td  style="width:400px;">
                    <input class="general" type="text" name="phone" id="phone" value="${info.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="${info.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" />${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>