From 1b4b501b313363882f78912da1d4953f1007204b Mon Sep 17 00:00:00 2001 From: user Date: Tue, 3 Jul 2018 10:49:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=94=B3=E8=AF=B7=EF=BC=8C?= =?UTF-8?q?=E8=87=AA=E7=84=B6=E4=BA=BA=E9=A1=B5=E9=9D=A2=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E6=98=AF=E5=90=A6=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E8=BF=87=E6=98=BE=E7=A4=BA=E7=BA=A2=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessApplication/CustomerInfo.jsp | 23 ++++++++++---- .../businessapply/CustomerInfoCheck.java | 30 +++++++++++++++++++ 2 files changed, 48 insertions(+), 5 deletions(-) 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; + } }