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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
<!doctype html>
<html>
<head>
[#include "/business/wechat/include/title.html" /]
[#include "/business/wechat/include/wheader.html" /]
[#include "/component/DatePicker.html" /]
[#include "/component/newsel.html" /]
[#include "/business/wechat/include/mobiscroll.html" /]
</head>
 
<body>
<header class="kltit">
    <div class="present"><a href="javascript:saveQuestion();">提交</a></div>
    <a href="${base}/ewyw/ewQuestion/ewMyQuestion.html" ><span></span></a>回退问题
 
</header>
<form id="myform" action="" method="post">
<input type="hidden" id="id" name="id" value="${question.ID}"/>
<input type="hidden" id="flowId" name="flowId" value="${flowId}"/>
<input type="hidden" id="nodeId" name="nodeId" value="${nodeId}"/>
<input type="hidden" id="order_code" name="order_code" value="${question.ORDER_CODE}"/>
<input type="hidden" id="selectUser" name="selectUser" value="1&1&1&1"/>
<input type="hidden" id="sh" name="sh" value="2"/>
<nav class="kltwo clearfix">
    <div class="kltwowrap">
        <a href="#" hidefocus="true" class="active">基本信息</a>
        <a href="#" hidefocus="true">关联配置</a>
        <a href="#" hidefocus="true">关联工单</a>
        <!--  <a href="#" hidefocus="true">文档附件</a>   -->     
    </div>
</nav>
<div class="swiper-container" id="swiper-pages">
    <div class="swiper-wrapper">
        <div class="swiper-slide">
            <section class="wlresponse">
                <p>
                    <span>问题名称</span>
                    <i><input name="name" id="name" type="text" class="enter" value="${question.name}"></i>
                </p>
                <p>
                    <span>问题描述</span>
                    <i><textarea name="descrip" id="descrip" cols="" rows="3" class="event-text">${question.descrip}</textarea></i>
                </p>
                <p >
                    <span>${Constants.CUSTOMER_CONSTANTS}名称</span>
                    <label id="showcus" >${question.customer_name}</label>
                    <input name="customer_id" id="customer_id" type="hidden" class="enter" value="${question.customer_id}">
                    <input name="customer_name" id="customer_name" type="hidden" class="enter" value="${question.customer_name}">
                </p>
                <p>
                    <span>联系方式</span>
                    <i><input name="contact_phone" id="contact_phone" type="text" class="enter" value="${question.contact_phone}"></i>
                </p>
                <p>
                    <span>联系人</span>
                     <i><input name="contact_name" id="contact_name" type="text" class="enter" value="${question.contact_name}"></i>
                </p>
                <p>
                    <span>业务科室</span>
                     <i><input name="keshi" id="keshi" type="text" class="enter" value="${question.keshi}"></i>
                </p>
              <p>
                    <span>问题来源</span>
                    
                    [#if froms?? && froms?size > 0]
                    <select id="source_id" name="source_id" style="width:140px;" class="select">
                    [#list froms as from]
                       <option value="${from.DATAKEY}" [#if question.source_id?? && question.source_id == from.DATAKEY]selected[#elseif fromId == from.DATAKEY]selected[/#if]>${from.DATAVALUE}</option>
                    [/#list]  
                    </select>
                    [/#if]
                    
              </p>
                <p class="next2">
                    <span  class="long">期望完成时间</span>
                    <i class="long"><input class="enter" type="text" name="want_deal_time" id="want_deal_time" value="${DateUtil.format('yyyy-MM-dd',question.want_deal_time)}"/></i>
                </p>
                 <p >
                    <span>服务目录</span>
                    [#if question.serivceList??]
                    <label>${question.serivceList}</label>
                    [#else]
                    <label>${question.FIRST_CATEGORY_NAME}-${question.SECOND_CATEGORY_NAME}-${question.THIRD_CATEGORY_NAME}</label>
                    [/#if]
                    [#if question.serivceList??]
                    <input type="hidden" id="serivceListId" name="serivceListId" value="${question.serivceListId}" >
                    <input type="hidden" id="serivceList" name="serivceList" value="${question.serivceList}" >
                      [#else]
                    <input type="hidden" id="serivceList" name="serivceList" value="${question.FIRST_CATEGORY_NAME}-${question.SECOND_CATEGORY_NAME}-${question.THIRD_CATEGORY_NAME}"/> 
                    <input type="hidden" id="serivceListId" name="serivceListId" value="${question.FIRST_CATEGORY_ID}-${question.SECOND_CATEGORY_ID}-${question.THIRD_CATEGORY_ID}"/> 
                    [/#if]
                </p>
                 <a href="javascript:showlevel();">
                 <p class="next2">
                    <span>SLA等级</span>
                    <label><em class="org">[#if question.slaId??]${question.slaName}[#else] ${question.pri_level}[/#if]</em><br />
                    <input type="hidden" id="slaId" name="sla_id" [#if question.slaId??]value="${question.slaId}"[#else]value="${question.pri_level_id}"[/#if] />
                    <input type="hidden" id="slaName" name="sla_name" [#if question.slaId??]value="${question.slaName}"[#else] value="${question.pri_level}"[/#if]/>
                    <input type="hidden" id="priority_id" name="priority_id" value="${question.priority_id}"/> 
                    <input type="hidden" id="influence_id" name="influence_id" value="${question.influence_id}"/> 
                </p></a>
            </section>
        </div>
      <div class="swiper-slide">
       <button type="button" id="button" class="add" onclick="linkDevice()" /><span>添加关联配置</span></button>
           [#if question.deviceList?? && question.deviceList?size > 0]
           [#list question.deviceList as device]
            <section class="worklist clearfix">
                <h2>
                    <div class="deletes"><a href="#"><img src="${common_static}/static/wechat/style/images/gdicon7.png" width="32" height="32" alt=""></a></div>
                    ${device.searchcode}
               </h2>
               <input type="hidden" name="deviceId" value="${device.deivceId}">
               <input type="hidden" name="devices" value="${device.deivceId}&${device.searchcode}&${device.ciname}&${device.position}&${device.lv_name}">
              <div class="worklistcon clearfix">
                     <span class="relaicon"></span>
                     <p>设备名称:${device.ciname}</p>
                     <p>分类名称:${device.lv_name}</p>
                    <p>存放位置:<em>${device.position}</em></p>
              </div>
            </section>
            [/#list] 
            [/#if]
      </div>
      <div class="swiper-slide">
      <button type="button" id="button" class="add" onclick="linkOrder()" /><span>添加关联工单</span></button>
           [#if question.orderList?? && question.orderList?size > 0]
           [#list question.orderList as order]
            <section class="worklist clearfix">
                <h2>
                    <div class="deletes"><a href="#"><img src="${common_static}/static/wechat/style/images/gdicon7.png" width="32" height="32" alt=""></a></div>
                    ${order.order_code}
                </h2>
                <input type="hidden" name="orderId" value="${order.orderId}">
                <input type="hidden" name="orders" value="${order.orderId}&${order.businesstype}&${order.order_code}&${order.wfname}&${order.customer_name}&${order.createtime}&${order.creatername}">
                <div class="worklistcon clearfix">
                    <span>${Constants.mapWORKFLOW_BUSINESS_TYPE_Label(order.businesstype+"")}</span>
                    <p>工单名称:${order.wfname}</p>
                    <p>${Constants.CUSTOMER_CONSTANTS}名称:${order.customer_name}</p>
                    <p>创建时间:<em>${DateUtil.format("yyyy-MM-dd HH:mm:ss",order.createtime)}</em></p>
                    <label></label>
                </div>
            </section>
            [/#list] 
            [/#if]
   </div>
         <!--   <div class="swiper-slide">
              <section class="wlfile clearfix">
                <button class="bluebtn uploadings"><span>上传附件</span></button><button class="bluebtn uploadings photographs"><span>拍照</span></button>
                <a href="#">
                <p>
                    <span class="file_rar"></span>
                     <label class="del2">
                        企业邮箱使用及绑定提醒操作说明.rar
                        <em>1.67MB  2015-06-17 12:30:21</em>
                    </label>
                </p>
                </a>
            </section>
        </div> -->
    </div>
</div>
</form> 
<script type="text/javascript">
n=$('.kltwowrap a').size();                
var wh=100*n+"%";
$('.kltwowrap').width(wh);
var lt=(100/n/4);
var lt_li=lt+"%";
$('.kltwowrap a').width(lt_li);            
$(".kltwowrap a").on('touchstart mousedown',function(e){
    e.preventDefault()
    $(".kltwowrap .active").removeClass('active');
    $(this).addClass('active');
    tabsSwiper.slideTo($(this).index());
});
 
$(".kltwowrap a").click(function(e){
    e.preventDefault();
});
 
var tabsSwiper = new Swiper(".swiper-container",{
    setWrapperSize :true,
    onSlideChangeStart: function(sw){
        $(".kltwowrap .active").removeClass('active');
        $(".kltwowrap a").eq(tabsSwiper.activeIndex).addClass('active');
        
    //sw.width
    var currTab = $(".kltwowrap a").eq(tabsSwiper.activeIndex);
    /*if(currTab.width()*sw.activeIndex +10 > sw.width){
      currTab.parent().css("left",-currTab.width()*sw.activeIndex);
    }else{
      currTab.parent().css("left",0);
    }*/
    currTab.parent().css("left",-parseInt(sw.activeIndex/4)*sw.width);
    }
});
var time = '${DateUtil.format("yyyy-MM-dd",question.want_deal_time)}';
$(function() {
 
     var currYear = (new Date()).getFullYear();    
    var opt={};
    opt.date = {preset : 'date'};
    opt.datetime = {preset : 'datetime'};
    opt.time = {preset : 'time'};
    opt.default = {
        theme: 'android-ics light', //皮肤样式
        display: 'modal', //显示方式 
        mode: 'scroller', //日期选择模式
        dateFormat: 'yyyy-mm-dd',
        lang: 'zh',
        showNow: true,
        nowText: "今天",
        startYear: currYear - 50, //开始年份
        endYear: currYear + 50//结束年份
    };
 
    $("#want_deal_time").scroller($.extend(opt['date'], opt['default']));
    if(!$.util.isEmpty(time)){
       $("#want_deal_time").scroller('setDate', new Date(time), true);
    }else{
       $("#want_deal_time").scroller('setDate', new Date(), true);
    }
});
$(function() {
    $("#contact_phone").blur(function() {
        var customer_id = $("#customer_id").val();
        if(!$.util.isEmpty(customer_id)) {
            var contactPhone = $.trim($(this).val());
            $("#loadCycle").show();
            $.post("${base}/ewyw/ewIncident/queryContactInfo.html",{"customer_id":customer_id,"contactPhone":contactPhone},function(data,textStatus) {
                if(data.hasMsg == 1) {
                    var contact_name = data.CONTACT_NAME;
                    if(!$.util.isEmpty(contact_name)) {
                        $("#contact_name").val(contact_name);
                    }
                    var ywks = data.YWKS;
                    if(!$.util.isEmpty(ywks)) {
                        $("#keshi").val(ywks);
                    }
                }
                $("#hasMsg").val(data.hasMsg);
                $("#loadCycle").hide();
            },"json")
            
        }
    });
    $(".deletes").click(function(){
       $(this).parent().parent().remove();
    });
})
 
function selectcus() {
   $.post("${base}/ewyw/ewQuestion/savetempquestion.html",$("#myform").serialize(),function(data,textStatus) {
        var customer_id = $("#customer_id").val();
        window.location.href = "${base}/ewyw/ewIncident/ewsubCus.html?customerId="+customer_id+"&wt=1";
    });
    
}
 
function showSl() {
       var customer_id = $("#customer_id").val();
        if($.util.isEmpty(customer_id)) {
            popupTips("请先选择${Constants.CUSTOMER_CONSTANTS}");
            return;
        }
       $.post("${base}/ewyw/ewQuestion/savetempquestion.html",$("#myform").serialize(),function(data,textStatus) {
 
            var serivceList = $("#serivceList").val();
            var serivceListId = $("#serivceListId").val();
            var url = "${base}/ewyw/ewIncident/ewserviceListTree.html?customerId="+customer_id+"&wt=1";
            if(!$.util.isEmpty(serivceList)&&!$.util.isEmpty(serivceListId)) {
                var names = serivceList.split("-");
                var ids = serivceListId.split("-");
                if(ids.length==3) {
                    url += "&sl="+ids[2];
                }
            }
            window.location.href = url;
        });    
    }
    
    function showlevel() {
       var customer_id = $("#customer_id").val();
        if($.util.isEmpty(customer_id)) {
            popupTips("请先选择${Constants.CUSTOMER_CONSTANTS}");
            return;
        }
        var serivceListId = $("#serivceListId").val();
        if($.util.isEmpty(serivceListId)) {
            popupTips("请先选择服务目录");
            return;
        }
       $.post("${base}/ewyw/ewQuestion/savetempquestion.html",$("#myform").serialize(),function(data,textStatus) {
            var priority_id = $("#priority_id").val();
            var influence_id = $("#influence_id").val();
            var url = "${base}/ewyw/ewIncident/ewselectlevel.html?customerId="+customer_id+"&serivceListId="+serivceListId+"&priority_id="+priority_id+"&influence_id="+influence_id+"&wt=1";
            window.location.href = url;
        });    
    }
    
function linkDevice() {
    var customerid = $("#customer_id").val();
    if($.util.isEmpty(customerid)) {
        popupTips("请先选择${Constants.CUSTOMER_CONSTANTS}");
        return;
    }
    var deviceIds = new Array();
    var $deviceId = $(":hidden[name='deviceId']");
    if($deviceId.length>0) {
        $deviceId.each(function() {
            deviceIds.push($(this).val());
        })
    }
    
    var ciIds = deviceIds.join("-");
    window.location.href = "${base}/ewyw/ewIncident/ewDevice.html?customerId="+customerid+"&ciIds="+ciIds+"&wt=1";
}
 
function linkOrder() {
    var customerid = $("#customer_id").val();
    
    if($.util.isEmpty(customerid)) {
        popupTips("请先选择${Constants.CUSTOMER_CONSTANTS}");
        return;
    }
    var orderIds = new Array();
    var $orderId = $(":hidden[name='orderId']");
    if($orderId.length>0) {
        $orderId.each(function() {
            orderIds.push($(this).val());
        })
    }
    
    window.location.href =  "${base}/ewyw/ewIncident/ewOrder.html?customerId="+customerid+"&orderids="+orderIds+"&wt=1";
}
 
function saveQuestion(){
     var name = $("#name").val();
     if($.util.isEmpty(name)) {
        popupTips("问题名称不能为空");
        return;
     } else {
        if(name.length > 50){
           popupTips("问题名称最大50个汉字");
           return;
        }
     }
     if($.util.isEmpty(name)) {
        popupTips("问题名称不能为空");
        return;
     }
     var descrip = $("#descrip").val();
     if($.util.isEmpty(descrip)) {
        popupTips("问题描述不能为空");
        return;
     } 
     var customer_id = $("#customer_id").val();
     if($.util.isEmpty(customer_id)) {
        popupTips("${Constants.CUSTOMER_CONSTANTS}不能为空");
        return;
     } 
     var contact_phone = $("#contact_phone").val();
     if($.util.isEmpty(contact_phone)) {
        popupTips("联系方式不能为空");
        return;
     }
     if(!$.util.isMobile(contact_phone) && !$.util.isTelphone(contact_phone)) {
        popupTips("联系方式格式不正确");
        return;
     }
     var contact_name = $("#contact_name").val();
     if($.util.isEmpty(contact_name)) {
        popupTips("联系人不能为空");
        return;
     } else {
        if(contact_name.length > 50){
           popupTips("联系人最大50个汉字");
           return;
        }
     }
     var keshi = $("#keshi").val();
     if(keshi.length > 25){
           popupTips("科室最大25个汉字");
           return;
     } 
     var source_id = $("#source_id").val();
      if($.util.isEmpty(source_id)) {
        popupTips("问题来源不能为空");
        return;
     }
     var want_deal_time = $("#want_deal_time").val();
      if($.util.isEmpty(want_deal_time)) {
        popupTips("期望完成时间不能为空");
        return;
     }
     var serivceListId = $("#serivceListId").val();
      if($.util.isEmpty(serivceListId)) {
        popupTips("服务目录不能为空");
        return;
     }
     var slaId = $("#slaId").val();
     if($.util.isEmpty(slaId)) {
        popupTips("等级协议不能为空");
        return;
     }
     
           $.post("${base}/ewyw/ewQuestion/ewaddQuestion.html",$("#myform").serialize(),function(data,textStatus) {
                  window.location.href =  "${base}/ewyw/ewIncident/ewoption.html?wt=1";
         });
 
}
 
 
</script>     
</body>
</html>