打开一个弹出层
1 //当前界面打开一个界面 2 waf.window.open({ 3 //该界面的url 4 url:waf.getContextPath()+"/dynamicPage.do?moneyDefineid="+encodeURIComponent(moneyDefine)+"&buildingid="+encodeURIComponent(buildingid)+"&event=initialize&uipk=com.kingdee.eas.re.sales.costAdjustDetailPage&waf2skin=easbase&method=doEvent&debug=true", 5 OpenType:"div", 6 method:'POST', 7 data:{modal:"type"}, 8 modal:false, 9 title:'选择调整明细', 10 position: 'center', 11 //position: "right", 12 width: 960, 13 height: 500, 14 minHeight:0, 15 minWidth:200, 16 iconCls:"ui-icon-winIcon", 17 draggable: true, 18 resizable: false, 19 zIndex:2000, 20 hideEffect: "slide", 21 style:{'border':'1px solid gray'}, 22 onOpenCompleted: function(event, ui) { 23 $(window).unbind("resize",$.window.doResize); 24 $(window).bind("resize",$.window.doResize); 25 }, 26 //当前界面接收弹出界面的返回数据 27 retValCallBack:function doHandler(rowdata){ 28 //获取分录表格数据填充到当前界面 29 var gridData = waf("#editGrid").dataGrid("getAllRowData"); 30 var rowids = ""; 31 for(var i = 0;i < gridData.length ;i++){ 32 rowids += gridData[i].sourcebillid+","; 33 } 34 for(var i = 0;i < rowdata.length ;i++){ 35 var redata = rowdata[i]; 36 if(rowids.indexOf(redata['id'])>=0){ 37 waf.msgBox.showInfo("房间: "+redata['room.name']+" 已经添加,不能重复."); 38 return false; 39 } 40 var moneyDefineId = waf("#moneyDefine").wafSelect("getValue"); 41 var moneyDefine = moneyDefineMap[moneyDefineId]; 42 var calculation = waf("#calculation").wafSelect("getValue"); 43 calculation = calculationMap[calculation]; 44 var calculateType = calculation.calculateType.value; 45 var factor; 46 if(calculateType=="GENERAL"){//常规模式 47 factor = calculation.factor.value; 48 } 49 var signId = redata['id']; 50 waf.doPost({ 51 action:'moneyfineAction', 52 data:{signId:signId,moneyDefineId:moneyDefineId,factor:factor}, 53 success:function(dataMap){ 54 var now = new Date(); 55 var data = dataMap['signInfo']; 56 var building = dataMap['building']; 57 var datarow = {customerNames:data['customerNames'],signId:data['id'],signData:data['bizDate'],room:data['room'],building:dataMap['building'], 58 moneyDefine:moneyDefine,contractAmount:data['contractTotalAmount'],calAmount:dataMap['calAmount'],id:now.getTime()}; 59 if(dataMap['oldAmount']!=null){ 60 datarow.oldAmount = dataMap['oldAmount']; 61 } 62 if(dataMap['entryId']!=null){ 63 datarow.sourcebillid = dataMap['entryId']; 64 } 65 $("#editGrid").wafGrid('addRow',{data:datarow}); 66 } 67 }); 68 69 } 70 71 }//option为子窗体回传参数 72 }); 73 74 75 //弹出界面返回数据到当前界面 76 waf.windowMgr.triggerRetValCallBack(rowdata); 77