apzl_leasing/WebContent/Tenwa/Lease/Flow/RentNotify/MessageRentNotifyList.jsp
2018-06-03 22:26:41 +08:00

117 lines
4.8 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 import="jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
<%@ page import="com.amarsoft.app.util.*" %>
<%
/*
Author: undefined 2016-09-01
Content:
History Log:
*/
String PlanDate = CurPage.getParameter("PlanDate");
String ID = CurPage.getParameter("ID");
ASObjectModel doTemp = new ASObjectModel("RentNotify");
doTemp.appendJboWhere("and plan_date='"+PlanDate+"'");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1";
dwTemp.setPageSize(15);
dwTemp.MultiSelect = true;
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
sButtons=new String[][]{
{"true","All","Button","生成租金通知书","生成租金通知书","generateQuotation()","","","",""},
{"true","All","Button","批量下载","批量下载","lotdown()","","","",""},
{"true","","Button","已处理","已处理","hasProcess()","","","","btn_icon_detail"},
{"true","","Button","已知","已知","hasKnow()","","","","btn_icon_detail"},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%@include file="/Tenwa/Core/BussinessMessage/MessageInfo/BaseMessageFunciton.jspf"%>
<script type="text/javascript">
//在加载完表格后调用
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
var html="";
html+='<a onclick=downloadFile(\''+getItemValue(0,i,"attrid")+'\')><font color="blue">'+"下载&nbsp&nbsp&nbsp&nbsp&nbsp"+'</font></a>';
getObj(0,i,"FILENAME").innerHTML=html+'<font >'+getObj(0,i,"FILENAME").innerHTML+'</font>';
};
}
function downloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
}
function generateQuotation()
{
var PAYMENT_NUMBERS=getItemValueArray(0,"PAYMENT_NUMBER");
var PLAN_LISTS=getItemValueArray(0,"PLAN_LIST");
if(typeof(PAYMENT_NUMBERS)=="undefined"||PAYMENT_NUMBERS==null||PAYMENT_NUMBERS==""){alert("请选择");return;}
for(var i=0;i<PAYMENT_NUMBERS.length;i++){
var param={};
var tempParam={};
var sparam="";
//模板号
param["templateNo"]="7bb0ad99651e42bf969a2a4e18bd20b6";
//生成文件关联关系
tempParam["OBJECTTYPE"]="租金通知书";
tempParam["contract_id"]=getItemValue(0,getRow(0),"contract_id");
tempParam["payment_number"]=getItemValue(0,getRow(0),"PAYMENT_NUMBER");
tempParam["PLAN_LIST"]=PLAN_LISTS[i];
tempParam["PLAN_NUMBER"]=PAYMENT_NUMBERS[i];
tempParam["customername"]=getItemValue(0,getRow(0),"customername");
tempParam["contract_number"]=getItemValue(0,getRow(0),"contract_number");
//生成模板固定参数
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");//生成模板的参数据
for(var key in param){
if(sparam.length>0){sparam+=",";}
sparam+=key+"="+param[key];
}
var plan_number=PAYMENT_NUMBERS[i];//投放编号
var plan_list=PLAN_LISTS[i];//期次
var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","plan_number="+plan_number+",plan_list="+plan_list);
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
}
alert("生成成功!");
reloadSelf();
}
function lotdown(){
var attrids=getItemValueArray(0,"attrid");
if(typeof(attrids)=="undefined"||attrids==null||attrids==""){alert("请选择");return;}
lotdownloadFile(attrids);
}
function lotdownloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/DownloadZipServlet?CompClientID=<%=sCompClientID%>&id="+id, "downloadTemplate");
}
function loadParam(){
var param={};
param["Id"]="<%=CurPage.getParameter("ID")%>";
var sParams="messageId="+param["Id"];
var info=RunJavaMethodTrans("com.tenwa.comm.message.controller.BussinessMessageController","queryMessageInfo",sParams);
param["CatalogName"]=info.split("@")[0];
param["Cparam"]= info.split("@")[1];
return param;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>