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

95 lines
3.7 KiB
Plaintext
Raw 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 docId=CurPage.getParameter("docId");
if(docId == null) docId = "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("ContractRentPlanList_temp");
if(null!=ishistory&&ishistory.equals("true")){
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataListHistory");
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ShowSummary="1"; //汇总
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(100);
dwTemp.genHTMLObjectWindow(docId);
//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"))){
RightType="ReadOnly";
sButtons=new String[][] {
};
}else{
sButtons=new String[][] {
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_detail",""},
{"true","","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""},
{"true","","Button","更新现金流","更新现金流","updateFlow()","","","","btn_icon_up",""},
/* {"true","","Button","导入Excel","导出Excel","importExcel()","","","","btn_icon_up",""},
{"true","","Button","导出Excel","导出Excel","exportPage('"+sWebRootPath+"',0,'excel','"+dwTemp.getArgsValue()+"')","","","","btn_icon_down",""} */
};
}
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function deleteRecord(){
//判断当前期次是否已回笼,并且是不是最后一期
var count=getRowCount(0);
var planStatus = getItemValue(0,getRow(0),'plan_status');
var rentList = getItemValue(0,getRow(0),'RENT_LIST');
if(Number(rentList) < count){
alert('请依次从最后一期开始删除!');
return;
}
if(planStatus != '未回笼'){
alert('档期租金计划已回笼,不能删除!');
return;
}
if(confirm('确实要删除吗?'))as_delete(0)
}
function newRecord(){
var count=getRowCount(0);
var sUrl = "Accounting/LoanSimulation_modify/rent_plan_info.jsp";
var sPara="flow_unid=<%=docId%>&TaskNo=<%=taskno%>"+"&IsHistory=<%=ishistory%>"+"&NodeNo=<%=nodeNo%>&rentList="+(++count);
AsControl.OpenView(sUrl,sPara,'_self','');
}
function updateFlow(){
openDWDialog();
setTimeout(function(){
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","updateCashFlow","docId=<%=docId%>");
resetDWDialog("更新成功!",true);
window.parent.parent.location.href = window.parent.parent.location.href;
}, 500);
}
function viewAndEdit(){
var planStatus = getItemValue(0,getRow(0),'plan_status');
if(planStatus != '未回笼'){
alert('档期租金计划已回笼,不能修改!');
return;
}
var sUrl = "Accounting/LoanSimulation_modify/rent_plan_info.jsp";
var sPara = getItemValue(0,getRow(0),'id');
var docId="<%=docId%>";
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
var sparm='id=' +sPara+'&flow_unid=' +docId+'&TaskNo=<%=taskno%>';
var righttype="<%=RightType%>";
if(righttype=="ReadOnly"){
sparm=sparm+"&RightType=<%=RightType%>";
}
sparm=sparm+"&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>";
AsControl.OpenView(sUrl,sparm,'_self','');
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>