144 lines
4.4 KiB
Plaintext

<%@page import="com.tenwa.reckon.util.UUIDUtil"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2018-06-18
Content: 示例详情页面
History Log:
*/
String sFlowUnid = CurPage.getParameter("FlowUnid");
System.out.print(sFlowUnid);
String sPrevUrl = CurPage.getParameter("PrevUrl");
String RightType= CurPage.getParameter("RightType");
String ProjectId= CurPage.getParameter("ProjectId");
String id = CurPage.getParameter("ID");
System.out.print(id);
String userOrgId = CurUser.getOrgID();
String userId = CurUser.getUserID();
String customerid = UUIDUtil.getUUID();
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "GuarantorInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
// doTemp.setDefaultValue("ASSUROR", customerid);
doTemp.setDefaultValue("project_id", ProjectId);
doTemp.setDefaultValue("flowunid", sFlowUnid);
doTemp.setHtmlEvent("MOBILE","onChange","checkMobileRepeat");
// doTemp.setDefaultValue("DATA_STATE", "guarantee");//标记该数据是担保人信息
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(id);
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","save()","","","",""},
{"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return"},
};
sButtonPosition = "north";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function checkCertId(){//校验担保人证件号格式
var certType = getItemValue(0,getRow(0),"CERTTYPE");
var certId = getItemValue(0,getRow(0),"CERTID");
if(certType==""){
//setErrorTips("certType","证件类型不能为空!");
alert("证件类型不能为空!");
return false;
}
if(certId==""){
//setErrorTips("certId","证件号不能为空!");
alert("证件号不能为空!");
return false;
}
if(certType=="Ent02"){
if(checkORGRight1(certId)){
return true;
}else{
//setErrorTips("certId","组织机构代码格式不正确!");
alert("组织机构代码格式不正确!");
return false;
}
}
if(certType=="Ind01"){
if(CheckLicense(certId)){
return true;
}else{
//setErrorTips("certId","身份证格式不正确!");
alert("身份证格式不正确!");
return false;
}
}
if(certType=="Ent03"){
return true;
}
}
function checkTel(){//校验担保人手机号格式
var mobile = getItemValue(0,getRow(0),"mobile");
if(mobile==""){
//setErrorTips("mobile","手机号不能为空!");
alert("手机号不能为空!");
return false;
}
if(CheckPhoneCode(mobile)){
return true;
}else{
//setErrorTips("mobile","手机号格式不正确!");
alert("手机号格式不正确!");
return false;
}
}
function checkWorkTel(){//校验担保人单位电话格式
var workTel = getItemValue(0,getRow(0),"WORKTEL");
if(workTel==""){
//setErrorTips("WORKTEL","单位电话不能为空!");
alert("单位电话不能为空!");
return false;
}
if(CheckPhoneCode(workTel)){
return true;
}else{
//setErrorTips("WORKTEL","单位电话格式不正确!");
alert("单位电话格式不正确!");
return false;
}
}
function checkMobileRepeat(){//校验担保人手机号重复
var customerType = "03";
var mobile = getItemValue(0,getRow(),"MOBILE");
var sParams = "mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=sFlowUnid%>";
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobileRepeat",sParams);
if(sReturnInfo=="8"){
alert("该手机号已重复!");
setItemValue(0,0,"MOBILE","");
return;
}
}
function save(){
var CertIdResult = checkCertId();
if(CertIdResult==false){
return;
}
var TelResult = checkTel();
if(TelResult==false){
return;
}
var WorkTelResult = checkWorkTel();
if(WorkTelResult==false){
return;
}
as_save(0,"goBack()");
}
function goBack(){
//要跳转的url
var url="/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitList.jsp";
var sparam="FlowUnid="+getItemValue(0,0,"FLOWUNID")+"&ProjectId="+getItemValue(0,0,"project_id")+"&RightType="+'<%=RightType%>';
AsControl.OpenView(url,sparam,"_self","");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>