2018-06-03 22:26:41 +08:00

72 lines
3.1 KiB
Plaintext

<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
String sPrevUrl = CurPage.getParameter("PrevUrl");
String ishistory=CurPage.getParameter("IsHistory");
String nodeNo=CurPage.getParameter("NodeNo");
String taskno=CurPage.getParameter("TaskNo");
if(sPrevUrl == null) sPrevUrl = "";
String RightType= CurPage.getParameter("RightType");
String sTempletNo = "ContractRentPlanInfo_temp";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
/* doTemp.setHtmlEvent("equip_num","onkeyup","adjustTotalPrice");
doTemp.setHtmlEvent("price","onkeyup","adjustTotalPrice"); */
String flow_unid=CurPage.getParameter("flow_unid");
doTemp.setDefaultValue("flow_unid", flow_unid);
String rentList = CurPage.getParameter("rentList");
doTemp.setDefaultValue("RENT_LIST", rentList);
doTemp.setDefaultValue("plan_status", "未回笼");
if(null!=ishistory&&ishistory.equals("true")){
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataInfoHistory");//如果是历史则新显示历史数据
}
CurPage.getCurComp().setAttribute("RightType", null);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "-2";//只读模式
}
dwTemp.genHTMLObjectWindow(CurPage.getParameter("id"));
CurPage.getCurComp().setAttribute("RightType", RightType);
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","saveData()","","","",""},
{"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return",""}
};
//sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function saveData(){
//判断财务本金和财务利息是否相同
var corpus = getItemValue(0,getRow(),"CORPUS");
var interest = getItemValue(0,getRow(),"INTEREST");
var bcorpus = getItemValue(0,getRow(),"CORPUS_BUSINESS");
var binterest = getItemValue(0,getRow(),"INTEREST_BUSINESS");
if(Number(corpus) + Number(interest) != Number(bcorpus) + Number(binterest)){
alert("财务本金和财务利息之和应与业务本金和业务利息之和相等,请验证后在执行保存操作!");
return;
}
as_save("myiframe0","goBack()");
}
function goBack(){
var PrevUrl="Accounting/LoanSimulation_modify/RentPlanList.jsp";
var sparm="flow_unid=<%=CurPage.getParameter("flow_unid")%>";
var righttype="<%=RightType%>";
if(righttype=="ReadOnly"){
sparm=sparm+"&RightType=<%=RightType%>";
}
sparm=sparm+"&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&TaskNo=<%=taskno%>&docId=<%=flow_unid%>";
AsControl.OpenView(PrevUrl,sparm,"_self","");
}
function calRentFina(){
var corpus = getItemValue(0,getRow(),"CORPUS");
var interest = getItemValue(0,getRow(),"INTEREST");
setItemValue(0,0,"RENT",Number(corpus) + Number(interest));
}
function calRentBusiness(){
var corpus = getItemValue(0,getRow(),"CORPUS_BUSINESS");
var interest = getItemValue(0,getRow(),"INTEREST_BUSINESS");
setItemValue(0,0,"RENT",Number(corpus) + Number(interest));
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>