easyUI中 把子页面的值传到父页面

[color=red]//点击选择按钮,加载跳转到子页面,并加载数据[/color]
function choose()
{
openWinW2('<%=basePath %>recall/gotoBatch.xhtml?prodcode='+$("#prodcode").textbox("getValue"),
"产品批次查询","650px","350px",false,false);
}
[color=red]子页面的列表[/color]

$('#tt').datagrid({
url: '<%=basePath %>recall/queryProdbatchList.xhtml',
queryParams: data_attr,
singleSelect: true,
rownumbers: true,
pagination: true,
pageNumber: 1,
pageSize:10,
columns:[[
{field:'detail_id',title:'产品批次',align:'center',width:100,hidden:'true'},
{field:'prodbatch',title:'产品批次',align:'center',width:100},
{field:'prodname',title:'产品名称',align:'center',width:100},
{field:'custentid',title:'客户企业ID',align:'center',width:100},
{field:'custentname',title:'客户企业名称',align:'center',width:100},
{field:'prodmodel',title:'规格',align:'center',width:100},
{field:'salesamount',title:'产品数量',align:'center',width:100},
{field:'detailid',title:'操作',halign:'center',align:'center',width:100,
formatter: function (value, rowData, rowIndex) {
return "<a href='javascript:void(0)' οnclick=\"[color=red]chooseBack[/color]('"+rowData.prodbatch+"','"+rowData.custentid+"','"+rowData.custentname+"','"+rowData.prodmodel+"','"+rowData.salesamount+"')\">选择</a>"
}
}
]]
});


[color=red]--传值 [/color]
function chooseBack(prodbatch,custentid,custentname,prodmodel,salesamount){
window.parent.selectBatch(prodbatch,custentid,custentname,prodmodel,salesamount);
window.parent.closeWin("产品批次查询");

}

[color=red]
--父页面接收
[/color]
function selectBatch(prodbatch,custentid,custentname,prodmodel,salesamount){
$("#prodbatch").textbox("setValue",prodbatch);
$("#cust_ent_id").val(custentid);
$("#cust_ent_name").textbox("setValue",custentname);
$("#prodmodel").textbox("setValue",prodmodel);
$("#recallamount").textbox("setValue",salesamount);
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值