<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="ec" uri="/WEB-INF/tld/ecnet_tld.tld"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fnc" uri="/WEB-INF/tld/functions.tld"%>


<script src="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"></script>
<script language=javascript>
var thisYearStart = "";
var thisYearEnd = "";
var lastfulstday = "";
var lastfuledday = "";
var thisfulstlday = "";
var thisfuledtlday = "";

$(document).ready(function(){
	payUserListAjax(1);
	
	// 등급제 대상 여부
	//getMberGrdChk();	
	
	var date = new Date() ;
	//이전달 첫날/마지막날 조회
	if(date.getMonth()+1 == 1){
		lastfulstday = date.getFullYear()-1 +  "/12" + "/01";
		lastfuledday = date.getFullYear()-1 +  "/12" + "/"+new Date(date.getFullYear()-1, 12, 0);
	}else{
		lastfulstday = date.getFullYear() + "/" ; 
		lastfulstday += date.getMonth() < 10  ? "0"+ (date.getMonth()) : date.getMonth()+"" ;
		lastfuledday = lastfulstday + "/"+ new Date(date.getFullYear(), date.getMonth(), 0).getDate()+"" ;
		lastfulstday += "/01" ;
	}
	
	//당월 첫날/마지막날 조회
	thisfulstlday = date.getFullYear() + "/" ;
	thisfulstlday += date.getMonth()+1 < 10  ? "0"+ (date.getMonth()+1) : date.getMonth()+1+"" ;
	thisfuledtlday = thisfulstlday + "/"+ new Date(date.getFullYear(), date.getMonth()+1, 0).getDate()+"";
	thisfulstlday += "/01" ;
	
	thisYearStart = date.getFullYear() + "/01/01" ;
	thisYearEnd = date.getFullYear() + "/12/31" ;

	//이용내역 loading
	subContent();			//이용내역 총금액

	subContentSendReserv();	//발송,예약건수

	subContentKakaoATSentList();//톡 발송 정보
	
	
	

	
	
});


//기간 요일 지정
function setCalVal(val,targetObj){
	$('input[name='+targetObj+']').val(val) ;
}
// 세부내역 텝 이동
function payUserTab(obj, pageType){
	
	var $tab = $(obj).closest("li");
	$tab.addClass("active");
	$tab.find("button").attr("title", "선택됨");
	$tab.siblings("li.tab").removeClass("active");
	$tab.siblings("li.tab").find("button").removeAttr("title");
	
	document.listForm.pageType.value = pageType;
	payUserListAjax(1);
}

//요금사용내역 리스트
function payUserListAjax(pageNo){
	document.listForm.pageIndex.value = pageNo;
	var sendData= $(document.listForm).serializeArray();
	$("#payUserListLoad").load("/web/member/pay/PayUserWithKakaoListAjax.do", sendData ,function(response, status, xhr){
		$("#statementTap").css('display', 'none');
	});
}

//마이페이지 - 세부내역
function subContent(p_content_no){	
	
	var sendData =  $(document.listForm).serializeArray();
	var v_html_pre	=	'<table>'
			+	'<caption>구분, 충전금액, 사용금액, 잔액 등 정보를 제공하는 표</caption>'
			+	'<colgroup>'
			+	'<col style="width: 115px;">'
			+	'<col style="width: calc((100% - 115px)/3);">'
			+	'<col style="width: calc((100% - 115px)/3);">'
			+	'<col style="width: calc((100% - 115px)/3);">'
			+	'</colgroup>'
			+	'<thead>'
			+	'<tr>'
			+	'<th scope="col">구분</th>'
			+	'<th scope="col">충전금액</th>'
			+	'<th scope="col">사용금액</th>'
			+	'<th scope="col">잔액</th>'
			+	'</tr>'
			+	'</thead>'
			+	'<tbody>'
			+	'<tr><td colspan="4">LOADING...</td></tr>'
			+	'</tbody>'
			+	'</table>';
	//$("#prePaymentYn_Y").html('<div class="list_info"><table class="tType4"><tbody><tr><td colspan="12">LOADING...</td></tr></tbody></table></div>');
	$("#prePaymentYn_Y").html(v_html_pre);

		
	
	$("#prePaymentYn_Y").load("/web/user/subcontent/mberInfo_cash_pointAjax.do", sendData ,function(response, status, xhr){
	});
	
}

//마이페이지 - 세부내역	-	발송/예약건수
function subContentSendReserv(p_content_no){	
	
	var sendData =  $(document.listForm).serializeArray();
	var v_html_pre	=	'<table>'
			+	'<caption>구분, 문자, 알림톡, 친구톡, 팩스, 계 등 정보를 제공하는 표</caption>'
			+	'<colgroup>'
			+	'<col style="width: calc(100% / 5);">'
			+	'<col style="width: calc(100% / 5);">'
			+	'<col style="width: calc(100% / 5);">'
			+	'<col style="width: calc(100% / 5);">'
			+	'<col style="width: calc(100% / 5);">'
			+	'</colgroup>'
			+	'<thead>'
			+	'<tr>'
			+	'<th scope="col">구분</th>'
			+	'<th scope="col">문자</th>'
			+	'<th scope="col">알림톡</th>'
			+	'<th scope="col">팩스</th>'
			+	'<th scope="col">계</th>'
			+	'</tr>'
			+	'</thead>'			
			+	'<tbody>'
			+	'<tr><td colspan="5">LOADING...</td></tr>'
			+	'</tbody>'
			+	'</table>';
	//$("#prePaymentYn_Y").html('<div class="list_info"><table class="tType4"><tbody><tr><td colspan="12">LOADING...</td></tr></tbody></table></div>');
	$("#send_reserv").html(v_html_pre);

		
	
	$("#send_reserv").load("/web/user/subcontent/mberInfo_send_reservAjax.do", sendData ,function(response, status, xhr){
	});
	
}

//마이페이지 - 세부내역	-	발송/예약건수
function subContentKakaoATSentList(p_content_no){	
	
	var sendData =  $(document.listForm).serializeArray();
	var v_html_pre	=	'<table>'
			+	'<caption>등록일자, 발신번호, 발신번호 명, 상태 정보를 제공하는 표</caption>'
			+	'<colgroup>'
			+	'<col style="width: 10%;">'
			+	'<col style="width: 15%;">'
			+	'<col style="width: auto;">'
			+	'<col style="width: 10%;">'
			+	'<col style="width: 10%;">'
			+	'<col style="width: 15%;">'
			+	'</colgroup>'
			+	'<thead>'
			+	'<tr>'
			+	'<th scope="col">메시지 형태</th>'
			+	'<th scope="col">발송일시</th>'
			+	'<th scope="col">내용</th>'
			+	'<th scope="col">발송건수</th>'
			+	'<th scope="col">결과</th>'
			+	'<th scope="col">대체문자 건수</th>'
			+	'</tr>'
			+	'</thead>'			
			+	'<tbody>'
			+	'<tr><td colspan="6">LOADING...</td></tr>'
			+	'</tbody>'
			+	'</table>';
								
	//$("#prePaymentYn_Y").html('<div class="list_info"><table class="tType4"><tbody><tr><td colspan="12">LOADING...</td></tr></tbody></table></div>');
	$("#kakaoATSentList").html(v_html_pre);
	
	$("#kakaoATSentList").load("/web/user/subcontent/mberInfo_kakaoATSentListAjax.do", sendData ,function(response, status, xhr){
	});
	
}

//[문자]상세보기 버튼 실행
function fnRevDetailPop(msgGroupId, fileCnt){
	document.resPopForm.msgGroupId.value = msgGroupId;
	var sendData =  $(document.resPopForm).serializeArray();
	$("#resvMsgDetailPopLoad").load("/web/member/pay/selectPayUserMsgWithKakaoDetailDataAjax.do", sendData ,function(response, status, xhr){
	});
}

//[카카오]상세보기 버튼 실행
function fnRevDetailPop02(msgGroupId){
	document.resPopForm.msgGroupId.value = msgGroupId;
	var sendData =  $(document.resPopForm).serializeArray();
	$("#msgSentDetailPopLoad").load("/web/kakao/sent/selectKakaoSentDetailDataAjax.do", sendData ,function(response, status, xhr){
		popupTab($('#atBtn'),'1');
		$('#kakaoClick').trigger('click');
	});		
	
}

//[펙스] 상세보기 버튼 실행
function fnRevDetailPop03(msgGroupId){
	document.faxPopForm.faxGroupId.value = msgGroupId;
	var sendData =  $(document.faxPopForm).serializeArray();
		// 전송건별
	$("#faxSentDetailPopLoad").load("/web/mjon/fax/faxSendListAjax.do", sendData ,function(response, status, xhr){
		$('#faxClick').trigger('click');
	});
}

// 등급제 누적결제액 세부내역
function mberGrdHistListAjax(pageNo){
	document.levelForm.pageIndex.value = pageNo;
		
	var sendData= $(document.levelForm).serializeArray();
	$("#mberGrdHistListLoad").load("/web/member/grd/mberGrdHistListAjax.do", sendData ,function(response, status, xhr){

	});
}

// 등급제 대상 여부
function getMberGrdChk() {
	$.ajax({
        type: "POST",
        url: "/web/grd/mberGrdChkAjax.do",
        data: {},
        dataType:'json',
        async: false,
        success: function (data) {
			if (data.isSuccess) {
				// 등급제 누적결제액 세부내역
				$("#levelSubTitle").html("(" + data.rtnMberGrdVO.grdDate + " ~ 현재)");				
				document.levelForm.grdSetNm.value = data.rtnMberGrdVO.grdSetNm;
				document.levelForm.totAmt.value = data.rtnMberGrdVO.totAmt;
				mberGrdHistListAjax(1);	

				// 등급제 아이콘 버튼 노출여부
				var sHtml = "";
				sHtml += "<img src='/publish/images/level/level_icon/level_small/" + data.rtnMberGrdVO.grdSetIcon + "_small_icon.png' alt='등급별 스몰 아이콘'>";
				sHtml += "<p>" + data.rtnMberGrdVO.grdSetNm + "</p>";
				$("#levelIconBtn").html(sHtml);
				$("#levelIconBtn").show();
			} 
			else {
				//alert("Msg : " + data.msg);
			}
		},
        error: function (e) { 
        	//alert("ERROR : " + JSON.stringify(e)); 
        }
    });				
}	

//휴대푠 번호 등록 [시작]--------------------------------------------------------------------------------------------
window.name = "kmcis_web_sample";
var KMCIS_window;
//휴대폰 인증팝업 열기
 function openKMCISWindow(){ 
 //본인인증시도 로그 
 certAccessLog();
	var UserAgent = navigator.userAgent;
	/* 모바일 접근 체크*/
	// 모바일일 경우 (변동사항 있을경우 추가 필요)
	if (UserAgent.match(/iPhone|iPod|Android|Windows CE|BlackBerry|Symbian|Windows Phone|webOS|Opera Mini|Opera Mobi|POLARIS|IEMobile|lgtelecom|nokia|SonyEricsson/i) != null || UserAgent.match(/LG|SAMSUNG|Samsung/) != null) {
		document.reqKMCISForm.target = 'KMCISWindow';  // 모바일
	} else { // 모바일이 아닐 경우
		KMCIS_window = window.open('', 'KMCISWindow', 'width=425, height=550, resizable=0, scrollbars=no, status=0, titlebar=0, toolbar=0, left=435, top=250' );
	
		if(KMCIS_window == null){
			alert(" ※ 윈도우 XP SP2 또는 인터넷 익스플로러 7 사용자일 경우에는 \n    화면 상단에 있는 팝업 차단 알림줄을 클릭하여 팝업을 허용해 주시기 바랍니다. \n\n※ MSN,야후,구글 팝업 차단 툴바가 설치된 경우 팝업허용을 해주시기 바랍니다.");
		}
	
		document.reqKMCISForm.target = 'KMCISWindow';
	}
	
	document.reqKMCISForm.action = 'https://www.kmcert.com/kmcis/web/kmcisReq.jsp';
	document.reqKMCISForm.submit();
}

// /web/user/selectSecurityAuthn.do 리다이렉트 URL

//자식창에서 호출
function callTo() {
	alert("호출입니다.");
}

//휴대푠 번호 등록 [끝]--------------------------------------------------------------------------------------------

</script>

<form name="reqKMCISForm" method="post" action="#">
	<input type="hidden" id="tr_url" name="tr_url" value = "${certVO.tr_url}">
	<input type="hidden" id="tr_add" name="tr_add" value = "${certVO.tr_add}">
	<input type="hidden" id="tr_cert" name="tr_cert" value = "${certVO.tr_cert}">
	<input type="hidden" name="tr_ver"      value = "V2">
</form>

<form id="levelForm" name="levelForm" method="post">
	<input type="hidden" id="pageType" name="pageType"  value=""/>
	<input type="hidden" id="pageIndex" name="pageIndex" value=""/>
	<input type="hidden" id="grdSetNm" name="grdSetNm" value=""/>
	<input type="hidden" id="totAmt" name="totAmt" value=""/>
</form>

<!-- 등급 및 누적결제액 확인 팝업 data-tooltip:level_check_popup01 시작 -->
<div class="tooltip-wrap level_popup">
	<div class="popup-com candidate_layer level_check_popup01" tabindex="0" data-tooltip-con="level_check_popup01" data-focus="level_check_popup01" data-focus-prev="level_check_popup01-close" style="width: 680px;">
		<div class="popup_heading">
			<p>누적결제액 세부내역<span id="levelSubTitle"></span></p>
			<button type="button" class="tooltip-close" data-focus="level_check_popup01-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button>
		</div>
		<div class="layer_in" id="mberGrdHistListLoad" style="padding-bottom: 0px;">
		
		</div>
		
		<div class="popup_btn_wrap2" style="margin-bottom: 30px;">
			<button type="button" class="tooltip-close" data-focus="level_check_popup01-close">닫기</button>                      
		</div>
		
	</div>
</div>
<!-- 등급 및 누적결제액 확인 팝업 data-tooltip:level_check_popup01 끝 -->
		
<!-- 문자 팝업 -->
<div class="tooltip-wrap">
	<div class="popup-com adr_layer rev_popup01" tabindex="0" data-tooltip-con="rev_popup01" 
		data-focus="rev_popup01" data-focus-prev="rev_popup01-close" style="width: 440px;">
		<div class="popup_heading">
			<p>문자내용</p>
			<button type="button" class="tooltip-close" data-focus="rev_popup01-close">
				<img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기">
			</button>
		</div>
		<div class="layer_in" id="resvMsgDetailPopLoad">
			<div class="popup_btn_wrap2" style="justify-content: center;">
			    <button type="button" class="tooltip-close" data-focus="rev_popup01-close" data-focus-next="rev_popup01">닫기</button>                      
			</div>
		</div>
	</div>
</div>
<!-- // 문자 팝업 -->

<!-- 카카오 알림톡 팝업 -->
<div class="tooltip-wrap">
	<div class="popup-com adr_layer kakao_rev_popup rev_popup02" tabindex="0" data-tooltip-con="rev_popup02"
		data-focus="rev_popup02" data-focus-prev="rev_popup02-close" style="width: 440px;">
		<div class="popup_heading">
			<p>카카오 내용</p>
			<button type="button" class="tooltip-close" data-focus="rev_popup02-close">
				<img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기">
			</button>
		</div>
		<div class="layer_in">
			
			<!-- 팝업 상세내용 노출  -->
			<div id="msgSentDetailPopLoad" >
			</div>
			<div class="popup_btn_wrap2" style="justify-content: center;">
				<button type="button" class="tooltip-close" data-focus="rev_popup02-close"
					data-focus-next="rev_popup02">닫기</button>
			</div>
		</div>
	</div>
</div>
<!-- //카카오 알림톡 팝업 -->

<!-- 펙스 팝업 -->
<div class="tooltip-wrap">
	<div class="popup-com adr_layer fax_rev_popup rev_popup03" tabindex="0" data-tooltip-con="rev_popup03"
		data-focus="rev_popup03" data-focus-prev="rev_popup03-close" style="width: 800px;">
		<div class="popup_heading">
			<p>펙스 내용</p>
			<button type="button" class="tooltip-close" data-focus="rev_popup03-close">
				<img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기">
			</button>
		</div>
		<div class="layer_in">
			
			<!-- 팝업 상세내용 노출  -->
			<div id="faxSentDetailPopLoad" >
			</div>
		</div>
	</div>
</div>
<!-- //펙스 팝업 -->



	<div class="mask"></div>

	<!-- 휴대폰인증 팝업 -->
	<div class="tooltip-wrap">
		<div class="popup-com certify_layer popup05" tabindex="0" data-tooltip-con="popup05" data-focus="popup05" data-focus-prev="popup05-close" style="width: 500px;">
			<div class="popup_heading">
				<p>휴대폰 인증</p>
				<button type="button" class="tooltip-close" data-focus="popup05-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button>
			</div>
			<div class="layer_in">
				<div class="hascont">
					<table class="layer_tType1">
						<caption>본인인증(step1) 표</caption>
						<colgroup>
							<col style="width: 95px">
							<col style="width: auto">
						</colgroup>
						<tbody>
							<tr>
								<th>핸드폰번호</th>
								<td>
									<label for="" class="label">핸드폰번호 입력</label>
									<input type="text" placeholder="‘-’없이 번호만 입력 " id="certReqPhone" onfocus="this.placeholder=''" 
										onblur="this.placeholder='‘-’없이 번호만 입력 '" class="inputLight" style="width: 200px;"
										oninput="this.value = this.value.replace(/[^0-9]/g, '');" maxlength="14"/>
									<button type="button" id="certReqBtn" class="btnType btnType6" style="width:90px">인증요청</button>
								</td>
							</tr>
							<tr>
								<th>인증번호</th>
								<td>
									<label for="" class="label">인증번호 입력</label>
									<input type="text" placeholder="인증번호 4자리 입력" id="certNumber" onfocus="this.placeholder=''" onblur="this.placeholder='인증번호 4자리 입력'" class="inputLight" style="width: 200px;">
									<button type="button" id="certConfirmBtn" class="btnType btnType6" style="width:90px">확인</button>
								</td>
							</tr>
						</tbody>
					</table>
					<div class="popup_btn_wrap2">
						<button type="button" class="tooltip-close" data-focus="popup05-close" data-focus-next="popup05">닫기</button>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!--// 휴대폰인증 팝업 -->







<input type="button" id="tooltopClick" data-tooltip="rev_popup01" style="display:none;"/>
<div class="inner">
	<!-- send top -->
	<div class="send_top">
		<!-- tab button -->
		<%@include file="/WEB-INF/jsp/web/user/mypageHeader.jsp" %>
		<!--// tab button -->

		<form id="resPopForm" name="resPopForm" method="post">
			<input type="hidden" id="msgGroupId" name="msgGroupId" value=""/>
			<input type="hidden" id="fileCnt" name="fileCnt" value=""/>
		</form>
		<form id="faxPopForm" name="faxPopForm" method="post">
			<input type="hidden" id="faxGroupId" name="faxGroupId" value=""/>
		</form>

		<!-- 마이페이지 - 대시보드 -->
		<div class="mypage_content current">
			<div class="heading">
				<h2>마이페이지</h2>
			</div>
			<div class="my_dashboard">
				<div class="my_dashboard_cont1">
					<button type="button" class="level_icon" data-tooltip="level_check_popup01" id="levelIconBtn" style="display: none;">
					</button>
					<div class="title_wrap">
						<p class="user_text">
							<span class="user_name"><c:out value="${mberManageVO.mberNm}"/></span>
							회원님 반갑습니다
						</p>
						<c:if test="${loginVO.dept eq 'p'}">
								<button type="button" class="btnType" onclick="location.href='/web/user/membershipChange.do'">기업회원전환</button>
						</c:if>
					</div>
					<div class="send_price">
						<div class="price_title">나의<br />단가</div>
						<div class="price_wrap">
						
						<c:choose>
							<c:when test="${eventMberInfo.eventStatus == 'Y' && eventDiffDate >= 0}">
								<ul>
									<li class="title">
										<img src="/publish/images/content/icon_mypage_message.png" alt="" />문자
									</li>
									<li class="price_line">
										<span class="type">단문</span>
										<span class="price">
											<fmt:formatNumber value="${eventMberInfo.eventShortPrice}" pattern="###.#" />
										</span>원 
									</li>
									<li class="price_line">
										<span class="type">장문</span>
										<span class="price">
											<fmt:formatNumber value="${eventMberInfo.eventLongPrice}" pattern="###.#" />
										</span>원 
									</li>
									<li>
										<span class="type">그림</span>
										<span class="price">
											<fmt:formatNumber value="${eventMberInfo.eventPicturePrice}" pattern="###.#" />
										</span>원 
										(2장 : <fmt:formatNumber value="${eventMberInfo.eventPicture2Price}" pattern="###.#" />원 / 3장 : <fmt:formatNumber value="${eventMberInfo.eventPicture3Price}" pattern="###.#" />원)
									</li>
								</ul>
								<ul>
									<li class="title">
										<img src="/publish/images/content/icon_mypage_kakaotalk.png" alt="" />카톡
									</li>
									<li class="price_line">
										<span class="type">알림톡</span>
										<span class="price"><fmt:formatNumber value="${kakaoAtPrice}" pattern="###.#" /></span>원 
									</li>
									<li class="title">
										<img src="/publish/images/content/icon_mypage_fax.png" alt="" />팩스
									</li>
									<li>
										<span class="type">팩스</span>
										<span class="price"><fmt:formatNumber value="${faxPrice}" pattern="###.#" /></span>원
									</li>
									<li class="event_wrap">
										<p class="event_text">※ 이벤트 단가 적용기간 : <c:out value="${eventMberInfo.eventStartDate}"/> ~ <c:out value="${eventMberInfo.eventEndDate}"/>(<span><c:out value="${eventDiffDate}"/></span>일 남음)</p>
									</li>
								</ul>
							</c:when>
							<c:otherwise>
								<ul>
									<li class="title">
										<img src="/publish/images/content/icon_mypage_message.png" alt="" />문자
									</li>
									<li class="price_line">
										<span class="type">단문</span>
										<span class="price">
											<fmt:formatNumber value="${shortPrice}" pattern="###.#" />
										</span>원 
									</li>
									<li class="price_line">
										<span class="type">장문</span>
										<span class="price">
											<fmt:formatNumber value="${longPrice}" pattern="###.#" />
										</span>원 
									</li>
									<li>
										<span class="type">그림</span>
										<span class="price">
											<fmt:formatNumber value="${picturePrice}" pattern="###.#" />
										</span>원 
										(2장 : <fmt:formatNumber value="${picture2Price}" pattern="###.#" />원 / 3장 : <fmt:formatNumber value="${picture3Price}" pattern="###.#" />원)
									</li>
								</ul>
								<ul>
									<li class="title">
										<img src="/publish/images/content/icon_mypage_kakaotalk.png" alt="" />카톡
									</li>
									<li class="price_line">
										<span class="type">알림톡</span>
										<span class="price">
											<fmt:formatNumber value="${kakaoAtPrice}" pattern="###.#" />
										</span>원 
									</li>
									<li class="title">
										<img src="/publish/images/content/icon_mypage_fax.png" alt="" />팩스
									</li>
									<li>
										<span class="type">팩스</span>
										<span class="price">
											<fmt:formatNumber value="${faxPrice}" pattern="###.#" />
										</span>원
									</li>
								</ul>
							</c:otherwise>
						</c:choose>
						</div>
					</div>
				</div>
				
				
				<div class="my_dashboard_cont3">
					<p class="dashboard_title">이용내역</p>
					
					<c:choose>
						<c:when test="${mberManageVO.prePaymentYn eq 'Y'}">
							<p class="reqTxt2">(단위 : 건, 원)</p>
							<div class="table_wrap" id="prePaymentYn_Y">
							</div>							
						</c:when>
						<c:otherwise>
							<p class="reqTxt2">(단위 : 건, 원) VAT 별도</p>
							<div class="table_wrap">
								<table>
									<caption>구분, 충전금액, 사용금액, 잔액 등 정보를 제공하는 표</caption>
									<colgroup>
										<col style="width: 115px;">
										<col style="width: calc((100% - 115px)/4);">
										<col style="width: calc((100% - 115px)/4);">
										<col style="width: calc((100% - 115px)/4);">
										<col style="width: calc((100% - 115px)/4);">
									</colgroup>
									<thead>
										<tr>
											<th scope="col">구분</th>
											<th scope="col">누적 사용금액</th>
											<th scope="col">누적 납부금액</th>
											<th scope="col">당월 납부 예상금액</th>
											<th scope="col">잔액 (사용가능금액)</th>
										</tr>
									</thead>
									<tbody>
										<tr>
											<td>캐시</td>
											<%-- <c:forEach var="cashInfo" items="${cashInfoList}" varStatus="status">
											<td>
												<fmt:formatNumber value="${cashInfo.cashSum}" pattern="" />
											</td>
											</c:forEach> --%>
											<td>
												<%-- 누적 사용금액 => 현재까지 실제 문자발송에 사용된 캐시의 합산 --%>
												<fmt:formatNumber value="${totSumCashAfterPay}" pattern="" />
											</td>
											<td>
												<%-- 누적 납부금액 => 현재까지 실제 납입하여 결제 완료 처리된 금액 (미납금액 제외) --%>
												<fmt:formatNumber value="${totSumPaymentAfterPay}" pattern="" />
											</td>
											<td>
												<%-- 당월 납부 예상 금액 => (누적 사용금액 - 누적 납부금액) --%>
												<fmt:formatNumber value="${unPaymentAfterPay}" pattern="" />
											</td>
											<td>
												<%-- 현재 회원의 보유잔액(캐시) --%>
												<fmt:formatNumber value="${mberManageVO.userMoney}" pattern="" />
											</td>
										</tr>
										<tr>
											<td>포인트</td>
											<%-- <c:forEach var="pointInfo" items="${pointInfoList}" varStatus="status">
											<td>
												<fmt:formatNumber value="${pointInfo.sumPay}" pattern="" />
											</td>
											</c:forEach> --%>
											<td>
												<%-- 현재까지 적립된 포인트의 합산 --%>
												<fmt:formatNumber value="${totSumPointAfterPay}" pattern="" />
											</td>
											<td>
												<%-- 누적 납부금액에 대한 2%의 포인트 --%>
												<fmt:formatNumber value="${sumPaymentPointAfterPay}" pattern="" />
											</td>
											<td>
												<%-- 당월  납부 예상금액에 대한 2%의 포인트 --%>
												<fmt:formatNumber value="${unPaymentPointAfterPay}" pattern="" />
											</td>
											<td>
												<%-- 현재 회원의 보유 포인트 --%>
												<fmt:formatNumber value="${mberManageVO.userPoint}" pattern="" />
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</c:otherwise>
					</c:choose>
					
					<button type="button" onclick="location.href='/web/member/pay/payUserSWList.do';">
						<img src="/publish/images/content/mypage_plus.png" alt="더보기">
					</button>
					<div class="table_wrap" id="send_reserv">
					</div>					
				</div>
				<p class="tType1_title">
					<img src="/publish/images/content/icon_details_breakdown.png" alt="알림톡 아이콘 이미지">세부내역
				</p>
				<form id="listForm" name="listForm" method="post">
					<input type="hidden" id="pageType" name="pageType"  value=""/>
					<input type="hidden" id="pageIndex" name="pageIndex" value=""/>
					<div class="excel_middle">
						<div class="select_btnWrap clearfix">
							<div class="btn_left">
								<span class="cal_label">기간선택</span>
								<div class="calendar_wrap">
									<input type="text" class="startDate inp calendar" title="검색 시작일" id="startDate" name="startDate" value="" data-datecontrol="true">
									<span class="dateEtc">~</span>
									<input type="text" class="endDate inp calendar" title="검색 종료일" id="endDate" name="endDate" value="" data-datecontrol="true">
								</div>
								<button type="button" onclick="setCalVal(thisYearStart,'startDate');setCalVal( thisYearEnd,'endDate'); return false;"  class="btnType btnType19">이번년도</button>
								<button type="button" onclick="setCalVal(lastfulstday,'startDate');setCalVal( lastfuledday,'endDate'); return false;"  class="btnType btnType19">전월</button>
								<button type="button" onclick="setCalVal(thisfulstlday,'startDate');setCalVal( thisfuledtlday,'endDate'); return false;"  class="btnType btnType19">당월</button>
								<button type="button" class="btnType6" onclick="payUserListAjax(1); return false;">조회</button>
								<span class="reqTxt4">
									<span class="vMiddle">*</span> 조회기간의 사용내역만 보여집니다.
								</span>
							</div>
							<div></div>
						</div>
					</div>
					<div class="list_tab_wrap2 type2">
						<ul class="list_tab">
							<li class="tab active"><button type="button" onclick="payUserTab(this,'');">전체</button></li>
							<li class="tab"><button type="button" onclick="payUserTab(this,'sms');">단문</button></li>
							<li class="tab"><button type="button" onclick="payUserTab(this,'lms');">장문</button></li>
							<li class="tab"><button type="button" onclick="payUserTab(this,'mms');">그림</button></li>
							<li class="tab"><button type="button" onclick="payUserTab(this,'cam');">선거</button></li>
							<li class="tab"><button type="button" onclick="payUserTab(this,'at');">알림톡</button></li>
	<!-- 						<li class="tab"><button type="button" onclick="payUserTab(this,'ft');">친구톡</button></li> -->
							<li class="tab"><button type="button" onclick="payUserTab(this,'fax');">팩스</button></li>
						</ul>
					</div>
					<div id="payUserListLoad">
					</div>
				</form>
				
				<div class="my_dashboard_cont3 number_set">
					<div>
						<p class="dashboard_title">대표 발신번호 관리</p>
						<div style="margin:0 0 10px;">
							<p style="font-weight: 300;">· 등록된 번호 수  <span class="c_002c9a fwMd"><c:out value="${countNum}"/></span>/10개</p>
						</div>
						<div class="table_wrap">
							<table>
								<caption>등록일자, 발신번호, 발신번호 명, 상태 정보를 제공하는 표</caption>
								<colgroup>
									<col style="width: 20%;">
									<col style="width: 25%;">
									<col style="width: auto;">
									<col style="width: 20%;">
								</colgroup>
								<thead>
									<tr>
										<th scope="col">등록일자</th>
										<th scope="col">발신번호</th>
										<th scope="col">발신번호명</th>
										<th scope="col">상태</th>
									</tr>
								</thead>
								<tbody>
									<c:choose>
										<c:when test="${not empty sendNumberList}">
											<c:forEach var="resultNumber" items="${sendNumberList}" varStatus="status">
												<c:if test="${status.count < 4}">
												<tr>
													<td><c:out value="${resultNumber.frstRegistPnttm}"/></td>
													<td><c:out value="${resultNumber.phoneNumber}"/></td>
													<td>
														<p class="font_ellipsis">
															<c:choose>
																<c:when test="${not empty resultNumber.userName}">
																	<c:out value="${resultNumber.userName}"/>
																</c:when>
																<c:otherwise>
																	-
																</c:otherwise>
															</c:choose>
														</p>
													</td>
													<td>
														<c:choose>
															<c:when test="${resultNumber.phmType eq '01'}">
																<c:choose>
																	<c:when test="${resultNumber.authYn eq 'N'}">
																		<span class="c_999999">미인증</span>
																	</c:when>
																	<c:when test="${resultNumber.authYn eq 'H'}">
																		<span class="c_ffa200">심사중</span>
																	</c:when>
																	<c:when test="${resultNumber.authYn eq 'C'}">
																		<span class="c_999999 textReject">반려</span>
																	</c:when>
																	<c:when test="${resultNumber.authYn eq 'A'}">
																		<span class="c_e40000">추가인증필요</span>
																	</c:when>
																	<c:otherwise>
																		<span class="c_002c9a">인증완료</span>
																	</c:otherwise>
																</c:choose>	
															</c:when>
															<c:otherwise>
																<span class="c_999999">발신번호 차단</span>
															</c:otherwise>
														</c:choose>
													</td>
												</tr>
												</c:if>
											</c:forEach>
										</c:when>
										<c:otherwise>
											<tr>
												<td colspan = "4">등록된 발신번호가 없습니다.</td>
											</tr>
										</c:otherwise>
									</c:choose>
								</tbody>
							</table>
						</div>
						<button type="button" onclick="location.href='/web/user/sendNumberManage.do';">
							<img src="/publish/images/content/mypage_plus.png" alt="더보기">
						</button>
					</div>
				</div>
				<div class="my_dashboard_cont3">
					<p class="dashboard_title">최근 발송내역 - 문자</p>
					<div class="table_wrap">
						<table>
							<caption>등록일자, 발신번호, 발신번호 명, 상태 정보를 제공하는 표</caption>
							<colgroup>
								<col style="width: 10%;">
								<col style="width: 15%;">
								<col style="width: auto;">
								<col style="width: 10%;">
								<col style="width: 10%;">
								<col style="width: 15%;">
							</colgroup>
							<thead>
								<tr>
									<th scope="col">메시지 형태</th>
									<th scope="col">발송일시</th>
									<th scope="col">내용</th>
									<th scope="col">발송건수</th>
									<th scope="col">결과</th>
									<th scope="col">발신번호</th>
								</tr>
							</thead>
							<tbody>
								<c:choose>
									<c:when test="${not empty mjonMsgSentList}">
										<c:forEach var="resultSentMsg" items="${mjonMsgSentList}" varStatus="status">
											<tr>
												<td>
													<c:choose>
														<c:when test="${resultSentMsg.msgType == '4'}">
															단문
														</c:when>
														<c:when test="${resultSentMsg.msgType == '6' && resultSentMsg.fileCnt > 0}">
															그림
														</c:when>
														<c:otherwise>
															장문
														</c:otherwise>
													</c:choose>
												</td>
												<td>
													<c:choose>
														<c:when test="${not empty resultSentMsg.regDate}">
<%-- 															<fmt:formatDate value="${resultSentMsg.regDate}" pattern="yyyy-MM-dd HH:mm:ss"/> --%>
															${fnc:setStrToDataFormatter(resultSentMsg.regDate, 'yyyy-MM-dd HH:mm:ss') }
														</c:when>
														<c:otherwise>
															-
														</c:otherwise>
													</c:choose>
												</td>
												<td class="font_ellipsis">
													<p>
														<c:out value="${resultSentMsg.smsTxt}"/>
													</p>
												</td>
												<td class="font_ellipsis">
													<p>
														<fmt:formatNumber value="${resultSentMsg.msgGroupCnt}" type="number" />
													</p>
												</td>
												<td class="font_ellipsis">
													<p class= "c_002c9a fwMd">
														<c:choose>
															<c:when test="${resultSentMsg.resultType == 'S'}">
																정상수신
															</c:when>
															<c:when test="${resultSentMsg.resultType == 'W'}">
																<c:choose>
																	<c:when test="${resultSentMsg.reserveYn == 'Y'}">
																		<c:if test="${resultSentMsg.reserveCYn == 'Y'}">
																			예약취소
																		</c:if>
																		<c:if test="${resultSentMsg.reserveCYn == 'N'}">
																			결과대기
																		</c:if>
																	</c:when>
																	<c:otherwise>
																		결과대기
																	</c:otherwise>
																</c:choose>
															</c:when>
															<c:when test="${resultSentMsg.resultType == 'F'}">
																수신오류
															</c:when>
															<c:otherwise>
																수신오류
															</c:otherwise>
														</c:choose>
													</p>
												</td>
												<td>
													<c:out value="${resultSentMsg.callFrom}"/>
												</td>
											</tr>
										</c:forEach>
									</c:when>
									<c:otherwise>
										<tr>
											<td colspan="6">발송 내역이 없습니다.</td>
										</tr>
									</c:otherwise>
								</c:choose>
							</tbody>
						</table>
					</div>
					<button type="button" onclick="location.href='/web/mjon/msgsent/selectMsgSentView.do';">
						<img src="/publish/images/content/mypage_plus.png" alt="더보기">
					</button>
				</div>
				
				<div class="my_dashboard_cont3">
					<p class="dashboard_title">최근 발송내역 - 알림톡</p>
					<div class="table_wrap" id="kakaoATSentList">
						<table>
							<caption>등록일자, 발신번호, 발신번호 명, 상태 정보를 제공하는 표</caption>
							<colgroup>
								<col style="width: 10%;">
								<col style="width: 15%;">
								<col style="width: auto;">
								<col style="width: 10%;">
								<col style="width: 10%;">
								<col style="width: 15%;">
							</colgroup>
							<thead>
								<tr>
									<th scope="col">메시지 형태</th>
									<th scope="col">발송일시</th>
									<th scope="col">내용</th>
									<th scope="col">발송건수</th>
									<th scope="col">결과</th>
									<th scope="col">대체문자 건수</th>
								</tr>
							</thead>
							<tbody>
								<c:choose>
									<c:when test="${not empty kakaoATSentList}">
										<c:forEach var="resultSentMsg" items="${kakaoATSentList}" varStatus="status">
											<tr>
												<td>
													알림톡
												</td>
												<td>
													<c:choose>
														<c:when test="${not empty resultSentMsg.regdate}">
															<fmt:formatDate value="${resultSentMsg.regdate}" pattern="yyyy-MM-dd HH:mm:ss"/>
														</c:when>
														<c:otherwise>
															-
														</c:otherwise>
													</c:choose>
												</td>
												<td>
													<button class="btnType btnType20" onClick="javascript:fnRevDetailPop02('${resultSentMsg.msgGroupId}'); return false;">상세보기</button>
												</td>
												<td class="font_ellipsis">
													<p>
														<fmt:formatNumber value="${resultSentMsg.msgGroupCnt}" type="number" />
													</p>
												</td>
												<td class="font_ellipsis">
													<p class= "c_002c9a fwMd">
														<c:choose>
															<c:when test="${resultSentMsg.msgResult == 'S'}">
																정상수신
															</c:when>
															<c:when test="${resultSentMsg.msgResult == 'W'}">
																발송대기
															</c:when>
															<c:when test="${resultSentMsg.msgResult == 'F'}">
																수신오류
															</c:when>
															<c:otherwise>
																-
															</c:otherwise>
														</c:choose>
													</p>
												</td>
												<td>
												<c:choose>
													<c:when test="${resultSentMsg.bizKakaoResendYn == 'Y'}">
														<c:choose>
															<c:when test="${resultSentMsg.kakaoResendSuccCount ne '0'}">
																<c:out value="${resultSentMsg.kakaoResendSuccCount}"/>
															</c:when>
															<c:otherwise>
																0
															</c:otherwise>
														</c:choose>
													</c:when>
													<c:otherwise>
														0
													</c:otherwise>
												</c:choose>
												</td>
											</tr>
										</c:forEach>
									</c:when>
									<c:otherwise>
										<tr>
											<td colspan="6">발송 내역이 없습니다.</td>
										</tr>
									</c:otherwise>
								</c:choose>
							</tbody>
						</table>
					</div>
					<button type="button" onclick="location.href='/web/kakao/sent/selectKakaoSentView.do';">
						<img src="/publish/images/content/mypage_plus.png" alt="더보기">
					</button>
				</div>
				<div class="my_dashboard_cont3">
					<p class="dashboard_title">최근 발송내역 - 팩스</p>
					<div class="table_wrap">
						<table>
							<caption>등록일자, 발신번호, 발신번호 명, 상태 정보를 제공하는 표</caption>
							<colgroup>
								<col style="width: 10%;">
								<col style="width: 15%;">
								<col style="width: auto;">
								<col style="width: 10%;">
								<col style="width: 10%;">
								<col style="width: 15%;">
							</colgroup>
							<thead>
								<tr>
									<th scope="col">메시지 형태</th>
									<th scope="col">발송일시</th>
									<th scope="col">내용</th>
									<th scope="col">발송건수</th>
									<th scope="col">발송매수</th>
									<th scope="col">결과</th>
								</tr>
							</thead>
							<tbody>
								<c:choose>
									<c:when test="${not empty faxSendList}">
										<c:forEach var="resultSentMsg" items="${faxSendList}" varStatus="status">
											<tr>
												<td>
													팩스
												</td>
												<td>
													<c:choose>
														<c:when test="${not empty resultSentMsg.reqDate}">
															<c:out value="${resultSentMsg.reqDate}"/>
														</c:when>
														<c:otherwise>
															-
														</c:otherwise>
													</c:choose>
												</td>
												<td class="font_ellipsis">
													<p>
														<c:out value="${resultSentMsg.subject}"/>
													</p>
												</td>
												<td class="font_ellipsis">
													<p>
														<c:out value="${resultSentMsg.totalEa}"/>
													</p>
												</td>
												<td class="font_ellipsis">
													<p class= "c_002c9a fwMd">
														<c:out value="${resultSentMsg.page}"/>
													</p>
												</td>
												<td>
													<c:choose>
														<c:when test="${resultSentMsg.sentEa ne '0'}">
															<p class="c_002c9a fwMd">성공</p>
														</c:when>
														<c:otherwise>
															<p class="font_ellipsis c_e40000 fwMd">실패</p>
														</c:otherwise>
													</c:choose>
												</td>
											</tr>
										</c:forEach>
									</c:when>
									<c:otherwise>
										<tr>
											<td colspan="6">발송 내역이 없습니다.</td>
										</tr>
									</c:otherwise>
								</c:choose>
							</tbody>
						</table>
					</div>
					<button type="button" onclick="location.href='/web/mjon/fax/faxSendList.do';">
						<img src="/publish/images/content/mypage_plus.png" alt="더보기">
					</button>
				</div>
			</div>
		</div>
			<!--// 마이페이지 - 대시보드 -->
	</div>
	<!--// send top -->
</div>
<!--// content 영역 -->
