197 lines
7.3 KiB
Plaintext
197 lines
7.3 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 userId = CurUser.getUserID();
|
|
String orgId = CurUser.getOrgID();
|
|
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 subjectId=CurPage.getParameter("SubjectId");//获取主体信息,用于是否签约查询
|
|
String flowNo=CurPage.getParameter("FlowNo");//获取流程编号
|
|
|
|
String sTempletNo = "DebitCardInfoMcontract";//--模板号--
|
|
if("AccountChangeFlow".equals(flowNo)){//如果是扣款卡信息变更流程,则用跟业务申请的模板临时表
|
|
sTempletNo = "DebitCardInfo";
|
|
}
|
|
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;
|
|
}
|
|
if("AccountChangeFlow".equals(flowNo)){//如果是扣款卡信息变更流程,则用跟业务申请的模板临时表
|
|
dwTemp.genHTMLObjectWindow(FlowUnid);
|
|
}else{
|
|
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 fileMeassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "isEntrustFile", "FlowUnid="+"<%=FlowUnid%>"+",contractid="+"<%=contractId%>");
|
|
if("success" != fileMeassge){
|
|
alert(fileMeassge);
|
|
return ;
|
|
}
|
|
var TelRes=checkTel();
|
|
if(TelRes==false){
|
|
return;
|
|
}
|
|
var number=getItemValue(0, getRow(0), "acc_number");
|
|
var reg = /^(\d{14}|\d{16}|\d{18}|\d{19})$/;
|
|
if(!reg.test(number)){
|
|
setErrorTips("acc_number","银行账号格式错误!");
|
|
return ;
|
|
}
|
|
setErrorTips("acc_number","");
|
|
setItemValue(0,0,"acc_type","Debit");
|
|
|
|
//查询该申请号的扣款卡是否签约,如果已签约将对应的数据存入对应的记录表中
|
|
RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkAccountSignStatus", "projectid=<%=projectId%>,userId=<%=userId%>,orgId=<%=orgId%>,applyType=<%=ApplyType%>");
|
|
|
|
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%>,certId="+getItemValue(0,getRow(),"CERTID")+",applyType=<%=ApplyType%>,subjectId=<%=subjectId%>,collect_type="+getItemValue(0,getRow(),"collect_type");
|
|
var meassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkSign", sparams);
|
|
if("Y"==meassge){
|
|
setItemValue(0,0,"sign_status","Y");
|
|
}else if("N"==meassge){
|
|
setItemValue(0,0,"sign_status","");
|
|
}else {
|
|
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;
|
|
}
|
|
}
|
|
var bool = true;
|
|
if (sflag != -1) {
|
|
var name=bankName[sflag].substring(0,bankName[sflag].indexOf("·"));
|
|
if(name.indexOf("邮储") != -1 || name.indexOf("邮政") != -1){
|
|
name = "邮政银行";
|
|
}
|
|
var res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "selectBankName", "bank_name="+name);
|
|
if("error"!= res){
|
|
res = res.split("@");
|
|
var bankCode = getItemValue(0, 0, "bank_code");
|
|
setItemValue(0,0,'bank_code',res[0]);
|
|
setItemValue(0,0,'bank_type',res[1]);
|
|
setItemValue(0,0,"bank_name",res[1]);
|
|
if("<%=subjectId%>"=="aa740e4111c111eaaa0000163e0e11e6"){//深圳主体都是广州银联
|
|
setItemValue(0,0,"collect_type","YLcollect");
|
|
}else{
|
|
setItemValue(0,0,"collect_type",res[2]);
|
|
}
|
|
bool = false;
|
|
}
|
|
|
|
}
|
|
if(bool){
|
|
setItemValue(0,0,'bank_code','');
|
|
setItemValue(0,0,'bank_type','');
|
|
setItemValue(0,0,"bank_name",'');
|
|
setItemValue(0,0,"collect_type",'');
|
|
}
|
|
setErrorTips("acc_number","");
|
|
return true;
|
|
}
|
|
|
|
function selectBankType(){
|
|
AsDialog.OpenSelector("selectBankType","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
|
if(!sReturn||sReturn=="_CANCEL_"){
|
|
return;
|
|
}
|
|
sReturn = sReturn.split("@");
|
|
setItemValue(0,0,'bank_code',sReturn[0]);
|
|
setItemValue(0,0,'bank_type',sReturn[1]);
|
|
setItemValue(0,0,"bank_name",sReturn[1]);
|
|
if("<%=subjectId%>"=="aa740e4111c111eaaa0000163e0e11e6"){//深圳主体都是广州银联
|
|
setItemValue(0,0,"collect_type","YLcollect");
|
|
}else{
|
|
setItemValue(0,0,"collect_type",sReturn[2]);
|
|
}
|
|
},"选择银行名称");
|
|
}
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|