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

90 lines
4.4 KiB
Plaintext

<%@page import="com.tenwa.reckon.product.ProductCondition"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
String ID = CurPage.getParameter("id");
if(ID == null)ID = "";
String sFlowUnid = CurPage.getParameter("flowunid");//流程编号
String planCName = CurPage.getParameter("planCName");//流程编号
String plannumber = CurPage.getParameter("plannumber");//流程编号
String productId=CurPage.getParameter("productId");
if(sFlowUnid == null)sFlowUnid = "";
String sInfoTempletNo = CurPage.getParameter("InfoTempletNo");//模板号
if(sInfoTempletNo == null) sInfoTempletNo = "LCFundPlanChangeInInfoTemp_calc";
String RightType= CurPage.getParameter("RightType");
if(RightType == null) RightType = "";
String ishistory=CurPage.getParameter("IsHistory");
ASObjectModel doTemp = new ASObjectModel(sInfoTempletNo);
doTemp.setDefaultValue("PAYMENT_NUMBER",plannumber);
doTemp.setDefaultValue("OPERATION_STATUS","opera_after");
doTemp.setDefaultValue("flowunid",sFlowUnid);
ProductCondition pc=new ProductCondition();
String condition=pc.getProductFundList(productId);
doTemp.setColumnAttribute("FEE_TYPE","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='FeeType' and itemno in ("+pc.getSqlWhere(condition)+") order by sortno");
doTemp.setHtmlEvent("FEE_TYPE","onchange","changPlanList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "1";//只读模式
}
dwTemp.genHTMLObjectWindow(ID);
CurPage.getCurComp().setAttribute("RightType", RightType);
String sButtons[][] =null;
sButtons =new String[][] {
{"true","All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"},
{"true","","Button","返回","返回","goBack()","","","","btn_icon_return"}
};
sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
$(function(){
if('<%=ID%>'==''){
setItemReadOnly(0, getRow(), "FEE_TYPE", false);
}
});
function saveRecord(){
var paymentnumber = getItemValue(0, getRow(), 'PAYMENT_NUMBER');
var feetype=getItemValue(0,getRow(),"FEE_TYPE");
var contractid = getItemValue(0, getRow(), 'CONTRACT_ID');
var sparam = contractid+"@"+paymentnumber+"@"+feetype+"@"+"<%=sFlowUnid%>"+"@"+"<%=CurUser.getUserID()%>";
as_save("myiframe0","checkCautionMoney('"+sparam+"')");
}
function checkCautionMoney(sparam){
var params = sparam.split("@");
if(params[2]=='feetype2' || params[2]=='feetype16' ||params[2]=='feetype17' ){
var sParam = "ContractId="+params[0]+",PaymentNumber="+params[1]+",FlowUnid="+params[3]+",CurUserID="+params[4];
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.lease.flow.fund.fundplanchange.FundPlanChangeListController","checkCautionMoney",sParam);
returnValue = returnValue.split("@");
if(returnValue[0]=='success'){
alert(returnValue[1]);
}
}
}
function goBack(){
var sUrl="/Accounting/LoanSimulation_change/FundPlanList.jsp";
var sParam = "flowunid="+"<%=sFlowUnid%>"+"&planCName=<%=planCName%>&plannumber=<%=plannumber%>&productId=<%=productId%>";
AsControl.OpenView(sUrl,sParam,"_self","");
}
function selectPayObject(){
AsDialog.OpenSelector("selectPayObject","","",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
return;
}
sReturn = sReturn.split("@");
setItemValue(0,0,"PAY_OBJ", sReturn[0]);
setItemValue(0,0,"PAY_OBJ_NAME", sReturn[1]);
},"请选择支付对象");
}
function changPlanList(){
var paymentnumber = getItemValue(0, getRow(), 'PAYMENT_NUMBER');
var feetype=getItemValue(0,getRow(),"FEE_TYPE");
var contractid = getItemValue(0, getRow(), 'CONTRACT_ID');
if(typeof(paymentnumber)!=undefined && paymentnumber!='' && typeof(feetype)!=undefined&& feetype!=''){
var sparam = "ContractId="+contractid+",PaymentNumber="+paymentnumber+",FeeType=" + feetype + ",FlowUnid=<%=sFlowUnid%>,CurUserID=<%=CurUser.getUserID()%>";
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.lease.flow.fund.fundplanchange.FundPlanChangeListController","createFundPlanList",sparam);
setItemValue(0,0,"PLAN_LIST", returnValue);
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>