GoodsQnaFormWeb.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : GoodsQnaFormWeb.html
  7. * @desc : 상품 문의 팝업
  8. *============================================================================
  9. * Wivismall
  10. * Copyright(C) 2020 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2021.03.05 eskim 최초 작성
  15. *******************************************************************************
  16. -->
  17. <div class="full_popup_wrap">
  18. <h5 class="sr-only">상품문의</h5>
  19. <div class="btn_close">
  20. <a href="javascript:void(0)" onclick="cfCloseFullLayer('layer_goods_qna');">닫기버튼</a>
  21. </div>
  22. <div class="full_pop_header">
  23. <!-- 해당 상품 -->
  24. <div class="item_prod" th:with="imgGoodsUrl=${@environment.getProperty('upload.goods.view')}, uxImgUrl=${@environment.getProperty('domain.uximage')}">
  25. <div class="item_state">
  26. <a href="javascript:void(0);" class="itemLink">
  27. <div class="itemPic">
  28. <img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm}">
  29. </div>
  30. <p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">NBA 키즈</p>
  31. <div class="itemName" th:text="${goodsInfo.goodsFullNm}">유니 삼단블록 플리스 집업 유니 삼단블록 플리스 집업 유니 삼단블록 플리스 집업</div>
  32. <p class="itemPrice"><th:block th:text="${#numbers.formatInteger(goodsInfo.currPrice, 0,'COMMA')}"> 134,100</th:block>
  33. <span class="itemPrice_original" th:if="${goodsInfo.listPrice > goodsInfo.currPrice}" th:text="${#numbers.formatInteger(goodsInfo.listPrice, 0,'COMMA')}">149,000</span>
  34. <span class="itemPercent" th:if="${goodsInfo.dcRate > 0}" th:text="|${#numbers.formatDecimal(goodsInfo.dcRate,0,0)}%|">30%</span>
  35. </p>
  36. </a>
  37. </div>
  38. </div>
  39. <!-- //해당 상품 -->
  40. </div>
  41. <div class="full_pop_container">
  42. <!-- 상품문의 리스트 내용 -->
  43. <div class="pd_qnalist">
  44. <form id="goodsQnaForm" name="goodsQnaForm" action="#" th:action="@{'/goods/qna/list'}">
  45. <input type="hidden" name="pageNo" value ="1"/>
  46. <input type="hidden" name="pageSize" value ="20"/>
  47. <input type="hidden" name="relGoodsCd" th:value ="${goodsInfo.goodsCd}"/>
  48. <div class="info_txt">
  49. <ul>
  50. <li>상품에 대해 궁금한 점이 있으시다면 문의해주세요.</li>
  51. <li>배송, 주문/결제, 취소/반품/교환/환불, 회원, 쿠폰/포인트, 이벤트 등의 자세한 문의사항은 고객센터 > 1:1문의를 이용하여 주시기 바랍니다.</li>
  52. </ul>
  53. <div class="btn_box">
  54. <button type="button" class="btn btn_default" onclick="cfnGoToPage(_PAGE_GOODS_QNA);"><span>고객센터 1:1문의</span></button>
  55. <button type="button" class="btn btn_dark" th:onclick="cfGoodsQngCreate([[${goodsInfo.goodsCd}]] )"><span>상품 문의하기</span></button>
  56. </div>
  57. </div>
  58. <div class="qna_list">
  59. <!-- 나열조건결과 있을 때 노출 내용 -->
  60. <div class="form_field">
  61. <input id="except_secret" type="checkbox" value="Y" name="secretYn" onclick=""><label for="except_secret"><span>비밀글제외</span></label>
  62. </div>
  63. <div class="ui_row">
  64. <div class="foldGroup case1">
  65. <ul id="ulGoodsQna">
  66. </ul>
  67. </div>
  68. </div>
  69. <div class="ui_foot">
  70. <div class="ui_row">
  71. <ul class="pageNav" id="pageNav">
  72. </ul>
  73. </div>
  74. </div>
  75. <!-- //나열조건결과 있을 때 노출 내용 -->
  76. <!-- 나열조건결과 없을 때 노출 내용 -->
  77. <div class="nodata" style="display:none;">
  78. <div class="txt_box">
  79. <p>
  80. 등록된 상품문의가 없습니다.
  81. </p>
  82. </div>
  83. </div>
  84. <!-- //나열조건결과 없을 때 노출 내용 -->
  85. </div>
  86. </form>
  87. </div>
  88. </div>
  89. </div>
  90. <script src="/ux/plugins/gaga/gaga.paging.js"></script>
  91. <script th:inline="javascript">
  92. /*<![CDATA[*/
  93. let fnGetList = function() {
  94. // Initialize a pagination
  95. gagaPaging.init('goodsQnaForm', fnGetListCallback, 'pageNav', 20);
  96. // Load data
  97. gagaPaging.load(1);
  98. }
  99. var fnGetListCallback = function(result) {
  100. $('#ulGoodsQna').html('');
  101. $('.nodata').hide();
  102. // 목록
  103. if (result.dataList != null && result.dataList.length > 0) {
  104. $.each(result.dataList, function(idx, item) {
  105. let tag = '<li class="'+ (item.selfGb == 1 ? "my_qna" : "") +'">\n'; // <!-- 내가 쓴 글에 클래스 my_qna 추가 -->
  106. tag += ' <div class="fold_head">\n';
  107. tag += ' <a href="javascript:void(0)">\n';
  108. tag += ' <div>\n';
  109. tag += ' <span class="fold_state ' + (item.ansStat == "G060_10" ? "doing" : "done") + '">' + item.ansStatNm + '</span>\n'; //답변완료 : done / 처리중 : doing
  110. tag += ' <div class="fold_tit">\n';
  111. tag += ' <span>' + item.questContent + '</span>\n';
  112. if (item.selfGb == 1){
  113. tag += ' <i class="ico ico_myqna"></i>\n'; //내가 쓴 글에 추가되는 아이콘
  114. }
  115. if (item.secretYn == "Y"){
  116. tag += ' <i class="ico ico_secret"></i>\n'; //비밀글에 추가되는 아이콘
  117. }
  118. tag += ' </div>\n';
  119. tag += ' <div class="data">\n';
  120. tag += ' <span class="wr_id">'+ item.maskingCustId+'</span>\n';
  121. tag += ' <span class="wr_data">' + item.questDt + '</span>\n';
  122. tag += ' </div>\n';
  123. tag += ' </div>\n';
  124. tag += ' </a>\n';
  125. tag += ' </div>\n';
  126. tag += ' <div class="fold_cont" style="display: none;">\n';
  127. tag += ' <div class="fold_detail">\n'; //문의 내용
  128. tag += ' <div>\n';
  129. tag += ' <p>' + item.questContent + '</p>\n';
  130. tag += ' </div>\n';
  131. tag += ' </div>\n';
  132. if (item.ansStat == 'G060_20') { // 답변완료 상태일 때
  133. tag += ' <div class="fold_answer">\n'; //문의 답변
  134. tag += ' <div class="answer_head">답변이 등록되었습니다.</div>\n';
  135. tag += ' <div class="answer_body">' + item.ansContent + '</div>\n';
  136. tag += ' <span class="data">' + item.ansDt + '</span>\n';
  137. tag += ' </div>\n';
  138. }
  139. tag += ' </div>\n';
  140. tag += '</li>\n';
  141. $('#ulGoodsQna').append(tag);
  142. });
  143. } else {
  144. $('.nodata').show();
  145. $('.ui_foot').hide();
  146. }
  147. // Create pagination
  148. gagaPaging.createPagination(result.paging.pageable);
  149. }
  150. $(document).ready(function() {
  151. fnGetList();
  152. });
  153. /*]]>*/
  154. </script>
  155. </html>