GoodsQnaDetailForm.html 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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. <h4>상담정보</h4>
  31. <table class="tableStyle" aria-describedby="상담정보">
  32. <colgroup>
  33. <col style="width:10%;"/>
  34. <col style="width:10%;"/>
  35. <col style="width:8%;"/>
  36. <col style="width:12%;"/>
  37. <col/>
  38. <col style="width:22%;"/>
  39. <col style="width:22%;"/>
  40. </colgroup>
  41. <thead>
  42. <tr>
  43. <th>상담일련번호</th>
  44. <th>사이트</th>
  45. <th>상담분류</th>
  46. <th>문의일시</th>
  47. <th>고객정보</th>
  48. <th>답변의뢰</th>
  49. <th>답변상태</th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. <tr>
  54. <td th:text="*{counselSq}"></td>
  55. <td th:text="*{siteNm}"></td>
  56. <td>상품문의</td>
  57. <td th:text="*{questDt}"></td>
  58. <td th:utext="*{maskingCustNm + ' / ' + maskingCellPhnno + '<br/>' + maskingEmail}"></td>
  59. <td th:utext="*{ansTransYn == 'Y' ? ansTransDt + '<br/>' + ansCompNm : ''}"></td>
  60. <td th:utext="*{ansStat == 'G060_20' ? ansStatNm + ' / ' + ansDt + '<br/>' + ansNm : ansStatNm}"></td>
  61. </tr>
  62. </tbody>
  63. </table>
  64. <h4>고객문의</h4>
  65. <table class="frmStyle" aria-describedby="고객문의">
  66. <colgroup>
  67. <col style="width:10%;"/>
  68. <col style="width:20%;"/>
  69. <col style="width:10%;"/>
  70. <col/>
  71. <col style="width:10%;"/>
  72. <col style="width:30%;"/>
  73. </colgroup>
  74. <tbody>
  75. <tr>
  76. <th>상품코드</th>
  77. <td colspan="3" th:text="*{relGoodsCd}"></td>
  78. <th rowspan="3">상품이미지</th>
  79. <td rowspan="3" class="userImg">
  80. <img style="height: 100px;" th:src="${@environment.getProperty('upload.goods.view') + '/' + counselInfo.goodsImg}" alt="" onerror='this.src="/image/no.gif"'/>
  81. </td>
  82. </tr>
  83. <tr>
  84. <th>상품명</th>
  85. <td colspan="3" th:text="*{goodsNm}"></td>
  86. </tr>
  87. <tr>
  88. <th>비밀글여부</th>
  89. <td th:text="*{secretYn == 'Y' ? 'Yes' : 'No'}"></td>
  90. <th>SMS답변요청</th>
  91. <td th:text="*{smsReqYn == 'Y' ? '수신' : '미수신'}"></td>
  92. </tr>
  93. <tr>
  94. <th>문의 내용</th>
  95. <td colspan="5">
  96. <textarea class="textareaR4" style="resize: none;" name="questContent" th:text="*{questContent}" disabled="disabled"></textarea>
  97. </td>
  98. </tr>
  99. </tbody>
  100. </table>
  101. <!-- 아직 업체에게 의뢰를 하지 않은 답변대기중인 입점상품이면서 권한이 "SUPER관리자, 어드민관리자, CS관리자, CS상담사"일 때 -->
  102. <ul class="panelBar" th:if="${counselInfo.selfGoodsYn == 'N' && counselInfo.ansTransYn == 'N' && counselInfo.ansStat == 'G060_10' && (sessionInfo.roleCd == 'G001_0000' || sessionInfo.roleCd == 'G001_A000' || sessionInfo.roleCd == 'G001_A3000' || sessionInfo.roleCd == 'G001_A301')}">
  103. <li class="right">
  104. <select name="ansCompCd" id="ansCompCd">
  105. <option value="">[답변의뢰업체]</option>
  106. <option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
  107. </select>
  108. <button type="button" class="btn btn-danger btn-lg" id="btnTransferAnswer">답변의뢰</button>
  109. </li>
  110. </ul>
  111. <h4>답변등록</h4>
  112. <table class="frmStyle" aria-describedby="답변등록">
  113. <colgroup>
  114. <col style="width:10%;"/>
  115. <col style="width:90%;"/>
  116. </colgroup>
  117. <tbody>
  118. <tr>
  119. <th>답변 템플릿</th>
  120. <td>
  121. <select name="ansSq">
  122. <option value="">[선택]</option>
  123. <option th:if="${ansPhaseList}" th:each="oneData, statue : ${ansPhaseList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
  124. </select>
  125. </td>
  126. </tr>
  127. <tr>
  128. <th>답변 제목<i class="required" title="필수" aria-hidden="true"></i></th>
  129. <td>
  130. <input type="text" class="" name="ansTitle" th:value="*{ansTitle}" required="required" data-valid-name="답변 제목"/>
  131. </td>
  132. </tr>
  133. <tr>
  134. <th>
  135. 답변 내용<i class="required" title="필수" aria-hidden="true"></i>
  136. <br/>
  137. <span id="dpLocAnsContent">0</span>/4,000Byte
  138. </th>
  139. <td>
  140. <textarea class="textareaR4" style="resize: none;" name="ansContent" th:text="*{ansContent}" onkeyup="cfnGetTextLength(this, 4000, $('#dpLocAnsContent'));" required="required" data-valid-name="답변 내용"></textarea>
  141. </td>
  142. </tr>
  143. </tbody>
  144. </table>
  145. </form>
  146. </div>
  147. <!-- //CONTENT -->
  148. <!-- 버튼 배치 영역 -->
  149. <ul class="panelBar">
  150. <li class="right">
  151. <button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer" th:if="${counselInfo.ansStat == 'G060_10'}">답변저장</button>
  152. </li>
  153. </ul>
  154. <!-- //버튼 배치 영역 -->
  155. </div>
  156. </div>
  157. <script th:inline="javascript">
  158. /*<![CDATA[*/
  159. // 답변의뢰
  160. $('#btnTransferAnswer').on('click', function() {
  161. if (gagajf.isNull($('#ansCompCd').val())) {
  162. mcxDialog.alertC("답변의뢰업체를 선택해 주세요.", {
  163. sureBtnText: "확인",
  164. sureBtnClick: function() {
  165. $('#ansCompCd').focus();
  166. }
  167. });
  168. return;
  169. }
  170. mcxDialog.confirm("답변을 의뢰하시겠습니까?", {
  171. cancelBtnText: "취소",
  172. sureBtnText: "확인",
  173. sureBtnClick: function() {
  174. var params = new Object;
  175. params.counselSq = $('input[name=counselSq]').val();
  176. params.ansCompCd = $('#ansCompCd').val();
  177. var jsonData = JSON.stringify(params);
  178. gagajf.ajaxJsonSubmit('/customer/goods/qna/answer/transfer/save', jsonData, function() {
  179. uifnPopupClose('popupGoodsQnaDetail');
  180. $('#btnSearch').trigger('click');
  181. });
  182. }
  183. });
  184. });
  185. // 답변 저장
  186. $('#btnSaveAnswer').on('click', function() {
  187. // 입력 값 체크
  188. if (!gagajf.validation('#qnaDetailForm'))
  189. return false;
  190. mcxDialog.confirm("저장하시겠습니까?", {
  191. cancelBtnText: "취소",
  192. sureBtnText: "확인",
  193. sureBtnClick: function() {
  194. gagajf.ajaxFormSubmit($('#qnaDetailForm').prop('action'), '#qnaDetailForm', function() {
  195. uifnPopupClose('popupGoodsQnaDetail');
  196. $('#btnSearch').trigger('click');
  197. });
  198. }
  199. });
  200. });
  201. // 답변템플릿 선택 시
  202. $('select[name=ansSq]').on('change', function() {
  203. var ansSq = $(this).val();
  204. if (!gagajf.isNull(ansSq)) {
  205. var actionUrl = '/customer/qna/answerphase/' + ansSq + '/20';
  206. $.get(actionUrl
  207. , function(data) {
  208. if (!gagajf.isNull(data.ansSq)) {
  209. $('input[name=ansTitle]').val(data.ansTitle);
  210. $('textarea[name=ansContent]').val(data.ansContent);
  211. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  212. }
  213. });
  214. } else {
  215. // 답변 내용 초기화
  216. $('input[name=ansTitle]').val('');
  217. $('textarea[name=ansContent]').val('');
  218. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  219. }
  220. });
  221. $(document).ready(function() {
  222. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  223. });
  224. /*]]>*/
  225. </script>
  226. </html>