이준호 찾교 커밋
문자 메일 발송 메뉴 청소년 요청서류 알림 메뉴 교육결과관리 메뉴 저작권체험교실 - 저작권 체험교실 > 운영신청 관리 > 상세(운영신청단계인거) 수정요청 버튼 클릭하고 기본멘트로 확인 버튼 눌렀을때 문자발송
This commit is contained in:
parent
41ff71b2da
commit
355ff67fa9
@ -149,6 +149,8 @@ public class VEEduAplctVO extends ComDefaultVO implements Serializable {
|
|||||||
private String acmdtAplctOrd; //숙박신청 순번
|
private String acmdtAplctOrd; //숙박신청 순번
|
||||||
private String acmdtSbmtYn; //숙박신청 제출여부
|
private String acmdtSbmtYn; //숙박신청 제출여부
|
||||||
|
|
||||||
|
private String targetId;
|
||||||
|
|
||||||
|
|
||||||
public int getChasi() {
|
public int getChasi() {
|
||||||
return chasi;
|
return chasi;
|
||||||
@ -1748,6 +1750,13 @@ public class VEEduAplctVO extends ComDefaultVO implements Serializable {
|
|||||||
public void setAcmdtSbmtYn(String acmdtSbmtYn) {
|
public void setAcmdtSbmtYn(String acmdtSbmtYn) {
|
||||||
this.acmdtSbmtYn = acmdtSbmtYn;
|
this.acmdtSbmtYn = acmdtSbmtYn;
|
||||||
}
|
}
|
||||||
|
public String getTargetId() {
|
||||||
|
return targetId;
|
||||||
|
}
|
||||||
|
public void setTargetId(String targetId) {
|
||||||
|
this.targetId = targetId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -976,6 +976,7 @@ public class EduAplctMngTngrController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping("popup/eduDocReqAlertPopup.do")
|
@RequestMapping("popup/eduDocReqAlertPopup.do")
|
||||||
public String eduDocReqAlertPopup( @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO , ModelMap model , HttpServletRequest request ) throws Exception {
|
public String eduDocReqAlertPopup( @ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO , ModelMap model , HttpServletRequest request ) throws Exception {
|
||||||
|
|
||||||
return "oprtn/tngrVisitEdu/popup/eduDocReqAlertPopup";
|
return "oprtn/tngrVisitEdu/popup/eduDocReqAlertPopup";
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@ -1297,7 +1297,9 @@
|
|||||||
A.SBMT_ATCH_FILE_ID AS sbmtAtchFileId,
|
A.SBMT_ATCH_FILE_ID AS sbmtAtchFileId,
|
||||||
TO_CHAR(A.SBMT_PNTTM,'YYYY-MM-DD') AS sbmtPnttm,
|
TO_CHAR(A.SBMT_PNTTM,'YYYY-MM-DD') AS sbmtPnttm,
|
||||||
A.SBMT_ID AS sbmtId,
|
A.SBMT_ID AS sbmtId,
|
||||||
B.INSTR_NM AS instrNm
|
B.INSTR_NM AS instrNm,
|
||||||
|
B.PHONE AS phone,
|
||||||
|
B.EMAIL AS email
|
||||||
FROM
|
FROM
|
||||||
VE_EDU_DOC_REQ A
|
VE_EDU_DOC_REQ A
|
||||||
LEFT JOIN VE_INSTR_DETAIL B
|
LEFT JOIN VE_INSTR_DETAIL B
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
<title>학교명 검색</title>
|
<title>학교명 검색</title>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<script type="text/javascript" src="/kccadrPb/usr/script/popup.js"></script>
|
<script type="text/javascript" src="/kccadrPb/usr/script/popup.js"></script>
|
||||||
|
<script src="${pageContext.request.contextPath}/js/ve/sendSmsEmailUtil.js"></script>
|
||||||
<script type="text/javaScript" language="javascript">
|
<script type="text/javaScript" language="javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
});
|
});
|
||||||
@ -41,6 +42,19 @@
|
|||||||
success:function(returnData){
|
success:function(returnData){
|
||||||
if(returnData.rsCnt > 0){
|
if(returnData.rsCnt > 0){
|
||||||
alert(msg + " 되었습니다.");
|
alert(msg + " 되었습니다.");
|
||||||
|
if(${veEduAplctVO.lctrDivCd =! '40'}){
|
||||||
|
try{
|
||||||
|
sendSms(
|
||||||
|
"<c:out value='${veEduAplctVO.phone}'/>",
|
||||||
|
"교육운영 관리 시스템입니다. 등록하신 체험교실 운영신청 수정요청드립니다.",
|
||||||
|
"<c:out value="${veEduAplctVO.eduAplctOrd}" />",
|
||||||
|
"<c:out value='${veEduAplctVO.targetId}'/>",
|
||||||
|
"N"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
opener.fncGoDetail();
|
opener.fncGoDetail();
|
||||||
self.close();
|
self.close();
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -112,6 +112,9 @@
|
|||||||
<form:form id="linkForm" name="linkForm" commandName="vEEduAplctVO" method="post">
|
<form:form id="linkForm" name="linkForm" commandName="vEEduAplctVO" method="post">
|
||||||
<input type="hidden" name="eduAplctOrd" id="eduAplctOrd" value="${info.eduAplctOrd}" />
|
<input type="hidden" name="eduAplctOrd" id="eduAplctOrd" value="${info.eduAplctOrd}" />
|
||||||
<input type="hidden" name="lctrDivCd" id="lctrDivCd" value="${info.lctrDivCd}" />
|
<input type="hidden" name="lctrDivCd" id="lctrDivCd" value="${info.lctrDivCd}" />
|
||||||
|
<input type="hidden" name="phone" id="phone" value="${info.clphone}" />
|
||||||
|
<input type="hidden" name="targetId" id="targetId" value="${info.userId}" />
|
||||||
|
|
||||||
</form:form>
|
</form:form>
|
||||||
|
|
||||||
<!-- cont -->
|
<!-- cont -->
|
||||||
|
|||||||
@ -280,7 +280,6 @@
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateHiddenMemo(){
|
function updateHiddenMemo(){
|
||||||
$("#prvtMemoCn").val($("#hiddenMemo").val());
|
$("#prvtMemoCn").val($("#hiddenMemo").val());
|
||||||
|
|
||||||
@ -308,11 +307,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 서류요청 SMS, EMAIL 알림 팝업
|
// 서류요청 SMS, EMAIL 알림 팝업
|
||||||
function alertPopup(userId,type) { //메뉴생성 화면 호출
|
function alertPopup(userId,type, p_receiver, instrNm) { //메뉴생성 화면 호출
|
||||||
document.popForm.action = "<c:url value='/kccadr/oprtn/tngrVisitEdu/popup/eduDocReqAlertPopup.do'/>";
|
document.popForm.action = "<c:url value='/kccadr/oprtn/tngrVisitEdu/popup/eduDocReqAlertPopup.do'/>";
|
||||||
|
document.popForm.targetId.value = userId;
|
||||||
|
document.popForm.type.value = type;
|
||||||
|
document.popForm.phone.value = p_receiver;
|
||||||
|
document.popForm.email.value = p_receiver;
|
||||||
|
document.popForm.instrNm.value = instrNm;
|
||||||
window.open("#", "_eduDocReqAlertPopup", "scrollbars = no, top=100px, left=100px, height=550px, width=750px");
|
window.open("#", "_eduDocReqAlertPopup", "scrollbars = no, top=100px, left=100px, height=550px, width=750px");
|
||||||
document.popForm.target = "_eduDocReqAlertPopup";
|
document.popForm.target = "_eduDocReqAlertPopup";
|
||||||
document.popForm.submit();
|
document.popForm.submit();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -335,7 +339,13 @@
|
|||||||
|
|
||||||
<form id="popForm" name="popForm" method="post">
|
<form id="popForm" name="popForm" method="post">
|
||||||
<input type="hidden" name="callFunc" value="callFunc"/>
|
<input type="hidden" name="callFunc" value="callFunc"/>
|
||||||
|
<input type="hidden" name="eduAplctOrd" value="<c:out value="${info.eduAplctOrd}" />"/>
|
||||||
<input type="hidden" name="targetId" value=""/>
|
<input type="hidden" name="targetId" value=""/>
|
||||||
|
<input type="hidden" name="type" value=""/>
|
||||||
|
<input type="hidden" name="phone" value=""/>
|
||||||
|
<input type="hidden" name="email" value=""/>
|
||||||
|
<input type="hidden" name="instrNm" value=""/>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<form:form id="linkForm" name="linkForm" commandName="vEEduAplctVO" method="post">
|
<form:form id="linkForm" name="linkForm" commandName="vEEduAplctVO" method="post">
|
||||||
<input type="hidden" id="eduAplctOrd" name="eduAplctOrd" value="<c:out value="${info.eduAplctOrd}" />" />
|
<input type="hidden" id="eduAplctOrd" name="eduAplctOrd" value="<c:out value="${info.eduAplctOrd}" />" />
|
||||||
@ -669,10 +679,8 @@
|
|||||||
</c:import>
|
</c:import>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${empty docReqList.sbmtAtchFileId}">
|
<c:if test="${empty docReqList.sbmtAtchFileId}">
|
||||||
<button class="btn_type06" onclick="alertPopup('<c:out value="${docReqList.sbmtId}" />','SMS'); return false;">SMS</button>
|
<button class="btn_type06" onclick="alertPopup('<c:out value="${docReqList.sbmtId}" />','SMS', '<c:out value="${docReqList.phone}" />', '<c:out value="${docReqList.instrNm}" />'); return false;">SMS</button>
|
||||||
<button class="btn_type06" onclick="alertPopup('<c:out value="${docReqList.sbmtId}" />','EMAIL'); return false;">EMAIL</button>
|
<button class="btn_type06" onclick="alertPopup('<c:out value="${docReqList.sbmtId}" />','EMAIL', '<c:out value="${docReqList.email}" />', '<c:out value="${docReqList.instrNm}" />'); return false;">EMAIL</button>
|
||||||
<%-- <button type="button" class="btnType01" data-tooltip="sub35_pop01" id="DOC" onclick="filePopupLayer('<c:out value="${docReqList.eduDocReqOrd}"/>','DOC')" title="팝업 열림">제출하기</button>
|
|
||||||
<button type="button" class="btnType01" data-tooltip="sub35_pop01" id="DOC" onclick="filePopupLayer('<c:out value="${docReqList.eduDocReqOrd}"/>','DOC')" title="팝업 열림">제출하기</button> --%>
|
|
||||||
</c:if>
|
</c:if>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -272,8 +272,13 @@ function replyCalculation(){
|
|||||||
|
|
||||||
|
|
||||||
// 서류요청 SMS, EMAIL 알림 팝업
|
// 서류요청 SMS, EMAIL 알림 팝업
|
||||||
function alertPopup(userId,type) { //메뉴생성 화면 호출
|
function alertPopup(userId,type, p_receiver, instrNm) { //메뉴생성 화면 호출
|
||||||
document.popForm.action = "<c:url value='/kccadr/oprtn/tngrVisitEdu/popup/eduDocReqAlertPopup.do'/>";
|
document.popForm.action = "<c:url value='/kccadr/oprtn/tngrVisitEdu/popup/eduDocReqAlertPopup.do'/>";
|
||||||
|
document.popForm.targetId.value = userId;
|
||||||
|
document.popForm.type.value = type;
|
||||||
|
document.popForm.phone.value = p_receiver;
|
||||||
|
document.popForm.email.value = p_receiver;
|
||||||
|
document.popForm.instrNm.value = instrNm;
|
||||||
window.open("#", "_eduDocReqAlertPopup", "scrollbars = no, top=100px, left=100px, height=550px, width=750px");
|
window.open("#", "_eduDocReqAlertPopup", "scrollbars = no, top=100px, left=100px, height=550px, width=750px");
|
||||||
document.popForm.target = "_eduDocReqAlertPopup";
|
document.popForm.target = "_eduDocReqAlertPopup";
|
||||||
document.popForm.submit();
|
document.popForm.submit();
|
||||||
@ -309,7 +314,12 @@ function replyCalculation(){
|
|||||||
|
|
||||||
<form id="popForm" name="popForm" method="post">
|
<form id="popForm" name="popForm" method="post">
|
||||||
<input type="hidden" name="callFunc" value="callFunc"/>
|
<input type="hidden" name="callFunc" value="callFunc"/>
|
||||||
|
<input type="hidden" name="eduAplctOrd" value="<c:out value="${info.eduAplctOrd}" />"/>
|
||||||
<input type="hidden" name="targetId" value=""/>
|
<input type="hidden" name="targetId" value=""/>
|
||||||
|
<input type="hidden" name="type" value=""/>
|
||||||
|
<input type="hidden" name="phone" value=""/>
|
||||||
|
<input type="hidden" name="email" value=""/>
|
||||||
|
<input type="hidden" name="instrNm" value=""/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form id="filePopForm" name="filePopForm" method="post">
|
<form id="filePopForm" name="filePopForm" method="post">
|
||||||
@ -602,10 +612,8 @@ function replyCalculation(){
|
|||||||
</c:import>
|
</c:import>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${empty docReqList.sbmtAtchFileId}">
|
<c:if test="${empty docReqList.sbmtAtchFileId}">
|
||||||
<button class="btn_type06" onclick="alertPopup('<c:out value="${docReqList.sbmtId}" />','SMS'); return false;">SMS</button>
|
<button class="btn_type06" onclick="alertPopup('<c:out value="${docReqList.sbmtId}" />','SMS', '<c:out value="${docReqList.phone}" />', '<c:out value="${docReqList.instrNm}" />'); return false;">SMS</button>
|
||||||
<button class="btn_type06" onclick="alertPopup('<c:out value="${docReqList.sbmtId}" />','EMAIL'); return false;">EMAIL</button>
|
<button class="btn_type06" onclick="alertPopup('<c:out value="${docReqList.sbmtId}" />','EMAIL', '<c:out value="${docReqList.email}" />', '<c:out value="${docReqList.instrNm}" />'); return false;">EMAIL</button>
|
||||||
<%-- <button type="button" class="btnType01" data-tooltip="sub35_pop01" id="DOC" onclick="filePopupLayer('<c:out value="${docReqList.eduDocReqOrd}"/>','DOC')" title="팝업 열림">제출하기</button>
|
|
||||||
<button type="button" class="btnType01" data-tooltip="sub35_pop01" id="DOC" onclick="filePopupLayer('<c:out value="${docReqList.eduDocReqOrd}"/>','DOC')" title="팝업 열림">제출하기</button> --%>
|
|
||||||
</c:if>
|
</c:if>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -29,45 +29,79 @@
|
|||||||
%>
|
%>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<title>교육신청 상세</title>
|
<title>교육신청 상세</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
/* Page Url Hide */
|
/* Page Url Hide */
|
||||||
@page {
|
@page {
|
||||||
size: auto; /* auto is the initial value */
|
size: auto; /* auto is the initial value */
|
||||||
margin: 0; /* this affects the margin in the printer settings */
|
margin: 0; /* this affects the margin in the printer settings */
|
||||||
}
|
}
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
html, body {height:auto;margin: 0 !important;padding: 0 !important;overflow: hidden;page-break-after: avoid;}
|
html, body {height:auto;margin: 0 !important;padding: 0 !important;overflow: hidden;page-break-after: avoid;}
|
||||||
.cont_tit {page-break-before: always;}
|
.cont_tit {page-break-before: always;}
|
||||||
.page_break {page-break-inside:avoid; page-break-after:auto}
|
.page_break {page-break-inside:avoid; page-break-after:auto}
|
||||||
.print_mark {page-break-before: auto;}
|
.print_mark {page-break-before: auto;}
|
||||||
form{display: none;}
|
form{display: none;}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script src="${pageContext.request.contextPath}/js/ve/sendSmsEmailUtil.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
</script>
|
|
||||||
|
$(document).ready(function (){
|
||||||
|
$('#smsSend').click(function(){
|
||||||
|
sendSms(
|
||||||
|
"<c:out value='${vEEduAplctVO.phone}'/>",
|
||||||
|
$('#cn').val(),
|
||||||
|
"<c:out value='${vEEduAplctVO.eduAplctOrd}'/>",
|
||||||
|
"<c:out value='${vEEduAplctVO.targetId}'/>",
|
||||||
|
"Y"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
$('#emailSend').click(function(){
|
||||||
|
sendEmail(
|
||||||
|
"<c:out value='${vEEduAplctVO.phone}'/>",
|
||||||
|
$('#cn').val(),
|
||||||
|
"<c:out value='${vEEduAplctVO.eduAplctOrd}'/>",
|
||||||
|
"<c:out value='${vEEduAplctVO.targetId}'/>",
|
||||||
|
"C",
|
||||||
|
"Y"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<form:form id="linkForm" name="linkForm" commandName="vEEduAplctVO" method="post">
|
|
||||||
<input type="hidden" id="eduAplctOrd" name="eduAplctOrd" value="<c:out value="${info.eduAplctOrd}" />" />
|
<input type="hidden" name="type" value="${vEEduAplctVO.type}"/>
|
||||||
</form:form>
|
<input type="hidden" name="phone" value="${vEEduAplctVO.phone}"/>
|
||||||
<form id="hiddenMemoForm" name="hiddenMemoForm" method="post">
|
<input type="hidden" name="email" value="${vEEduAplctVO.email}"/>
|
||||||
<input type="hidden" name="eduAplctOrd" value="<c:out value="${info.eduAplctOrd}" />" />
|
<input type="hidden" name="eduAplctOrd" value="${vEEduAplctVO.eduAplctOrd}"/>
|
||||||
<input type="hidden" name="prvtMemoCn" id="prvtMemoCn" value="" />
|
<input type="hidden" name="targetId" value="${vEEduAplctVO.targetId}"/>
|
||||||
</form>
|
|
||||||
<!-- cont -->
|
<!-- cont -->
|
||||||
<div class="area_popup">
|
<div class="area_popup">
|
||||||
<div class="cont_popup">
|
<div class="cont_popup">
|
||||||
|
|
||||||
<div class="cont_tit" style="padding: 0 0 20px 0; margin-bottom: 30px;"><h2>SMS|EMIAL 발송 - 개발전</h2></div>
|
<div class="cont_tit" style="padding: 0 0 20px 0; margin-bottom: 30px;">
|
||||||
|
<h2>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${vEEduAplctVO.type eq 'SMS'}">
|
||||||
|
SMS 발송
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
EMAIL 발송
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
<table class="pop_tb_type02">
|
<table class="pop_tb_type02">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 140px;">
|
<col style="width: 140px;">
|
||||||
@ -78,13 +112,23 @@
|
|||||||
<th scope="row">
|
<th scope="row">
|
||||||
<p>수신자</p>
|
<p>수신자</p>
|
||||||
</th>
|
</th>
|
||||||
<td>청소년강사1(010-1111-2222)</td>
|
<td>
|
||||||
|
<c:out value="${vEEduAplctVO.instrNm}"/>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${vEEduAplctVO.type eq 'SMS'}">
|
||||||
|
(<c:out value="${vEEduAplctVO.phone}"/>)
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
(<c:out value="${vEEduAplctVO.email}"/>)
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<p>내용</p>
|
<p>내용</p>
|
||||||
</th>
|
</th>
|
||||||
<td colspan="3"><textarea rows="" cols=""></textarea></td>
|
<td colspan="3"><textarea rows="" cols="" id="cn"></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -95,8 +139,15 @@
|
|||||||
<div class="btn_left">
|
<div class="btn_left">
|
||||||
</div>
|
</div>
|
||||||
<div class="btn_center">
|
<div class="btn_center">
|
||||||
<button type="button" class="btn_type01" onclick="" title="새창 열림">확인</button>
|
<c:choose>
|
||||||
|
<c:when test="${vEEduAplctVO.type eq 'SMS'}">
|
||||||
|
<button type="button" class="btn_type01" id="smsSend" title="전송">전송</button>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<button type="button" class="btn_type01" id="emailSend" title="전송">전송</button>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
<button type="button" class="btn_type01" onclick="window.close()" title="창닫기">닫기</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn_right">
|
<div class="btn_right">
|
||||||
|
|
||||||
|
|||||||
101
src/main/webapp/js/ve/sendSmsEmailUtil.js
Normal file
101
src/main/webapp/js/ve/sendSmsEmailUtil.js
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
//문자발송
|
||||||
|
function sendSms(
|
||||||
|
p_receiver, // 수신자
|
||||||
|
p_cn, //내용
|
||||||
|
p_logSeq, //로그에 남길 pk
|
||||||
|
p_trgtId, //받는사용자pk
|
||||||
|
p_alertYn // 발송 후 alert 여부
|
||||||
|
){
|
||||||
|
|
||||||
|
if (p_cn==""){
|
||||||
|
alert("SMS 발송 내용은 필수값입니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
sendContent(
|
||||||
|
p_receiver,
|
||||||
|
p_cn,
|
||||||
|
"",
|
||||||
|
"10", //코드 10:sms 20:mail
|
||||||
|
p_logSeq,
|
||||||
|
p_trgtId,
|
||||||
|
p_alertYn
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//이메일 발송
|
||||||
|
function sendEmail(
|
||||||
|
p_receiver, // 수신자
|
||||||
|
p_cn, //내용
|
||||||
|
p_logSeq, //로그에 남길 pk
|
||||||
|
p_trgtId, //받는사용자pk
|
||||||
|
p_flag, // p_flag -> 'C' 청소년 , 'S' 성인
|
||||||
|
p_alertYn // 발송 후 alert 여부
|
||||||
|
){
|
||||||
|
|
||||||
|
if (p_cn==""){
|
||||||
|
alert("이메일 발송 내용은 필수값입니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
sendContent(
|
||||||
|
p_receiver,
|
||||||
|
p_cn,
|
||||||
|
p_flag,
|
||||||
|
"20", //코드 10:sms 20:mail
|
||||||
|
p_logSeq,
|
||||||
|
p_trgtId,
|
||||||
|
p_alertYn
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//발송
|
||||||
|
function sendContent(p_receiver, p_cn, p_flag, p_cd, p_logSeq, p_trgtId, p_alertYn){
|
||||||
|
|
||||||
|
var url = "";
|
||||||
|
if(p_cd == '10') url = getContextPath()+"/kccadr/oprtn/pblc/offeduSMSSndAjax.do";
|
||||||
|
else if(p_cd == '20') url = getContextPath()+"/kccadr/oprtn/pblc/emailSndAjax.do";
|
||||||
|
|
||||||
|
if(url ==""){
|
||||||
|
if(p_alertYn != 'N'){
|
||||||
|
alert("발송이 실패했습니다.");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url:url,
|
||||||
|
data:{
|
||||||
|
"clphone": p_receiver,
|
||||||
|
"email": p_receiver,
|
||||||
|
"sndCn": p_cn,
|
||||||
|
"sndFlag": p_flag,
|
||||||
|
"sndCd": p_cd,
|
||||||
|
"eduAplctOrd": p_logSeq,
|
||||||
|
"trgtId" : p_trgtId
|
||||||
|
},
|
||||||
|
dataType:'json',
|
||||||
|
success:function(returnData){
|
||||||
|
if(returnData.result == "success"){
|
||||||
|
if(p_alertYn != 'N'){
|
||||||
|
alert(returnData.message);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(p_alertYn != 'N'){
|
||||||
|
alert(returnData.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error:function(request , status, error){
|
||||||
|
if(p_alertYn != 'N'){
|
||||||
|
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getContextPath(){
|
||||||
|
var hostIndex = location.href.indexOf( location.host ) + location.host.length;
|
||||||
|
var contextPath = location.href.substring( hostIndex, location.href.indexOf('/', hostIndex + 1) );
|
||||||
|
return contextPath;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user