친구톡 발송 > 전송내역 스크립트 추가
This commit is contained in:
parent
eb3f3876f1
commit
485a2b52a6
@ -171,10 +171,10 @@ public class KakaoFriendsTalkSendController {
|
||||
String chkDate = format.format(cal.getTime());
|
||||
searchVO.setUserId(userId);
|
||||
searchVO.setMyMsgStDt(chkDate); //검색 시작일 저장 - 현재날짜로 부터 3일 이전 날짜로 시작
|
||||
model.addAttribute("resultLatestMsgList", mjonMsgDataService.selectLatestMsgList(searchVO));
|
||||
// model.addAttribute("resultLatestMsgList", mjonMsgDataService.selectLatestMsgList(searchVO));
|
||||
|
||||
//자주보내는 번호
|
||||
model.addAttribute("resultBookMarkMsgList", mjonMsgDataService.selectBookMarkMsgList(searchVO));
|
||||
// model.addAttribute("resultBookMarkMsgList", mjonMsgDataService.selectBookMarkMsgList(searchVO));
|
||||
|
||||
// 사용자 정의 단가 정보 불러오기(시스템 단가 혹은 협의 단가)
|
||||
model.addAttribute("sendPrice", kakaoSendUtil.selectSendPriceOfKakaoAtAndSmsAndMms(userId));
|
||||
|
||||
@ -182,8 +182,116 @@ $(document).ready(function (){
|
||||
setTimeout(() => { $(this).val(''); }, 0); // 파일 선택 초기화
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// 최근 전송내역
|
||||
resultLatestMsgList();
|
||||
//자주보내는 번호
|
||||
resultBookMarkMsgList();
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
//최근 전송내역
|
||||
function resultLatestMsgList(){
|
||||
|
||||
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:"/web/mjon/msgdata/resultLatestMsgListAjax.do",
|
||||
data:{},
|
||||
dataType:'json',
|
||||
// timeout:(1000*30),
|
||||
success:function(data){
|
||||
console.log('resultLatestMsgList : ',data.object);
|
||||
|
||||
|
||||
// 가져온 데이터 배열
|
||||
let resultList = data.object;
|
||||
let $latestMsgUl = $('#latestMsgUl'); // 기존 리스트 UL
|
||||
|
||||
// 기존 내용을 비우기
|
||||
$latestMsgUl.empty();
|
||||
|
||||
// 데이터가 있는 경우
|
||||
if (resultList && resultList.length > 0) {
|
||||
resultList.forEach(function(item, index) {
|
||||
let listItem =
|
||||
'<li id="latestLi">' +
|
||||
'<input type="checkbox" id="addrChk_' + (index + 1) + '" name="latAddrChk" value="' + item.callTo + '">' +
|
||||
'<label for="addrChk_' + (index + 1) + '" class="label">최근 전송내역</label>' +
|
||||
'<p>' + item.callTo + '</p>' +
|
||||
'<button type="button" id="latestAddrDel">' +
|
||||
'<img src="/publish/images/popup/close3.png" alt="전화번호 삭제">' +
|
||||
'</button>' +
|
||||
'</li>';
|
||||
|
||||
$latestMsgUl.append(listItem);
|
||||
});
|
||||
} else {
|
||||
// 데이터가 없는 경우
|
||||
$latestMsgUl.append('<li><p>최근 발송 내역이 없습니다.</p></li>');
|
||||
}
|
||||
},
|
||||
error:function(request , status, error){
|
||||
console.log(' error ?');
|
||||
console.log('request : ', request);
|
||||
console.log('status : ', status);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//자주보내는 번호
|
||||
function resultBookMarkMsgList(){
|
||||
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:"/web/mjon/msgdata/resultBookMarkMsgList.do",
|
||||
data:{},
|
||||
dataType:'json',
|
||||
// timeout:(1000*30),
|
||||
success:function(data){
|
||||
console.log('resultBookMarkMsgList : ',data.object);
|
||||
|
||||
|
||||
// 가져온 데이터 배열
|
||||
let resultList = data.object;
|
||||
let $bookMsgUl = $('#bookMsgUl'); // 기존 리스트 UL
|
||||
|
||||
// 기존 내용을 비우기
|
||||
$bookMsgUl.empty();
|
||||
|
||||
// 데이터가 있는 경우
|
||||
if (resultList && resultList.length > 0) {
|
||||
resultList.forEach(function(item, index) {
|
||||
// console.log(item.addrPhoneNo + " : " + item.addrPhoneNo);
|
||||
let listItem =
|
||||
'<li id="bookMarkLi">' +
|
||||
'<input type="checkbox" id="bokAddrChk_' + (index + 1) + '" name="bookAddrChk" value="' + item.addrPhoneNo + '">' +
|
||||
'<label for="bokAddrChk_' + (index + 1) + '" class="label">최근 전송내역</label>' +
|
||||
// '<p>' + item.addrPhoneNo + '</p>' +
|
||||
'<p>' + item.addrPhoneNo + '</p>' +
|
||||
'<button type="button" id="bookMarkAddrDel">' +
|
||||
'<img src="/publish/images/popup/close3.png" alt="전화번호 삭제">' +
|
||||
'</button>' +
|
||||
'</li>';
|
||||
|
||||
$bookMsgUl.append(listItem);
|
||||
});
|
||||
} else {
|
||||
// 데이터가 없는 경우
|
||||
$bookMsgUl.append('<li><p>등록된 자주 보내는 번호 내역이 없습니다..</p></li>');
|
||||
}
|
||||
},
|
||||
error:function(request , status, error){
|
||||
console.log(' error ?');
|
||||
console.log('request : ', request);
|
||||
console.log('status : ', status);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initFormChk(){
|
||||
|
||||
//첫로딩시 우측 미리보기 화면 숨김처리
|
||||
@ -2240,6 +2348,100 @@ function updateButtons(){
|
||||
</div><!--// 엑셀 불러오기 -->
|
||||
</form>
|
||||
|
||||
|
||||
<div class="tooltip-wrap">
|
||||
<div class="popup-com history_layer popup03" tabindex="0"
|
||||
data-tooltip-con="popup03" data-focus="popup03"
|
||||
data-focus-prev="popup03-close">
|
||||
<div class="popup_heading">
|
||||
<p>
|
||||
전송내역
|
||||
</p>
|
||||
<button type="button" class="tooltip-close"
|
||||
data-focus="popup03-close" id="btnLatestAddPhoneClose">
|
||||
<img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기">
|
||||
</button>
|
||||
</div>
|
||||
<div class="layer_in">
|
||||
<!-- tab button -->
|
||||
<ul class="tabType6">
|
||||
<li class="tab active"><button type="button"
|
||||
onclick="TabType(this,'1');">최근 전송내역</button></li>
|
||||
<li class="tab"><button type="button"
|
||||
onclick="TabType(this,'2');">자주보내는 번호</button></li>
|
||||
</ul>
|
||||
<!--// tab button -->
|
||||
<!-- 최근 전송내역 -->
|
||||
<div class="history_cont hascont current">
|
||||
<div class="histroy_trans latestMsgArea" id="latestMsgArea">
|
||||
<ul id="latestMsgUl">
|
||||
<%-- <c:choose>
|
||||
<c:when test="${not empty resultLatestMsgList}">
|
||||
<c:forEach var="latestMsgList" items="${resultLatestMsgList}" varStatus="status">
|
||||
<li id="latestLi">
|
||||
<input type="checkbox" id="addrChk_${status.count}" name="latAddrChk" value="<c:out value='${latestMsgList.callTo}'/>">
|
||||
<label for="addrChk_${status.count}" class="label">최근 전송내역</label>
|
||||
<p><c:out value="${latestMsgList.callTo}"/></p>
|
||||
<button type="button" id="latestAddrDel">
|
||||
<img src="/publish/images/popup/close3.png" alt="전화번호 삭제">
|
||||
</button>
|
||||
</li>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li>
|
||||
<p>최근 발송 내역이 없습니다.</p>
|
||||
</li>
|
||||
</c:otherwise>
|
||||
</c:choose> --%>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="popup_btn_wrap2 hisroy_btn" style="width: 230px;">
|
||||
<button type="button" id="latestAddPhoneAll">전체추가</button>
|
||||
<button type="button" id="latestAddPhone">선택추가</button>
|
||||
<button type="button" id="latestCancelPhone">선택취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<!--// 최근 전송내역 -->
|
||||
<!-- 자주보내는 번호 -->
|
||||
<div class="history_cont hascont">
|
||||
<div class="histroy_trans" id="bookMarkMsgArea">
|
||||
<ul id="bookMsgUl">
|
||||
<li>
|
||||
<p>데이터 로딩중입니다.</p>
|
||||
</li>
|
||||
<%-- <c:choose>
|
||||
<c:when test="${not empty resultBookMarkMsgList}">
|
||||
<c:forEach var="bookMarkMsgList" items="${resultBookMarkMsgList}" varStatus="status">
|
||||
<li id="bookMarkLi">
|
||||
<input type="checkbox" id="bokAddrChk_${status.count}" name="bookAddrChk" value="<c:out value='${bookMarkMsgList.addrPhoneNo}'/>">
|
||||
<label for="addrChk_${status.count}" class="label">최근 전송내역</label>
|
||||
<p><c:out value="${bookMarkMsgList.addrPhoneNo}"/></p>
|
||||
<button type="button" id="bookMarkAddrDel"><img src="/publish/images/popup/close3.png" alt="전화번호 삭제"></button>
|
||||
</li>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li>
|
||||
<p>등록된 자주 보내는 번호 내역이 없습니다.</p>
|
||||
</li>
|
||||
</c:otherwise>
|
||||
</c:choose> --%>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="popup_btn_wrap2 hisroy_btn" style="width: 230px;">
|
||||
<button type="button" id="bookMarkAddPhoneAll">전체추가</button>
|
||||
<button type="button" id="bookMarkAddPhone">선택추가</button>
|
||||
<button type="button" id="bookMarkCancelPhone">선택취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<!--// 자주보내는 번호 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--// 전송내역 팝업 -->
|
||||
|
||||
|
||||
<form id="templateForm" name="templateForm" method="post">
|
||||
<input type="hidden" id="friendId" name="friendId" value="<c:out value='${resultTemplateVO.friendId}'/>"/>
|
||||
</form>
|
||||
Loading…
Reference in New Issue
Block a user