$.ajax({
url:'${appName}/project/t9a_project/saveCustomerByProject_id.ajax',
data:$(form).serializeArray(),
type:'post',
dataType:'json',
success:function(data){
if("1" == data.messageFlag){
var popLayerWindow = getPopLayerWindow(); //获取主窗口,
popLayerWindow.paramLayerPhase.remove(); //关闭此页面回到父页面
popLayerWindow.frames[0].queryList(); //调用页面的重加载方法(其中frames[0]表示为主窗口第一个 按钮)
popLayerWindow.successMsg('保存成功');
}
if("1" == data.messageFlag){
var activeWindow = getPopLayerWindow(); //获取主窗口
//debugger;
activeWindow.abc.remove(); //关闭此页面回到父页面
(由于父页面的结构为左树右表,由中间页面加载调用而来,因此要回到中间页面重新加载页面)
activeWindow.paramLayerPhaseProject.frame[0].contentWindow.initTree();(重新加载树)
activeWindow.paramLayerPhaseProject.frame[0].contentWindow.queryPhaseList();(重新加载表)
activeWindow.successMsg("保存成功!");
var popLayerWindow = getPopLayerWindow(); //主窗口
var preLayerWindow = popLayerWindow.popLayer.frame[0].contentWindow; //拿到二级页面窗口 popLayer二级页面打开名称
popLayerWindow.paramLayerPhase.remove();//主窗口关闭当前页面
popLayerWindow.successMsg(data.message);//主窗口弹出提示框
preLayerWindow.getsubmit();//二级窗口调用二级页面方法
var activeWindow = getPopLayerWindow();
var preLayerWindow = activeWindow.paramLayer.frame[0].contentWindow;
activeWindow.paramLayerAdd.remove();
preLayerWindow.successMsg(data.message);
preLayerWindow.queryDataList();
preLayerWindow.setParentGrid();