From b2cdaeadbc7e135e5a911e877233d82b2b392a8e Mon Sep 17 00:00:00 2001 From: tangfutang Date: Mon, 13 Aug 2018 19:31:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=BA=AB=E4=BB=BD=E8=AF=81?= =?UTF-8?q?=E5=8F=B7=E5=88=A4=E6=96=AD=E6=80=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessProjectTempInfo.jsp | 25 ++++++++++++++----- .../CustomerFamilyJoinTempInfo.jsp | 13 ++++++++++ .../CustomerFamilyTempInfo.jsp | 12 +++++++++ .../BusinessApplication/CustomerInfo.jsp | 13 +++++----- .../businessapply/CustomerInfoManage.java | 19 ++++++++++++++ 5 files changed, 70 insertions(+), 12 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp index 591c17634..81668be53 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/BusinessProjectTempInfo.jsp @@ -39,7 +39,7 @@ dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid")); dwTemp.replaceColumn("customer_info", "", CurPage.getObjectWindowOutput()); String sButtons[][] = { - {"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","saves()","","","","btn_icon_saveNew",""} + {"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存","save()","","","","btn_icon_saveNew",""} }; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> @@ -52,22 +52,24 @@ $(".info_td_left").css("width","150px"); $(".info_mid_line").css("width","50%"); }) - function saves(){ + function save(){ + if(!checkinputName()){ + return; + } if(!checkTel()){ return ; } - as_save("0","save();"); - } - function save(){ var leasfrom = getItemValue(0,getRow(),"LEAS_FORM"); var projectSource = getItemValue(0,getRow(),"PROJECT_SOURCE"); + var inputName = getItemValue(0,getRow(),"inputName"); + var inputTel = getItemValue(0,getRow(),"inputTel"); var customerType = "<%=custype%>"; if(customerType=="01"){//法人 as_save("myiframe0","frame_list.window.as_save(0);"); //as_save(0); } if(customerType=="03"){//自然人 - frame_list.window.saveRecord(leasfrom,projectSource); + frame_list.window.saveRecord(leasfrom,projectSource,inputName,inputTel); //as_save("myiframe0","frame_list.window.as_save(0);"); } } @@ -86,5 +88,16 @@ return false; } } + + function checkinputName(){ + var inputName = getItemValue(0,getRow(0),"inputName"); + if(inputName==""){ + setErrorTips("inputName","报单人不能为空!"); + return false; + }else{ + setErrorTips("inputName",""); + return true; + } + } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp index f5ac244b3..a8ae0f3be 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp @@ -18,6 +18,7 @@ doTemp.setHtmlEvent("tel","onChange","checkTelRepeat"); doTemp.setHtmlEvent("certId","onChange","checkCertId"); doTemp.setHtmlEvent("suphone","onChange","checkSuphone"); + doTemp.setHtmlEvent("certid","onChange","ValidityCheck"); ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); dwTemp.Style = "2";//freeform //dwTemp.ReadOnly = "-2";//只读模式 @@ -226,5 +227,17 @@ function returnList(){ AsControl.OpenView("<%=sPrevUrl%>", "","_self",""); } + + //根据身份证号判断性别 + function ValidityCheck(){ + var certID = getItemValue(0,getRow(),"CERTID"); + sex = certID.substring(16,17); + sex = parseInt(sex); + if(sex%2==0){//奇男偶女 + setItemValue(0,getRow(),"SEX","2"); + }else{ + setItemValue(0,getRow(),"SEX","1"); + } + } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp index 1315b2e21..9a876d6c9 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyTempInfo.jsp @@ -17,6 +17,7 @@ doTemp.setHtmlEvent("Partner_","onChange","changePartner"); doTemp.setHtmlEvent("tel","onChange","checkTelRepeat"); doTemp.setHtmlEvent("sex","onChange","checkSex"); + doTemp.setHtmlEvent("certid","onChange","ValidityCheck"); ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); dwTemp.Style = "2";//freeform //dwTemp.ReadOnly = "-2";//只读模式 @@ -304,5 +305,16 @@ } return true; } + //根据身份证号判断性别 + function ValidityCheck(){ + var certID = getItemValue(0,getRow(),"CERTID"); + sex = certID.substring(16,17); + sex = parseInt(sex); + if(sex%2==0){//奇男偶女 + setItemValue(0,getRow(),"SEX","2"); + }else{ + setItemValue(0,getRow(),"SEX","1"); + } + } <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp index 1b2024cec..0fdcbbc7d 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp @@ -254,8 +254,8 @@ $("#WORKTEL")[0].width = $("#WORKTEL").parent().parent().parent()[0].clientWidth/2+200; if("ReadOnly" != "<%=rightType%>"){ checkDriver(); - //ValidityCheck(); } + ValidityCheck(); frame_list.window.onload = function(){//当页面加载完后调用子页面方法,不能去掉 changeChildrensNumber(); changeSex(); @@ -386,7 +386,7 @@ } */ } - function saveRecord(leasfrom,projectSource){//保存 + function saveRecord(leasfrom,projectSource,inputName,inputTel){//保存 var mobile = getItemValue(0,getRow(),"mobile"); var emergencyTel = getItemValue(0,getRow(),"EMERGENCY_CONTACT_TEL"); var remark = getItemValue(0,getRow(),"REMARK"); @@ -440,15 +440,16 @@ var certid=getItemValue(0,0,"CERTID"); <%-- var customerid=RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerAction","updateCustomerId",'certid='+certid+',flowunid=<%=flowunid%>'); --%> // setItemValue(0,0,"customerid",customerid); - as_save("0","saveCertInfo("+leasfrom+",'"+projectSource+"')"); + as_save("0","saveCertInfo('"+inputName+"','"+inputTel+"','"+leasfrom+"','"+projectSource+"')"); + return true; }; } - function saveCertInfo(leasfrom,projectSource){ + function saveCertInfo(inputName,inputTel,leasfrom,projectSource){ - var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCertInfo",'project_source='+projectSource+',leas_from='+leasfrom+',idexpiry='+getItemValue(0,0,"idexpiry")+',certtype='+getItemValue(0,0,"certtype")+',customerid='+getItemValue(0,0,"customerid")+',flowunid=<%=flowunid%>,certid='+getItemValue(0,0,"certid")+',name='+getItemValue(0,0,"name")+',userid=<%=CurUser.getUserID()%>,orgid=<%=CurUser.getOrgID()%>'); + var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCertInfo",'inputName='+inputName+',inputTel='+inputTel+',project_source='+projectSource+',leas_from='+leasfrom+',idexpiry='+getItemValue(0,0,"idexpiry")+',certtype='+getItemValue(0,0,"certtype")+',customerid='+getItemValue(0,0,"customerid")+',flowunid=<%=flowunid%>,certid='+getItemValue(0,0,"certid")+',name='+getItemValue(0,0,"name")+',userid=<%=CurUser.getUserID()%>,orgid=<%=CurUser.getOrgID()%>'); if(sResult == "SUCCESS"){ - reloadSelf(); + parent.reloadSelf(); } } diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java index 1b7caa20f..635012f7b 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerInfoManage.java @@ -44,6 +44,8 @@ public class CustomerInfoManage { private String projectId; private String workunit; private String sex; + private String inputName; + private String inputTel; public String getF_I_TYPE() { return F_I_TYPE; @@ -234,6 +236,21 @@ public class CustomerInfoManage { public void setSex(String sex) { this.sex = sex; } + public String getInputName() { + return inputName; + } + + public void setInputName(String inputName) { + this.inputName = inputName; + } + + public String getInputTel() { + return inputTel; + } + + public void setInputTel(String inputTel) { + this.inputTel = inputTel; + } public String saveCustomerFamilyFormal(JBOTransaction tx){ try{ @@ -346,6 +363,8 @@ public class CustomerInfoManage { proj.setAttributeValue("LEAS_FORM", lesa); proj.setAttributeValue("PROJECT_SOURCE", projectSource); proj.setAttributeValue("PROJECT_NAME", projName + "-" + fullname); + proj.setAttributeValue("inputName", inputName); + proj.setAttributeValue("inputTel", inputTel); } //update 项目名称 if(buss != null){