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
<!doctype html>
<html>
<head>
[#include "/business/wechat/include/title.html" /]
[#include "/business/wechat/include/wheader.html" /]
</head>
 
<body>
<header class="kltit"><div class="present"><a href="javascript:saveorder();">确定</a></div><a href="javascript:history.go(-1);" ><span></span></a>添加关联工单</header>
<div class="search-bg">
    <div class="search-box">
        <input type="text" placeholder="请输入工单编号" id="orderCode" >
        <a href="javascript:query();"><span></span></a>
    </div>    
</div>
 
<div id="main"></div>
</body>
<script type="text/javascript">
function query() {
    var orderCode = $.util.encode($.trim($("#orderCode").val()));
    var orderids = '${orderids}'
     var param = {"customerId":"${customer_id}","orderCode":orderCode,"orderids":orderids};
     $.post("${base}/ewyw/ewIncident/ewAddOrderData.html",param,function(data,textStatus) {
            $("#main").html(data);
    });
}
 
$(function() {
    query();
})
function saveorder(){
    var checkedBox = $(".item-foucs");
    if(checkedBox.length==0) {
        popupTips("请选择关联的工单");
        return;
    }
    
    var orders = new Array();
    checkedBox.each(function() {
        orders.push($.trim($(this).find(".orderId").val()));
    });
    var orderslist = orders.join(",");
    $.post("${base}/ewyw/ewIncident/saveLinkOrders.html",{"flowId":"${flowId}","orderIds":orderslist},function(data,textStatus) {
        if(data=="1") {
            popupTips("关联成功");
            if('${showType}' == '${Constants.WECHAT_DETAIL_DEAL_SCORE_SJ}'){
                window.location.href = "${base}/ewyw/ewIncident/ewIncidentInfoCl.html?orderId=${orderId}";
            }else if('${showType}' == '${Constants.WECHAT_DETAIL_DEAL_SCORE_WT}'){
                window.location.href = "${base}/ewyw/ewQuestion/ewQuestionDeal.html?orderId=${orderId}&flowId=${flowId}";
            }else if('${showType}' == '${Constants.WECHAT_DETAIL_DEAL_SCORE_LXWH}'){
                  window.location.href = "${base}/ewyw/ewRemind/ewRemindInfoCl.html?orderId=${orderId}";
              }else if('${showType}' == '${Constants.WECHAT_DETAIL_DEAL_SCORE_JKJC}'){
                  window.location.href="${base}/ewyw/ewHealth/ewHealthInfoCl.html?orderId=${orderId}";
              }
        } else {
            popupTips("关联失败");
        }
    })
}
</script>
</html>