提前结清(传统)

This commit is contained in:
G 2018-09-29 15:40:38 +08:00
parent 788e721d8c
commit e6b9d78093
4 changed files with 215 additions and 0 deletions

View File

@ -0,0 +1,211 @@
<%@page import="jbo.app.tenwa.calc.LC_CALC_CONDITION"%>
<%@page import="jbo.com.tenwa.lease.comm.LB_UNION_LESSEE"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
<%@ page import="com.amarsoft.app.util.*" %>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info00;Describe=注释区;]~*/%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info01;Describe=定义页面属性;]~*/%>
<%
String PG_TITLE = "提前结清"; // 浏览器窗口标题 <title> PG_TITLE </title>
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info02;Describe=定义变量,获取参数;]~*/%>
<%
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
if(sFlowUnid == null) sFlowUnid = "";
BizObject flow=GetFlowAction.getFlowBussinessObject(sFlowUnid);
String product_id=flow.getAttribute("productId").toString();
String contractid=flow.getAttribute("contract_id").toString();
String projectid=flow.getAttribute("proj_id").toString();
String contract_number=flow.getAttribute("flow_key").toString();//业务合同号
BizObjectManager bom=JBOFactory.getBizObjectManager(LB_UNION_LESSEE.CLASS_NAME);
BizObject cust=bom.createQuery("contract_id=:contract_id and is_main='Y'").setParameter("contract_id", contractid).getSingleResult(false);
String custname=cust.getAttribute("customer_name").toString();;//主承租人
// String planinformation=ProductParamUtil.getProductParameterValue(product_id,"PRD0314","planinformation");//方案类型
String money="";//留购价
// if("SinglePlan".equals(planinformation)){
// BizObjectManager bom1=JBOFactory.getBizObjectManager(LC_CALC_CONDITION.CLASS_NAME);
// BizObject condition=bom1.createQuery("contract_id=:contract_id ").setParameter("contract_id", contractid).getSingleResult(false);
// money=condition.getAttribute("NOMINAL_PRICE").toString();
// }
String ishistory=CurPage.getParameter("IsHistory");
String nodeNo=CurPage.getParameter("NodeNo");
String RightType = CurPage.getParameter("RightType");//选择模式
String sTempletNo = "LBContractTermainateTemp";//模板号
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%>
<%
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setDefaultValue("accept_person", custname);
doTemp.setDefaultValue("contract_id", contractid);
doTemp.setDefaultValue("project_id", projectid);
doTemp.setDefaultValue("flowunid", sFlowUnid);
doTemp.setDefaultValue("RESERVE_PRICE", money);
if(null!=ishistory&&ishistory.equals("true")){
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataInfoHistory");//如果是历史则新显示历史数据
}
CurPage.getCurComp().setAttribute("RightType", null);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "-2";//只读模式
isShowButton=false;
}else{
isShowButton=true;
}
String compClientID = request.getParameter("CompClientID");
dwTemp.genHTMLObjectWindow(sFlowUnid);//得到的参数
CurPage.getCurComp().setAttribute("RightType",RightType);
dwTemp.replaceColumn("devolution", "<iframe type='iframe' id='frame_list_knowing' name=\"frame_list_knowing\" width=\"100%\" height=\"200px\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBContractEnd/QuotationList.jsp?CompClientID="+compClientID+"&flowunid="+sFlowUnid+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+RightType+"&docname=settletradition"+"\"></iframe>", CurPage.getObjectWindowOutput());
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%>
<%
String sButtons[][] = {
{"true","All","Button","生成提前结清","生成提前结清","saveRecord()","","","","btn_icon_save"},
{"true","All","Button","公司盖章","盖公司电子章","stamp()","","","",""},
};
sButtonPosition = "north";
%>
<%/*~END~*/%>
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=Info05;Describe=主体页面;]~*/%>
<%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info06;Describe=定义按钮事件;]~*/%>
<script type="text/javascript">
var bIsInsert = false;
/*~[Describe=保存;InputParam=无;OutPutParam=无;]~*/
function saveRecord()
{
var param={};
var tempParam={};
var sparam="";
//模板号
//param["templateNo"]="e1fc3afacfbc46fea0a881ac20de23cc";
param["templateNo"]="1a9be791ea6449f09f02f9a4afe8c86b";
//生成文件关联关系
tempParam["OBJECTTYPE"]="settletradition";
tempParam["FLOW_UNID"]="<%=sFlowUnid%>";
tempParam["PROJ_ID"]="<%=projectid%>";
tempParam["ID"]="<%=contractid%>";
tempParam["CONTRACT_ID"]="<%=contractid%>";
tempParam["contract_number"]="<%=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 deleteparam ="PROJECT_PLAN_NUMBER="+"<%=contractid%>"+",objecttype=settletradition";
var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.QutationAction","deletedevtion",deleteparam);
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","wordToPdfAnnex","contract_id=<%=contractid%>,PLAN_LIST=settletradition,FlowUnid=<%=sFlowUnid%>");
if(bIsInsert)
{
beforeInsert();
}
beforeUpdate();
as_save("myiframe0");
reloadSelf();
}
function stamp(){
// var flie = getItemValue(0,getRow(0),"FILENAME");
// if(typeof(flie)=="undefined"||flie==null||flie==""){
// alert("请先生成产权转移单!!");
// return;
// }
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","TcollectionSignA","contract_id=<%=contractid%>,FlowUnid=<%=sFlowUnid%>,flagType=settletradition");
location.reload();
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info07;Describe=自定义函数;]~*/%>
<script type="text/javascript">
<%/*~[Describe=执行插入操作前执行的代码;]~*/%>
function beforeInsert()
{
setItemValue(0,0,"InputUserID","<%=CurUser.getUserID()%>");
setItemValue(0,0,"InputOrgID","<%=CurUser.getOrgID()%>");
setItemValue(0,0,"InputTime","<%=StringFunction.getTodayNow()%>");
bIsInsert = false;
}
<%/*~[Describe=执行更新操作前执行的代码;]~*/%>
function beforeUpdate()
{
setItemValue(0,0,"UpdateUserID","<%=CurUser.getUserID()%>");
setItemValue(0,0,"UpdateOrgID","<%=CurUser.getOrgID()%>");
setItemValue(0,0,"UpdateTime","<%=StringFunction.getTodayNow()%>");
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info08;Describe=页面装载时,进行初始化;]~*/%>
<script type="text/javascript">
function initRow(){
if (getRowCount(0) == 0) //如果没有找到对应记录,则新增一条,并设置字段默认值
{
setItemValue(0,0,"FlowUnid","<%=sFlowUnid%>");
//设置自动获取日期为当前日期
setItemValue(0,0,"Accept_Date","<%=StringFunction.getToday()%>");
bIsInsert = true;
}
}
initRow();
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -21,6 +21,8 @@
docname = "써헌친겼";
}else if("transfer".equals(docname)){
docname = "끓홈瘻盧聯蝎";
}else if("settletradition".equals(docname)){
docname = "瓊품써헌(눈固)";
};
String sTempletNo = CurPage.getParameter("TempletNo");//친겼뵀
sTempletNo = "DevolutionList";

Binary file not shown.

View File

@ -1626,6 +1626,8 @@ public void wordToPdfJar(JBOTransaction tx){
DOCRELATIVE=bom.createQuery(" OBJECTTYPE='TriditionCollection' and plan_number=:plan_number").setParameter("plan_number",PAYMENT_NUMBER).getSingleResult(false);
}else if("TriditionSuspension".equals(PLAN_LIST)){
DOCRELATIVE=bom.createQuery(" OBJECTTYPE='TriditionSuspension' and FLOW_UNID=:flowunid ").setParameter("flowunid",FlowUnid).getSingleResult(false);
}else if("settletradition".equals(PLAN_LIST)){
DOCRELATIVE=bom.createQuery(" OBJECTTYPE='settletradition' and FLOW_UNID=:flowunid ").setParameter("flowunid",FlowUnid).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);
}