申请人和配偶性别不能一致。添加报单人和报单人电话
This commit is contained in:
parent
7aa42dd3c5
commit
e45b8c3390
@ -19,6 +19,7 @@
|
||||
String custype = CurPage.getParameter("CustomerType");
|
||||
String customertype = CurPage.getParameter("customertype");
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setHtmlEvent("inputTel","onChange","checkTel");
|
||||
//×âÁÞÐÎʽsetÖ»¶Á
|
||||
if((null!=sPhaseNo&&sPhaseNo.equals("0010")) && ("BusinessApplyFlow".equals(FlowNo) ||"BusinessChangeFlow".equals(FlowNo))){
|
||||
doTemp.setReadOnly("LEAS_FORM", true);
|
||||
@ -38,7 +39,7 @@
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid"));
|
||||
dwTemp.replaceColumn("customer_info", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"500px\" frameborder=\"0\" src=\""+sWebRootPath+userll+compClientID+"&sPhaseNo="+sPhaseNo+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
String sButtons[][] = {
|
||||
{"ReadOnly".equals(rightType)?"false":"true","","Button","±£´æ","±£´æ","save()","","","","btn_icon_saveNew",""}
|
||||
{"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","saves()","","","","btn_icon_saveNew",""}
|
||||
};
|
||||
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
@ -51,6 +52,12 @@
|
||||
$(".info_td_left").css("width","150px");
|
||||
$(".info_mid_line").css("width","50%");
|
||||
})
|
||||
function saves(){
|
||||
if(!checkTel()){
|
||||
return ;
|
||||
}
|
||||
as_save("0","save();");
|
||||
}
|
||||
function save(){
|
||||
var leasfrom = getItemValue(0,getRow(),"LEAS_FORM");
|
||||
var projectSource = getItemValue(0,getRow(),"PROJECT_SOURCE");
|
||||
@ -64,5 +71,20 @@
|
||||
//as_save("myiframe0","frame_list.window.as_save(0);");
|
||||
}
|
||||
}
|
||||
|
||||
function checkTel(){//校验手机号格式和不为空校验
|
||||
var mobile = getItemValue(0,getRow(0),"inputTel");
|
||||
if(mobile==""){
|
||||
setErrorTips("inputTel","手机号不能为空!");
|
||||
return false;
|
||||
}
|
||||
if(CheckPhoneCode(mobile)){
|
||||
setErrorTips("inputTel","");
|
||||
return true;
|
||||
}else{
|
||||
setErrorTips("inputTel","报单人电话格式不正确!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -7,6 +7,7 @@
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
String customerType = CurPage.getParameter("CustomerType");
|
||||
String ProjectId = CurPage.getParameter("ProjectId");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
@ -126,7 +127,26 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function checkSex(){
|
||||
var sexw = getItemValue(0,0,"sex");
|
||||
var spouse = getItemValue(0,0,"Spouse_");
|
||||
if("Y"==spouse){
|
||||
if("<%=customerType%>"=="03"){
|
||||
var sParams ="flowunid="+"<%=FlowUnid%>";
|
||||
var message = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkSex",sParams);
|
||||
if("error"==message){
|
||||
alert("请先填写承租人性别!!");
|
||||
return false;
|
||||
}else{
|
||||
if(sexw==message){
|
||||
alert("承租人和配偶性别不能一致!!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function newRecord(){//新增
|
||||
var name = getItemValue(0,0,"name");
|
||||
var certid = getItemValue(0,0,"certid");
|
||||
@ -172,6 +192,9 @@
|
||||
if(falgs==false){
|
||||
return;
|
||||
}
|
||||
if(!checkSex()){
|
||||
return;
|
||||
}
|
||||
/*var ID = getItemValue(0,getRow(0),'ID');
|
||||
if("undefined"==ID||""==ID || null==ID){
|
||||
AsDebug.showMessage("提示","请选中一条数据!","","",true);
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setHtmlEvent("Partner_","onChange","changePartner");
|
||||
doTemp.setHtmlEvent("tel","onChange","checkTelRepeat");
|
||||
doTemp.setHtmlEvent("sex","onChange","checkSex");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
@ -78,6 +79,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
function checkSex(){
|
||||
var status = getItemValue(0,getRow(),"status");
|
||||
if("01"==status){
|
||||
var parentSex= getItemValue(0,getRow(),"parentSex");
|
||||
var sex = getItemValue(0,getRow(),"sex");
|
||||
if(""==parentSex){
|
||||
alert("请选择承租人性别!!");
|
||||
return false;
|
||||
}else if (parentSex==sex){
|
||||
alert("申请人和配偶性别不能一致!!!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function setParent(sexStatus){
|
||||
setItemValue(0,0,"parentSex",sexStatus);//把父页面承租人的性别带过来
|
||||
}
|
||||
// function checkRepeat(mobile,emergencyTel,remark){//校验申请人页面三个手机号和配偶手机号是否重复
|
||||
// var tel = getItemValue(0,getRow(),"tel");
|
||||
// if(mobile!=emergencyTel && mobile!=remark && mobile!=tel && emergencyTel!=remark && emergencyTel!=tel && remark!=tel){
|
||||
@ -209,6 +229,9 @@
|
||||
alert("请选择性别!");
|
||||
return;
|
||||
}
|
||||
if(!checkSex()){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(name.length > 0){
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
doTemp.setHtmlEvent("CERTID","onChange","changeCertid");
|
||||
//doTemp.setHtmlEvent("MARRIAGE","onChange","changeFamilyRequired");
|
||||
doTemp.setHtmlEvent("MARRIAGE","onChange","changeChildrensNumber");
|
||||
doTemp.setHtmlEvent("sex","onChange","changeSex");
|
||||
doTemp.setHtmlEvent("Mailing_Address","onChange","checkMailingAddress");
|
||||
//doTemp.setHtmlEvent("mobile","onChange","checkMobileRepeat");
|
||||
//doTemp.setHtmlEvent("EMERGENCY_CONTACT_TEL","onChange","checkEmergencyRepeat");
|
||||
@ -95,7 +96,12 @@
|
||||
frame_list.window.changeFamilyRequiredFalse(marriage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function changeSex(){
|
||||
var sex = getItemValue(0,getRow(0),"sex");
|
||||
frame_list.window.setParent(sex);
|
||||
}
|
||||
|
||||
if(getItemValue(0,0,"CERTTYPE") == null || getItemValue(0,0,"CERTTYPE") == ""){
|
||||
setItemValue(0,0,"CERTTYPE","Ind01");
|
||||
}
|
||||
@ -252,7 +258,9 @@
|
||||
}
|
||||
frame_list.window.onload = function(){//当页面加载完后调用子页面方法,不能去掉
|
||||
changeChildrensNumber();
|
||||
changeSex();
|
||||
}
|
||||
|
||||
})
|
||||
var flag=false;//标记是否复制过客户
|
||||
function changeCertid(){
|
||||
@ -592,13 +600,10 @@
|
||||
setItemValue(0,getRow(),"BIRTHDAY",certID);
|
||||
if(sex%2==0){//奇男偶女
|
||||
setItemValue(0,getRow(),"SEX","2");
|
||||
|
||||
|
||||
}else{
|
||||
}else{
|
||||
setItemValue(0,getRow(),"SEX","1");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT;
|
||||
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
@ -140,6 +141,20 @@ public class CustomerInfoCheck {
|
||||
return mobileResult;
|
||||
}
|
||||
|
||||
public String checkSex(JBOTransaction tx) throws Exception{
|
||||
BizObjectManager cptMange = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME, tx);
|
||||
BizObject cpt = cptMange.createQuery("flowunid =:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
|
||||
if(cpt!=null){
|
||||
String sex = cpt.getAttribute("sex").getString();
|
||||
if(sex.length()==0){
|
||||
return "error";
|
||||
}else{
|
||||
return sex;
|
||||
}
|
||||
}
|
||||
return "error";
|
||||
}
|
||||
|
||||
public String getFlowunid() {
|
||||
return flowunid;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user