OneToOneQnaDetailForm.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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="popupOneToOneQnaDetail">
  18. <div class="panelStyle">
  19. <!-- TITLE -->
  20. <div class="panelTitle">
  21. <strong>1:1문의 상세</strong>
  22. <button type="button" class="close" onclick="uifnPopupClose('popupOneToOneQnaDetail');"><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:12%;"/>
  36. <col style="width:15%;"/>
  37. <col/>
  38. <!-- <col style="width:10%;"/> -->
  39. <!-- <col style="width:15%;"/> -->
  40. <col style="width:25%;"/>
  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. <th>답변상태</th>
  52. </tr>
  53. </thead>
  54. <tbody>
  55. <tr>
  56. <td th:text="*{counselSq}"></td>
  57. <td th:text="*{siteNm}"></td>
  58. <td th:utext="*{counselClsfNm}"></td>
  59. <td th:text="*{questDt}"></td>
  60. <td th:utext="*{custNm + ' / ' + cellPhnno + ' / ' + email}"></td>
  61. <!-- <td th:text="*{relOrdNo}"></td> -->
  62. <!-- <td th:utext="*{ansTransYn == 'Y' ? ansTransDt + '<br/>' + ansCompNm : ''}"></td> -->
  63. <td th:utext="*{ansStat == 'G060_20' ? ansStatNm + ' / ' + ansDt + ' / ' + ansNm : ansStatNm}"></td>
  64. </tr>
  65. </tbody>
  66. </table>
  67. <h4>고객문의</h4>
  68. <table class="frmStyle" aria-describedby="고객문의">
  69. <colgroup>
  70. <col style="width:10%;"/>
  71. <col style="width:50%;"/>
  72. <col style="width:10%;"/>
  73. <col/>
  74. </colgroup>
  75. <tbody>
  76. <tr>
  77. <th>문의 제목</th>
  78. <td th:text="*{questTitle}"></td>
  79. <th>SMS답변요청</th>
  80. <td th:text="*{smsReqYn == 'Y' ? '수신' : '미수신'}"></td>
  81. </tr>
  82. <tr>
  83. <th>문의 내용</th>
  84. <td>
  85. <textarea class="textareaR4" style="resize: none;" name="questContent" th:text="*{questContent}" disabled="disabled"></textarea>
  86. </td>
  87. <th>첨부 이미지</th>
  88. <td class="userImg">
  89. <img th:if="${counselInfo.sysFileNm1 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/counsel/' + counselInfo.sysFileNm1}" alt="" onerror='this.src="/image/no.gif"'/>
  90. <img th:if="${counselInfo.sysFileNm2 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/counsel/' + counselInfo.sysFileNm2}" alt="" onerror='this.src="/image/no.gif"'/>
  91. </td>
  92. </tr>
  93. </tbody>
  94. </table>
  95. <h4>답변등록</h4>
  96. <table class="frmStyle" aria-describedby="답변등록">
  97. <colgroup>
  98. <col style="width:10%;"/>
  99. <col style="width:90%;"/>
  100. </colgroup>
  101. <tbody>
  102. <tr>
  103. <th>답변 템플릿</th>
  104. <td>
  105. <select name="ansSq">
  106. <option value="">[선택]</option>
  107. <option th:if="${ansPhaseList}" th:each="oneData, statue : ${ansPhaseList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
  108. </select>
  109. </td>
  110. </tr>
  111. <tr>
  112. <th>답변 제목<i class="required" title="필수" aria-hidden="true"></i></th>
  113. <td>
  114. <input type="text" class="" name="ansTitle" th:value="*{ansTitle}" required="required" data-valid-name="답변 제목"/>
  115. </td>
  116. </tr>
  117. <tr>
  118. <th>
  119. 답변 내용<i class="required" title="필수" aria-hidden="true"></i>
  120. <br/>
  121. <span id="dpLocAnsContent">0</span>/4,000Byte
  122. </th>
  123. <td>
  124. <textarea class="textareaR4" style="resize: none;" name="ansContent" th:text="*{ansContent}" onkeyup="cfnGetTextLength(this, 4000, $('#dpLocAnsContent'));" required="required" data-valid-name="답변 내용"></textarea>
  125. </td>
  126. </tr>
  127. </tbody>
  128. </table>
  129. </form>
  130. </div>
  131. <!-- //CONTENT -->
  132. <!-- 버튼 배치 영역 -->
  133. <ul class="panelBar">
  134. <li class="right">
  135. <button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer" th:if="${counselInfo.ansStat == 'G060_10'}">답변저장</button>
  136. </li>
  137. </ul>
  138. <!-- //버튼 배치 영역 -->
  139. </div>
  140. </div>
  141. <script th:inline="javascript">
  142. /*<![CDATA[*/
  143. // 답변 저장
  144. $('#btnSaveAnswer').on('click', function() {
  145. // 입력 값 체크
  146. if (!gagajf.validation('#qnaDetailForm'))
  147. return false;
  148. mcxDialog.confirm("저장하시겠습니까?", {
  149. cancelBtnText: "취소",
  150. sureBtnText: "확인",
  151. sureBtnClick: function() {
  152. gagajf.ajaxFormSubmit($('#qnaDetailForm').prop('action'), '#qnaDetailForm', function() {
  153. uifnPopupClose('popupOneToOneQnaDetail');
  154. $('#btnSearch').trigger('click');
  155. });
  156. }
  157. });
  158. });
  159. // 답변템플릿 선택 시
  160. $('select[name=ansSq]').on('change', function() {
  161. var ansSq = $(this).val();
  162. if (!gagajf.isNull(ansSq)) {
  163. var actionUrl = '/customer/qna/answerphase/' + ansSq + '/20';
  164. $.get(actionUrl
  165. , function(data) {
  166. if (!gagajf.isNull(data.ansSq)) {
  167. $('input[name=ansTitle]').val(data.ansTitle);
  168. $('textarea[name=ansContent]').val(data.ansContent);
  169. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  170. }
  171. });
  172. } else {
  173. // 답변 내용 초기화
  174. $('input[name=ansTitle]').val('');
  175. $('textarea[name=ansContent]').val('');
  176. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  177. }
  178. });
  179. $(document).ready(function() {
  180. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  181. });
  182. /*]]>*/
  183. </script>
  184. </html>