diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp index 70f3e7d4e..05f5c3d4e 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp @@ -118,31 +118,37 @@ function checkTel(){//校验担保人手机号格式 var mobile = getItemValue(0,getRow(0),"mobile"); + //var certid = getItemValue(0,getRow(),"CERTID"); if(mobile==""){ //setErrorTips("mobile","手机号不能为空!"); -// alert("手机号不能为空!"); + //alert("手机号不能为空!"); return true; } - var phone = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/; - if(phone.test(mobile)){ - var customerType = "03"; - var id = getItemValue(0,getRow(),"id"); - var sParams = "certId="+id+",mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=sFlowUnid%>"; - var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobileRepeat",sParams); - if("SUCCESS"!=sReturnInfo){ - //setErrorTips("tel","该手机号已重复!"); - setErrorTips("mobile",sReturnInfo); - //alert("该手机号已重复!"); - return false; + // 判断担保人是否配偶, 配偶不做手机号校验 + //var params1="certid="+certid+",flowunid="+"<%=sFlowUnid%>"; + //var returns = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkYesOrNoSpouse",params1); + //if("true"==returns){ + var phone = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/; + if(phone.test(mobile)){ + var customerType = "03"; + var id = getItemValue(0,getRow(),"id"); + var sParams = "certId="+id+",mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=sFlowUnid%>"; + var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobileRepeat",sParams); + if("SUCCESS"!=sReturnInfo){ + //setErrorTips("tel","该手机号已重复!"); + setErrorTips("mobile",sReturnInfo); + //alert("该手机号已重复!"); + return false; + }else{ + setErrorTips("mobile",""); + return true; + } }else{ - setErrorTips("mobile",""); - return true; + setErrorTips("mobile","手机号格式不正确!"); + //alert("手机号格式不正确!"); + return false; } - }else{ - setErrorTips("mobile","手机号格式不正确!"); - //alert("手机号格式不正确!"); - return false; - } + //} /* if(CheckPhoneCode(mobile)){ return true; 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 9278fcaa7..4a4963eab 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoCheck.java @@ -184,7 +184,8 @@ public class CustomerInfoCheck { if(mobileFTSpouse!=null){ String id = mobileFTSpouse.getAttribute("ID").getString(); if(!id.equals(certId)){ - return "手机号跟配偶人手机号重复!"; + //return "手机号跟配偶人手机号重复!"; + return "SUCCESS"; } } } @@ -266,7 +267,8 @@ public class CustomerInfoCheck { }else if("Y".equals(cft.getAttribute("Spouse_").getString())){ BizObject cptP = cptManage.createQuery("flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); if(cptP.getAttribute("MARRIAGE").getString().equals("01")){ - return "该身份证已跟配偶身份证重复"; + //return "该身份证已跟配偶身份证重复"; + return "success"; } }else{ return "该身份证已跟共同申请人身份证重复"; @@ -282,6 +284,16 @@ public class CustomerInfoCheck { } return "success"; } + //如果是配有, 不校验手机号信息 + /*public String checkYesOrNoSpouse(JBOTransaction tx) throws Exception{ + String returns="true"; + BizObjectManager cftManage = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY_TEMP.CLASS_NAME, tx); + BizObject cft = cftManage.createQuery("flowunid=:flowunid and CERTID=:certid and relative=:relative").setParameter("flowunid", flowunid).setParameter("certid",certid).setParameter("relative","01").getSingleResult(false); + if(cft!=null || !"".equals(cft)){ + returns= "false"; + } + return returns; + }*/ public String getFlowunid() { return flowunid;