直营店逻辑修改
This commit is contained in:
parent
6a6a42e58d
commit
8839547248
@ -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+"'"));
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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=="")
|
||||
{
|
||||
|
||||
@ -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=="")
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user