301 lines
12 KiB
Plaintext
301 lines
12 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 customerId = CurPage.getParameter("customerId");
|
||
String contractId = CurPage.getParameter("ContractId");
|
||
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 flowName=CurPage.getParameter("FlowName");
|
||
String CustomerType=CurPage.getParameter("CustomerType");
|
||
String ApplyType=CurPage.getParameter("ApplyType");
|
||
String PhaseNo=CurPage.getParameter("PhaseNo");
|
||
BizObjectManager ldclManager = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME);
|
||
BizObject ldcls = ldclManager.createQuery("select * from O where file_flag='yes' and ( flow_unid=:flowunid or contract_id=:contractid ) ").setParameter("flowunid", FlowUnid).setParameter("contractid", contractId).getSingleResult(false);
|
||
System.out.print("=========="+ldcls+"==========");
|
||
/* 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");
|
||
if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")||("ºÏÍ¬ÖÆ×÷Á÷³Ì".equals(flowName))){
|
||
doTemp.setColInnerBtEvent("ACCOUNT", "");
|
||
}
|
||
//doTemp.setHtmlEvent("MOBILE", "onchange", "checkMobile");
|
||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||
dwTemp.Style = "2";//freeform
|
||
if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")||("ºÏÍ¬ÖÆ×÷Á÷³Ì".equals(flowName)&&null!=ldcls)){
|
||
dwTemp.ReadOnly = "-2";//Ö»¶Áģʽ
|
||
}
|
||
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))||("ºÏÍ¬ÖÆ×÷Á÷³Ì".equals(flowName))){
|
||
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 autoSetCustId(){
|
||
var param1 = "";
|
||
var param2 = "";
|
||
if('AccountChangeApply'=='<%=ApplyType%>'){
|
||
param1 = "selectAccountForChange";
|
||
param2 = "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 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 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;
|
||
}
|
||
/* 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;
|
||
if("AccountChangeApply"!="<%=ApplyType%>"){//Èç¹ûÊǿۿÐÅÏ¢±ä¸ü£¬Ôò²»ÐèÒªÖØÐÂÌîдcontract_id¡¢customerid¡¢projectid
|
||
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;
|
||
}
|
||
}
|
||
if("BusinessChangeApply"!="<%=ApplyType%>"){//ÒµÎñ±ä¸ü£¬²»ÐèÒªÐÞ¸Äcustomerid¡¢project_id¡¢contract_id
|
||
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);
|
||
}
|
||
}
|
||
}
|
||
if("BusinessChangeApply"=="<%=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%>";
|
||
var meassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkSign", sparams);
|
||
if("YES"==meassge){
|
||
setItemValue(0,0,"sign_status","");
|
||
}else if("NULL"==meassge){
|
||
alert("ûÓÐÕÒµ½¶ÔÓ¦µÄ¿Û¿î¿¨ÐÅÏ¢£¡£¡");
|
||
return;
|
||
}else if("Y"==meassge){
|
||
setItemValue(0,0,"sign_status","Y");
|
||
}else if("N"==meassge){
|
||
setItemValue(0,0,"sign_status","");
|
||
}
|
||
}
|
||
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"%>
|