193 lines
7.0 KiB
Plaintext
193 lines
7.0 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
|
<%@ 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 sPrevUrl = CurPage.getParameter("PrevUrl");
|
|
if(sPrevUrl == null) sPrevUrl = "";
|
|
String RightType=CurPage.getParameter("RightType");
|
|
String ishistory=CurPage.getParameter("IsHistory");
|
|
String FlowUnid=CurPage.getParameter("FlowUnid");
|
|
|
|
/* System.out.print("\n\n\n\t--FlowUnid "+FlowUnid+"\t\n\n\n"); */
|
|
String sTempletNo = "DebitCardInfo";//--模板号--
|
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
|
//doTemp.setColTips("", "测试");
|
|
doTemp.setHtmlEvent("acc_number", "onchange", "getNameOfBank");
|
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
|
dwTemp.Style = "2";//freeform
|
|
//dwTemp.ReadOnly = "-2";//只读模式
|
|
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
|
|
dwTemp.ReadOnly = "-2";//只读模式
|
|
RightType="ReadOnly";
|
|
isShowButton=false;
|
|
}else{
|
|
isShowButton=true;
|
|
}
|
|
|
|
dwTemp.genHTMLObjectWindow(FlowUnid);
|
|
dwTemp.replaceColumn("PaymentCard", "<iframe type='iframe' name=\"frame_list\" width=\"100%\" height=\"120\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBDebitCard/PaymentCardInfo.jsp?FlowUnid="+FlowUnid+"&RightType="+RightType+"&ishistory="+ishistory+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
|
|
dwTemp.replaceColumn("S_PaymentCard", "<iframe type='iframe' name=\"frame_lists\" width=\"100%\" height=\"250\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBDebitCard/S_PaymentCardInfo.jsp?FlowUnid="+FlowUnid+"&RightType="+RightType+"&ishistory="+ishistory+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
|
|
|
|
String sButtons[][] = {
|
|
{"true","","Button","保存","保存所有修改","save()","","","",""},
|
|
{"true","All","Button","校验银行卡信息","校验银行卡四要素","verifyFourelementBank()","","","","btn_icon_return"}
|
|
}
|
|
/* {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
|
} */;
|
|
sButtonPosition = "north";
|
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
|
<script type="text/javascript">
|
|
function save(){
|
|
setItemValue(0,0,"flowunid","<%=FlowUnid%>");
|
|
setItemValue(0,0,"acc_type","Debit");
|
|
var res=RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "getCustIdByFlowunid", "FlowUnid=<%=FlowUnid%>");
|
|
var strarry=res.split(",");
|
|
var customerid=strarry[0];
|
|
var projectid=strarry[1];
|
|
var contractid=strarry[2];
|
|
//setItemValue(0,0,"customerid",customerid);
|
|
if(res=="false"){
|
|
alert("请先填写个人基本信息!");
|
|
return;
|
|
}
|
|
var contract_id= getItemValue(0,0,"contract_id");
|
|
if(null!=contract_id&&contract_id!=""){
|
|
contractid=contract_id;
|
|
}
|
|
setItemValue(0,0,"customerid",customerid);
|
|
setItemValue(0,0,"project_id",projectid);
|
|
if(contractid==""||contractid=="null"||contractid==null){
|
|
setItemValue(0,0,"contract_id","");
|
|
}else{
|
|
setItemValue(0,0,"contract_id",contractid);
|
|
}
|
|
|
|
|
|
iV_all("0");
|
|
|
|
if(frame_list.window.save(customerid,projectid,contractid)&&frame_lists.window.save(customerid,projectid,contractid)){
|
|
as_save("0","re");
|
|
|
|
}
|
|
//reloadSelf();
|
|
}
|
|
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 CheckBank_name(){
|
|
var bank_name=getItemValue(0, getRow(0), "bank_name");
|
|
if(bank_name==null||bank_name==""){
|
|
setErrorTips("bank_name","请输入开户银行!");
|
|
return false;
|
|
}else{
|
|
setErrorTips("bank_name","");
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
function CheckAccount(){
|
|
var account=getItemValue(0, getRow(0), "account");
|
|
if(account==null||account==""){
|
|
setErrorTips("account","请输入账户名称!");
|
|
return false;
|
|
}else{
|
|
setErrorTips("account","");
|
|
return true;
|
|
}
|
|
}
|
|
|
|
/* 银行账号格式校验 */
|
|
function CheckAcc_number(){
|
|
var acc=getItemValue(0, getRow(0), "acc_number");
|
|
if(acc!=null&&acc!=""){
|
|
/* var reg = /^(\d{16}|\d{19})$/;
|
|
if(!reg.test(acc)){
|
|
setErrorTips("acc_number","银行账号格式错误!");
|
|
return false;
|
|
}else{ */
|
|
setErrorTips("acc_number","");
|
|
return true;
|
|
|
|
}else{
|
|
setErrorTips("acc_number","请输入银行账号!");
|
|
return false;
|
|
}
|
|
|
|
|
|
|
|
}
|
|
function getNameOfBank(){
|
|
var sflag=-1;
|
|
var number=getItemValue(0, getRow(0), "acc_number");
|
|
/* var reg = /^(\d{14}|\d{16}|\d{19})$/;
|
|
if(!reg.test(number)){
|
|
setErrorTips("acc_number","银行账号格式错误!");
|
|
return false;
|
|
}else{ */
|
|
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;
|
|
}
|
|
//校验银行卡四要素
|
|
function verifyFourelementBank(){
|
|
var parm = "FlowUnid=<%=FlowUnid%>";
|
|
var res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "verifyFourelementBank", parm);
|
|
if (res == "ERROR") {
|
|
alert("校验失败");
|
|
}
|
|
reloadSelf();
|
|
}
|
|
//提示是否为指定银行
|
|
function vertifyBankIsValid(){
|
|
var parm = "bank_name="+getItemValue(0,getRow(0),"bank_name");
|
|
var res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "vertifyBankIsValid", parm);
|
|
if (res == "error") {
|
|
alert("该银行卡号,非指定银行,请核对");
|
|
}
|
|
}
|
|
//选择开户行所属省份
|
|
function selectProvince(){
|
|
AsDialog.OpenSelector("selectProvince","","dialogWidth=" + parseInt(window.screen.width * 0.50) + "px dialogHeight=" + parseInt(window.screen.height * 0.45) + "px",function(sReturn){
|
|
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""){
|
|
//alert(getHtmlMessage('1'));//请选择一条信息!
|
|
return;
|
|
}
|
|
sReturn = sReturn.split("@");
|
|
if (sReturn[0].indexOf("省") != -1) {
|
|
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("省"));
|
|
}else if (sReturn[0].indexOf("市") != -1){
|
|
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("市"));
|
|
}else if (sReturn[0].indexOf("壮族自治区") != -1){
|
|
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("壮族自治区"));
|
|
}else if (sReturn[0].indexOf("回族自治区") != -1){
|
|
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("回族自治区"));
|
|
}else if (sReturn[0].indexOf("自治区") != -1){
|
|
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("自治区"));
|
|
}else if (sReturn[0].indexOf("特别行政区") != -1){
|
|
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("特别行政区"));
|
|
}
|
|
setItemValue(0,0,"ACCOUNT_PROVINCE",sReturn[0]);
|
|
},"请选择开户行所属省份",'');
|
|
}
|
|
|
|
function returnList(){
|
|
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
|
}
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%> |