easyUI 子窗口关闭 父窗口刷新

来源:互联网 发布:mac解压缩软件下载 编辑:程序博客网 时间:2024/05/16 05:10

子窗口写法:

  function loadPsg4Wel(rec) {    enableCmp('L');    $('#btn_j').hide();    $('#btn_save').hide();    rec.lclDptDate = rec.lclDptDate.split(" ")[0];    rec.std = rec.lclDptDate + ' ' + rec.stdStr + ":00";    $("#vipForm").form('load', rec);    getVipPaxInfo();};
$.post(ctx + '/yourAction', trimFieldValue(params),                function(data) {                    loading.close();                    if (data.status == 1) {// 操作成功                        /*$.messager.alert('提示:', '', 'info');                        cancel();*/                        $.messager.confirm('操作成功', '您确定关闭当前窗口并刷新父窗口?', function(r) {                               if (r) {                               if(window.parent!=window){                                 console.log("子窗口");                                 cancel();                                 window.parent.location.reload(true);                               }                             }                              });                      } else {                        $.messager.alert('提示', data.object, 'warning',                                function() {                                    $("#bordCardCode").focus();                                });                    }                });

父窗口写法:

$("#MyPopWindow").window({                title : '父窗口添加子页面信息',                href : ctx + '/jsp/winPage/childPage.jsp',                width : 850,                height : 525,                iniframe : true,                onLoad : function() {                    loadPsg4Wel(obj);                }            });
阅读全文
0 0
原创粉丝点击