결제하기 > 전용계좌 선택시 가상계좌 확인서 팝업 추가 - 전용계좌가 있는 경우 확인서 팝업 호출 하여 출력기능 추가
- 전용계좌가 있는 경우 확인서 팝업 호출 하여 출력기능 추가
@26c92d4945348fcd02eae480ebe8133f3bcb79b3
--- src/main/java/itn/let/mjo/pay/web/MjonPayV2Controller.java
+++ src/main/java/itn/let/mjo/pay/web/MjonPayV2Controller.java
... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 |
import java.text.SimpleDateFormat; |
| 4 | 4 |
import java.util.ArrayList; |
| 5 | 5 |
import java.util.Arrays; |
| 6 |
+import java.util.Calendar; |
|
| 6 | 7 |
import java.util.Date; |
| 7 | 8 |
import java.util.List; |
| 8 | 9 |
import java.util.Random; |
... | ... | @@ -191,6 +192,65 @@ |
| 191 | 192 |
|
| 192 | 193 |
return "/web/pay/PayView"; |
| 193 | 194 |
} |
| 195 |
+ |
|
| 196 |
+ |
|
| 197 |
+ /** |
|
| 198 |
+ * 결제하기 |
|
| 199 |
+ * @param searchVO |
|
| 200 |
+ * @param model |
|
| 201 |
+ * @return "/web/pay/PayView.do" |
|
| 202 |
+ * @throws Exception |
|
| 203 |
+ */ |
|
| 204 |
+ @RequestMapping(value= {"/web/member/pay/selectVaViewPrintPopupAjax.do"})
|
|
| 205 |
+ public String selectVaViewPrintPopupAjax(@ModelAttribute("mjonPayVO") MjonPayVO mjonPayVO,
|
|
| 206 |
+ HttpServletRequest request, RedirectAttributes redirectAttributes, |
|
| 207 |
+ ModelMap model) throws Exception{
|
|
| 208 |
+ |
|
| 209 |
+ String pattern = (String) request.getAttribute( |
|
| 210 |
+ HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE) ; |
|
| 211 |
+ |
|
| 212 |
+ //로그인 정보 획득 |
|
| 213 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 214 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 215 |
+ String userNm = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getName()); |
|
| 216 |
+ |
|
| 217 |
+ if(loginVO == null) {
|
|
| 218 |
+ return "redirect:/web/user/login/login.do"; |
|
| 219 |
+ } |
|
| 220 |
+ |
|
| 221 |
+ // 하드코딩 |
|
| 222 |
+ // Itm Member Id Check |
|
| 223 |
+ //if(!getItnMemberId(userId)) {
|
|
| 224 |
+ // return "redirect:/web/main/mainPage.do"; |
|
| 225 |
+ //} |
|
| 226 |
+ |
|
| 227 |
+ MberManageVO mberManageVO = mberManageService.selectMber(loginVO.getId()); |
|
| 228 |
+ model.addAttribute("mberManageVO", mberManageVO);
|
|
| 229 |
+ |
|
| 230 |
+ //회원 전용계좌 정보 리스트 가져오기 |
|
| 231 |
+ VacsVactVO vacsVactVO = new VacsVactVO(); |
|
| 232 |
+ vacsVactVO.setMberId(loginVO.getId()); |
|
| 233 |
+ List<?> myBankList = vacsVactService.selectMyBankAcctList(vacsVactVO); //내가 할당받은 전용계좌 리스트 받아오기 |
|
| 234 |
+ |
|
| 235 |
+ //대상 리스트, 페이징 정보 전달 |
|
| 236 |
+ model.addAttribute("resultMyList", myBankList);
|
|
| 237 |
+ //사용자 정보 |
|
| 238 |
+ model.addAttribute("userId", userId);
|
|
| 239 |
+ model.addAttribute("userNm", userNm);
|
|
| 240 |
+ |
|
| 241 |
+ Calendar cal = Calendar.getInstance(); |
|
| 242 |
+ |
|
| 243 |
+ int year = cal.get(Calendar.YEAR); |
|
| 244 |
+ int month = cal.get(Calendar.MONTH) + 1; |
|
| 245 |
+ int day = cal.get(Calendar.DAY_OF_MONTH); |
|
| 246 |
+ |
|
| 247 |
+ model.addAttribute("year", year);
|
|
| 248 |
+ model.addAttribute("month", month);
|
|
| 249 |
+ model.addAttribute("day", day);
|
|
| 250 |
+ |
|
| 251 |
+ |
|
| 252 |
+ return "/web/pay/PayVaViewPrintPopup"; |
|
| 253 |
+ } |
|
| 194 | 254 |
|
| 195 | 255 |
/** |
| 196 | 256 |
* 다음 결제시 결제수단 SELECT |
+++ src/main/webapp/WEB-INF/jsp/web/pay/PayVaViewPrintPopup.jsp
... | ... | @@ -0,0 +1,153 @@ |
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
| 2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| 3 | +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> | |
| 4 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | |
| 5 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> | |
| 6 | +<%@ page import="itn.com.cmm.LoginVO" %> | |
| 7 | +<!DOCTYPE html> | |
| 8 | +<html lang="ko"> | |
| 9 | + | |
| 10 | +<head> | |
| 11 | + <meta charset="UTF-8"> | |
| 12 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| 13 | + <title>가상계좌 확인서</title> | |
| 14 | + <script type="text/javascript" src="/publish/js/jquery-3.5.0.js"></script> | |
| 15 | + | |
| 16 | + <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap" rel="stylesheet"> | |
| 17 | + <link rel="stylesheet" href="/publish/css/reset.css"> | |
| 18 | + <link rel="stylesheet" href="/publish/css/common.css"> | |
| 19 | + <link rel="stylesheet" href="/publish/css/estimate.css"> | |
| 20 | + <link rel="stylesheet" href="/publish/css/font.css"> | |
| 21 | + <link rel="stylesheet" href="/publish/css/button.css"> | |
| 22 | +</head> | |
| 23 | +<script type="text/javascript"> | |
| 24 | +$(document).ready(function(){ | |
| 25 | + | |
| 26 | +}); | |
| 27 | + | |
| 28 | +function f_print(){ | |
| 29 | + document.getElementById('est_btn_wrap').style.display = 'none'; | |
| 30 | + var initBody = document.body.innerHTML; | |
| 31 | + window.onbeforeprint = function(){ | |
| 32 | + // print_area는 인쇄하고자 하는 영역의 ID를 말합니다.( 필수 ) | |
| 33 | + // document.body.innerHTML = document.getElementById("print_area").innerHTML; | |
| 34 | + } | |
| 35 | + window.onafterprint = function(){ | |
| 36 | + document.body.innerHTML = initBody; | |
| 37 | + } | |
| 38 | + window.print(); | |
| 39 | + document.getElementById('est_btn_wrap').style.display = ''; | |
| 40 | +} | |
| 41 | + | |
| 42 | +</script> | |
| 43 | + <body> | |
| 44 | + <!-- 발송결과 출력 --> | |
| 45 | + <div class="estimate_wrap" > | |
| 46 | + <div class="estimate"> | |
| 47 | + <div class="est_head clearfix"> | |
| 48 | + <img src="/publish/images/CI.png" alt="문자온 CI"> | |
| 49 | + <div class="clearfix"> | |
| 50 | + <p>(12248) 경기도 남양주시 다산순환로 20, A동 735호(다산동, 현대프리미어캠퍼스)</p> | |
| 51 | + <p>TEL 010-8432-9333</p> | |
| 52 | + </div> | |
| 53 | + </div> | |
| 54 | + <div class="est_body"> | |
| 55 | + <h2>가상계좌 확인서</h2> | |
| 56 | + <div class="cont1 tb_ver2"> | |
| 57 | + <div> | |
| 58 | + <table class="est_table"> | |
| 59 | + <caption>가상계좌 사실 확인</caption> | |
| 60 | + <colgroup> | |
| 61 | + <col style="width: 50px;"> | |
| 62 | + <col style="width: auto;"> | |
| 63 | + </colgroup> | |
| 64 | + <tbody> | |
| 65 | + <tr> | |
| 66 | + <td colspan="2" class="colspan"><span><c:out value="${userNm}"/></span> 님의 가상계좌 발급 사실을 아래와 같이 확인합니다.</td> | |
| 67 | + </tr> | |
| 68 | + </tbody> | |
| 69 | + </table> | |
| 70 | + </div> | |
| 71 | + </div> | |
| 72 | + <div class="cont3"> | |
| 73 | + <div class="est_table2_wrap"> | |
| 74 | + <table class="est_table2"> | |
| 75 | + <caption>예금주명, 발급은행, 계좌번호 정보를 제공하는 표</caption> | |
| 76 | + <colgroup> | |
| 77 | + <col style="width: 25%;"> | |
| 78 | + <col style="width: 25%;"> | |
| 79 | + <col style="width: auto;"> | |
| 80 | + </colgroup> | |
| 81 | + <thead> | |
| 82 | + <tr> | |
| 83 | + <th scope="col">예금주명</th> | |
| 84 | + <th scope="col">발급은행</th> | |
| 85 | + <th scope="col">계좌번호</th> | |
| 86 | + </tr> | |
| 87 | + </thead> | |
| 88 | + <tbody> | |
| 89 | + <c:choose> | |
| 90 | + <c:when test="${not empty resultMyList}"> | |
| 91 | + <c:forEach var="result" items="${resultMyList}" varStatus="status"> | |
| 92 | + <tr> | |
| 93 | + <td> | |
| 94 | + <c:out value="${result.cmfNm}"/> | |
| 95 | + </td> | |
| 96 | + <td> | |
| 97 | + <c:out value='${result.codeNm}'/> | |
| 98 | + </td> | |
| 99 | + <td> | |
| 100 | + <c:out value='${result.acctNo}'/> | |
| 101 | + </td> | |
| 102 | + </tr> | |
| 103 | + </c:forEach> | |
| 104 | + </c:when> | |
| 105 | + <c:otherwise> | |
| 106 | + <tr> | |
| 107 | + <td colspan="3"> | |
| 108 | + <div> | |
| 109 | + 보유한 전용 계좌가 없습니다. | |
| 110 | + </div> | |
| 111 | + </td> | |
| 112 | + </tr> | |
| 113 | + </c:otherwise> | |
| 114 | + </c:choose> | |
| 115 | + <!-- <tr> | |
| 116 | + <td>홍길동</td> | |
| 117 | + <td>신한은행</td> | |
| 118 | + <td>56212519512583</td> | |
| 119 | + </tr> --> | |
| 120 | + </tbody> | |
| 121 | + </table> | |
| 122 | + </div> | |
| 123 | + </div> | |
| 124 | + <div class="cont4 account"> | |
| 125 | + <table class="est_table"> | |
| 126 | + <caption>추가설명</caption> | |
| 127 | + <colgroup> | |
| 128 | + <col style="width: 64px;"> | |
| 129 | + <col style="width: auto;"> | |
| 130 | + </colgroup> | |
| 131 | + <tbody> | |
| 132 | + <tr> | |
| 133 | + <td class="acc_te">* 본 확인서는 결제 증빙 용도로만 활용될 수 있습니다. (법적 효력 없음)</td> | |
| 134 | + </tr> | |
| 135 | + </tbody> | |
| 136 | + </table> | |
| 137 | + </div> | |
| 138 | + <div class="cont5"> | |
| 139 | + <p><span><c:out value="${year}"/></span> 년 <span><c:out value="${month}"/></span> 월 <span><c:out value="${day}"/></span> 일</p> | |
| 140 | + <div> | |
| 141 | + <span>주식회사 아이티앤 대표이사</span> | |
| 142 | + <span>유 인 식</span> | |
| 143 | + <span class="big_stamp"><img src="/publish/images/content/big_stamp.png"></span> | |
| 144 | + </div> | |
| 145 | + </div> | |
| 146 | + </div> | |
| 147 | + <div class="est_btn_wrap" id="est_btn_wrap"> | |
| 148 | + <button type="button" class="btnType" onclick="javascript:f_print(); return false;"><i class="print_img"></i>인쇄하기</button> | |
| 149 | + </div> | |
| 150 | + </div> | |
| 151 | + </div><!--// 견적서 --> | |
| 152 | + </body> | |
| 153 | +</html> |
--- src/main/webapp/WEB-INF/jsp/web/pay/PayView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/pay/PayView.jsp
... | ... | @@ -777,6 +777,23 @@ |
| 777 | 777 |
}); |
| 778 | 778 |
} |
| 779 | 779 |
|
| 780 |
+ |
|
| 781 |
+/* 사용내역서 클릭 시 내역서 새창 팝업 오픈 */ |
|
| 782 |
+function fnShowVaViewPrintPopup() {
|
|
| 783 |
+ //만들려는 팝업의 크기 |
|
| 784 |
+ var popup_wid = '840'; |
|
| 785 |
+ var popup_ht = '800'; |
|
| 786 |
+ |
|
| 787 |
+ var popup_left = (window.screen.width / 2) - (popup_wid / 2); |
|
| 788 |
+ var popup_top =(window.screen.height / 2) - (popup_ht / 2); |
|
| 789 |
+ |
|
| 790 |
+ $("#pgForm").attr("target","payVaPrint");
|
|
| 791 |
+ |
|
| 792 |
+ window.open('', 'payVaPrint', 'width='+ popup_wid +', height='+ popup_ht +', left=' + popup_left + ', top='+ popup_top +',scrollbars=1');
|
|
| 793 |
+ $("#pgForm").attr({"action":"/web/member/pay/selectVaViewPrintPopupAjax.do", "method":"post"}).submit();
|
|
| 794 |
+ |
|
| 795 |
+} |
|
| 796 |
+ |
|
| 780 | 797 |
</script> |
| 781 | 798 |
|
| 782 | 799 |
<!-- </head> |
... | ... | @@ -972,7 +989,7 @@ |
| 972 | 989 |
|
| 973 | 990 |
</td> |
| 974 | 991 |
<td class="right account_te"> |
| 975 |
- <button type="button">가상계좌 확인서</button> |
|
| 992 |
+ <button type="button" onClick="javascript:fnShowVaViewPrintPopup(); return false;">가상계좌 확인서</button> |
|
| 976 | 993 |
</td> |
| 977 | 994 |
</tr> |
| 978 | 995 |
</c:forEach> |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?