From cb54f97f5c9ea7baf8f3f30f5149d5f5f6fc0264 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 16 Jun 2018 18:26:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=94=B3=E8=AF=B7=EF=BC=8C?= =?UTF-8?q?=E5=8A=A0=E7=89=88=E6=9C=AC=E5=8F=B7=E5=B9=B6=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectApprovalCreationInfo.jsp | 62 ++++++++++++------- .../LBProjectIntoTempInitCarBusiness.java | 15 +++++ .../BusinessApprovalStartAction.java | 10 +++ 3 files changed, 66 insertions(+), 21 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp index 6de107e15..ba38d843c 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp @@ -86,8 +86,9 @@ var custid = getItemValue(0,getRow(),"CustomerID"); var custname = getItemValue(0,getRow(),"CustomerName"); var customerType = getItemValue(0,getRow(),"Customer_type"); - var certtype =getItemValue(0,getRow(),"certtype"); - var certid =getItemValue(0,getRow(),"certid"); + var certtype = getItemValue(0,getRow(),"certtype"); + var certid = getItemValue(0,getRow(),"certid"); + var versionid = getItemValue(0,getRow(),"versionid"); if(certtype==""){ @@ -126,7 +127,7 @@ } var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>"; - sParams =sParams+",ProductId="+productid+",ProductName="+productname+",CustomerType="+customerType+",carAttributes="+carAttributes+",leasehold="+leasehold+",carSystem="+carSystem+",custname="+custname+",certtype="+certtype+",certid="+certid+",productModel="+productModel+",carSeries="+carSeries; + sParams =sParams+",ProductId="+productid+",ProductName="+productname+",CustomerType="+customerType+",carAttributes="+carAttributes+",leasehold="+leasehold+",carSystem="+carSystem+",custname="+custname+",certtype="+certtype+",certid="+certid+",productModel="+productModel+",carSeries="+carSeries+",versionid="+versionid; var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.projectapproval.BusinessApprovalStartAction","initFLow",sParams); if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_" ) { @@ -134,7 +135,7 @@ } else { - parent.AsDialog.ClosePage(sReturnInfo+"@"+customerType+"@"+carAttributes+"@"+leasehold+"@"+carSystem+"@"+custname+"@"+certtype+"@"+certid+"@"+productModel+"@"+carSeries); + parent.AsDialog.ClosePage(sReturnInfo+"@"+customerType+"@"+carAttributes+"@"+leasehold+"@"+carSystem+"@"+custname+"@"+certtype+"@"+certid+"@"+productModel+"@"+carSeries+"@"+versionid); } } @@ -231,8 +232,10 @@ var carAttributes = getItemValue(0,getRow(),"carAttributes"); var leasehold = getItemValue(0,getRow(),"leasehold"); - if(carAttributes=='1'){ - AsDialog.OpenSelector("SelectBusinessType","ProductType,1,TypeNo,0005","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px", + var modelid=""; + if(MyOjbect.modelid){ + modelid=MyOjbect.modelid; + AsDialog.OpenSelector("selectProductVersionInfo","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px", function(sReturn){ if(!sReturn||sReturn=="_CANCEL_"||sReturn==""||sReturn=="_NONE_") { @@ -240,24 +243,42 @@ return; } sReturn = sReturn.split("@"); -// alert(sReturn); - setItemValue(0,0,"productId",sReturn[0]); - setItemValue(0,0,"productName",sReturn[1]); - },"请选择产品",''); - }else if(carAttributes=='2'){ - AsDialog.OpenSelector("SelectBusinessType","ProductType,1,TypeNo,0005","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px", - function(sReturn){ - if(!sReturn||sReturn=="_CANCEL_"||sReturn==""||sReturn=="_NONE_") - { - //alert(getHtmlMessage('1'));//请选择一条信息! - return; - } - sReturn = sReturn.split("@"); -// alert(sReturn); + // alert(sReturn); setItemValue(0,0,"productId",sReturn[0]); setItemValue(0,0,"productName",sReturn[1]); + setItemValue(0,0,"versionid",sReturn[1]); },"请选择产品",''); + }else{ + alert("请先选择车型"); } + +// if(carAttributes=='1'){ +// AsDialog.OpenSelector("SelectBusinessType","ProductType,1,TypeNo,0005","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px", +// function(sReturn){ +// if(!sReturn||sReturn=="_CANCEL_"||sReturn==""||sReturn=="_NONE_") +// { +// //alert(getHtmlMessage('1'));//请选择一条信息! +// return; +// } +// sReturn = sReturn.split("@"); +// // alert(sReturn); +// setItemValue(0,0,"productId",sReturn[0]); +// setItemValue(0,0,"productName",sReturn[1]); +// },"请选择产品",''); +// }else if(carAttributes=='2'){ +// AsDialog.OpenSelector("SelectBusinessType","ProductType,1,TypeNo,0005","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px", +// function(sReturn){ +// if(!sReturn||sReturn=="_CANCEL_"||sReturn==""||sReturn=="_NONE_") +// { +// //alert(getHtmlMessage('1'));//请选择一条信息! +// return; +// } +// sReturn = sReturn.split("@"); +// // alert(sReturn); +// setItemValue(0,0,"productId",sReturn[0]); +// setItemValue(0,0,"productName",sReturn[1]); +// },"请选择产品",''); +// } } @@ -280,7 +301,6 @@ } function setCertType(){ - debugger; var customerType = getItemValue(0,0,"Customer_type"); if("01" == customerType){ // if(carType == "stock_car"){ diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java index caa69eec8..6d6a7f418 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBProjectIntoTempInitCarBusiness.java @@ -2,6 +2,7 @@ package com.tenwa.lease.flow.project.commbusiness; import jbo.app.lpapplication; import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP; import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR_TEMP; import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP; import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP; @@ -29,6 +30,9 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { BizObjectManager bmLULT = JBOFactory.getBizObjectManager(LB_UNION_LESSEE_TEMP.CLASS_NAME,Sqlca); BizObjectManager bmLPA = JBOFactory.getBizObjectManager(lpapplication.CLASS_NAME,Sqlca); BizObjectManager bmLECT = JBOFactory.getBizObjectManager(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME,Sqlca); + BizObjectManager bmLPIT = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME,Sqlca); + BizObjectManager bmLCIT = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO_TEMP.CLASS_NAME,Sqlca); + Sqlca.join(bm); String customerid = UUIDUtil.getUUID(); @@ -37,10 +41,19 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { BizObject boLULT = bmLULT.newObject(); BizObject bmLP = bmLPA.newObject(); BizObject bmLEC = bmLECT.newObject(); + BizObject bmLPI = bmLPIT.newObject(); + BizObject bmLCI = bmLCIT.newObject(); ASUser asUser=new ASUser(this.getAttribute("CurUserID").toString()); + bmLCI.setAttributeValue("FLOWUNID", this.getAttribute("FlowUnid")); + bmLCI.setAttributeValue("VERSIONID", this.getAttribute("versionid")); + + bmLPI.setAttributeValue("FLOWUNID", this.getAttribute("FlowUnid")); + bmLPI.setAttributeValue("VERSIONID", this.getAttribute("versionid")); + + boCRT.setAttributeValue("flowunid", this.getAttribute("FlowUnid")); boCRT.setAttributeValue("customerid", customerid); boCRT.setAttributeValue("InputOrgID", asUser.getOrgID()); @@ -92,6 +105,8 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness { bmLULT.saveObject(boLULT); bmLPA.saveObject(bmLP); bmLECT.saveObject(bmLEC); + bmLPIT.saveObject(bmLPI); + bmLCIT.saveObject(bmLCI); String sMessage="true"; return sMessage; diff --git a/src_tenwa/com/tenwa/lease/flow/project/projectapproval/BusinessApprovalStartAction.java b/src_tenwa/com/tenwa/lease/flow/project/projectapproval/BusinessApprovalStartAction.java index edfc7c769..205a74154 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/projectapproval/BusinessApprovalStartAction.java +++ b/src_tenwa/com/tenwa/lease/flow/project/projectapproval/BusinessApprovalStartAction.java @@ -42,6 +42,7 @@ public class BusinessApprovalStartAction extends BaseFlowStartAction{ private String certid; private String productModel; private String carSeries; + private String versionid; @Override public void customOperation(JBOTransaction tx,BizObject flowBussiness) throws Exception { @@ -60,9 +61,18 @@ public class BusinessApprovalStartAction extends BaseFlowStartAction{ this.FlowParam.put("certid", this.getCertid()); this.FlowParam.put("productModel", getProductModel()); this.FlowParam.put("carSeries", getCarSeries()); + this.FlowParam.put("versionid", getVersionid()); } + public String getVersionid() { + return versionid; + } + + public void setVersionid(String versionid) { + this.versionid = versionid; + } + public String getProductModel() { return productModel; }