From b467ea8426bcc716577e0b1f4f3225bd965b8a14 Mon Sep 17 00:00:00 2001 From: zhanglei Date: Fri, 15 Sep 2023 16:20:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A3=8E=E6=8E=A7=E4=B8=AD=E5=8F=B0=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5-=E8=BA=AB=E4=BB=BD=E8=AF=81=E4=B8=8E=E7=94=9F?= =?UTF-8?q?=E6=97=A5=E8=81=94=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LBGuaranteePerUnitInfo.jsp | 22 +++++++++++++++++++ .../CustomerFamilyJoinTempInfo.jsp | 21 +++++++++++++++++- .../CustomerFamilyTempInfo.jsp | 22 +++++++++++++++++-- 3 files changed, 62 insertions(+), 3 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp index e0e86c818..b46fc9b5e 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitInfo.jsp @@ -72,6 +72,7 @@ $("#IDEXPIRY_TYPE_0").prop("checked", "checked"); } changeIdexpiryType(); + birthdayCheck(); }); function changeIdexpiryType(){ @@ -398,7 +399,28 @@ } } checkCertidRepeat(); + birthdayCheck(); } + + function birthdayCheck(){ + //校验证件类型为身份证或临时身份证时,出生日期是否同证件编号中的日期一致 + var certID = getItemValue(0,0,"CERTID"); + var birthday = getItemValue(0,0,"BIRTHDAY"); + if(""!=birthday){ + return; + } + //将身份证中的日期自动赋给出生日期,把身份证中的性别赋给性别 + if(certID.length == 15){ + certID = certID.substring(6,12); + certID = "19"+certID.substring(0,2)+"/"+certID.substring(2,4)+"/"+certID.substring(4,6); + setItemValue(0,0,"BIRTHDAY",certID); + }else if(certID.length == 18){ + certID = certID.substring(6,14); + certID = certID.substring(0,4)+"/"+certID.substring(4,6)+"/"+certID.substring(6,8); + setItemValue(0,0,"BIRTHDAY",certID); + } + } + function checkCertidRepeat(){ var certtype = getItemValue(0,getRow(),"CERTTYPE"); if("Ind01"==certtype){ diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp index f400f943c..8f73b2ba4 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp @@ -108,7 +108,7 @@ $("#IDEXPIRY_TYPE_0").prop("checked", "checked"); } changeIdexpiryType(); - + birthdayCheck(); }); function changeIdexpiryType(){ @@ -443,6 +443,25 @@ } checkCertidRepeat(); + birthdayCheck(); + } + function birthdayCheck(){ + var birthday = getItemValue(0,0,"BIRTHDAY"); + if(""!=birthday){ + return; + } + //校验证件类型为身份证或临时身份证时,出生日期是否同证件编号中的日期一致 + var certID = getItemValue(0,0,"CERTID"); + //将身份证中的日期自动赋给出生日期,把身份证中的性别赋给性别 + if(certID.length == 15){ + certID = certID.substring(6,12); + certID = "19"+certID.substring(0,2)+"/"+certID.substring(2,4)+"/"+certID.substring(4,6); + setItemValue(0,0,"BIRTHDAY",certID); + }else if(certID.length == 18){ + certID = certID.substring(6,14); + certID = certID.substring(0,4)+"/"+certID.substring(4,6)+"/"+certID.substring(6,8); + setItemValue(0,0,"BIRTHDAY",certID); + } } //选择证件类型后,如果证件号不为空,则去判断性别 function checkCertidSex(){ diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp index 821921b69..63c8ba304 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp @@ -79,9 +79,26 @@ setItemValue(0,0,"Partner_","N"); } changePartner(); - + birthdayCheck(); }); - + function birthdayCheck(){ + var birthday = getItemValue(0,0,"BIRTHDAY"); + if(""!=birthday){ + return; + } + //校验证件类型为身份证或临时身份证时,出生日期是否同证件编号中的日期一致 + var certID = getItemValue(0,0,"CERTID"); + //将身份证中的日期自动赋给出生日期,把身份证中的性别赋给性别 + if(certID.length == 15){ + certID = certID.substring(6,12); + certID = "19"+certID.substring(0,2)+"/"+certID.substring(2,4)+"/"+certID.substring(4,6); + setItemValue(0,0,"BIRTHDAY",certID); + }else if(certID.length == 18){ + certID = certID.substring(6,14); + certID = certID.substring(0,4)+"/"+certID.substring(4,6)+"/"+certID.substring(6,8); + setItemValue(0,0,"BIRTHDAY",certID); + } + } function changeIdexpiryType(){ var idexpiry_type = getItemValue(0,0,"IDEXPIRY_TYPE"); @@ -560,6 +577,7 @@ setItemValue(0,getRow(),"SEX","1"); } checkCertidRepeat(); + birthdayCheck(); } function checkCertidRepeat(){