带出各方出租人信息

This commit is contained in:
tangfutang 2018-10-12 15:50:36 +08:00
parent 64094280ba
commit 8cef11522d
2 changed files with 37 additions and 0 deletions

View File

@ -101,6 +101,31 @@
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info07;Describe=自定义函数;]~*/%>
<script type="text/javascript">
$(function(){
var id = getItemValue(0,0,"ID");
if((id==""||id=="undefined"||id.length==0)&&"BContractApproveApply"=="<%=CurPage.getParameter("ApplyType")%>"){
OwnInfo();
}
})
//默认带出来承租人信息
function OwnInfo(){
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","selectOwnInfo","projectId=<%=CurPage.getParameter("ProjectId")%>");
if(sReturnInfo!=""){
sReturn = sReturnInfo.split("@");
setItemValue(0,0,"LESSOR", sReturn[0]);//出租人姓名
setItemValue(0,0,"OWN_NAME", sReturn[1]);//出租人姓名
setItemValue(0,getRow(),"LEASE_CONSIGNER",sReturn[2]);//委托代理人
setItemValue(0,getRow(),"LEASE_REGISTER_ADDR",sReturn[3]);//注册地址
setItemValue(0,getRow(),"LEASE_ADDR",sReturn[4]);//通讯地址
setItemValue(0,getRow(),"LEASE_PERSON",sReturn[5]);//法人代表
setItemValue(0,getRow(),"LEASE_POSTCODE",sReturn[6]);//邮编
setItemValue(0,getRow(),"LEASE_LINKMAN",sReturn[7]);//联系人
setItemValue(0,getRow(),"LEASE_TEL",sReturn[8]);//电话
setItemValue(0,getRow(),"LEASE_FAX",sReturn[9]);//传真
setItemValue(0,getRow(),"LEASE_EMAIL",sReturn[10]);//电子邮件
}
}
//选择出租人
function SelectOwnInfo(){
AsDialog.OpenSelector("SelectOwnInfo","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){

View File

@ -7,7 +7,9 @@ import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
import jbo.app.tenwa.customer.DISTRIBUTOR_SUBSIDIARY;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP;
import org.bouncycastle.crypto.tls.AlertDescription;
@ -463,6 +465,16 @@ public class CustomerInfoManage {
return "false";
}*/
//合同制作合同各方出租信息默认带出
public String selectOwnInfo(JBOTransaction tx) throws Exception{
BizObject lpi = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME,tx).createQuery("id=:id").setParameter("id", projectId).getSingleResult(false);
BizObject ds = JBOFactory.getBizObjectManager(DISTRIBUTOR_SUBSIDIARY.CLASS_NAME,tx).createQuery("distributor_id=:distributorid").setParameter("distributorid", lpi.getAttribute("distributor_id").getString()).getSingleResult(false);
if(ds!=null){
return ds.getAttribute("comp_no").getString()+"@"+ds.getAttribute("comp_name").getString()+"@"+ds.getAttribute("LEASE_CONSIGNER").getString()+"@"+ds.getAttribute("LEASE_REGISTER_ADDR").getString()+"@"+ds.getAttribute("LEASE_ADDR").getString()+"@"+ds.getAttribute("LEASE_PERSON").getString()+"@"+ds.getAttribute("LEASE_POSTCODE").getString()+"@"+ds.getAttribute("LEASE_LINKMAN").getString()+"@"+ds.getAttribute("LEASE_TEL").getString()+"@"+ds.getAttribute("LEASE_FAX").getString()+"@"+ds.getAttribute("LEASE_EMAIL").getString();
}
return "";
}
}