var aheadPaymentScheFlag = false;//控制是否需要贷款进行还款计划测算 /*~[Describe=保存前校验方法;InputParam=无;OutPutParam=无;]~*/ function beforeSave(){ var transDate = getItemValue(0,getRow(),"TransDate"); if(transDate < businessDate){ alert("生效日期不能早于当前日期"); return false; } if(!RATFrame.getValues()) return false; if(!FINFrame.iV_all("myiframe0")) return false; RATFrame.saveRecord(); return false;//不再调用主页面的保存 } /*~[Describe=保存后续逻辑;InputParam=无;OutPutParam=无;]~*/ function afterSave(){ window.setTimeout("reopen();", 1400); } function reopen(){ if(aheadPaymentScheFlag) { AsDialog.PopView("/Accounting/Transaction/ViewPrepaymentConsult.jsp","TransSerialNo="+transactionSerialNo,""); aheadPaymentScheFlag = false; } } /*~[Describe=还款计划测算;InputParam=无;OutPutParam=无;]~*/ function viewConsult(){ aheadPaymentScheFlag = true; saveRecord("afterSave();"); } /*~[Describe=打开利率信息;InputParam=无;OutPutParam=无;]~*/ function openRAT(iframe,param){ var obj = document.getElementById(iframe); if(typeof(obj) == "undefined" || obj == null) return; AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessRATInfo.jsp","ObjectType="+documentType+"&ObjectNo="+documentNo+"&"+param,iframe,""); } /*~[Describe=打开利率信息;InputParam=无;OutPutParam=无;]~*/ function openFIN(iframe,param){ var obj = document.getElementById(iframe); if(typeof(obj) == "undefined" || obj == null) return; AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessFINInfo.jsp","ObjectType="+documentType+"&ObjectNo="+documentNo+"&"+param,iframe,""); } /*~[Describe=初始化;InputParam=无;OutPutParam=无;]~*/ function initRow(){ setItemValue(0,getRow(),"INPUTUSERID",curUserID); setItemValue(0,getRow(),"INPUTUSERNAME",curUserName); setItemValue(0,getRow(),"INPUTORGID",curOrgID); setItemValue(0,getRow(),"INPUTORGNAME",curOrgName); setItemValue(0,getRow(),"INPUTDATE",businessDate); setItemValue(0,getRow(),"UPDATEUSERID",curUserID); setItemValue(0,getRow(),"UPDATEUSERNAME",curUserName); setItemValue(0,getRow(),"UPDATEORGID",curOrgID); setItemValue(0,getRow(),"UPDATEORGNAME",curOrgName); setItemValue(0,getRow(),"UPDATEDATE",businessDate); openRAT("OLDRATFrame","Status=2&RightType=ReadOnly"); openRAT("RATFrame","Status=0,1"); openFIN("OLDFINFrame","Status=2&RightType=ReadOnly"); openFIN("FINFrame","Status=0,1"); }