2021-05-20 11:05:46 +08:00

119 lines
5.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
String flowunid=CurPage.getParameter("flowunid");//流程编号
String plannumber=CurPage.getParameter("plannumber");//方案编号
String planCName=CurPage.getParameter("planCName");//项目方案 合同方案 投放编号 列名
String calType=CurPage.getParameter("calType");
String productId=CurPage.getParameter("productId");
if(flowunid == null) flowunid = "100000";
String RightType= CurPage.getParameter("RightType");
String taskno=CurPage.getParameter("TaskNo");
String ishistory=CurPage.getParameter("IsHistory");
String nodeNo=CurPage.getParameter("NodeNo");
ASObjectModel doTemp = new ASObjectModel("LCFundPlanChangeTemp");
doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'");
String flowNo=CurPage.getParameter("FlowNo");
if(null!=ishistory&&ishistory.equals("true") && !flowNo.equals("RentDormantFlow")){
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcRentListArachiveShow");
}
CurPage.setAttribute("modelno","fund");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.setPageSize(100);
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.genHTMLObjectWindow(flowunid);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
sButtons=new String[][] {
};
}else{
sButtons=new String[][] {
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add"},
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit"},
{"true","","Button","删除","删除","deleteRecord()","","","","btn_icon_delete"},
{"true","","Button","更新现金流","修改","updateFlow()","","","","btn_icon_edit"},
};
}
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function updateFlow(){
var s= AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","updateConditionFund","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>,productId=<%=productId%>");
if(s!="true"){
alert(s);
return;
}
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","updateCashFlow","flowunid=<%=flowunid%>,calType=<%=calType%>,plannumber=<%=plannumber%>");
//reloadSelf();/Accounting/LoanSimulation/LoanBasicInfo.jsp
alert("更新成功!");
}
function newRecord(){
var sUrl = "/Accounting/LoanSimulation_change/FundPlanChangeInfo.jsp";
var sParam = "flowunid=<%=flowunid%>&planCName=<%=planCName%>&plannumber=<%=plannumber%>&productId=<%=productId%>";
AsControl.OpenView(sUrl,sParam,'_self','');
}
function viewAndEdit(){
if('<%=RightType%>'!='ReadOnly'&&'<%=ishistory%>'!='true'){
if("feetype10"==getItemValue(0,getRow(0),"FEE_TYPE")){
alert("不能修改设备款");
return ;
}
var planstatus=getItemValue(0,getRow(0),'PLAN_STATUS');
if(planstatus=='planstatus1' || planstatus=='planstatus2'){
alert("该费用已收款或部分收款,不允许修改!");
return;
}
if(planstatus=='planstatus4' || planstatus=='planstatus5'){
alert("该费用已付款或部分付款,不允许修改!");
return;
}
if(planstatus=='planstatus6'){
var id = getItemValue(0,getRow(0),'ID');
var sParam = "PlanId="+id+",CurUserID=<%=CurUser.getUserID()%>";
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.lease.flow.fund.fundplanchange.FundPlanChangeListController","checkPayOutApplyPass",sParam);
if(returnValue=='fail'){
alert("该费用已申请通过,不允许修改!");
return;
}
}
}
var sUrl = "/Accounting/LoanSimulation_change/FundPlanChangeInfo.jsp";
var id = getItemValue(0,getRow(0),'ID');
if(typeof(id)=="undefined" || id.length==0 ){
alert("请选择一条数据!");
return ;
}
sParam = "id="+id+"&flowunid=<%=flowunid%>&planCName=<%=planCName%>&plannumber=<%=plannumber%>&productId=<%=productId%>";
AsControl.OpenView(sUrl,sParam,'_self','');
}
function deleteRecord(){
var planstatus=getItemValue(0,getRow(0),'PLAN_STATUS');
if(confirm('确实要删除吗?')){
if(planstatus=='planstatus1' || planstatus=='planstatus2'){
alert("该费用已收款或部分收款,不允许删除!");
return;
}
if(planstatus=='planstatus4' || planstatus=='planstatus5'){
alert("该费用已付款或部分付款,不允许删除!");
return;
}
if(planstatus=='planstatus6'){
var id = getItemValue(0,getRow(0),'ID');
var sParam = "PlanId="+id+",CurUserID=<%=CurUser.getUserID()%>";
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.lease.flow.fund.fundplanchange.FundPlanChangeListController","checkPayOutApplyPass",sParam);
if(returnValue=='fail'){
alert("该费用已申请通过,不允许删除!");
return;
}
}
if(getItemValue(0,getRow(0),"plan_list")=="1"&&getItemValue(0,getRow(0),"FEE_TYPE")=="feetype10"){
alert("不能删除所有设备款");
return;
}
as_delete('myiframe0');
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>