<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>选择关联配置</title>
|
<!--(start) public flies-->
|
|
</head>
|
[#include "/business/pages/include/static.html" /]
|
<body class="search_list_body">
|
<div class="search_list">
|
<div class="sl_search clearfix">
|
<table><tr><td>
|
<ul>
|
<li><label>搜索码:</label><input class="general" type="text" id="seachcode" name="seachcode" /></li>
|
<li><label>配置名称:</label><input class="general" type="text" id="cmdbName" name="cmdbName"/></li>
|
<!--<li><label>配置编号:</label><input class="general" type="text" id="membercode" name="membercode"/></li>-->
|
<li>
|
<label>${Constants.UNIT_CONSTANTS}:</label>
|
<input class="general" type="text" name="sub_customer_name" id="sub_customer_name" value="${subCustomerName}" readOnly onclick="subCus();"/>
|
<input type="hidden" name="sub_customer_id" id="sub_customer_id" value="${RequestParameters.subCustomerId}"/>
|
</li>
|
|
</ul>
|
</td><td width="15%">
|
<a class="retrievebtn" href="javascript:window.location.reload(true);">重置</a><a class="retrievebtn focus" href="javascript:query();">查询</a>
|
</td></tr></table>
|
</div>
|
<table class="display_form" id="main">
|
|
</table>
|
</div>
|
|
<script type="text/javascript">
|
var customerid = '${RequestParameters.customerid}';
|
function query() {
|
var seachcode = $.trim($("#seachcode").val());
|
var cmdbName = $.trim($("#cmdbName").val());
|
var membercode = $.trim($("#membercode").val());
|
var subCustomerId = $("#sub_customer_id").val();
|
var ciids = '${ciIds}';
|
$.post("${base}/business/pages/incident/deviceList.html",{"customerid":customerid,"subCustomerId":subCustomerId,"seachcode":seachcode,"cmdbName":cmdbName,"ciids":ciids,"membercode":membercode},function(data,textStatus) {
|
$("#main").html(data);
|
niceform('input[type=checkbox]').create();
|
})
|
|
}
|
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
var checkedBox = $("#main :checkbox:checked");
|
if(checkedBox.length==0) {
|
popupTips("请选择关联的配置");
|
return;
|
}
|
|
var devices = new Array();
|
checkedBox.each(function() {
|
var $str = $(this).parents("tr.linkTr");
|
var map = new $.HashMap();
|
map.put("deivceId",$(this).val());
|
map.put("deviceName",$.trim($str.find("td.ciName").text()));
|
map.put("searchCode",$.trim($str.find("td.searchCode").text()));
|
map.put("ciName",$.trim($str.find("td.ciName").text()));
|
map.put("position",$.trim($str.find("td.position").text()));
|
map.put("ciAdmin",$.trim($str.find("td.ciAdmin").text()));
|
devices.push(map);
|
});
|
var type = '${RequestParameters.type}';
|
if(type==1){
|
window.top.document.getElementById('dialogIframe10').contentWindow.showLinkDeivce(devices);
|
}else{
|
window.parent.showLinkDeivce(devices);
|
}
|
|
|
window.top.hideDialog(dialogID);
|
}
|
}
|
|
function subCus() {
|
|
var sub_customer_id = $("#sub_customer_id").val();
|
|
var url = "${base}/business/pages/servicelist/slaproject/subCus.html?type=3&customerId="+customerid+"&subCustomerId="+sub_customer_id;
|
window.top.openDialog("selectSubCus","操作",
|
{},
|
{"width":80,"height":80},
|
[{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],url);
|
}
|
|
function showCus(labelId,labelName) {
|
$("#sub_customer_name").val(labelName);
|
$("#sub_customer_id").val(labelId);
|
}
|
|
$(function() {
|
query();
|
})
|
</script>
|
</body>
|
</html>
|