diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp index b1f34eeec..dadc36f5f 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp @@ -103,18 +103,31 @@ return sReturnInfo; } + function checkMobile(){ + var customerType = "03"; + var mobile = getItemValue(0,getRow(),"mobile"); + var sParams = "mobile="+mobile+",customerType="+customerType; + var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobile",sParams); + return sReturnInfo; + } + $(document).ready(function(){ - var nameResult = checkName(); - if(nameResult=="2"){ - //$("#FULLNAME").attr("style","color:red;"); - $("#FULLNAME").css("color","red"); - } +// var nameResult = checkName(); +// if(nameResult=="2"){ +// //$("#FULLNAME").attr("style","color:red;"); +// $("#FULLNAME").css("color","red"); +// } var certResult = checkCertId(); if(certResult=="4"){ //$("#FULLNAME").attr("style","color:red;"); $("#CERTID").css("color","red"); } + var mobileResult = checkMobile(); + if(mobileResult=="6"){ + //$("#FULLNAME").attr("style","color:red;"); + $("#MOBILE").css("color","red"); + } if("0020"!="<%=sPhaseNo%>"){ $("#ButtonTR").attr("style","display:none;"); diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java index 89b151881..2e26ae1d8 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java @@ -14,9 +14,11 @@ public class CustomerInfoCheck { private String CustomerName; private String certId; + private String mobile; private String customerType; private String nameResult; private String certResult; + private String mobileResult; public String checkName(JBOTransaction tx) throws JBOException{ if(customerType.equals("03")){//自然人 @@ -56,6 +58,26 @@ public class CustomerInfoCheck { return certResult; } + public String checkMobile(JBOTransaction tx) throws JBOException{ + if(customerType.equals("03")){//自然人 + BizObject mobile=JBOFactory.createBizObjectQuery(CUSTOMER_PERSON.CLASS_NAME,"mobile=:mobile").setParameter("mobile", this.mobile).getSingleResult(false); + if(mobile==null){ + this.mobileResult = "5"; + }else{ + this.mobileResult = "6"; + } + } + return mobileResult; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + public String getCustomerName() { return CustomerName; } @@ -95,5 +117,13 @@ public class CustomerInfoCheck { public void setCertResult(String certResult) { this.certResult = certResult; } + + public String getMobileResult() { + return mobileResult; + } + + public void setMobileResult(String mobileResult) { + this.mobileResult = mobileResult; + } }