diff --git a/src/main/webapp/WEB-INF/jsp/kccadr/adjReqMgrOff/popup/adjReqMgrOffOcrPop.jsp b/src/main/webapp/WEB-INF/jsp/kccadr/adjReqMgrOff/popup/adjReqMgrOffOcrPop.jsp index 7a9025e1..5a37fed4 100644 --- a/src/main/webapp/WEB-INF/jsp/kccadr/adjReqMgrOff/popup/adjReqMgrOffOcrPop.jsp +++ b/src/main/webapp/WEB-INF/jsp/kccadr/adjReqMgrOff/popup/adjReqMgrOffOcrPop.jsp @@ -71,17 +71,11 @@ return false; } - console.log("outputFileNm :: ", outputFileNm); - // 3. 5초 마다 결과 조회 총 12번 호출, 호출횟수 > 12 = fail const intervalId = setInterval(() => { - console.log("outputFileNm2 :: ", outputFileNm); - responResult = ocrResultAjaxCall(outputFileNm); - console.log("responResult :: ", responResult); - try { if(responResult != null){ clearInterval(intervalId); @@ -90,7 +84,32 @@ console.log('responResult ::',responResult); // 4. 결과 성공 시 부모 창에 알맞게 set - window.opener.adrVO.rppl0101Nm.value = 'test'; + var openerId = window.opener.adrVO; + + //신청인 + openerId.rppl0101Nm.value = responResult.user_1; + openerId.rppl01Post.value = responResult.address_1.substring(0, responResult.address_1.indexOf(')')+1); + openerId.rppl01Addr.value = responResult.address_1.substring(responResult.address_1.indexOf(')')+1, responResult.address_1.length); + openerId.rppl01Email1.value = responResult.mail_1.substring(0, responResult.mail_1.indexOf('@')+1); + openerId.rppl01Email2.value = responResult.mail_1.substring(responResult.mail_1.indexOf('@')+1, responResult.mail_1.length); + openerId.rppl01Phone1.value = responResult.mobile_1.replace(/\s|-/g, '').substring(0,3); + openerId.rppl01Phone2.value = responResult.mobile_1.replace(/\s|-/g, '').substring(3,7); + openerId.rppl01Phone3.value = responResult.mobile_1.replace(/\s|-/g, '').substring(7,11); + + //피신청인 + openerId.rppl0201Nm.value = responResult.user_2; + openerId.rppl02Post.value = responResult.responResult.address_2.substring(0, responResult.address_2.indexOf(')')+1); + openerId.rppl02Addr.value = responResult.address_2.substring(responResult.address_2.indexOf(')')+1, responResult.address_2.length); + openerId.rppl02Email1.value = responResult.mail_2.substring(0, responResult.mail_2.indexOf('@')+1); + openerId.rppl02Email2.value = responResult.mail_2.substring(responResult.mail_2.indexOf('@')+1, responResult.mail_2.length); + openerId.rppl02Phone1.value = responResult.mobile_2.replace(/\s|-/g, '').substring(0,3); + openerId.rppl02Phone2.value = responResult.mobile_2.replace(/\s|-/g, '').substring(3,7); + openerId.rppl02Phone3.value = responResult.mobile_2.replace(/\s|-/g, '').substring(7,11); + + //신청취지 + openerId.reqCn1.value = responResult.purpose; + //신청원인 + openerId.reqCn2.value = responResult.reason; // window.close(); }