父页面:function kaipiao(ids) { layer.open({ type: 2, title: '开票', maxmin: true, shadeClose: false, // 点击遮罩关闭层 area: ['1200px', '700px'], content: prefix + '/kaipiao', afterClose: function (VRetrun) { layer.msg(VRetrun); }, otherParams: { ids: ids } });}子页面:在初始加载中获取$(function){
var params = parent.layer.getParams();//取参数if (params) { unitguids = params.ids;}}子页面向父页面传参 通过layer.open 打开新窗口
var openCustomerselect = function () { top.layer.open({ type: 2, title: "选择客户", area: ['1100px', '600px'], content: "/manage/customer/customerselect", afterClose: setCustomer, })}
function setCustomer(result) { $("#customerguid").val(result.unitguid); $("#customername").val(result.customername);}