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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>填写解决方法</title>
[#include "/business/pages/include/static.html" /]
[#include "/component/HtmlEditor.html" /]
[#include "/component/newupload.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("0","操作",
                         {},
                         {"width":60,"height":80,"noclose":true},
                         [{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
                         
                         
                         return true;
        }});
        
        $("#repeat_order").formValidator({empty: false, onShow:"请选择重复工单!",onFocus: "重复工单不能为空"}).inputValidator({min: 1,onError: "重复工单不能为空"});    
        $("#reason").formValidator({onshow:"",onFocus:"原因不能为空"}).functionValidator({
                fun:function(val,elem){
                    var text = reason.isEmpty();
                    if(text) {
                        return "请输入原因";
                    } 
                    return true;
                }
            });
            
            
            
            $("#reason").attr("disabled",true).unFormValidator(true);
            $("#repeat_order").attr("disabled",true).unFormValidator(true);
        $(".closetype").click(function() {
           if($(this).val() == "WTCF"){
               $(".repead").show();
               $("#repeat_order").attr("disabled",false).unFormValidator(false);
           }else{
               $(".repead").hide();
               $("#repeat_order").attr("disabled",true).unFormValidator(true);
           }
       });    
        
         $(".endtype").click(function() {
           if($(this).val() == 1){
               $("#end").show();
               $(".close").hide();
               $(".yuan").hide();
               $("#reason").attr("disabled",true).unFormValidator(true);
               $("#repeat_order").attr("disabled",true).unFormValidator(true);
           }else{
               $("#end").hide();
               $(".close").show();
                $(".yuan").show();
                $("#reason").attr("disabled",false).unFormValidator(false);
                $("#repeat_order").attr("disabled",false).unFormValidator(false);
           }
       });
    });
    
    
  </script>
 
</head>
 
<body class="end_task_body">
<div class="end_task">
    <form id="myform" action="" method="post">
    <input type="hidden" name="know" id="know" >
         <table>
             <tr>
                 <th style="border-bottom:0px;">问题解决:</th>
                 <td id="solveWrap" style="border-bottom:0px;">
                         <p style="float:left;margin-right:10px;">
                                     <input class="ropos endtype"  name="solve" type="radio" value="1" checked /><span>已解决</span>
                         </p>
                         <p style="float:left;margin-right:10px;">
                                     <input class="ropos endtype"  name="solve" type="radio" value="2"/><span>未解决</span>
                         </p>
              </tr>
             <tr id="end">
                 <th style="border-bottom:0px;">解决方式:</th>
                 <td id="solveWrap" style="border-bottom:0px;">
                     [#if ways?? && ways?size>0]
                         [#list ways as way]
                         <p style="float:left;margin-right:10px;">
                                     <input class="ropos jietype solveWaytype" [#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 class="close" style="display:none;">
                 <th style="border-bottom:0px;">关闭方式:</th>
                 <td id="solveWrap" style="border-bottom:0px;">
                     [#if closeways?? && closeways?size>0]
                         [#list closeways as close]
                         <p style="float:left;margin-right:10px;">
                                     <input class="ropos closetype solveWaytype" [#if close_index == 0]checked[/#if] name="solveWay" type="radio" value="${close.DATAKEY}"/><span>${close.DATAVALUE}</span>
                         </p>
                         [/#list]
                         <input type="hidden" name="solveWayName" id="solveWayName" >
                     [/#if]
              </tr>
              <tr class="close" style="display:none;">
              <th class="repead" style="border-bottom:0px;"><label class="required">关联重复问题工单:</label></th>
                <td class="repead" style="border-bottom:0px;">
                    <input class="general" type="text" name="showrepeat_order" id="showrepeat_order" readonly onclick="questionorder()"/>
                    <input type="hidden" name="repeat_order" id="repeat_order" />
                    <div id="repeat_orderTip" style="display:inline-block;"></div>
                </td>
               </tr>
              <tr class="yuan"  style="display:none;"><th style="border-bottom:0px;"><label class="required">原因:</label></th><td style="border-bottom:0px;"></td></tr>
              <tr class="yuan"  style="display:none;">
              <td colspan="2" align="center">
                    [@htmleditor id="reason"  simple="true" class="general" height="200px;" width="70%"/]
                    <div id="resolveTip" style="display:inline-block;"></div>
              </td></tr>
              
              
         </table>
         
     </form>
</div>
<script type="text/javascript">
var customerid = '${RequestParameters.customerId}';
var orderid = '${question.ID}';
function questionorder() {
    
    if($.util.isEmpty(customerid)) {
        popupTips("请先选择${Constants.CUSTOMER_CONSTANTS}");
        return;
    }
    var reordercode = $("#showrepeat_order").val();
    window.top.openDialog("0","添加重复问题工单",
                         {},
                         {"width":80,"height":80},
                         [{btnId:"btnSure", btnName:"选择", btnStyle:"bluebtn"}],
                         "${base}/business/pages/question/linkwtOrder.html?customerid="+customerid+"&reordercode="+reordercode+"&orderid="+orderid);
}
 
function showLinkwtOrder(flowid,ordercode){
    $("#showrepeat_order").val(ordercode);
    $("#repeat_order").val(flowid);
}
function onDialogBtnClick(btnID, dialogID, config){
        var $endtype = $(".endtype:checked");
               if($endtype.val() == 1){
                 var $jietype = $(".jietype:checked");
                 if($jietype.length != 1){
                   popupTips("请选择解决方式");
                   return;
                 }
               }else{
                  var $closetype = $(".closetype:checked");
                 if($closetype.length != 1){
                   popupTips("请选择关闭方式");
                   return;
                 }
               }
                var solveWayName = $(".solveWaytype:checked").next("span").text();
                $("#solveWayName").val(solveWayName);
                
                if(btnID == "btnSure"){
                    
                        $("#myform").submit();
                }
            }
</script>
 
</body>
</html>