فهرست منبع

09.07 LMS 추가

tsit05 4 سال پیش
والد
کامیت
033364df63
1فایلهای تغییر یافته به همراه159 افزوده شده و 0 حذف شده
  1. 159 0
      src/main/webapp/WEB-INF/views/customer/LmsPopupForm2.html

+ 159 - 0
src/main/webapp/WEB-INF/views/customer/LmsPopupForm2.html

@@ -0,0 +1,159 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : LmsPopupForm2.html
+ * @desc    : 메시지발송팝업 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.01.21   jsshin     최초 작성
+ *******************************************************************************
+ -->
+
+	<div class="modelessPopup draggable" data-width="800">
+		<div class="panelStyle">
+			<!-- TITLE -->
+			<div class="panelTitle">
+				<strong>LMS 발송</strong>
+				<button type="button" class="close" onclick="uifnPopupClose('popupLmsForm2')"><em class="fa fa-times"></em></button>
+			</div>
+			<!-- //TITLE -->
+			<!-- CONTENT -->
+			<div class="panelContent">
+				<form id="lmsForm" name="lmsForm">
+					<table class="frmStyle">
+						<colgroup>
+							<col style="width:1%"/>
+							<col style="width:40%"/>
+						</colgroup>
+						<tbody>
+						<tr >
+							<th>수신자번호<em class="required" title="필수"></em></th>
+							<td th:if="${maskingCellPhnno == ''}">
+								<input type="text" class="w150" name="cellPhnno" data-valid-name="수신번호"  required="required"  maxlength="13" />
+							</td>
+							<td th:unless="${maskingCellPhnno == ''}">
+								<input type="hidden" name="cellPhnno"/>
+								<input type="text" class="w150" name="maskingCellPhnno" readonly="readonly"/>
+							</td>
+						</tr>
+						<tr>
+							<th>발신자번호<em class="required" title="필수"></em></th>
+							<td>
+								<input type="text" class="w150" name="callcenterTelNo" data-valid-name="발신자번호" readonly="readonly" th:value="${callBack}" maxlength="11" />
+							</td>
+						</tr>
+						<tr>
+							<th>메시지<em class="required" title="필수"></em></th>
+							<td>
+								<span name="topStr">[STYLE24]안녕하세요. 스타일24입니다.</span>
+								<textarea class="textareaR4"  style="resize: none;" name ="content" ></textarea>
+								스타일24 바로가기 : https://www.style24.com<br>
+								스타일24 고객센터 : 1544-5336<br>
+								<span name="count">0</span> / 2000 byte
+							</td>
+						</tr>
+						</tbody>
+					</table>
+				</form>
+			</div>
+			<ul class="panelBar">
+				<li class="right">
+					<button type="button" class="btn btn-success btn-lg" id="btnSendSms">발송</button>
+					<button type="button" class="btn btn-gray btn-lg" onclick="uifnPopupClose('popupLmsForm2')">취소</button>
+				</li>
+			</ul>
+			<!-- //CONTENT -->
+		</div>
+	</div>
+
+<script th:inline="javascript">
+	/*<![CDATA[*/
+	const elementCellPhnno = [[${elementCellPhnno}]];
+	const elementCustNo = [[${elementCustNo}]];
+	const maskingCellPhnno = [[${maskingCellPhnno}]];
+	const pageGb = [[${pageGb}]];
+
+	// 메시지 전송
+	$("#btnSendSms").on("click",function() {
+		let formId = '#lmsForm';
+		let custNo = gagajf.isNull(pageGb) ? $(elementCustNo).val() : elementCustNo;
+		
+		const $callcenterTelNo = $(formId+' input[name=callcenterTelNo]');
+		if(gagajf.isNull($callcenterTelNo.val())) {
+			mcxDialog.alertC("발신자번호를 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$callcenterTelNo.focus();
+				}
+			});
+			return;
+		}		
+		
+		if(!gagajf.validation(formId)){
+			return;
+		}
+		
+		const $content = $(formId+' textarea[name=content]');
+		
+		if(gagajf.isNull($content.val())) {
+			mcxDialog.alertC("보낼 메시지를 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$content.focus();
+				}
+			});
+			return;
+		}
+		
+
+		
+		mcxDialog.confirm("저장하시겠습니까?", {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function() {
+				let params = $(formId).serializeObject();
+				//params.custNo = custNo;
+				let jsonData = JSON.stringify(params);
+				//if(gagajf.isNull(pageGb)){
+					// gagajf.ajaxJsonSubmit('/customer/message/send', jsonData, uifnPopupClose('popupLmsForm'));
+				//} else {
+					gagajf.ajaxJsonSubmit('/customer/message/send3', jsonData, uifnPopupClose('popupLmsForm'));
+				//}
+			}
+		});
+		
+
+	});
+
+	// LMS 글자수 변경 이벤트
+	$("#lmsForm textarea[name=content]").bind('focus focusout input keyup keydown paste change', function () {
+		cfnGetTextLength($(this), 2000, $('#lmsForm span[name=count]'));
+	});
+
+	var fnInitDataSet = function () {
+		let cellPhnno = gagajf.isNull(pageGb) ? $(elementCellPhnno).val() : elementCellPhnno;
+		if (gagajf.isNull(maskingCellPhnno)) {
+			$('#lmsForm input[name=cellPhnno]').val(cellPhnno);
+		} else {
+			let mkCellPhno = gagajf.isNull(pageGb) ? $(maskingCellPhnno).val() : maskingCellPhnno;
+			$('#lmsForm input[name=cellPhnno]').val(cellPhnno);
+			$('#lmsForm input[name=maskingCellPhnno]').val(mkCellPhno);
+		}
+	}
+
+	$(document).ready(function() {
+		fnInitDataSet();
+	
+		cfnGetTextLength("#lmsForm textarea[name=content]", 2000, $('#lmsForm span[name=count]'));
+	
+		$('#popupLmsForm2 .modelessPopup').draggable({'cancel':'.panelContent'});
+	});
+	/*]]>*/
+</script>
+</html>