业务申请,自然人页面姓名和证件号字段校验显示红色字提示
This commit is contained in:
parent
2be01ebf41
commit
139394098a
@ -83,7 +83,39 @@
|
||||
setItemValue(0,0,"CERTTYPE","Ind01");
|
||||
}
|
||||
|
||||
function checkName(){
|
||||
var customerType = "03";
|
||||
var customerName = getItemValue(0,getRow(),"FULLNAME");
|
||||
//var certId = getItemValue(0,getRow(),"certid");
|
||||
//var sParams = "CustomerName="+customerName+",certId="+certId+",customerType="+customerType;
|
||||
var sParams = "CustomerName="+customerName+",customerType="+customerType;
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkName",sParams);
|
||||
return sReturnInfo;
|
||||
}
|
||||
|
||||
function checkCertId(){
|
||||
var customerType = "03";
|
||||
//var customerName = getItemValue(0,getRow(),"CustomerName");
|
||||
var certId = getItemValue(0,getRow(),"CERTID");
|
||||
//var sParams = "CustomerName="+customerName+",certId="+certId+",customerType="+customerType;
|
||||
var sParams = "certId="+certId+",customerType="+customerType;
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkCertId",sParams);
|
||||
return sReturnInfo;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
if("0020"!="<%=sPhaseNo%>"){
|
||||
$("#ButtonTR").attr("style","display:none;");
|
||||
//$("#InfoButtonArea").attr("style","display:none;");
|
||||
|
||||
@ -1,50 +1,75 @@
|
||||
package com.tenwa.lease.flow.project.businessapply;
|
||||
|
||||
import jbo.app.tenwa.customer.CUSTOMER_CERT;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_COMPANY;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_COMPANY_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_PERSON;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.flow.baseBussion.BaseBussiness;
|
||||
|
||||
public class CustomerInfoCheck {
|
||||
|
||||
//private String CustomerName;
|
||||
private String CustomerName;
|
||||
private String certId;
|
||||
private String customerType;
|
||||
private String result;
|
||||
private String nameResult;
|
||||
private String certResult;
|
||||
|
||||
public String checkNameAndCertId(JBOTransaction tx) throws JBOException{
|
||||
public String checkName(JBOTransaction tx) throws JBOException{
|
||||
if(customerType.equals("03")){//×ÔÈ»ÈË
|
||||
//BizObject fullname = JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"FULLNAME=:CustomerName").setParameter("CustomerName", this.CustomerName).getSingleResult(false);
|
||||
BizObject cert=JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"CERTID=:certid").setParameter("certid", this.certId).getSingleResult(false);
|
||||
if(cert==null){
|
||||
this.result = "1";
|
||||
BizObject fullname = JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"FULLNAME=:CustomerName").setParameter("CustomerName", this.CustomerName).getSingleResult(false);
|
||||
if(fullname==null){
|
||||
this.nameResult = "1";
|
||||
}else{
|
||||
this.result = "2";
|
||||
this.nameResult = "2";
|
||||
}
|
||||
}else if(customerType.equals("01")){//·¨ÈË
|
||||
//BizObject enterprisename = JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"FULLNAME=:CustomerName").setParameter("CustomerName", this.CustomerName).getSingleResult(false);
|
||||
BizObject cert=JBOFactory.createBizObjectQuery(CUSTOMER_COMPANY_TEMP.CLASS_NAME,"certid=:certid").setParameter("certid", this.certId).getSingleResult(false);
|
||||
if(cert==null){
|
||||
this.result = "1";
|
||||
BizObject enterprisename = JBOFactory.createBizObjectQuery(CUSTOMER_COMPANY_TEMP.CLASS_NAME,"enterprisename=:CustomerName").setParameter("CustomerName", this.CustomerName).getSingleResult(false);
|
||||
if(enterprisename==null){
|
||||
this.nameResult = "1";
|
||||
}else{
|
||||
this.result = "2";
|
||||
this.nameResult = "2";
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return nameResult;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
public String checkCertId(JBOTransaction tx) throws JBOException{
|
||||
if(customerType.equals("03")){//×ÔÈ»ÈË
|
||||
BizObject cert=JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"CERTID=:certid").setParameter("certid", this.certId).getSingleResult(false);
|
||||
if(cert==null){
|
||||
this.certResult = "3";
|
||||
}else{
|
||||
this.certResult = "4";
|
||||
}
|
||||
}else if(customerType.equals("01")){//·¨ÈË
|
||||
BizObject cert=JBOFactory.createBizObjectQuery(CUSTOMER_COMPANY_TEMP.CLASS_NAME,"certid=:certid").setParameter("certid", this.certId).getSingleResult(false);
|
||||
if(cert==null){
|
||||
this.certResult = "3";
|
||||
}else{
|
||||
this.certResult = "4";
|
||||
}
|
||||
}
|
||||
return certResult;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
public String getCustomerName() {
|
||||
return CustomerName;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName) {
|
||||
CustomerName = customerName;
|
||||
}
|
||||
|
||||
public String getCertId() {
|
||||
return certId;
|
||||
}
|
||||
|
||||
public void setCertId(String certId) {
|
||||
this.certId = certId;
|
||||
}
|
||||
|
||||
public String getCustomerType() {
|
||||
@ -55,20 +80,20 @@ public class CustomerInfoCheck {
|
||||
this.customerType = customerType;
|
||||
}
|
||||
|
||||
// public String getCustomerName() {
|
||||
// return CustomerName;
|
||||
// }
|
||||
//
|
||||
// public void setCustomerName(String customerName) {
|
||||
// CustomerName = customerName;
|
||||
// }
|
||||
|
||||
public String getCertId() {
|
||||
return certId;
|
||||
public String getNameResult() {
|
||||
return nameResult;
|
||||
}
|
||||
|
||||
public void setCertId(String certId) {
|
||||
this.certId = certId;
|
||||
public void setNameResult(String nameResult) {
|
||||
this.nameResult = nameResult;
|
||||
}
|
||||
|
||||
public String getCertResult() {
|
||||
return certResult;
|
||||
}
|
||||
|
||||
public void setCertResult(String certResult) {
|
||||
this.certResult = certResult;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user