北汽可编辑业务申请编号

This commit is contained in:
tangft 2018-11-29 14:59:47 +08:00
parent e7530a4394
commit 672d17cea5
5 changed files with 64 additions and 10 deletions

View File

@ -48,7 +48,7 @@
//sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function saveCompany(inputName,inputTel){
function saveCompany(inputName,inputTel,projectNo){
if(!changetel()){
return;
}
@ -58,10 +58,10 @@
if(!changecompany_tel()){
return;
}
as_save("0","saveCertInfo('"+inputName+"','"+inputTel+"')");
as_save("0","saveCertInfo('"+inputName+"','"+inputTel+"','"+projectNo+"')");
}
function saveCertInfo(inputName,inputTel,leasfrom,projectSource){
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCompanyInfo",'inputName='+inputName+',inputTel='+inputTel+',flowunid=<%=flowUnid%>');
function saveCertInfo(inputName,inputTel,leasfrom,projectSource,projectNo){
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCompanyInfo",'projectNo='+projectNo+',inputName='+inputName+',inputTel='+inputTel+',flowunid=<%=flowUnid%>');
if(sResult == "SUCCESS"){
parent.reloadSelf();
}

View File

@ -11,6 +11,7 @@
String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号
String FlowNo=CurPage.getParameter("FlowNo");//流程名称
String sPrevUrl = CurPage.getParameter("PrevUrl");
String operationType = CurPage.getParameter("operationType");//获取产品类型
if(sPrevUrl == null) sPrevUrl = "";
String compClientID = CurPage.getParameter("CompClientID");
String rightType = CurPage.getParameter("RightType");
@ -30,6 +31,12 @@
doTemp.setReadOnly("INPUTNAME", true);
doTemp.setReadOnly("INPUTTEL", true);
}
//如果是北汽的产品,业务申请号可编辑
if(!"ReadOnly".equals(rightType)&&sPhaseNo.equals("0010")&&"BAIC_MOTOR".equals(operationType)){
doTemp.setReadOnly("PROJECT_NO", false);
}else{
doTemp.setReadOnly("PROJECT_NO", true);
}
String userll=null;
userll="/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp?CompClientID=";
if("01".equals(custype)||"01".equals(customertype)){
@ -67,13 +74,23 @@
var inputName = getItemValue(0,getRow(),"inputName");
var inputTel = getItemValue(0,getRow(),"inputTel");
var customerType = "<%=custype%>";
var projectNo=getItemValue(0,getRow(),"PROJECT_NO");
if(projectNo.length<=0){
alert("请填写业务申请编号!!!");
return;
}
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkProjectNo","projectNo="+projectNo);
if("error"==sReturnInfo){
alert("业务申请编号已被占用,请重新填写!!!");
return;
}
if(customerType=="01"){//法人
//as_save("myiframe0","frame_list.window.saveCompany();");
frame_list.window.saveCompany(inputName,inputTel);
frame_list.window.saveCompany(inputName,inputTel,projectNo);
//as_save(0);
}
if(customerType=="03"){//自然人
frame_list.window.saveRecord(leasfrom,projectSource,inputName,inputTel);
frame_list.window.saveRecord(leasfrom,projectSource,inputName,inputTel,projectNo);
//as_save("myiframe0","frame_list.window.as_save(0);");
}
}

View File

@ -408,7 +408,7 @@
} */
}
function saveRecord(leasfrom,projectSource,inputName,inputTel){//±£´æ
function saveRecord(leasfrom,projectSource,inputName,inputTel,projectNo){//±£´æ
//校验申请人手机号和配偶手机号是否重复
var RepeatReault = "";
var customerType = "03";
@ -528,14 +528,14 @@
var certid=getItemValue(0,0,"CERTID");
<%-- var customerid=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","updateCustomerId",'certid='+certid+',flowunid=<%=flowunid%>'); --%>
// setItemValue(0,0,"customerid",customerid);
as_save("0","saveCertInfo('"+inputName+"','"+inputTel+"','"+leasfrom+"','"+projectSource+"')");
as_save("0","saveCertInfo('"+inputName+"','"+inputTel+"','"+leasfrom+"','"+projectSource+"','"+projectNo+"')");
return true;
};
}
function saveCertInfo(inputName,inputTel,leasfrom,projectSource){
function saveCertInfo(inputName,inputTel,leasfrom,projectSource,projectNo){
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCertInfo",'inputName='+inputName+',inputTel='+inputTel+',project_source='+projectSource+',leas_from='+leasfrom+',idexpiry='+getItemValue(0,0,"idexpiry")+',certtype='+getItemValue(0,0,"certtype")+',customerid='+getItemValue(0,0,"customerid")+',flowunid=<%=flowunid%>,certid='+getItemValue(0,0,"certid")+',name='+getItemValue(0,0,"name")+',userid=<%=CurUser.getUserID()%>,orgid=<%=CurUser.getOrgID()%>');
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCertInfo",'projectNo='+projectNo+',inputName='+inputName+',inputTel='+inputTel+',project_source='+projectSource+',leas_from='+leasfrom+',idexpiry='+getItemValue(0,0,"idexpiry")+',certtype='+getItemValue(0,0,"certtype")+',customerid='+getItemValue(0,0,"customerid")+',flowunid=<%=flowunid%>,certid='+getItemValue(0,0,"certid")+',name='+getItemValue(0,0,"name")+',userid=<%=CurUser.getUserID()%>,orgid=<%=CurUser.getOrgID()%>');
if(sResult == "SUCCESS"){
parent.reloadSelf();
}

View File

@ -9,6 +9,8 @@ import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
@ -34,6 +36,7 @@ public class CustomerInfoCheck {
private String certtype;
private String certid;
private String id;
private String projectNo;
public String getCerttype() {
return certtype;
@ -358,6 +361,14 @@ public class CustomerInfoCheck {
this.id = id;
}
public String getProjectNo() {
return projectNo;
}
public void setProjectNo(String projectNo) {
this.projectNo = projectNo;
}
public String checkDistributorStatus(JBOTransaction tx)throws Exception{
String mas="false";
Transaction Sqlca=null;
@ -374,4 +385,19 @@ public class CustomerInfoCheck {
}
return mas;
}
public String checkProjectNo(JBOTransaction tx) throws JBOException{//УÑéÐÕÃûÊÇ·ñ´æÔÚLB_PROJECT_INFO_TEMP
BizObjectManager lpitManage = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME, tx);
BizObjectManager lpiManage = JBOFactory.getBizObjectManager(LB_PROJECT_INFO.CLASS_NAME, tx);
BizObject lpit = lpitManage.createQuery("PROJECT_NO=:projectNo").setParameter("projectNo", projectNo).getSingleResult(false);
BizObject lpi = lpiManage.createQuery("PROJECT_NO=:projectNo ").setParameter("projectNo", projectNo).getSingleResult(false);
if(lpi!=null&&!(lpi.getAttribute("PROJECT_STATUS").getString().equals("101"))){
return "error";
}else if(lpi!=null&&(lpi.getAttribute("PROJECT_STATUS").getString().equals("101"))) {
return "success";
}else if(lpi==null&&lpit!=null){
return "error";
}
return "success";
}
}

View File

@ -49,6 +49,7 @@ public class CustomerInfoManage {
private String inputName;
private String inputTel;
private String distributorCode;
private String projectNo;
public String getDistributorCode() {
return distributorCode;
@ -262,6 +263,14 @@ public class CustomerInfoManage {
public void setInputTel(String inputTel) {
this.inputTel = inputTel;
}
public String getProjectNo() {
return projectNo;
}
public void setProjectNo(String projectNo) {
this.projectNo = projectNo;
}
public String saveCustomerFamilyFormal(JBOTransaction tx){
try{
@ -376,6 +385,7 @@ public class CustomerInfoManage {
proj.setAttributeValue("PROJECT_NAME", projName + "-" + fullname);
proj.setAttributeValue("inputName", inputName);
proj.setAttributeValue("inputTel", inputTel);
proj.setAttributeValue("PROJECT_NO", projectNo);
}
//update ÏîÄ¿Ãû³Æ
if(buss != null){
@ -448,6 +458,7 @@ public class CustomerInfoManage {
if(proj != null){
proj.setAttributeValue("inputName", inputName);
proj.setAttributeValue("inputTel", inputTel);
proj.setAttributeValue("PROJECT_NO", projectNo);
}
bm.saveObject(proj);
tx.commit();