修改法人客户相关信息

This commit is contained in:
tangfutang 2018-09-03 19:27:00 +08:00
parent 4a903eca90
commit d553f81229
5 changed files with 53 additions and 5 deletions

View File

@ -28,7 +28,7 @@
dwTemp.genHTMLObjectWindow(customerId);
String compClientID = request.getParameter("CompClientID");
dwTemp.replaceColumn("invoicelist", "<iframe type='iframe' name=\"frame_list_invoice\" width=\"100%\" height=\"250\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Customer/Lessee/Comm/Invoice/CustomerInvoiceList.jsp?customerId="+customerId+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
dwTemp.replaceColumn("othercertlist", "<iframe type='iframe' name=\"frame_list_othercert\" width=\"100%\" height=\"250\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Customer/Lessee/Comm/Certificates/CustomerCertList.jsp?customerId="+customerId+"&customerType=01"+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
// dwTemp.replaceColumn("othercertlist", "<iframe type='iframe' name=\"frame_list_othercert\" width=\"100%\" height=\"250\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Customer/Lessee/Comm/Certificates/CustomerCertList.jsp?customerId="+customerId+"&customerType=01"+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
dwTemp.replaceColumn("addresslist", "<iframe type='iframe' name=\"frame_list_address\" width=\"100%\" height=\"250\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Customer/Lessee/Comm/Address/CustomerAddressList.jsp?customerId="+customerId+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
dwTemp.replaceColumn("tellist", "<iframe type='iframe' name=\"frame_list_tel\" width=\"100%\" height=\"250\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Customer/Lessee/Comm/Telephone/CustomerTelList.jsp?customerId="+customerId+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
dwTemp.replaceColumn("accountlist", "<iframe type='iframe' name=\"frame_list_account\" width=\"100%\" height=\"260\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Customer/Lessee/Comm/Account/CustomerAccountList.jsp?customerId="+customerId+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());

View File

@ -11,7 +11,7 @@
if(customerListTemplet==null)customerListTemplet="";
ASObjectModel doTemp = new ASObjectModel(customerListTemplet);
String otherWhere=DataRightManager.getRightCondition(CurUser,"O","cust");
doTemp.appendJboWhere(otherWhere);
// doTemp.appendJboWhere(otherWhere);
//doTemp.setJboWhereWhenNoFilter("ct.custstatus = 'status02' ");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.setPageSize(20);

View File

@ -9,7 +9,11 @@
doTemp.setDDDWJbo("certtype","jbo.sys.CODE_LIBRARY,itemNo,ItemName,Codeno='CertType' and SortNo like 'Ent%' and itemno<>'Ent03' and IsInuse='1' ");
doTemp.setDDDWJbo("status","jbo.sys.CODE_LIBRARY,itemNo,ItemName,Codeno='customer_status' and itemno in('status01','status02') ");
doTemp.setDefaultValue("nationcode","CHN");
doTemp.setColInnerBtEvent("NATIONCODENAME", "");
doTemp.setHtmlEvent("certtype","onchange","changeCertidRequired");
doTemp.setColInnerBtEvent("customername", "changeCustomername()");
doTemp.setHtmlEvent("customername","onchange","changeCustomerName");
doTemp.setHtmlEvent("customer_num","onchange","changeCustomerNum");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";
dwTemp.genHTMLObjectWindow("");
@ -90,8 +94,8 @@ include file="/Frame/resources/include/ui/include_info.jspf"%>
var certid = getItemValue(0,getRow(),"certid");
//判断组织机构代码合法性
if(certType =='Ent02'){
if(!checkORGRight1(certid) ){
setErrorTips("certid","组织机构代码格式错误!");
if(!checkORGRight(certid) ){
setErrorTips("certid","社会统一信用代码格式错误!");
return false;
}
}
@ -119,6 +123,37 @@ include file="/Frame/resources/include/ui/include_info.jspf"%>
}
});
}
var customername ;
var customer_num ;
function changeCustomername(){
AsDialog.OpenSelector("selectCustomerList", "","dialogWidth=500px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px", function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
return;
}
sReturn = sReturn.split("@");
customername = sReturn[1];
customer_num = sReturn[0];
setItemValue(0, 0, "CUSTOMERNAME", customername);
setItemValue(0, 0, "CUSTOMER_NUM", customer_num);
}, "客户信息");
}
function changeCustomerName(){
var customerName = getItemValue(0,0,"CUSTOMERNAME");
alert("新:"+customerName+"===旧:"+customername);
if(customername!=customerName){
setItemValue(0, 0, "CUSTOMER_NUM", "");
customername= customerName;
}
}
// function changeCustomerNum(){
// var customernum = getItemValue(0,0,"CUSTOMER_NUM");
// alert("新:"+customernum+"===旧:"+customer_num);
// if(customernum!=customer_num){
// setItemValue(0, 0, "CUSTOMERNAME", "");
// customer_num=customernum;
// }
// }
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -51,7 +51,10 @@ public class FlowUtil {
public static synchronized String getCustomer_Number(JBOTransaction tx) throws Exception{
return String.valueOf(Integer.parseInt(FlowUtil.getSerialNumber("{maxOrderNumber}",15,null, "客户编号", Integer.parseInt(DateAssistant.getTodayNow().substring(0,4)), tx)));
}
//获取法人customerid--123
public static synchronized String getCustomer_Id(JBOTransaction tx) throws Exception{
return String.valueOf(Integer.parseInt(FlowUtil.getSerialNumber("{maxOrderNumber}",15,null, "法人客户编号", Integer.parseInt(DateAssistant.getTodayNow().substring(0,4)), tx)));
}
//获取经销商编号
public static synchronized String getDistributorSerialNumber(JBOTransaction tx) throws Exception{

View File

@ -5,6 +5,7 @@ import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.util.date.DateAssistant;
import com.tenwa.flow.util.FlowUtil;
public class NewCustomerCompanyController{
@ -148,8 +149,17 @@ public class NewCustomerCompanyController{
return "FAIl@客户证件号码\""+certId+"\""+certfrom+"中已注册,不能重复注册!";
}else{
//»ñÈ¡±àÂë¹æÔò
String serinum=FlowUtil.getCustomer_Id(tx);
String serin="";
if(serinum.length()<15){
for(int i=0;i<15-serinum.length();i++){
serin+="0";
}
}
//新增客户
BizObject newCustomer = custManager.newObject();
newCustomer.setAttributeValue("customerid", "APZLC"+serin+serinum);
newCustomer.setAttributeValue("nationcode", nationCode);
newCustomer.setAttributeValue("customername", customerName);
newCustomer.setAttributeValue("certtype", certType);