OneToOneQnaDetailForm.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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. <input type="hidden" name="counselType" value="C"/>
  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:12%;"/>
  37. <col style="width:15%;"/>
  38. <col/>
  39. <!-- <col style="width:10%;"/> -->
  40. <!-- <col style="width:10%;"/> -->
  41. <col style="width:25%;"/>
  42. </colgroup>
  43. <thead>
  44. <tr>
  45. <th>상담일련번호</th>
  46. <th>사이트</th>
  47. <th>상담분류</th>
  48. <th>문의일시</th>
  49. <th>고객정보</th>
  50. <!-- <th>주문번호</th> -->
  51. <!-- <th>답변의뢰</th> -->
  52. <th>답변상태</th>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. <tr>
  57. <td th:text="*{counselSq}"></td>
  58. <td th:text="*{siteNm}"></td>
  59. <td th:utext="*{counselClsfNm}"></td>
  60. <td th:text="*{questDt}"></td>
  61. <td th:utext="*{maskingCustNm + ' / ' + maskingCellPhnno + '<br/>' + maskingEmail}"></td>
  62. <!-- <td th:text="*{relOrdNo}"></td> -->
  63. <!-- <td th:utext="*{ansTransYn == 'Y' ? ansTransDt + '<br/>' + ansCompNm : ''}"></td> -->
  64. <td th:utext="*{ansStat == 'G060_20' ? ansStatNm + ' / ' + ansDt + '<br/>' + ansNm : ansStatNm}"></td>
  65. </tr>
  66. </tbody>
  67. </table>
  68. <h4>고객문의</h4>
  69. <table class="frmStyle" aria-describedby="고객문의">
  70. <colgroup>
  71. <col style="width:10%;"/>
  72. <col style="width:50%;"/>
  73. <col style="width:10%;"/>
  74. <col/>
  75. </colgroup>
  76. <tbody>
  77. <tr>
  78. <th>문의 제목</th>
  79. <td th:text="*{questTitle}"></td>
  80. <th>SMS답변요청</th>
  81. <td th:text="*{smsReqYn == 'Y' ? '수신' : '미수신'}"></td>
  82. </tr>
  83. <tr>
  84. <th>문의 내용</th>
  85. <td>
  86. <textarea class="textareaR4" style="resize: none;" name="questContent" th:text="*{questContent}" disabled="disabled"></textarea>
  87. </td>
  88. <th>첨부 이미지</th>
  89. <td class="userImg">
  90. <img th:if="${counselInfo.sysFileNm1 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/' + counselInfo.sysFileNm1}" onclick="fnPopupOpen('layer_review_pic', this);" alt="" onerror='this.src="/image/no.png"'/>
  91. <img th:if="${counselInfo.sysFileNm2 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/' + counselInfo.sysFileNm2}" onclick="fnPopupOpen('layer_review_pic', this);" alt="" onerror='this.src="/image/no.png"'/>
  92. </td>
  93. </tr>
  94. </tbody>
  95. </table>
  96. <h4>답변등록</h4>
  97. <table class="frmStyle" aria-describedby="답변등록">
  98. <colgroup>
  99. <col style="width:10%;"/>
  100. <col style="width:90%;"/>
  101. </colgroup>
  102. <tbody>
  103. <tr>
  104. <th>답변 템플릿</th>
  105. <td>
  106. <select name="ansSq">
  107. <option value="">[선택]</option>
  108. <option th:if="${ansPhaseList}" th:each="oneData, statue : ${ansPhaseList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
  109. </select>
  110. </td>
  111. </tr>
  112. <tr>
  113. <th>답변 제목<i class="required" title="필수" aria-hidden="true"></i></th>
  114. <td>
  115. <input type="text" class="" name="ansTitle" th:value="*{ansTitle}" required="required" data-valid-name="답변 제목"/>
  116. </td>
  117. </tr>
  118. <tr>
  119. <th>
  120. 답변 내용<i class="required" title="필수" aria-hidden="true"></i>
  121. <br/>
  122. <span id="dpLocAnsContent">0</span>/4,000Byte
  123. </th>
  124. <td>
  125. <textarea class="textareaR4" style="resize: none;" name="ansContent" th:text="*{ansContent}" onkeyup="cfnGetTextLength(this, 4000, $('#dpLocAnsContent'));" required="required" data-valid-name="답변 내용"></textarea>
  126. </td>
  127. </tr>
  128. </tbody>
  129. </table>
  130. </form>
  131. </div>
  132. <!-- //CONTENT -->
  133. <!-- 버튼 배치 영역 -->
  134. <ul class="panelBar">
  135. <li class="right">
  136. <button type="button" class="btn btn-info btn-lg" id="btnSaveAnswer" th:if="${counselInfo.ansStat == 'G060_10'}">답변저장</button>
  137. </li>
  138. </ul>
  139. <!-- //버튼 배치 영역 -->
  140. </div>
  141. </div>
  142. <div class="uPopupWrap off" id="layer_review_pic">
  143. <div class="area reviewPic" style="width:500px; height:500px;">
  144. <ul class="picList" th:object="${counselInfo}">
  145. <li><div class="img"></div></li>
  146. </ul>
  147. <!-- <button type="button" class="btnArr prev" onclick="fnPicPrev('layer_review_pic');">이전</button>
  148. <button type="button" class="btnArr next" onclick="fnPicNext('layer_review_pic');">다음</button> -->
  149. <button type="button" class="btnClose">닫기</button>
  150. </div>
  151. </div>
  152. <script th:inline="javascript">
  153. /*<![CDATA[*/
  154. // 답변 저장
  155. $('#btnSaveAnswer').on('click', function() {
  156. // 입력 값 체크
  157. if (!gagajf.validation('#qnaDetailForm'))
  158. return false;
  159. mcxDialog.confirm("저장하시겠습니까?", {
  160. cancelBtnText: "취소",
  161. sureBtnText: "확인",
  162. sureBtnClick: function() {
  163. gagajf.ajaxFormSubmit($('#qnaDetailForm').prop('action'), '#qnaDetailForm', function() {
  164. uifnPopupClose('popupOneToOneQnaDetail');
  165. $('#btnSearch').trigger('click');
  166. });
  167. }
  168. });
  169. });
  170. // 답변템플릿 선택 시
  171. $('select[name=ansSq]').on('change', function() {
  172. var ansSq = $(this).val();
  173. if (!gagajf.isNull(ansSq)) {
  174. var actionUrl = '/customer/qna/answerphase/' + ansSq + '/G061_20';
  175. $.get(actionUrl
  176. , function(data) {
  177. if (!gagajf.isNull(data.ansSq)) {
  178. $('input[name=ansTitle]').val(data.ansTitle);
  179. $('textarea[name=ansContent]').val(data.ansContent);
  180. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  181. }
  182. });
  183. } else {
  184. // 답변 내용 초기화
  185. $('input[name=ansTitle]').val('');
  186. $('textarea[name=ansContent]').val('');
  187. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  188. }
  189. });
  190. // 팝업 열기
  191. function fnPopupOpen(id,el,kind) {
  192. $("#"+id).removeClass("off"); //레이어 Open
  193. $("#"+id).find(".picList li").removeClass("on");
  194. $(".picList").find("div").attr("style","background-image:url("+el.src+")");
  195. let onIdx = $(el).index();
  196. $("#"+id).find(".picList li").eq(onIdx).addClass("on");
  197. let picTot = $("#"+id).find(".picList li").length - 1;
  198. //console.log(onIdx +', '+ picTot);
  199. if (onIdx == 0) {
  200. $("#"+id).find("button.prev").addClass("off");
  201. }
  202. if (onIdx == picTot) {
  203. $("#"+id).find("button.next").addClass("off");
  204. }
  205. }
  206. $("#layer_review_pic .btnClose").click(function() {
  207. $("#layer_review_pic").addClass("off"); //레이어 닫기
  208. $("#layer_review_pic").find("button.btnArr").removeClass("off"); //버튼 초기화
  209. });
  210. $(document).ready(function() {
  211. cfnGetTextLength($('textarea[name=ansContent]'), 4000, $('#dpLocAnsContent'));
  212. });
  213. /*]]>*/
  214. </script>
  215. </html>