根据身份证号判断性别
This commit is contained in:
parent
21714643d2
commit
b2cdaeadbc
@ -39,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","±£´æ","±£´æ","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;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -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");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -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");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user