更新经销商分类查询和担保人保存方法
This commit is contained in:
parent
0f4479df46
commit
1ad56808d5
@ -27,7 +27,16 @@
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
Return =Return+sReturn;
|
||||
var arr = sReturn.split("@~");
|
||||
//定义一个新的数组
|
||||
var sReturns = "";
|
||||
//遍历数组
|
||||
for(var i = 0;i<arr.length-1;i++){
|
||||
if(sReturns.indexOf(arr[i]) == -1){ //判断在s数组中是否存在,不存在则push到s数组中
|
||||
sReturns=sReturns+arr[i]+"@~";
|
||||
}
|
||||
}
|
||||
Return =Return+sReturns;
|
||||
sParams = "CarBrandId="+Return;
|
||||
/*
|
||||
CarBrandId=admin@~
|
||||
@ -36,9 +45,13 @@
|
||||
7c7624a558594bff8387ca6949982b21@~
|
||||
00303ba448074b0792bd465dd2359b7c@
|
||||
*/
|
||||
debugger;
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.apzl.saveunioncar.saveUnionCarUtil","saveLmDistributorToProduct",sParams);
|
||||
if(sReturnInfo!="error"){
|
||||
alert("该经销商已绑定!");
|
||||
if(""!=sReturnInfo){
|
||||
AsDebug.showMessage("提示",sReturnInfo,"","",true,'','','',function(){
|
||||
});
|
||||
}else{
|
||||
alert("绑定成功!!!");
|
||||
}
|
||||
reloadSelf();
|
||||
},"请选择经销商");
|
||||
|
||||
@ -20,10 +20,10 @@
|
||||
|
||||
String sTempletNo = "GuarantorInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setDefaultValue("ASSUROR", customerid);
|
||||
doTemp.setDefaultValue("PROJECT_ID", ProjectId);
|
||||
doTemp.setDefaultValue("FLOWUNID", sFlowUnid);
|
||||
doTemp.setDefaultValue("DATA_STATE", "guarantee");//标记该数据是担保人信息
|
||||
// doTemp.setDefaultValue("ASSUROR", customerid);
|
||||
doTemp.setDefaultValue("project_id", ProjectId);
|
||||
doTemp.setDefaultValue("flowunid", sFlowUnid);
|
||||
// doTemp.setDefaultValue("DATA_STATE", "guarantee");//标记该数据是担保人信息
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
@ -113,7 +113,7 @@
|
||||
function goBack(){
|
||||
//要跳转的url
|
||||
var url="/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitList.jsp";
|
||||
var sparam="FlowUnid="+getItemValue(0,0,"FLOWUNID")+"&RightType="+'<%=RightType%>';
|
||||
var sparam="FlowUnid="+getItemValue(0,0,"FLOWUNID")+"&ProjectId="+getItemValue(0,0,"project_id")+"&RightType="+'<%=RightType%>';
|
||||
AsControl.OpenView(url,sparam,"_self","");
|
||||
}
|
||||
|
||||
|
||||
@ -7,11 +7,13 @@
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
String ProjectId = CurPage.getParameter("ProjectId");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
String sTempletNo = "CustomerFamilyJoinTempInfo";//--Ä£°åºÅ--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setColTips("", "");
|
||||
doTemp.setDefaultValue("project_id", ProjectId);
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//Ö»¶Áģʽ
|
||||
|
||||
@ -3,6 +3,7 @@ package com.tenwa.apzl.saveunioncar;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
|
||||
import jbo.app.tenwa.customer.LM_DISTRIBUTOR_TO_CAR;
|
||||
import jbo.app.tenwa.customer.LM_DISTRIBUTOR_TO_PRODUCT;
|
||||
import jbo.app.tenwa.customer.LM_PORTAL_TO_CAR;
|
||||
@ -136,7 +137,7 @@ public String getCarBrandId() {
|
||||
String updateOrgId = params[1];
|
||||
String updateTime = params[2];
|
||||
String typeno = params[3];
|
||||
//String productid=params[4];
|
||||
String Message="";
|
||||
int lle=0;
|
||||
int i;
|
||||
try{
|
||||
@ -146,7 +147,10 @@ public String getCarBrandId() {
|
||||
BizObject obcheck=Lmcheck.createQuery("DISTRIBUTOR_ID=:DISTRIBUTOR_ID and PRODUCT_ID=:PRODUCT_ID")
|
||||
.setParameter("DISTRIBUTOR_ID", brandid).setParameter("PRODUCT_ID",typeno).getSingleResult(false);
|
||||
if(obcheck!=null){
|
||||
return "success";
|
||||
BizObjectManager diManager = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,tx);
|
||||
BizObject di = diManager.createQuery("select distributor_name from O where O.id=:id").setParameter("id", brandid).getSingleResult(true);
|
||||
Message = Message+di.getAttribute("distributor_name").getString()+":该经销商已绑定。<br>";
|
||||
continue;
|
||||
}
|
||||
String PortalToCarId=UUID.randomUUID().toString().replaceAll("-", "");
|
||||
BizObjectManager Lmpc = JBOFactory.getBizObjectManager(LM_DISTRIBUTOR_TO_PRODUCT.CLASS_NAME,tx);
|
||||
@ -166,10 +170,10 @@ public String getCarBrandId() {
|
||||
e.printStackTrace();
|
||||
tx.rollback();
|
||||
}
|
||||
if(lle>0){
|
||||
return "success";
|
||||
}
|
||||
return "error";
|
||||
// if(lle>0){
|
||||
// return "success";
|
||||
// }
|
||||
return Message;
|
||||
}
|
||||
public String saveLmDistributorToDistrict(JBOTransaction tx)throws Exception {
|
||||
/*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user