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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>填写解决方法</title>
[#include "/business/pages/include/static.html" /]
[#include "/component/HtmlEditor.html" /]
<script type="text/javascript">
  $(document).ready(function() {
        $.formValidator.initConfig({formID:"myform",onError:function(msg){popupTips(msg)},onSuccess:function(){
            if(!(window.top.openConfirm("确定要提交吗?"))) {
                 return false;
            }
        
            document.getElementById("myform").target = window.top.openDialog("jiejue","操作",
                         {},
                         {"width":40,"height":40,"noclose":true},
                         [{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
                         
                         
                         return true;
        }});
        
        $("#resolve").formValidator({onshow:"解决方案不能为空",onFocus:"解决方案不能为空"}).functionValidator({
                fun:function(val,elem){
                    var text = resolve.isEmpty();
                    if(text) {
                        return "请输入解决方案";
                    } 
                    return true;
                }
            });
            
        $("#suggest").formValidator({onshow:"",onFocus:"优化建议不能为空"}).functionValidator({
                fun:function(val,elem){
                    var text = resolve.isEmpty();
                    if(text) {
                        return "请输入优化建议";
                    } 
                    return true;
                }
            });
            
        
        /*
        niceform(":radio[name='solve']").on("click",function() {
            $(".way").hide();
            $(this).parent().next(".way").show();
            
            var $this = $(this).find(":radio");
            if($this.val()==1) {
                $("#solveWay").attr("disabled",false).unFormValidator(false);
                $("#noSolveWay").attr("disabled",true).unFormValidator(true); 
            } else {
                $("#noSolveWay").attr("disabled",false).unFormValidator(false);
                $("#solveWay").attr("disabled",true).unFormValidator(true); 
            }
            
        })*/
            
        
        
    });
    
    
  </script>
 
</head>
 
<body class="end_task_body">
<div class="end_task">
    <form id="myform" action="${base}/business/pages/zcyw/solution.html" method="post">
        <input type="hidden" name="incidentId" value='${RequestParameters.incidentId}'>
         <table>
             <tr>
                 <th><label class="required">解决方式:</label></th>
                 <td id="solveWrap">
                     [#if ways?? && ways?size>0]
                         [#list ways as way]
                         <p style="float:left;margin-right:10px;">
                                     <input class="ropos" [#if way_index==0]checked[/#if] name="solveWay" type="radio" value="${way.DATAKEY}"/><span>${way.DATAVALUE}</span>
                         </p>
                         [/#list]
                         <input type="hidden" name="solveWayName" id="solveWayName" >
                     [/#if]
              </tr>
              
              <tr><th><label class="required">解决方案:</label></th><td>
                    [@htmleditor id="resolve"  simple="true" class="general" height="200px;" width="625px"/]
                    <div id="resolveTip" style="display:inline-block;"></div>
              </td></tr>
              
              <tr><th><label class="required">优化建议:</label></th><td>
                  [@htmleditor id="suggest"  simple="true" class="general" height="200px;" width="625px"/]
                  <div id="suggestTip" style="display:inline-block;"></div>
              </td></tr>
              
              <tr><th>流转备注:</th><td>
                  <textarea class="general" style="width:615px;" id="bz" name="bz"></textarea>
              </td></tr>
              
              <!-- <tr>
                  <th>事件升级</th>
                  <td>
                  <input class="pos" type="checkbox" /><label>升级至问题管理</label><input  class="pos" type="checkbox" /><label>保存解决方案至知识库</label></td></tr>
               -->
              
         </table>
     </form>
</div>
<script type="text/javascript">
function onDialogBtnClick(btnID, dialogID, config){
                var solveWayName = $(":radio:checked").next("span").text();
                $("#solveWayName").val(solveWayName);
                if(btnID == "tipBtnSure"){
                     $("#myform").submit();
                }
            }
</script>
 
</body>
</html>