function f_selectContact(){
$.post("${ctx}/basicInfo/findEnterNames.action",function(data){
var hh = data;
localStorage.setItem("array",JSON.stringify(hh));//传递数据
parent.jQuery.ligerDialog.open({ title: '企业', //构建弹窗
name:'winselector',
550,
height: 520,
url: '${ctx}/pages/outfalls/viewGrid.jsp', //子页面
isHidden: false,
buttons: [
{ text: '确定', onclick: f_selectContactOK },
{ text: '取消', onclick: f_selectContactCancel }
]
});
});
//
return false;
}
function f_selectContactOK(item, dialog) {
var fn = dialog.frame.f_select || dialog.frame.window.f_select;
var data = fn();
if (!data) {
alert('请选择行!');
return;
}
$("#outUserCbx").val(data.entName);
$("#outfallsentid").val(data.id);
dialog.close();
}
function f_selectContactCancel(item, dialog) {
dialog.close();
}
function f_loadText(){
var id = $("#voId").val();
$.post("${ctx}/basicInfo/outfallsAct!loadText.action",{"id":id},
function(data){
$("#outUserCbx").val(data[0].entName);
});
}
//dialog的显示内容
<head>
<link href="${ctx}/javascripts/ligerUI_v133/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/javascripts/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
<script src="${ctx}/javascripts/jquery/jquery-1.9.0.min.js" type="text/javascript"></script>
<script src="${ctx}/javascripts/ligerUI_v133/js/ligerui.min.js" type="text/javascript"></script>
<title></title>
<script type="text/javascript">
var g = null;
var array = null;
$(function(){
var url=window.location.search; //获取url中"?"符后的字串
//if($("#txtKey").val()==null || $("#txtKey").val()==""){
array = JSON.parse(localStorage.getItem("array"));
console.log("array: " +array);
/* }else{
array = selarr;
} */
f_reload();
});
function f_reload(){
g = $("#maingrid4").ligerGrid({
columns: [
{ display: 'id', name: 'id', hide:1, 5,isAllowHide:true },
{ display: '企业', name: 'entName', 300 ,frozen: false}
], usePager :false,
allowAdjustColWidth: true,
data: {Rows:array},
'99.5%',height:'100%',
rownumbers: true // 显示序号
});
}
function f_select()
{
return g.getSelectedRow();
}
var selarr ;
function f_search() {
var seloutfalls = $("#txtKey").val();
$.post("${ctx}/basicInfo/outfallsAct!findEnterNames.action",{"seleoutfalls":seloutfalls},function(data){
array = data;
f_reload();
});
}
</script>
<style type="text/css">
.edittable td.editcellmessage,.edittable td.editcellverify,.edittable td.editcell{ padding:4px;line-height:23px;}
.edittable td.editcellmessage{ padding-left:20px;}
body { font-size:12px; background:white;}
.l-button-submit {80px; margin:10px 15px 10px 10px ; padding-bottom:2px;}
</style>
</head>
<body>
<table class="edittable">
<tbody>
<tr >
<!--企业 -->
<td align="right" class="editcellmessage">企业:</td>
<td align="left" class="editcell"><input type="text" id="txtKey" style="130px;height:18px;border: 1px solid #A3C0E8" /></td>
<td><input type="submit" id="btnOK" value="搜索" class="l-button l-button-submit" onclick="f_search()"/> </td>
</tr>
</tbody>
</table>
<div id="maingrid4" style="margin:0; padding:0"></div>
<div style="display:none;">
<!-- g data total ttt -->
</div>