LmsPopupForm.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : LmsPopupForm.html
  7. * @desc : 메시지발송팝업 Page
  8. *============================================================================
  9. * STYLE24
  10. * Copyright(C) 2021 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2021.01.21 jsshin 최초 작성
  15. *******************************************************************************
  16. -->
  17. <div class="modelessPopup draggable" data-width="634">
  18. <div class="panelStyle">
  19. <!-- TITLE -->
  20. <div class="panelTitle">
  21. <strong>LMS 발송</strong>
  22. <button type="button" class="close" onclick="uifnPopupClose('popupLmsForm')"><em class="fa fa-times"></em></button>
  23. </div>
  24. <!-- //TITLE -->
  25. <!-- CONTENT -->
  26. <div class="panelContent">
  27. <div class="tabs">
  28. <div class="tabsNav">
  29. <ul >
  30. <li class="on"><a href="#tab1">LMS 발송</a></li>
  31. </ul>
  32. </div>
  33. <!-- //TABS NAVI -->
  34. <!-- TABS CONTENT -->
  35. <ul class="tabsCont">
  36. <!-- LMS 발송 -->
  37. <li class="tab on" id="tab1">
  38. <div class="panelStyle">
  39. <form id="lmsForm" name="lmsForm">
  40. <table class="frmStyle">
  41. <colgroup>
  42. <col style="width:1%"/>
  43. <col style="width:40%"/>
  44. </colgroup>
  45. <tbody>
  46. <tr >
  47. <th>수신자번호 <em class="star"></em></th>
  48. <td>
  49. <input type="text" class="w150" name="cellPhnno" data-valid-name="수신번호" required="required" maxlength="13"/>
  50. </td>
  51. </tr>
  52. <tr>
  53. <th>발신자번호<em class="star"></em></th>
  54. <td>
  55. <input type="text" class="w150" name="callBack" th:value="${callBack}" maxlength="11" readonly="readonly"/>
  56. </td>
  57. <tr>
  58. <th>메시지<em class="star"></em></th>
  59. <td>
  60. <textarea class="textareaR4" style="resize: none;" name ="content" ></textarea>
  61. <span name="count">0</span> / 2000 byte
  62. </td>
  63. </tr>
  64. </tr>
  65. </tbody>
  66. </table>
  67. </form>
  68. </div>
  69. </li>
  70. <!-- //LMS발송 -->
  71. </ul>
  72. <!-- //TAB CONTENT -->
  73. </div>
  74. <ul class="panelBar">
  75. <li class="right">
  76. <button type="button" class="btn btn-success btn-lg" id="btnSendSms">발송</button>
  77. <button type="button" class="btn btn-gray btn-lg" onclick="uifnPopupClose('popupLmsForm')">취소</button>
  78. </li>
  79. </ul>
  80. </div>
  81. <!-- //CONTENT -->
  82. </div>
  83. </div>
  84. <script th:inline="javascript">
  85. /*<![CDATA[*/
  86. const elementCellPhnno = [[${elementCellPhnno}]];
  87. const elementCustNo = [[${elementCustNo}]];
  88. // 메시지 전송
  89. $("#btnSendSms").on("click",function() {
  90. let formId = '#lmsForm';
  91. let custNo = $(elementCustNo).val();
  92. const $content = $(formId+' textarea[name=content]');
  93. if(gagajf.isNull($content.val())) {
  94. mcxDialog.alertC("보낼 메시지를 입력해 주세요.", {
  95. sureBtnText: "확인",
  96. sureBtnClick: function() {
  97. $content.focus();
  98. }
  99. });
  100. return;
  101. }
  102. if(!gagajf.validation(formId)){
  103. return;
  104. }
  105. mcxDialog.confirm("저장하시겠습니까?", {
  106. cancelBtnText: "취소",
  107. sureBtnText: "확인",
  108. sureBtnClick: function() {
  109. let params = $(formId).serializeObject();
  110. params.custNo = custNo;
  111. let jsonData = JSON.stringify(params);
  112. gagajf.ajaxJsonSubmit('/customer/message/send', jsonData, uifnPopupClose('popupLmsForm'));
  113. }
  114. });
  115. });
  116. // LMS 글자수 변경 이벤트
  117. $("#lmsForm textarea[name=content]").bind('focus focusout input keyup keydown paste change', function () {
  118. cfnGetTextLength($(this), 2000, $('#lmsForm span[name=count]'));
  119. });
  120. var fnInitDataSet = function () {
  121. let cellPhnno = $(elementCellPhnno).val();
  122. if(!gagajf.isNull(cellPhnno)) {
  123. $('#lmsForm input[name=cellPhnno]').val(cellPhnno);
  124. }
  125. }
  126. $(document).ready(function() {
  127. fnInitDataSet();
  128. cfnGetTextLength("#lmsForm textarea[name=content]", 2000, $('#lmsForm span[name=count]'));
  129. });
  130. /*]]>*/
  131. </script>
  132. </html>