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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
[@formui/]
[#include "/component/combobox.html" /]
<title>equipment</title>
 
<script type="text/javascript">
    $(document).ready(function() {
        
        $.formValidator.initConfig({formID:"myform",onError:function(msg){alert(msg)},onSuccess:function(){
            
            var dealers = document.getElementsByName("admins");
            if(!dealers || dealers.length == 0){alert("请选择维保方案负责人!");return false;}
            else {
                var isAdmins = false;
                for(var i=0;i<dealers.length;i++){
                    if(dealers[i].checked) {isAdmins=true;}
                }
                if(!isAdmins){
                    alert("请选择主要负责人!");
                    return false;
                }
            }
        
            if (!confirm('确定提交表单?')){   
                return false;  
            } 
            document.getElementById("myform").target = window.top.openDialog(101,30,30,'操作提示:');
            return true;
        }});
        
        $("#deal_note").formValidator({empty:false,onShow:"请输入处理意见"}).inputValidator({min:1,max:2000,onError:"处理意见不能为空"});
    });
   
   function ondutyer_idChanged(ids,text){
        if(ids){
            $("#container").empty();
            var arrText = text.split(",");
            var html = "";
            for(var i=0;i<ids.length;i++){
                html+='<input type="radio" name="admins" value="'+ ids[i] +'"/>'+ arrText[i] +'  ';
            }
            $("#container").append(html);
        }
    }
    
   function closeWin(index){
       window.top.closeDialog(index);
   }
   
   function _onFormSubmit(){
        document.getElementById("btnOK").click();
   }
</script>
 
</head>
 
<body>
<form action="" method="post" id="myform" name="myform">
<div>
    <table align="center" width="98%" class="table_form contentWrap" border="0">
        <tr>
          <th width="20%" align="right">选择维保方案负责人:</th>
          <td>
           [@combobox  id="dutyer_id"  style="width:350px;"  multiple="true" editable="false"
                                textField="USER_NAME" valueField="USER_ID" url="${base}/interface/partner/getPartnerUserList.html"
           /]
            <font color="red">*</font>
           <div id="dutyer_idTip" style="width:250px;"></div>      
          </td>
        </tr>
        <tr>
              <th width="10%" align="right">选择主要负责人:</th>
              <td id="container">
              </td>
        </tr>
        <tr>
            <th align="right">处理意见:</th>
            <td><textarea name="deal_note" id="deal_note" style="width:60%;" cols="45" rows="4" class="input-text"></textarea></td>
        </tr>
    </table>
</div>
 
<div align="center">
    <input type="submit" id="btnOK" value="提交" style="display:none;"/>
</div>
 
</form>
</body>
</html>