GoodsQnaDetailForm.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : GoodsQnaDetailForm.html
  7. * @desc : 상품문의 상세 팝업 Page
  8. *============================================================================
  9. * STYLE24
  10. * Copyright(C) 2020 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2020.12.25 gagamel 최초 작성
  15. *******************************************************************************
  16. -->
  17. <div class="modalPopup" data-width="1200" id="popupGoodsQnaDetail">
  18. <div class="panelStyle">
  19. <!-- TITLE -->
  20. <div class="panelTitle">
  21. <strong>상품문의 상세</strong>
  22. <button type="button" class="close" onclick="uifnPopupClose('popupGoodsQnaDetail');"><em class="fa fa-times"></em></button>
  23. </div>
  24. <!-- //TITLE -->
  25. <!-- CONTENT -->
  26. <div class="panelContent">
  27. <form id="qnaDetailForm" name="qnaDetailForm" action="#" th:action="@{'/customer/qna/answer/save'}" th:method="post" th:object="${counselInfo}">
  28. <input type="hidden" name="counselSq" th:value="*{counselSq}"/>
  29. <input type="hidden" name="smsReqYn" th:value="*{smsReqYn}"/>
  30. <input type="hidden" name="counselType" value="G"/>
  31. <h4>상담정보</h4>
  32. <table class="tableStyle" aria-describedby="상담정보">
  33. <colgroup>
  34. <col style="width:10%;"/>
  35. <col style="width:10%;"/>
  36. <col style="width:8%;"/>
  37. <col style="width:12%;"/>
  38. <col/>
  39. <col style="width:22%;"/>
  40. <col style="width:22%;"/>
  41. </colgroup>
  42. <thead>
  43. <tr>
  44. <th>상담일련번호</th>
  45. <th>사이트</th>
  46. <th>상담분류</th>
  47. <th>문의일시</th>
  48. <th>고객정보</th>
  49. <th>답변의뢰</th>
  50. <th>답변상태</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. <tr>
  55. <td th:text="*{counselSq}"></td>
  56. <td th:text="*{siteNm}"></td>
  57. <td>상품문의</td>
  58. <td th:text="*{questDt}"></td>
  59. <td th:utext="*{maskingCustNm + ' / ' + maskingCellPhnno + '<br/>' + maskingEmail}"></td>
  60. <td th:utext="*{ansTransYn == 'Y' ? ansTransDt + '<br/>' + ansCompNm : ''}"></td>
  61. <td th:utext="*{ansStat == 'G060_20' ? ansStatNm + ' / ' + ansDt + '<br/>' + ansNm : ansStatNm}"></td>
  62. </tr>
  63. </tbody>
  64. </table>
  65. <h4>고객문의</h4>
  66. <table class="frmStyle" aria-describedby="고객문의">
  67. <colgroup>
  68. <col style="width:10%;"/>
  69. <col style="width:20%;"/>
  70. <col style="width:10%;"/>
  71. <col/>
  72. <col style="width:10%;"/>
  73. <col style="width:30%;"/>
  74. </colgroup>
  75. <tbody>
  76. <tr>
  77. <th>상품코드</th>
  78. <td colspan="3" th:text="*{relGoodsCd}"></td>
  79. <th rowspan="3">상품이미지</th>
  80. <td rowspan="3" class="userImg">
  81. <img style="height: 100px;" th:src="${@environment.getProperty('upload.goods.view') + '/' + counselInfo.goodsImg}" alt="" onerror='this.src="/image/no.png"'/>
  82. </td>
  83. </tr>
  84. <tr>
  85. <th>상품명</th>
  86. <td colspan="3" th:text="*{goodsNm}"></td>
  87. </tr>
  88. <tr>
  89. <th>비밀글여부</th>
  90. <td th:text="*{secretYn == 'Y' ? 'Yes' : 'No'}"></td>
  91. <th>SMS답변요청</th>
  92. <td th:text="*{smsReqYn == 'Y' ? '수신' : '미수신'}"></td>
  93. </tr>
  94. <tr>
  95. <th>문의 내용</th>
  96. <td colspan="5">
  97. <textarea class="textareaR4" style="resize: none;" name="questContent" th:text="*{questContent}" disabled="disabled"></textarea>
  98. </td>
  99. </tr>
  100. </tbody>
  101. </table>
  102. <h4>답변등록</h4>
  103. <table class="frmStyle" aria-describedby="답변등록">
  104. <colgroup>
  105. <col style="width:10%;"/>
  106. <col style="width:90%;"/>
  107. </colgroup>
  108. <tbody>
  109. <tr>
  110. <th>답변 템플릿</th>
  111. <td>
  112. <select name="ansSq">
  113. <option value="">[선택]</option>
  114. <option th:if="${ansPhaseList}" th:each="oneData, statue : ${ansPhaseList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
  115. </select>
  116. </td>
  117. </tr>
  118. <tr>
  119. <th>답변 제목<i class="required" title="필수" aria-hidden="true"></i></th>
  120. <td>
  121. <input type="text" class="" name="ansTitle" th:value="*{ansTitle}" required="required" data-valid-name="답변 제목"/>
  122. </td>
  123. </tr>
  124. <tr>
  125. <th>
  126. 답변 내용<i class="required" title="필수" aria-hidden="true"></i>
  127. <br/>
  128. <span id="dpLocAnsContent">0</span>/4,000Byte
  129. </th>
  130. <td>
  131. <textarea class="textareaR4" style="resize: none;" name="ansContent" th:text="*{ansContent}" onkeyup="cfnGetTextLength(this, 4000, $('#dpLocAnsContent'));" required="required" data-valid-name="답변 내용"></textarea>
  132. </td>
  133. </tr>
  134. </tbody>
  135. </table>
  136. </form>
  137. </div>
  138. <!-- //CONTENT -->
  139. <!-- 버튼 배치 영역 -->
  140. <ul class="panelBar">
  141. <li class="right">
  142. <button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer" th:if="${counselInfo.ansStat == 'G060_10'}">답변저장</button>
  143. </li>
  144. </ul>
  145. <!-- //버튼 배치 영역 -->
  146. </div>
  147. </div>
  148. <script th:inline="javascript">
  149. /*<![CDATA[*/
  150. // 답변의뢰
  151. $('#btnTransferAnswer').on('click', function() {
  152. if (gagajf.isNull($('#ansCompCd').val())) {
  153. mcxDialog.alertC("답변의뢰업체를 선택해 주세요.", {
  154. sureBtnText: "확인",
  155. sureBtnClick: function() {
  156. $('#ansCompCd').focus();
  157. }
  158. });
  159. return;
  160. }
  161. mcxDialog.confirm("답변을 의뢰하시겠습니까?", {
  162. cancelBtnText: "취소",
  163. sureBtnText: "확인",
  164. sureBtnClick: function() {
  165. var params = new Object;
  166. params.counselSq = $('input[name=counselSq]').val();
  167. params.ansCompCd = $('#ansCompCd').val();
  168. var jsonData = JSON.stringify(params);
  169. gagajf.ajaxJsonSubmit('/customer/goods/answer/transfer/save', jsonData, function() {
  170. uifnPopupClose('popupGoodsQnaDetail');
  171. $('#btnSearch').trigger('click');
  172. });
  173. }
  174. });
  175. });
  176. // 답변 저장
  177. $('#btnSaveAnswer').on('click', function() {
  178. // 입력 값 체크
  179. if (!gagajf.validation('#qnaDetailForm'))
  180. return false;
  181. mcxDialog.confirm("저장하시겠습니까?", {
  182. cancelBtnText: "취소",
  183. sureBtnText: "확인",
  184. sureBtnClick: function() {
  185. gagajf.ajaxFormSubmit($('#qnaDetailForm').prop('action'), '#qnaDetailForm', function() {
  186. uifnPopupClose('popupGoodsQnaDetail');
  187. $('#btnSearch').trigger('click');
  188. });
  189. }
  190. });
  191. });
  192. // 답변템플릿 선택 시
  193. $('select[name=ansSq]').on('change', function() {
  194. var ansSq = $(this).val();
  195. if (!gagajf.isNull(ansSq)) {
  196. var actionUrl = '/customer/qna/answerphase/' + ansSq + '/20';
  197. $.get(actionUrl
  198. , function(data) {
  199. if (!gagajf.isNull(data.ansSq)) {
  200. $('input[name=ansTitle]').val(data.ansTitle);
  201. $('textarea[name=ansContent]').val(data.ansContent);
  202. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  203. }
  204. });
  205. } else {
  206. // 답변 내용 초기화
  207. $('input[name=ansTitle]').val('');
  208. $('textarea[name=ansContent]').val('');
  209. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  210. }
  211. });
  212. $(document).ready(function() {
  213. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  214. });
  215. /*]]>*/
  216. </script>
  217. </html>