134 lines
4.6 KiB
Plaintext
134 lines
4.6 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
|
<%@page import="jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST"%>
|
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/bankBin.js"></script><%
|
|
/*
|
|
Author: undefined 2017-07-10
|
|
Content: 示例详情页面
|
|
History Log:
|
|
*/
|
|
String projectId = CurPage.getParameter("ProjectId");
|
|
String RightType=CurPage.getParameter("RightType");
|
|
String ishistory=CurPage.getParameter("IsHistory");
|
|
String ApplyType=CurPage.getParameter("ApplyType");
|
|
String CustomerType=CurPage.getParameter("CustomerType");
|
|
String customerId = CurPage.getParameter("customerId");
|
|
String FlowUnid=CurPage.getParameter("FlowUnid");
|
|
String contractId = CurPage.getParameter("ContractId");
|
|
|
|
String sTempletNo = "DebitCardInfoMcontract";//--模板号--
|
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
|
doTemp.setHtmlEvent("acc_number", "onchange", "getNameOfBank");
|
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
|
dwTemp.Style = "2";//freeform
|
|
|
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
|
dwTemp.ReadOnly = "-2";//只读模式
|
|
RightType="ReadOnly";
|
|
isShowButton=false;
|
|
}else{
|
|
isShowButton=true;
|
|
}
|
|
dwTemp.genHTMLObjectWindow(projectId);
|
|
|
|
String sButtons[][] = {
|
|
{"true","","Button","保存","保存所有修改","save()","","","",""}
|
|
} ;
|
|
|
|
sButtonPosition = "north";
|
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
|
<script type="text/javascript">
|
|
//根据选择的用户名选择对应的证件号
|
|
function autoSetCustId(){
|
|
var param1 = "";
|
|
var param2 = "";
|
|
if('AccountChangeApply'=='<%=ApplyType%>'){
|
|
param1 = "selectAccountForChange";
|
|
param2 = "ProjectId,<%=projectId%>,customerType,<%=CustomerType%>,ProjectId,<%=projectId%>,CustomerId,<%=customerId%>";
|
|
}else{
|
|
param1 = "selectAccountByCusts";
|
|
param2 = "flowunid,<%=FlowUnid%>";
|
|
}
|
|
param2=param2+",customerType,"+"<%=CustomerType%>";
|
|
AsDialog.OpenSelector(param1,param2,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
|
if(!sReturn||sReturn=="_CANCEL_"){
|
|
alert(getHtmlMessage('1'));//请选择一条信息!
|
|
return;
|
|
}
|
|
sReturn = sReturn.split("@");
|
|
setItemValue(0,0,'CERTID',sReturn[0]);
|
|
setItemValue(0,0,'ACCOUNT',sReturn[1]);
|
|
setItemValue(0,0,'CUSTTYPE',sReturn[2]);
|
|
setItemValue(0,0,'MOBILE',sReturn[3]);
|
|
},"选择扣款卡名称");
|
|
}
|
|
|
|
|
|
function checkTel(){//校验预留手机号格式
|
|
var mobile = getItemValue(0,getRow(0),"MOBILE");
|
|
if(mobile==""){
|
|
//setErrorTips("mobile","手机号不能为空!");
|
|
// alert("预留手机号不能为空!");
|
|
return true;
|
|
}
|
|
var phone = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/;
|
|
if(phone.test(mobile)){
|
|
setErrorTips("MOBILE","");
|
|
return true;
|
|
}else{
|
|
setErrorTips("MOBILE","手机号格式不正确!");
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
function save(){
|
|
var TelRes=checkTel();
|
|
if(TelRes==false){
|
|
return;
|
|
}
|
|
var number=getItemValue(0, getRow(0), "acc_number");
|
|
var reg = /^(\d{14}|\d{16}|\d{19})$/;
|
|
if(!reg.test(number)){
|
|
setErrorTips("acc_number","银行账号格式错误!");
|
|
return ;
|
|
}
|
|
setErrorTips("acc_number","");
|
|
setItemValue(0,0,"acc_type","Debit");
|
|
var sparams = "account="+getItemValue(0,getRow(),"ACCOUNT")+",acc_number="+getItemValue(0,getRow(),"ACC_NUMBER")+",bank_name="+getItemValue(0,getRow(),"BANK_NAME")+",mobile="+getItemValue(0,getRow(),"MOBILE")+",projectid=<%=projectId%>,FlowUnid=<%=FlowUnid%>,contractid=<%=contractId%>";
|
|
var meassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "IsSignStatus", sparams);
|
|
if("Y"==meassge){
|
|
setItemValue(0,0,"sign_status","Y");
|
|
}else if("N"==meassge){
|
|
setItemValue(0,0,"sign_status","");
|
|
}
|
|
setItemValue(0,0,"ACC_NUMBER",allTrim(getItemValue(0,0,"ACC_NUMBER")));
|
|
|
|
as_save("0","re");
|
|
|
|
}
|
|
function re(){
|
|
var param="CompClientID=<%=sCompClientID%>&FlowUnid=<%=FlowUnid%>&RightType=<%=RightType%>&ishistory=<%=ishistory%>";
|
|
AsControl.OpenView("/Tenwa/Lease/Flow/Comm/LBDebitCard/PaymentCardInfo.jsp",param,"frame_list");
|
|
}
|
|
|
|
function getNameOfBank(){
|
|
var sflag=-1;
|
|
var number = getItemValue(0, getRow(0), "acc_number");
|
|
var cardbin = number.substring(0, 6);
|
|
for (var i=0;i<bankBin.length;i++) {
|
|
if(cardbin==bankBin[i]){
|
|
sflag = i;
|
|
}
|
|
}
|
|
if (sflag != -1) {
|
|
var name=bankName[sflag].substring(0,bankName[sflag].indexOf("·"));
|
|
setItemValue(0,getRow(),"bank_name",name);
|
|
|
|
}
|
|
setErrorTips("acc_number","");
|
|
return true;
|
|
}
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|