122 lines
5.2 KiB
Plaintext
122 lines
5.2 KiB
Plaintext
<%@ 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 sRightType= CurPage.getParameter("RightType");;
|
||
String calType=CurPage.getParameter("calType");
|
||
String ishistory=CurPage.getParameter("IsHistory");
|
||
String flowNo=CurPage.getParameter("FlowNo");
|
||
String nodeNo=CurPage.getParameter("NodeNo");
|
||
ASObjectModel doTemp = new ASObjectModel("LCRentPlanTempList");
|
||
doTemp.appendJboWhere(" and payment_number='"+plannumber+"'");
|
||
if(null!=ishistory&&ishistory.equals("true") && !flowNo.equals("RentDormantFlow")){
|
||
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcRentListArachiveShow");
|
||
}
|
||
CurPage.setAttribute("modelno","rent");
|
||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||
dwTemp.Style="1"; //--设置为Grid风格--
|
||
dwTemp.ShowSummary="1"; //汇总
|
||
dwTemp.ReadOnly = "1"; //只读模式
|
||
dwTemp.setPageSize(100);
|
||
dwTemp.genHTMLObjectWindow(flowunid);
|
||
|
||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||
if((null!=sRightType&&sRightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||
isShowButton=false;
|
||
}else{
|
||
isShowButton=true;
|
||
}
|
||
String sButtons[][] =null;
|
||
|
||
sButtons=new String[][] {
|
||
{"true","","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_detail",""},
|
||
{"true","","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""},
|
||
{"true","","Button","更新现金流","更新现金流","updateFlow()","","","","btn_icon_detail",""},
|
||
{"true","","Button","导入租金计划","导入租金计划","importRentPlan()","","","","btn_icon_detail",""},
|
||
{"true","","Button","模板下载","模板下载","downloadTemplate()","","","","btn_icon_set",""},
|
||
};
|
||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||
<script type="text/javascript">
|
||
function afterSearch(){
|
||
for(var i=0;i<getRowCount(0);i++){
|
||
var sPlanStatus = getItemValue(0,i,"planstatus");
|
||
if(typeof(sPlanStatus)==undefined || sPlanStatus==''){
|
||
setItemValue(0,i,'planstatus','未回笼');
|
||
}
|
||
}
|
||
}
|
||
function newRecord()
|
||
{
|
||
var count=getRowCount(0)+1;
|
||
var sUrl = "/Accounting/LoanSimulation_change/LCRentPlanInfo.jsp";
|
||
var sParam = "flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planlist="+count;
|
||
AsControl.OpenView(sUrl,sParam,"_self","");
|
||
}
|
||
function updateFlow(){
|
||
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","updateRentTax","flowunid=<%=flowunid%>,calType=<%=calType%>,plannumber=<%=plannumber%>");
|
||
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","updateCashFlow","flowunid=<%=flowunid%>,calType=<%=calType%>,plannumber=<%=plannumber%>");
|
||
alert("更新成功!");
|
||
reloadSelf();
|
||
//window.parent.parent.location.href = window.parent.parent.location.href;
|
||
}
|
||
function viewAndEdit(){
|
||
var sID = getItemValue(0,getRow(),"ID");
|
||
if(typeof(sID) == "undefined" || sID.length == 0 )
|
||
{
|
||
alert("请选择一条信息!");
|
||
return ;
|
||
}
|
||
var planStatus=getItemValue(0,getRow(0),'planstatus');
|
||
if(planStatus != '未回笼'){
|
||
alert('档期租金计划已回笼,不能修改!');
|
||
return;
|
||
}
|
||
var sUrl = "/Accounting/LoanSimulation_change/LCRentPlanInfo.jsp";
|
||
var sParam = "ID="+sID+"&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>";
|
||
var righttype="<%=sRightType%>";
|
||
if(righttype == "ReadOnly"){
|
||
sParam = sParam+"&RightType=<%=sRightType%>";
|
||
}
|
||
sParam = sParam+"&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>";
|
||
AsControl.OpenView(sUrl,sParam,"_self","");
|
||
}
|
||
|
||
function deleteRecord(){
|
||
//判断当前期次是否已回笼,并且是不是最后一期
|
||
var count=getRowCount(0);
|
||
var rentList = getItemValue(0,getRow(0),'PLAN_LIST');
|
||
var planStatus=getItemValue(0,getRow(0),'planstatus');
|
||
if(Number(rentList) < count){
|
||
alert('请依次从最后一期开始删除!');
|
||
return;
|
||
}
|
||
if(planStatus != '未回笼'){
|
||
alert('档期租金计划已回笼,不能删除!');
|
||
return;
|
||
}
|
||
if(confirm('确实要删除吗?'))as_delete(0)
|
||
}
|
||
|
||
function importRentPlan(){
|
||
var importCondition = {};//导入配置
|
||
importCondition["templateNo"] = "857eecfc7f7f48d5b01e5c7f696aeddf";//导入汽车的模板编号必填
|
||
//增加其他配置参数
|
||
importCondition["flowunid"] = "<%=flowunid%>";
|
||
importCondition["plannumber"] = "<%=plannumber%>";
|
||
var sUrl = "/Tenwa/Core/OfficeTemplate/TemplateManager/BFTemplateTest/uploadExcel.jsp";
|
||
var sparam = JSON.stringify(importCondition).replace(/,/g,"@");//生成模板的参数据
|
||
AsDialog.PopView(sUrl,"importparam="+sparam,{width:"350px",height:"40px",title:"导入租金计划"},function(retVal){
|
||
if('fail'!=retVal){
|
||
self.location.reload();
|
||
}
|
||
});
|
||
}
|
||
|
||
function downloadTemplate(){
|
||
var templateId="857eecfc7f7f48d5b01e5c7f696aeddf";
|
||
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||
window.open(sWebRootPath+"/servlet/view/fileTemplateView?CompClientID=<%=sCompClientID%>&sqlString=save@"+templateId, "downloadTemplate");
|
||
}
|
||
</script>
|
||
<%@ include file="/Frame/resources/include/include_end.jspf"%> |