From 88395472485ab0962a4ea7d17860ec39755fcc9b Mon Sep 17 00:00:00 2001 From: zhanglei Date: Thu, 4 Mar 2021 11:53:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E8=90=A5=E5=BA=97=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/Tenwa/Gps/LmGpsOrderInfo.jsp | 20 +++++++--- .../DistributorApproval/LDistributorInfo.jsp | 2 +- .../DistributorChange/LDistributorInfo.jsp | 2 +- .../ProjectDistriborInfo.jsp | 12 +++++- .../ProjectApprovalCreationInfo.jsp | 38 ++++++++++++++++--- 5 files changed, 60 insertions(+), 14 deletions(-) diff --git a/WebContent/Tenwa/Gps/LmGpsOrderInfo.jsp b/WebContent/Tenwa/Gps/LmGpsOrderInfo.jsp index 1f04aa4ad..959081b5e 100644 --- a/WebContent/Tenwa/Gps/LmGpsOrderInfo.jsp +++ b/WebContent/Tenwa/Gps/LmGpsOrderInfo.jsp @@ -27,13 +27,21 @@ String id = Sqlca.getString("select id from LM_GPS_ORDER_TEMP where APPLY_NO='"+ProjectNo+"'"); String contact_name = Sqlca.getString("select CONTACT_NAME from GPS_config_info where isenable='1' ");//派工联系人 String contact_phone = Sqlca.getString("select CONTACT_PHONE from GPS_config_info where isenable='1' ");//派工联系人电话 - System.out.println("经销商orgId=" + CurUser.getOrgID()); - //如果部门是南京直销的话 CurUser.getOrgID()== 8006014 拉车单位显示南京直销 - String distributor_name = "安鹏汽车业务直销部(江苏)"; - if(!"8006014".equals(CurUser.getOrgID())){ + + //如果当前有记录优先取数据库中的记录 + String distributor_name = ""; + if("null".equals(id)){ + System.out.println("经销商orgId=" + CurUser.getOrgID()); + String distributor_id = Sqlca.getString("select distributor_id from lb_project_info where id='"+ProjectId+"'");//获取经销商ID + distributor_name = Sqlca.getString("select distributor_name from distributor_info where distributor_no='"+distributor_id+"'");//获取经销名称 + }else { + distributor_name = Sqlca.getString("select CAR_ACCOUNT from LM_GPS_ORDER_TEMP where APPLY_NO='"+ProjectNo+"'"); + System.out.println("经销商distributor_name=" + distributor_name); + } + //如果当前部门为直销&&有记录&&0010显示 直销 或者 无记录&&直销&&0010 + if("8006014".equals(CurUser.getOrgID()) && "0010".equals(PhaseNo)){ System.out.println("经销商id不等于【8006014】,经销商id=" + CurUser.getOrgID()); - String distributor_id = Sqlca.getString("select distributor_id from lb_project_info where id='"+ProjectId+"'");//获取经销商ID - distributor_name = Sqlca.getString("select distributor_name from distributor_info where distributor_no='"+distributor_id+"'");//获取经销名称 + distributor_name = "安鹏汽车业务直销部(江苏)"; } BigDecimal incomNuber = new BigDecimal(Sqlca.getString("select INCOME_NUMBER from LC_CALC_CONDITION_TEMP where FLOWUNID='"+flowunid+"'")); diff --git a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp index 25810df47..2c7c7ac28 100644 --- a/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp +++ b/WebContent/Tenwa/Lease/DistributorManage/DistributorApproval/LDistributorInfo.jsp @@ -204,7 +204,7 @@ $(function(){ //请选择经销商名称 function selectcompany(){ - AsDialog.OpenSelector("SelectCompany","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ + AsDialog.OpenSelector("SelectCompanyNew","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ if(!sReturn||sReturn=="_CANCEL_"){ alert(getHtmlMessage('1'));//请选择一条信息! return; diff --git a/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp b/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp index b898e4c68..4cc48399d 100644 --- a/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp +++ b/WebContent/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorInfo.jsp @@ -100,7 +100,7 @@ function saveproj_name(){ //请选择经销商名称 function selectcompany(){ - AsDialog.OpenSelector("SelectCompany","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ + AsDialog.OpenSelector("SelectCompanyNew","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){ if(!sReturn||sReturn=="_CANCEL_"){ alert(getHtmlMessage('1'));//请选择一条信息! return; diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ProjectDistriborInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ProjectDistriborInfo.jsp index 834a5f096..d7c08a3af 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ProjectDistriborInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ProjectDistriborInfo.jsp @@ -7,6 +7,16 @@ */ String sPrevUrl = CurPage.getParameter("PrevUrl"); String flowunid = CurPage.getParameter("FlowUnid"); + String productId = CurPage.getParameter("ProductId"); + String distributorNo = CurPage.getParameter("distributorNo"); + String orgId = CurUser.getOrgID(); + //如果是直营店,则显示子经销。 + String sSql = "select DISTRIBUTOR_NO,F_I_TYPE from O where ORGID = :orgId"; + // F_I_TYPE=f_i_type03 直营店 + BizObject bo = JBOFactory.createBizObjectQuery("jbo.app.tenwa.customer.DISTRIBUTOR_INFO", sSql).setParameter("orgId", orgId).getSingleResult(false); + if(bo != null){ + distributorNo = bo.getAttribute("DISTRIBUTOR_NO").getString(); + } String phaseNo = CurPage.getParameter("PhaseNo"); if(sPrevUrl == null) sPrevUrl = ""; @@ -34,7 +44,7 @@ } function selectDistributor(){ - AsDialog.OpenSelector("selectDistributor","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px", + AsDialog.OpenSelector("selectDistributorNew","distributorNum,<%=distributorNo%>,productId,,<%=productId%>","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px", function(sReturn){ if(!sReturn||sReturn=="_CANCEL_"||sReturn=="") { diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp index 14310a9f4..2d19c905e 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApproval/ProjectApprovalCreationInfo.jsp @@ -25,6 +25,19 @@ <%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info02;Describe=定义变量,获取参数;]~*/%> <% + String distributorNo = ""; + String distributorType = ""; + String orgId = CurUser.getOrgID(); + //如果是直营店,则显示子经销。 + String sSql = "select DISTRIBUTOR_NO,F_I_TYPE from O where ORGID = :orgId"; + // F_I_TYPE=f_i_type03 直营店 + BizObject bo = JBOFactory.createBizObjectQuery("jbo.app.tenwa.customer.DISTRIBUTOR_INFO", sSql).setParameter("orgId", orgId).getSingleResult(false); + if(bo != null){ + distributorNo = bo.getAttribute("DISTRIBUTOR_NO").getString(); + distributorType = bo.getAttribute("F_I_TYPE").getString(); + } + System.out.println(distributorNo); + System.out.println(distributorType); String sApplyType = CurPage.getParameter("ApplyType"); String sInputUserID = CurUser.getUserID(); @@ -102,7 +115,7 @@ setItemValue(0,getRow(),"geartype",data[10]); setItemValue(0,getRow(),"newtype","ysp"); - + setItemValue(0,0,"CUSTOMER_TYPE","03"); setItemValue(0,0,"certtype","Ind01"); } @@ -113,6 +126,16 @@ function changeProductName(){//清空产品名称 setItemValue(0,getRow(0),"productName",""); } + + //判断经销商是否显示: 如果为自营则显示 + function checkDispalyDistributor() { + var distributorNo22 = "<%=distributorNo%>"; + var distributorType22 = "<%=distributorType%>"; + if(distributorType22 == "f_i_type03"){ + return true; + } + return false; + } function checkNameAndCertId(){//校验姓名和证件号 //var customerName = getItemValue(0,getRow(),"CustomerName"); @@ -198,12 +221,14 @@ alert(message[1]); return; } - + var distributorType = "<%=distributorType%>"; var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>"; sParams =sParams+",SubjectId="+SubjectId+",SubjectName="+message[1]+",ProductId="+productId+",ProductName="+productname+",CustomerType="+customerType+",carAttributes="+carAttributes+",leasehold="+leasehold+",carSystem="+carSystem+",custname="+custname+",certtype="+certtype+",certid="+certid+",CustomerId="+CustomerId+",productModel="+productModel+",carSeries="+carSeries+",versionid="+versionid+",modelid="+modelid+",businessType="+businessType+",price="+price+",liter="+liter+",geartype="+geartype+",sourcetype=web,operationType="+operationType+",newtype="+newtype; sParams =sParams+",cartype="+cartype+",vehicletype="+vehicletype+",vehiclelevel="+vehiclelevel;//赋值新增的三个车型信息 + sParams =sParams+",distributorType="+distributorType;//新增自营店信息作为显示经销商变更页签显示条件 // - if("BAIC_MOTOR"==operationType){ + // if("BAIC_MOTOR"==operationType){ + if(checkDispalyDistributor()){ sParams = sParams+",distributorNo="+getItemValue(0,getRow(),"distributorNo")+",distributorName="+getItemValue(0,getRow(),"distributorName"); } //如果是个人,将对应的性别参数参数到流程中 @@ -405,6 +430,8 @@ setItemValue(0,0,"versionid",sReturn[4]); setItemValue(0,0,"carAttributes",sReturn[9]); setItemValue(0,0,"leasehold",sReturn[10]); + setItemValue(0,0,"distributorName",""); + setItemValue(0,0,"distributorNo",""); dispalyDistributor(operationType);//根据产品判断是否选择经销商 },"请选择产品",''); }else{ @@ -451,7 +478,7 @@ } //根据产品是否选择经销商 function dispalyDistributor(operationType){ - if("BAIC_MOTOR"==operationType){ + if(checkDispalyDistributor()){ $("#A_div_0150").attr("style","display:block;"); setItemRequired(0,"DISTRIBUTORNAME",true); }else{ @@ -460,7 +487,8 @@ } } function selectDistributor(){ - AsDialog.OpenSelector("selectDistributor","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px", + var productId = getItemValue(0,0,"productId"); + AsDialog.OpenSelector("selectDistributorNew","distributorNum,<%=distributorNo%>,productId,"+productId,"dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px", function(sReturn){ if(!sReturn||sReturn=="_CANCEL_"||sReturn=="") {