cy
2022-06-22 6e06bba1c89f8077e29d0fbf0ce12f89f027d8d2
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
<button type="button" id="button" class="add" onclick="linkDevice()" ><span>添加关联配置</span></button>
[#if devices?? && devices?size>0]
    [#list devices as device]
        <section class="worklist clearfix" >
        <!--<section class="worklist clearfix">-->
            <h2>
                <a href="javascript:delLink('${device.LINK_ID}');"><em class="deletes"></em></a>
                ${device.SEARCHCODE}
            </h2>
            <input type="hidden" name="deviceId" value="${device.ID}">
            <div class="worklistcon clearfix" style="cursor:pointer;" onclick="javascript:window.location.href='${base}/ewyw/ewconfig/econfigInfo.html?cate=${device.LV3_ID}&id=${device.ID}'">
                <span class="relaicon"></span>
                <p>配置名称:${device.CINAME}</p>
                <p>分类名称:${device.LV1_NAME}->${device.LV2_NAME}->${device.LV3_NAME}</p>
                <p>存放位置:<em>${device.POSITION}</em></p>
            </div>
        </section>
    [/#list]
[#else]
    <div class="nodate"><span>暂无关联配置</span></div>
[/#if]
 
<script type="text/javascript">
function linkDevice() {
    var customerid = '${customer_id}';
    var sub_customer_id = '${sub_customer_id}';
    if(sub_customer_id!=null && sub_customer_id!=undefined && sub_customer_id!=''){
        customerid=customerid+"--"+sub_customer_id;
    }
    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/ewAddLinkDevice.html?customerId="+customerid+"&ciIds="+ciIds+"&flowId=${flowId}&orderId=${orderId}&showType=${showType}";
}
 
function delLink(linkId) {
    if(confirm("确认要删除当前记录吗?")){
        $.post("${base}/ewyw/ewIncident/delLinkDevice.html",{"linkId":linkId},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 {
                popupTips("删除失败");
            }
        })
    }
}
</script>