/*~[Describe=保存前校验方法;InputParam=无;OutPutParam=无;]~*/ function beforeSave(){ var transDate = getItemValue(0,getRow(),"TransDate"); if(transDate < businessDate){ alert("生效日期不能早于当前日期"); return false; } return true; } /*~[Describe=保存后续逻辑;InputParam=无;OutPutParam=无;]~*/ function afterSave(){ calcOldAccountInfo(); calcNewAccountInfo(); } /*~[Describe=原账户信息;InputParam=无;OutPutParam=无;]~*/ function calcOldAccountInfo(){ var OldAccountFrame = document.getElementById("OldAccountFrame"); if(typeof(OldAccountFrame) == "undefined" || OldAccountFrame == null) return; var documentNo = getItemValue(0,getRow(),"DocumentNo"); var documentType = getItemValue(0,getRow(),"DocumentType"); AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessAccountList.jsp","RightType=ReadOnly&Status=2&ObjectNo="+documentNo+"&ObjectType="+documentType,"OldAccountFrame",""); } /*~[Describe=新账户信息;InputParam=无;OutPutParam=无;]~*/ function calcNewAccountInfo(){ var NewAccountFrame = document.getElementById("NewAccountFrame"); if(typeof(NewAccountFrame) == "undefined" || NewAccountFrame == null) return; var documentNo = getItemValue(0,getRow(),"DocumentNo"); var documentType = getItemValue(0,getRow(),"DocumentType"); AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessAccountList.jsp","Status=0@1&ToInheritObj=y&ObjectNo="+documentNo+"&ObjectType="+documentType,"NewAccountFrame",""); } /*~[Describe=初始化;InputParam=无;OutPutParam=无;]~*/ function initRow(){ if (getRowCount(0)==0) { as_add("myiframe0");//新增记录 } calcOldAccountInfo(); calcNewAccountInfo(); }