调息后生成租金通知书并该电子章

This commit is contained in:
tangfutang 2018-08-04 15:51:40 +08:00
parent 01f071d1b4
commit ff9b75e2f6
5 changed files with 102 additions and 9 deletions

View File

@ -6,6 +6,14 @@
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);
@ -31,8 +39,9 @@
}
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","","Button","撤销","撤销","runCancel()","","","","btn_icon_delete"},
{"true","","Button","生成租金通知书","生成租金通知书","generateQuotation()","","","","btn_icon_generate"},
{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">
@ -68,12 +77,16 @@
var tempParam={};
var sparam="";
//模板号
param["templateNo"]="dae79cd9de784183b91f4a50f37d8e47";
//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()%>";
@ -85,18 +98,44 @@
sparam+=key+"="+param[key];
}
var deleteparam="";
var sParams="flowunid=<%=sFlowUnid%>";
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(){
debugger;
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"%>

View File

@ -33,8 +33,12 @@
doTemp.setVisible("operation", false);
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.MultiSelect = true;
dwTemp.Style="1";
//--设置为Grid风格--
if(!("付款申请(汽车)".equals(flowName))){
dwTemp.MultiSelect = true;
}
dwTemp.ReadOnly = "1"; //Ö»¶Áģʽ
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow(sFlowUnid);

View File

@ -0,0 +1,38 @@
<%@page import="jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
Author: undefined 2018-07-16
Content:
History Log:
*/
ASObjectModel doTemp = new ASObjectModel("RentFileList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
// dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","新增","新增一条记录","newRecord()","","","","btn_icon_add"},
{"true","All","Button","修改","查看/修改详情","viewAndEdit()","","","","btn_icon_edit"},
// {"true","","Button","详情","查看/修改详情","view()","","","","btn_icon_detail"},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
//在加载完表格后调用
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
var html="";
html+='<a onclick=downloadFile(\''+getItemValue(0,i,"id")+'\')><font color="blue">'+getItemValue(0,i,"FILENAME")+'</font></a>';
getObj(0,i,"file").innerHTML=html;
}
}
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"%>

View File

@ -1474,6 +1474,8 @@ public void wordToPdfJar(JBOTransaction tx){
DOCRELATIVE = bom.createQuery("CONTRACT_ID=:CONTRACT_ID and objecttype='끓홈瘻盧데'").setParameter("CONTRACT_ID",contract_id).getSingleResult(false);
}else if("settle".equals(PLAN_LIST)){
DOCRELATIVE = bom.createQuery("CONTRACT_ID=:CONTRACT_ID and objecttype='瓊품써헌聯츠'").setParameter("CONTRACT_ID",contract_id).getSingleResult(false);
}else if("TX".equals(PLAN_LIST)){
DOCRELATIVE=bom.createQuery("plan_number=:plan_number and objecttype='AdjustInterst' ").setParameter("plan_number",PAYMENT_NUMBER).getSingleResult(false);
}else{
DOCRELATIVE=bom.createQuery("plan_number=:plan_number and plan_list=:plan_list").setParameter("plan_number",PAYMENT_NUMBER).setParameter("plan_list", PLAN_LIST).getSingleResult(false);
}

View File

@ -16,10 +16,11 @@ import com.tenwa.doc.action.DocListAction;
public class AdjustInterestAction {
public String flowunid;
public String plan_number;
@SuppressWarnings("unchecked")
public void deleteFile(JBOTransaction tx) throws Exception{
List<BizObject> list=JBOFactory.createBizObjectQuery(LB_DOCRELATIVE.CLASS_NAME,"flow_unid=:flowunid and OBJECTTYPE='AdjustInterst'").setParameter("flowunid", this.flowunid).getResultList(false);
List<BizObject> list=JBOFactory.createBizObjectQuery(LB_DOCRELATIVE.CLASS_NAME,"flow_unid=:flowunid and OBJECTTYPE='AdjustInterst' and plan_number=:plannumber").setParameter("flowunid", this.flowunid).setParameter("plannumber", plan_number) .getResultList(false);
DocListAction doc=new DocListAction();
for(BizObject bo:list){
doc.setRelativeId(bo.getAttribute("id").getString());
@ -53,5 +54,14 @@ public class AdjustInterestAction {
public void setFlowunid(String flowunid) {
this.flowunid = flowunid;
}
public String getPlan_number() {
return plan_number;
}
public void setPlan_number(String plan_number) {
this.plan_number = plan_number;
}
}