layer 弹出框再弹出框点击确认刷新父亲弹出框

xiaoxiao2021-02-28  67

function addShip(productId,orderId){ var index = parent.layer.getFrameIndex(window.name); var iframeName = 'layui-layer-iframe'+index; top.layer.open({ type: 2, area: ['800px','480px'], title: '添加发货信息', maxmin: true, //开启最大化最小化按钮 content: '${ctx}/produceTrace/ship/addform?orderId='+orderId+'&productId='+productId , btn: ['确定', '关闭'], yes: function(index, layero){ var body = top.layer.getChildFrame('body', index); var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method(); var inputForm = body.find('#inputForm'); var top_iframe = iframeName;//如果指定了iframe,则在改frame中跳转 inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示 if(iframeWin.contentWindow.doSubmit(iframeName) ){ setTimeout(function(){ top.layer.close(index); top.window[iframeName].frames.location.reload(); }, 100);//延时0.1秒,对应360 7.1版本bug } }, cancel: function(index){ } }); }
转载请注明原文地址: https://www.6miu.com/read-56122.html

最新回复(0)