/*************************************************************************************************************** * * radfcheckAcountClose ÁÖ¾îÁø ³¯Â¥ ±âÁØÀ¸·Î ȸ°è ¸¶°¨ »óÅ ¿©ºÎ¸¦ return ÇÑ´Ù. * radfgetAcntYY ÁÖ¾îÁø ³¯Â¥ ±âÁØÀ¸·Î ȸ°è ³âµµ¸¦ return ÇÑ´Ù. * radfcheckCustExist À¯È¿ÇÑ °Å·¡Ã³ÀÎÁö Check * radfcheckEmplExist À¯È¿ÇÑ »ç¹øÀÎÁö Check * radfGetBankcd À¯È¿ÇÑ ÀºÇà¸íÀÎÁö Check, ÀºÇàÄÚµå return * radfGetIcpncd À¯È¿ÇÑ ¼ÒµæÀÚÀÎÁö Check, ÁֹιøÈ£ return * radfseizureynCheck ¾Ð·ù°Å·¡Ã³ üũ * radfBizCheck »ç¾÷ÀÚ µî·Ï¹øÈ£ üũ * radfJuminCheck Áֹεî·Ï¹øÈ£ üũ * radfFgnJuminCheck ¿Ü±¹ÀÎ Áֹεî·Ï¹øÈ£ üũ * radGetInstCardNO ¹ýÀÎÄ«µå ±âº»°ª Á¶È¸ * radfSaveExcel excel ´Ù¿î·Îµå * radfCheckInstSearchAuth ±â°üÄÚµå Á¶È¸ ±ÇÇÑ ±â°ü üũ(ÇöÀç ÀÇ·á¿ø[001]) * ***************************************************************************************************************/ /************************************* * Instcd ±â°üÄÚµå * ym ³â¿ù *************************************/ function radfcheckAcountClose(Instcd, YM) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/ym", YM); model.makeValue(comcd_node + "/instcd", Instcd); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00003"); model.createChild("xforms:submission", "id:TRRAZ00003;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00003"); if(model.getValue("/root/init/comcd/comcodelist/closyn") == 'Y') { return 'close'; } else { return 'open'; } } /************************************* * Instcd ±â°üÄÚµå * ymdd ³â¿ùÀÏ *************************************/ function radfgetAcntYY(Instcd, YMDD, nZipcd1, nZipcd2, nSupaddr, nInfaddr, cadl, nEntrregno, nFromDD, nToDD) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/ymdd", YMDD); model.makeValue(comcd_node + "/instcd", Instcd); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00004"); model.createChild("xforms:submission", "id:TRRAZ00004;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00004"); if(!(nZipcd1 == "" || nZipcd1 == null)) {model.setValue(nZipcd1, model.getValue("/root/init/comcd/comcodelist/zipcd1"));} if(!(nZipcd2 == "" || nZipcd2 == null)) {model.setValue(nZipcd2, model.getValue("/root/init/comcd/comcodelist/zipcd2"));} if(!(nSupaddr == "" || nSupaddr == null)) {model.setValue(nSupaddr, model.getValue("/root/init/comcd/comcodelist/supaddr"));} if(!(nInfaddr == "" || nInfaddr == null)) {model.setValue(nInfaddr, model.getValue("/root/init/comcd/comcodelist/infaddr"));} if(!(cadl == "" || cadl == null)) {model.setValue(cadl, model.getValue("/root/init/comcd/comcodelist/cadl"));} if(!(nEntrregno == "" || nEntrregno == null)) {model.setValue(nEntrregno, model.getValue("/root/init/comcd/comcodelist/entrregno"));} if(!(nFromDD == "" || nFromDD == null)) {model.setValue(nFromDD, model.getValue("/root/init/comcd/comcodelist/fromdd"));} if(!(nToDD == "" || nToDD == null)) {model.setValue(nToDD, model.getValue("/root/init/comcd/comcodelist/todd"));} return model.getValue("/root/init/comcd/comcodelist/acntyy"); } /************************************* * Instcd ±â°üÄÚµå * entrregno »ç¾÷ÀÚµî·Ï¹øÈ£ *************************************/ function radfcheckCustExist(Instcd, entrregno, allscanyn) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/entrregno", entrregno); model.makeValue(comcd_node + "/instcd", Instcd); model.makeValue(comcd_node + "/allscanyn", allscanyn); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00005"); model.createChild("xforms:submission", "id:TRRAZ00005;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00005"); return model.getValue("/root/init/comcd/comcodelist/custnm"); } /************************************* * emplno »ç¹ø *************************************/ function radfcheckEmplExist(emplno, vNode) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/emplno", emplno); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00006"); model.createChild("xforms:submission", "id:TRRAZ00006;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00006"); if(vNode != null) { //alert(model.getValue("/root/init/comcd/comcodelist/rregno")); model.setValue(vNode,model.getValue("/root/init/comcd/comcodelist/rregno")); } return model.getValue("/root/init/comcd/comcodelist/emplnm"); } /************************************* * banknm ÀºÇà¸í *************************************/ function radfGetBankcd(banknm) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/banknm", banknm); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00007"); model.createChild("xforms:submission", "id:TRRAZ00007;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00007"); return model.getValue("/root/init/comcd/comcodelist/bankcd"); } /************************************* * instcd ±â°üÄÚµå * rrgstno Áֹεî·Ï¹øÈ£ *************************************/ function radfGetIcpncd(instcd, rrgstno) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/instcd", instcd); model.makeValue(comcd_node + "/rrgstno", rrgstno); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00008"); model.createChild("xforms:submission", "id:TRRAZ00008;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00008"); return model.getValue("/root/init/comcd/comcodelist/name"); } /************************************* * instcd ±â°üÄÚµå * entrregno »ç¾÷ÀÚµî·Ï¹øÈ£ *************************************/ function radfseizureynCheck(instcd, entrregno, messageflag) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/instcd", instcd); model.makeValue(comcd_node + "/entrregno", entrregno); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00009"); model.createChild("xforms:submission", "id:TRRAZ00009;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00009"); if(messageflag == 'Y' && model.getValue("/root/init/comcd/comcodelist/seizureyn") == "Y") { messageBox(model.getValue("/root/init/comcd/comcodelist/custnm") + "Àº(´Â) ¾Ð·ù °Å·¡Ã³ÀÔ´Ï´Ù." ,"I000"); } return model.getValue("/root/init/comcd/comcodelist/seizureyn"); } /************************************* * bizID »ç¾÷ÀÚµî·Ï¹øÈ£ *************************************/ function radfBizCheck(bizID) { var checkID = new Array(1, 3, 7, 1, 3, 7, 1, 3, 5, 1); var tmpBizID, i, chkSum=0, c2, remander; for (i=0; i<=7; i++) { chkSum += checkID[i] * bizID.charAt(i); } c2 = "0" + (checkID[8] * bizID.charAt(8)); c2 = c2.substring(c2.length - 2, c2.length); chkSum += Math.floor(c2.charAt(0)) + Math.floor(c2.charAt(1)); remander = (10 - (chkSum % 10)) % 10 ; if (Math.floor(bizID.charAt(9)) == remander) { return true; // OK! } return false; } /************************************* * jumin Áֹεî·Ï¹øÈ£ *************************************/ function radfJuminCheck(juminno) { jumin = juminno.substr(0, 6) + "-" + juminno.substr(6, 7); if(jumin.match(/^\d{2}[0-1]\d[0-3]\d-[1-4]\d{6}$/) == null) { return false; } var chk = 0; var i; var last_num = jumin.substring(13, 14); var chk_num = '234567-892345'; for(i = 0; i < 13; i++) { if(jumin.charAt(i) != '-') chk += ( parseInt(chk_num.charAt(i)) * parseInt(jumin.charAt(i)) ); } chk = (11 - (chk % 11)) % 10; if (chk != last_num) return false; return true; } /************************************* * jumin ¿Ü±¹ÀÎ Áֹεî·Ï¹øÈ£ *************************************/ function radfFgnJuminCheck(juminno) { var sum = 0; var odd = 0; buf = new Array(13); for (i = 0; i < 13; i++) buf[i] = parseInt(juminno.charAt(i)); odd = buf[7]*10 + buf[8]; if (odd%2 != 0) { return false; } if ((buf[11] != 6)&&(buf[11] != 7)&&(buf[11] != 8)&&(buf[11] != 9)) { return false; } multipliers = [2,3,4,5,6,7,8,9,2,3,4,5]; for (i = 0, sum = 0; i < 12; i++) sum += (buf[i] *= multipliers[i]); sum=11-(sum%11); if (sum>=10) sum-=10; sum += 2; if (sum>=10) sum-=10; if ( sum != buf[12]) { return false; } else { return true; } } /************************************* * instcd ±â°üÄÚµå * userid »ç¿ëÀÚ ID *************************************/ function radGetInstCardNO(instcd, userid, deptcd) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/instcd", instcd); model.makeValue(comcd_node + "/userid", userid); model.makeValue(comcd_node + "/deptcd", deptcd); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00010"); model.createChild("xforms:submission", "id:TRRAZ00010;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00010"); if(model.instance1.selectNodes("/root/init/comcd/comcodelist").length == 1) { return model.getValue("/root/init/comcd/comcodelist/cardno"); } else { return null; } } /************************************* * pGrid ±×¸®µå¸í * sTitle ÆÄÀÏÀ̸§ * sSheetName ½ÃÆ®¸í * bColhidden hidden Çà Ãâ·Â¿©ºÎ (true/false) * bRowhidden hidden ¿­ Ãâ·Â¿©ºÎ (true/false) * sExportfalsecols Ãâ·Â Á¦¿Ü Çà (1,2,3,4,5) * sExportfalserows Ãâ·Â Á¦¿Ü ¿­ (6,7,8,9,10) *************************************/ function radfSaveExcel(pGrid, sTitle, sSheetName, bColhidden, bRowhidden, sExportfalsecols, sExportfalserows) { if(sTitle == null) { sTitle = "excel"; }; if(sSheetName == null) { sSheetName = "sheet1"; } else { sSheetName = "sheetname:" + sSheetName + ";"; }; if(bColhidden == null) { bColhidden = ""; } else { bColhidden = "colhiddenextend:" + bColhidden + ";"; }; if(bRowhidden == null) { bRowhidden = ""; } else { bRowhidden = "rowhiddenextend:" + bRowhidden + ";"; }; if(sExportfalsecols == null) { sExportfalsecols = ""; } else { sExportfalsecols = "exportfalsecols:" + sExportfalsecols + ";"; }; if(sExportfalserows == null) { sExportfalserows = ""; } else { sExportfalserows = "exportfalserows:" + sExportfalserows + ";"; }; var sProperty = sSheetName + bColhidden + bRowhidden + sExportfalsecols + sExportfalserows; var fileName = window.fileDialog("save", ",", false, sTitle, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*"); if (fileName != "") { pGrid.saveExcel(fileName,""); } } /************************************* * Instcd ±â°üÄÚµå * CmbBoxID ±â°üÄÚµå ÄÞº¸¹Ú½º *************************************/ function radfCheckInstSearchAuth(Instcd, CmbBoxID) { if(Instcd == '001') { CmbBoxID.disabled = false; } else { CmbBoxID.disabled = true; } CmbBoxID.refresh(); } /************************************* * Instcd ±â°üÄÚµå * UserID »ç¿ëÀÚID *************************************/ function radfCheckAcntAuth(Instcd, UserID, ControlColumn, ColumnValue) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/instcd", Instcd); model.makeValue(comcd_node + "/userid", UserID); model.makeValue(comcd_node + "/" + ControlColumn, ColumnValue); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00011"); model.createChild("xforms:submission", "id:TRRAZ00011;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00011"); return model.getValue("/root/init/comcd/comcodelist/authyn"); } /************************************* * Instcd ±â°üÄÚµå * UserID »ç¿ëÀÚID *************************************/ function radfCheckInstMngt(Instcd, ConditionID) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/instcd", Instcd); model.makeValue(comcd_node + "/conditionid", ConditionID); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00012"); model.createChild("xforms:submission", "id:TRRAZ00012;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00012"); return model.getValue("/root/init/comcd/comcodelist/mngtcontent"); } /************************************* * Instcd ±â°üÄÚµå * Emplno »ç¹ø * Deptcd ºÎ¼­ÄÚµå * WorkFlag ¾÷¹«±¸ºÐ *************************************/ function radfCheckBugtAuth(Instcd, Emplno, Deptcd, WorkFlag) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/instcd", Instcd); model.makeValue(comcd_node + "/emplno", Emplno); model.makeValue(comcd_node + "/deptcd", Deptcd); model.makeValue(comcd_node + "/workflag", WorkFlag); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00013"); model.createChild("xforms:submission", "id:TRRAZ00013;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00013"); return model.getValue("/root/init/comcd/comcodelist/auth"); } /************************************* * Instcd ±â°üÄÚµå * Entrregno ¼¼±Ý°è»ê¼­¹øÈ£ * Nodeset Return Node *************************************/ function radfGetCustEmailList(Instcd, Entrregno, Nodeset) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/instcd", Instcd); model.makeValue(comcd_node + "/entrregno", Entrregno); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00014"); model.createChild("xforms:submission", "id:TRRAZ00014;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00014"); for(var i = 1 ; i <= instance1.selectNodes("/root/init/comcd/comcodelist").length ; i++) { model.makeValue(Nodeset + "[" + i + "]" + "/label", model.getValue("/root/init/comcd/comcodelist[" + i + "]/label")); model.makeValue(Nodeset + "[" + i + "]" + "/value", model.getValue("/root/init/comcd/comcodelist[" + i + "]/value")); } return model.getValue("/root/init/comcd/comcodelist"); } /************************************* * Instcd ±â°üÄÚµå * Entrregno ¼¼±Ý°è»ê¼­¹øÈ£ * Nodeset Return Node *************************************/ function radfGetDTIPassword() { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/emplno", getUserInfo("userid")); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00015"); model.createChild("xforms:submission", "id:TRRAZ00015;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00015"); var sPasswd = model.getValue("/root/init/comcd/comcodelist/passwd") var sLink = "http://222.106.233.111:8081/login.do?method=process1&userId=" + getUserInfo("userid") + "&password=" + sPasswd; if(sPasswd != "") { window.load(sLink, "html"); } } /************************************* * ctr_repaymthd »ó°¢±¸ºÐ ÄÁÆ®·Ñ·¯ * ctr_cntsyearno ³»¿ë¿¬¼ö ÄÁÆ®·Ñ·¯ *************************************/ function radfGetCntsYearNOList(ctr_repaymthd,ctr_cntsyearno,ctr_repayrate) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd/cntsyearnolist"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/repaymthd", model.getValue(ctr_repaymthd.attribute("ref"))); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00016"); model.createChild("xforms:submission", "id:TRRAZ00016;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00016"); //alert(model.getValue("/root/init/comcd/comcodelist/cntsyearno")); //alert(model.instance1.selectNodes("/root/init/comcd/comcodelist/cntsyearno").length); var vLen = model.instance1.selectNodes(comcd_rsltnode + "/comcodelist/cntsyearno").length; model.setValue(ctr_cntsyearno.attribute("ref"), ""); vNodeset = "/root/hidden/cntsyearnolist"; model.removeNodeset(vNodeset); for(var i = 1 ; i <= vLen ; i++) { model.makeValue(vNodeset + "[" + i + "]" + "/label", model.getValue(comcd_rsltnode + "/comcodelist[" + i + "]/cntsyearno")); model.makeValue(vNodeset + "[" + i + "]" + "/value", model.getValue(comcd_rsltnode + "/comcodelist[" + i + "]/cntsyearno")); } ctr_cntsyearno.choices.itemset.attribute("nodeset") = vNodeset; ctr_cntsyearno.choices.itemset.label.attribute("ref") = "label"; ctr_cntsyearno.choices.itemset.value.attribute("ref") = "value"; ctr_cntsyearno.refresh(); model.setValue(ctr_repayrate.attribute("ref"), ""); ctr_repayrate.refresh(); } /************************************* * ctr_repaymthd »ó°¢±¸ºÐ ÄÁÆ®·Ñ·¯ * ctr_cntsyearno ³»¿ë¿¬¼ö ÄÁÆ®·Ñ·¯ * ctr_repayrate »ó°¢À² ÄÁÆ®·Ñ·¯ *************************************/ function radfGetRepayRate(ctr_repaymthd,ctr_cntsyearno,ctr_repayrate) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd/repayratelist"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/repaymthd", model.getValue(ctr_repaymthd.attribute("ref"))); model.makeValue(comcd_node + "/cntsyearno", model.getValue(ctr_cntsyearno.attribute("ref"))); model.makeNode(comcd_rsltnode); model.removeChild("TRRAZ00017"); model.createChild("xforms:submission", "id:TRRAZ00017;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TRRAZ00017"); model.setValue(ctr_repayrate.attribute("ref"), model.getValue(comcd_rsltnode + "/comcodelist/repayrate")); ctr_repayrate.refresh(); } /************************************* * Instcd ±â°üÄÚµå * Acntyy ȸ°è³âµµ * FromDD ½ÃÀÛÀÏ *************************************/ function radfRenewalBebtClos(Instcd, Acntyy, FromDD) { var comcd_node = "/root/send/comcdref"; var comcd_rsltnode = "/root/init/comcd"; model.removeNodeset(comcd_node); model.makeValue(comcd_node + "/instcd", Instcd); model.makeValue(comcd_node + "/acntyy", Acntyy); model.makeValue(comcd_node + "/fromdd", FromDD); model.makeNode(comcd_rsltnode); model.removeChild("TXRAZ00002"); model.createChild("xforms:submission", "id:TXRAZ00002;mediatype:application/x-www-form-urlencoded; method:post; ref:" + comcd_node + "; resultref:" + comcd_rsltnode + "; "); submit("TXRAZ00002"); }