<!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">
|
<form id="myform">
|
<table>
|
<tr>
|
<td>
|
<label>搜索码:</label><input class="general" type="text" id="seachcode" name="seachcode" />
|
</td>
|
<td>
|
<label>配置名称:</label><input class="general" type="text" id="cmdbName" name="cmdbName"/>
|
</td>
|
<td>
|
<a class="retrievebtn focus" href="javascript:query();">查询</a>
|
<a class="retrievebtn" id="reset">重置</a>
|
|
</td></tr></table>
|
</form>
|
</div>
|
<table class="display_form" id="main">
|
</table>
|
</div>
|
|
<script type="text/javascript">
|
function query() {
|
var type = '${RequestParameters.type}';
|
var customerid = '${RequestParameters.customerid}';
|
var spare_part_apply_entity_id = '${RequestParameters.spare_part_apply_entity_id}';
|
var seachcode = $.trim($("#seachcode").val());
|
var cmdbName = $.trim($("#cmdbName").val());
|
var orderId ='${RequestParameters.orderId}';
|
var ciids = '${ciIds}';
|
$.post("${base}/business/pages/bpbj/spareParts/deviceList.html",{"customerid":customerid,"seachcode":seachcode,"cmdbName":cmdbName,"ciids":ciids,"spare_part_apply_entity_id":spare_part_apply_entity_id,"type":type,"orderId":orderId},function(data,textStatus) {
|
$("#main").html(data);
|
})
|
|
}
|
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
var type = '${RequestParameters.type}';
|
var spare_part_apply_entity_id = '${RequestParameters.spare_part_apply_entity_id}';
|
if(type==1){
|
var deivceId = $(".deivceId:checked");
|
var labelId = deivceId.attr("value");
|
var labelName = deivceId.attr("supplier_name");
|
window.top.document.getElementById("dialogIframe0").contentWindow.showLinkDeivce(labelId,labelName,spare_part_apply_entity_id);
|
window.top.hideDialog(dialogID);
|
}else{
|
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("searchCode",$.trim($str.find("td.searchCode").text()));
|
map.put("ciName",$.trim($str.find("td.sub_customer_name").text()));
|
map.put("position",$.trim($str.find("td.position").text()));
|
devices.push(map);
|
});
|
window.top.document.getElementById("dialogIframe0").contentWindow.showLinkDeivce(devices);
|
window.top.hideDialog(dialogID);
|
}
|
|
}
|
}
|
|
$(function() {
|
query();
|
$("#reset").click(function () {
|
$("#myform")[0].reset();
|
});
|
})
|
</script>
|
</body>
|
</html>
|