<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>
|