250 lines
9.0 KiB
Plaintext
250 lines
9.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");
|
|
String CustomerType=CurPage.getParameter("CustomerType");
|
|
String ApplyType=CurPage.getParameter("ApplyType");
|
|
String PhaseNo=CurPage.getParameter("PhaseNo");
|
|
/* 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");
|
|
//doTemp.setHtmlEvent("MOBILE", "onchange", "checkMobile");
|
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
|
dwTemp.Style = "2";//freeform
|
|
if(PhaseNo.equals("0020")||PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")){
|
|
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()","","","",""},
|
|
{"false","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 checkMobile(){
|
|
if("<%=CustomerType%>"=="03"){//УÑé×ÔÈ»È˿ۿÐÅÏ¢ÊÖ»úºÅÊÇ·ñÊÇÉêÇëÈË»ò¹²Í¬ÉêÇëÈË
|
|
var customerType = "03";
|
|
var mobile = getItemValue(0,getRow(),"MOBILE");
|
|
var sParams = "mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=FlowUnid%>";
|
|
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkDebitCardMobile",sParams);
|
|
if(sReturnInfo=="10"){
|
|
alert("Ô¤ÁôÊÖ»úºÅ²»ÊÇÉêÇëÈËÊÖ»úºÅ»ò¹²Í¬ÉêÇëÈËÊÖ»úºÅ!");
|
|
}
|
|
return sReturnInfo;
|
|
}else if("<%=CustomerType%>"=="01"){//УÑé·¨È˿ۿÐÅÏ¢ÊÖ»úºÅÊÇ·ñÊǵ£±£ÈË»ò¹²Í¬ÉêÇëÈË
|
|
var customerType = "01";
|
|
var mobile = getItemValue(0,getRow(),"MOBILE");
|
|
var sParams = "mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=FlowUnid%>";
|
|
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkDebitCardMobile",sParams);
|
|
if(sReturnInfo=="10"){
|
|
alert("Ô¤ÁôÊÖ»úºÅ²»Êǵ£±£ÈËÊÖ»úºÅ»ò¹²Í¬ÉêÇëÈËÊÖ»úºÅ!");
|
|
}
|
|
return sReturnInfo;
|
|
}
|
|
}
|
|
|
|
function checkTel(){//УÑéÔ¤ÁôÊÖ»úºÅ¸ñʽ
|
|
var mobile = getItemValue(0,getRow(0),"MOBILE");
|
|
if(mobile==""){
|
|
//setErrorTips("mobile","ÊÖ»úºÅ²»ÄÜΪ¿Õ!");
|
|
alert("Ô¤ÁôÊÖ»úºÅ²»ÄÜΪ¿Õ!");
|
|
return false;
|
|
}
|
|
var phone = /^[1][3,4,5,7,8][0-9]{9}$/;
|
|
if(phone.test(mobile)){
|
|
setErrorTips("MOBILE","");
|
|
return true;
|
|
}else{
|
|
setErrorTips("MOBILE","ÊÖ»úºÅ¸ñʽ²»ÕýÈ·!");
|
|
return false;
|
|
}
|
|
/* if(CheckPhoneCode(mobile)){
|
|
return true;
|
|
}else{
|
|
//setErrorTips("mobile","ÊÖ»úºÅ¸ñʽ²»ÕýÈ·!");
|
|
alert("Ô¤ÁôÊÖ»úºÅ¸ñʽ²»ÕýÈ·!");
|
|
return false;
|
|
} */
|
|
}
|
|
|
|
function save(){
|
|
var TelRes=checkTel();
|
|
if(TelRes==false){
|
|
return;
|
|
}
|
|
setItemValue(0,0,"flowunid","<%=FlowUnid%>");
|
|
setItemValue(0,0,"acc_type","Debit");
|
|
var res=true;
|
|
debugger;
|
|
if('BusinessApplyApply'=='<%=ApplyType%>'){
|
|
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];
|
|
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");
|
|
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 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("УÑéʧ°Ü");
|
|
}else if(res == 'SUCCESS'){
|
|
alert('УÑéÍê³É');
|
|
reloadSelf();
|
|
}else{
|
|
alert(res);
|
|
}
|
|
}
|
|
//ÌáʾÊÇ·ñΪָ¶¨ÒøÐÐ
|
|
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"%>
|