<!doctype html>
|
<html>
|
<head>
|
[#include "/business/wechat/include/title.html" /]
|
[#include "/business/wechat/include/wheader.html" /]
|
</head>
|
|
<body>
|
<header class="kltit"><a href="javascript:history.go(-1);"><span></span></a>添加关联配置</header>
|
<div class="search-bg">
|
<div class="search-box">
|
<input type="text" placeholder="请输入配置名称或配置搜索码" id="cmdbName" >
|
<a href="javascript:query();"><span></span></a>
|
</div>
|
</div>
|
|
<div id="main"></div>
|
<button class="bluebtn bluebtnsmal2" onclick="savedevice()">确定</button>
|
</body>
|
<script type="text/javascript">
|
var flowId = '${flowId}';
|
var cmdbName = $.util.encode($.trim($("#cmdbName").val()));
|
function query() {
|
var param = {"customerId":"${customerId}","ciids":"${ciIds}","cmdbName":cmdbName,"orderId":"${orderId}"};
|
$.post("${base}/ewyw/ewIncident/ewAddLinkDeviceData.html",param,function(data,textStatus) {
|
$("#main").html(data);
|
});
|
}
|
|
$(function() {
|
query();
|
})
|
|
function savedevice(){
|
var checkedBox = $(".item-foucs");
|
if(checkedBox.length==0) {
|
popupTips("请选择关联的配置");
|
return;
|
}
|
|
var devices = new Array();
|
checkedBox.each(function() {
|
devices.push($.trim($(this).find(".deivceId").val()));
|
});
|
var devicelist = devices.join(",");
|
$.post("${base}/ewyw/ewIncident/saveLinkDevices.html",{"flowId":"${flowId}","deviceIds":devicelist},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 {
|
window.top.popupTips("关联失败");
|
}
|
});
|
}
|
</script>
|
</html>
|