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
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>选择关联工单</title>
<!--(start) public flies-->
 
</head>
[#include "/business/pages/include/static.html" /]
<body>
<div class="fs_main clearfix">
    <div class="event_fill list_common_select">
    <table><tr><th width="85%">
        [#if businessTypes?? && businessTypes?size>0]
        <div class="fill_item"><label>工单类型:</label>
            <select class="businesstype" id="businessType">
                            <option value="">请选择</option>
                            [#list businessTypes as types]
                                <option value="${types.id}">${types.text}</option>
                            [/#list]
                        </select>
        </div>
        [/#if]
        <div class="fill_item">
            <label>工单编号:</label><input class="general" type="text" id="orderCode" name="orderCode"/></div>
        <div class="fill_item">
           <label>工单名称:</label><input class="general" type="text" id="orderName" name="orderName" />
        </div>
    </th><td width="15%">
        <a class="retrievebtn focus" onclick="query();">查询</a><a class="retrievebtn" id="reset">重置</a>
    </td></tr></table>
    </div>
</div>
 
<div class="fs_main clearfix">
        <div id="main"></div>   
    </div>
 
<script type="text/javascript">
    var flowId = '${RequestParameters.flowId}';
    var customerId = '${customerId}';
    function query() {
        var orderName = $.util.encode($.trim($("#orderName").val()));
        var orderCode = $.util.encode($.trim($("#orderCode").val()));
        var businessType = $("#businessType").val();
        var orderIds = '${orderIds}';
        $.post("${base}/business/pages/incident/orderList.html",{"flowId":flowId,"customerid":customerId,"orderName":orderName,"orderCode":orderCode,"businessType":businessType,"orderids":orderIds},function(data,textStatus) {
            $("#main").html(data);
        })
        
    }
    
    function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            var checkedBox = $("#main :checkbox:checked");
            if(checkedBox.length==0) {
                popupTips("请选择关联的工单");
                return;
            }
            
            var orders = new Array();
            checkedBox.each(function() {
                orders.push($(this).val());
            });
            
            var orderIds = orders.join(",");
            
            $.post("${base}/business/pages/incident/saveLinkOrders.html",{"flowId":flowId,"orderIds":orderIds},function(data,textStatus) {
                if(data=="1") {
                    window.top.popupTips("关联成功");
                    window.top.document.getElementById('orderIframe').contentWindow.location.reload(true);
                     window.top.hideDialog(dialogID);
                } else {
                    window.top.popupTips("关联失败");
                }
            })
        }
    }
    
    $(function() {
        query();
        $("#reset").click(function() {
            window.location.reload(true);
        });
    })
</script>
</body>
</html>