141 lines
5.8 KiB
Plaintext
141 lines
5.8 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||
/*
|
||
Author: undefined 2017-08-02
|
||
Content:
|
||
History Log:
|
||
*/
|
||
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
|
||
String phaseNo = CurPage.getParameter("PhaseNo");//获取当前节点
|
||
String button = "false";
|
||
String repeal = "true";
|
||
if("0030".equals(phaseNo)){
|
||
button = "true";
|
||
repeal = "false";
|
||
}
|
||
|
||
String projid="";
|
||
String contractid="";
|
||
BizObject flow=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT","flow_unid='"+sFlowUnid+"'").getSingleResult(false);
|
||
if(flow!=null){
|
||
projid=flow.getAttribute("proj_id").getString();
|
||
contractid=flow.getAttribute("contract_id").getString();
|
||
}
|
||
String ishistory=CurPage.getParameter("IsHistory");
|
||
String nodeNo = CurPage.getParameter("NodeNo");
|
||
String RightType=CurPage.getParameter("RightType");
|
||
ASObjectModel doTemp = new ASObjectModel("LCAdjustContractTemp");
|
||
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.ReadOnly = "1"; //只读模式
|
||
dwTemp.setPageSize(10);
|
||
dwTemp.genHTMLObjectWindow(sFlowUnid);
|
||
String compClientID= request.getParameter("CompClientID");
|
||
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
||
isShowButton=false;
|
||
}
|
||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||
String sButtons[][] = {
|
||
{repeal,"","Button","撤销","撤销","runCancel()","","","","btn_icon_delete"},
|
||
{button,"","Button","生成租金通知书","生成租金通知书","generateQuotation()","","","","btn_icon_generate"},
|
||
{button,"All","Button","公司盖章","公司盖章","stamp()","","","",""},
|
||
};
|
||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||
<script type="text/javascript">
|
||
function afterSearch(){
|
||
for(var i=0;i<getRowCount(0);i++){
|
||
getObj(0,i,"ACTION").innerHTML='<a onclick="contrast()"><font color="blue">对比</font></a>';
|
||
var filelist=getObj(0,i,"FILENAME").innerHTML;
|
||
var obj=eval('('+filelist+')');
|
||
var html=""
|
||
if(obj['id']){
|
||
html='<a onclick=downloadFile(\''+obj['id']+'\')><font color="blue">'+obj['filename']+'</font></a>';
|
||
}
|
||
getObj(0,i,"FILENAME").innerHTML=html;
|
||
}
|
||
}
|
||
function contrast(){
|
||
var sUrl = "/Tenwa/Lease/Flow/AdjustInterest/RentContrastList.jsp";
|
||
var sparam ="FlowUnid=<%=sFlowUnid%>&payment_number="+getItemValue(0,getRow(0),"payment_number")+"&IsHistory=<%=ishistory%>&RightType=<%=RightType%>&NodeNo=<%=nodeNo%>";
|
||
AsControl.OpenView(sUrl,sparam,"_self","");
|
||
}
|
||
function runCancel(){
|
||
AsControl.RunJavaMethod("com.tenwa.reckon.adjustInterest.AdjustInterestController","runCancel","payment_number="+getItemValue(0,getRow(0),"payment_number")+",flowunid=<%=sFlowUnid%>");
|
||
alert("撤销成功!");
|
||
reloadSelf();
|
||
}
|
||
function generateQuotation()
|
||
{
|
||
if(getItemValue(0,0,"id")==""){
|
||
alert("请生成调息记录!");
|
||
return;
|
||
}
|
||
var param={};
|
||
var tempParam={};
|
||
var sparam="";
|
||
//模板号
|
||
//param["templateNo"]="dae79cd9de784183b91f4a50f37d8e47";
|
||
param["templateNo"]="f9e457e99bca4614a7628b4e83cbb3e1";
|
||
|
||
//生成文件关联关系
|
||
tempParam["OBJECTTYPE"]="AdjustInterst";
|
||
tempParam["FLOW_UNID"]="<%=sFlowUnid%>";
|
||
tempParam["contract_id"]=getItemValue(0,getRow(0),"CONTID");
|
||
tempParam["CONTRACT_ID"]=getItemValue(0,getRow(0),"CONTID");
|
||
tempParam["PLAN_NUMBER"]=getItemValue(0,getRow(0),"PAYMENT_NUMBER");
|
||
tempParam["PLAN_LIST"]=getItemValue(0,getRow(0),"START_LIST");
|
||
//生成模板固定参数
|
||
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 deleteparam="";
|
||
var sParams="flowunid=<%=sFlowUnid%>,plan_number="+getItemValue(0,getRow(0),"PAYMENT_NUMBER");
|
||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.adjustinterest.action.AdjustInterestAction","deleteFile",sParams);
|
||
|
||
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
|
||
var id = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","wordToPdfAnnex","PAYMENT_NUMBER="+getItemValue(0,getRow(0),"PAYMENT_NUMBER")+",PLAN_LIST=TX");
|
||
alert("生成成功!");
|
||
reloadSelf();
|
||
|
||
}
|
||
//公司盖章
|
||
function stamp(){
|
||
var flie = getItemValue(0,getRow(0),"FILENAME");
|
||
if(typeof(flie)=="undefined"||flie==null||flie==""){
|
||
alert("请先生成租金通知书!");
|
||
return;
|
||
}
|
||
var PAYMENT_NUMBERS=getItemValueArray(0,"PAYMENT_NUMBER");
|
||
var PLAN_LISTS=getItemValueArray(0,"PLAN_LIST");
|
||
// for(var i=0;i<PAYMENT_NUMBERS.length;i++){
|
||
var plan_list=getItemValue(0,getRow(0),"START_LIST");//期次
|
||
var contractID = getItemValue(0,getRow(0),"CONTID");
|
||
var plan_number = getItemValue(0,getRow(0),"PAYMENT_NUMBER");
|
||
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","claimSignA","PAYMENT_NUMBER="+plan_number+",PLAN_LIST="+plan_list+",contract_id="+contractID+",flagType=adjustment");
|
||
if("success"==result){
|
||
alert("盖章成功!!!");
|
||
location.reload();
|
||
}else{
|
||
alert("盖章失败!!!");
|
||
}
|
||
// }
|
||
|
||
}
|
||
|
||
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");
|
||
}
|
||
|
||
</script>
|
||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|