OneToOneQnaDetailForm.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : OneToOneQnaDetailForm.html
  7. * @desc : 1:1문의 상세 팝업 Page
  8. *============================================================================
  9. * STYLE24
  10. * Copyright(C) 2020 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2020.12.24 gagamel 최초 작성
  15. *******************************************************************************
  16. -->
  17. <div class="modalPopup" data-width="1200" id="popupQna">
  18. <div class="panelStyle">
  19. <!-- TITLE -->
  20. <div class="panelTitle">
  21. <strong>1:1문의 상세</strong>
  22. <button type="button" class="close" onclick="uifnPopupClose('popupQna');"><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. <h4>상담정보</h4>
  30. <table class="tableStyle" aria-describedby="상담정보">
  31. <colgroup>
  32. <col style="width:10%;"/>
  33. <col style="width:10%;"/>
  34. <col style="width:12%;"/>
  35. <col style="width:15%;"/>
  36. <col/>
  37. <!-- <col style="width:10%;"/> -->
  38. <!-- <col style="width:15%;"/> -->
  39. <col style="width:25%;"/>
  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. <th>답변상태</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. <tr>
  55. <td th:text="*{counselSq}"></td>
  56. <td th:text="*{siteNm}"></td>
  57. <td th:utext="*{counselClsfNm}"></td>
  58. <td th:text="*{questDt}"></td>
  59. <td th:utext="*{custNm + ' / ' + cellPhnno + ' / ' + email}"></td>
  60. <!-- <td th:text="*{relOrdNo}"></td> -->
  61. <!-- <td th:utext="*{ansTransYn == 'Y' ? ansTransDt + '<br/>' + ansCompNm : ''}"></td> -->
  62. <td th:utext="*{ansStat == '20' ? ansStatNm + ' / ' + ansDt + ' / ' + ansNm : ansStatNm}"></td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. <h4>고객문의</h4>
  67. <table class="frmStyle" aria-describedby="고객문의">
  68. <colgroup>
  69. <col style="width:10%;"/>
  70. <col style="width:50%;"/>
  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="*{questTitle}"></td>
  78. </tr>
  79. <tr>
  80. <th>문의 내용</th>
  81. <td>
  82. <textarea class="textareaR4" style="resize: none;" name="questContent" th:text="*{questContent}" disabled="disabled"></textarea>
  83. </td>
  84. <th>첨부 이미지</th>
  85. <td class="userImg" id="onetooneImg">
  86. </td>
  87. </tr>
  88. </tbody>
  89. </table>
  90. <h4>답변등록</h4>
  91. <table class="frmStyle" aria-describedby="답변등록">
  92. <colgroup>
  93. <col style="width:10%;"/>
  94. <col style="width:90%;"/>
  95. </colgroup>
  96. <tbody>
  97. <tr>
  98. <th>답변 템플릿</th>
  99. <td>
  100. <select name="ansSq">
  101. <option value="">[선택]</option>
  102. <option th:if="${ansPhaseList}" th:each="oneData, statue : ${ansPhaseList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
  103. </select>
  104. </td>
  105. </tr>
  106. <tr>
  107. <th>답변 제목<i class="required" title="필수" aria-hidden="true"></i></th>
  108. <td>
  109. <input type="text" class="" name="ansTitle" th:value="*{ansTitle}" required="required" data-valid-name="답변 제목"/>
  110. </td>
  111. </tr>
  112. <tr>
  113. <th>
  114. 답변 내용<i class="required" title="필수" aria-hidden="true"></i>
  115. <br/>
  116. <span id="dpLocAnsContent">0</span>/4,000Byte
  117. </th>
  118. <td>
  119. <textarea class="textareaR4" style="resize: none;" name="ansContent" th:text="*{ansContent}" onkeyup="cfnGetTextLength(this, 4000, $('#dpLocAnsContent'));" required="required" data-valid-name="답변 내용"></textarea>
  120. </td>
  121. </tr>
  122. </tbody>
  123. </table>
  124. </form>
  125. </div>
  126. <!-- //CONTENT -->
  127. <!-- 버튼 배치 영역 -->
  128. <ul class="panelBar">
  129. <li class="right">
  130. <button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer">답변저장</button>
  131. </li>
  132. </ul>
  133. <!-- //버튼 배치 영역 -->
  134. </div>
  135. </div>
  136. <script th:inline="javascript">
  137. /*<![CDATA[*/
  138. // 답변 저장
  139. $('#btnSaveAnswer').on('click', function() {
  140. // 입력 값 체크
  141. if (!gagajf.validation('#qnaDetailForm'))
  142. return false;
  143. mcxDialog.confirm("저장하시겠습니까?", {
  144. cancelBtnText: "취소",
  145. sureBtnText: "확인",
  146. sureBtnClick: function() {
  147. gagajf.ajaxFormSubmit($('#qnaDetailForm').prop('action'), '#qnaDetailForm', function() {
  148. uifnPopupClose('popupQna');
  149. $('#btnSearch').trigger('click');
  150. });
  151. }
  152. });
  153. });
  154. // 답변템플릿 선택 시
  155. $('select[name=ansSq]').on('change', function() {
  156. var ansSq = $(this).val();
  157. if (!gagajf.isNull(ansSq)) {
  158. var actionUrl = '/customer/qna/answerphase/' + ansSq + '/20';
  159. $.get(actionUrl
  160. , function(data) {
  161. if (!gagajf.isNull(data.ansSq)) {
  162. $('input[name=ansTitle]').val(data.ansTitle);
  163. $('textarea[name=ansContent]').val(data.ansContent);
  164. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  165. }
  166. });
  167. } else {
  168. // 답변 내용 초기화
  169. $('input[name=ansTitle]').val('');
  170. $('textarea[name=ansContent]').val('');
  171. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  172. }
  173. });
  174. $(document).ready(function() {
  175. // var counsel = [[${counsel}]];
  176. // if (!gagajf.isNull(counsel.sysFileNm)) {
  177. // var imgTag = '<img style="height: 100px;" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \'' + _imgUrl + '/counsel/' + counsel.sysFileNm + '\')" src="' + _imgUrl + '/counsel/' + counsel.sysFileNm + '">';
  178. // $('#onetooneImg').append(imgTag);
  179. // }
  180. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  181. });
  182. /*]]>*/
  183. </script>
  184. </html>