<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org"
	  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	  layout:decorate="~{/web/layout/homeLayout}">
<th:block layout:fragment="layout_css">
	<link rel="stylesheet" href="/css/web/statistics_clinic.css">
</th:block>

<th:block layout:fragment="layout_top_script">
	<script src="/js/web/common_option.js"></script>
	<script src="/js/web/jquery.twbsPagination.js" type="text/javascript"></script>
	<script>
		let menuClass     = "[[${param.menuClass}]]"==""?"":"[[${param.menuClass}]]";

		let selectUseYn   = "[[${selectUseYn}]]"==""?"N":"[[${selectUseYn}]]";
		let insertUseYn   = "[[${insertUseYn}]]"==""?"N":"[[${insertUseYn}]]";
		let updateUseYn   = "[[${updateUseYn}]]"==""?"N":"[[${updateUseYn}]]";
		let deleteUseYn   = "[[${deleteUseYn}]]"==""?"N":"[[${deleteUseYn}]]";
		let downloadUseYn = "[[${downloadUseYn}]]"==""?"N":"[[${downloadUseYn}]]";

		/* 검색 관련 변수 */
		// let memberSearchKeywordParam = "[[${param.memberSearchKeywordParam}]]";
		// let memberSort               = "[[${param.memberSort}]]";
		// let memberDir                = "[[${param.memberDir}]]";
		// let memberStart              = "[[${param.memberStart}]]"==""?0:"[[${param.memberStart}]]";
		// let memberLimit              = "[[${param.memberLimit}]]"==""?100:"[[${param.memberLimit}]]";
		//
		// let memberSearchGroupId      = "[[${param.memberSearchGroupId}]]"==""?"":"[[${param.memberSearchGroupId}]]";
		// let memberSearchDutyId       = "[[${param.memberSearchDutyId}]]"==""?"":"[[${param.memberSearchDutyId}]]";
		// let memberSearchAuthId       = "[[${param.memberSearchAuthId}]]"==""?"":"[[${param.memberSearchAuthId}]]";

	</script>
</th:block>
<th:block layout:fragment="layout_content">
	<!-- 센터쪽 -->
	<div class="center_box">
		<p class="page_title">진료 통계</p>

		<div class="filter_box">
            <div class="form_box">
                <div class="calendar_box">
                    <div class="date_box">
                        <img src="/image/web/calendar.svg" alt="calendar">
                        <input type="text" class="date_picker" id="statisticsSearchDate">
                    </div>
                </div>
            </div>
        </div>

		<div class="main">
			<ul class="statistics_list">
				<li class="first" id="treatmentAll">
					<label>진료(전체)</label>
					<p class="first">0건</p>
					<p>0원</p>
				</li>
				<li id="treatment0">
					<label>피부</label>
					<p class="first">0건</p>
					<p>0원</p>
				</li>
				<li id="treatment1">
					<label>쁘띠</label>
					<p class="first">0건</p>
					<p>0원</p>
				</li>
				<li id="treatment2">
					<label>비만</label>
					<p class="first">0건</p>
					<p>0원</p>
				</li>
				<li id="treatment3">
					<label>제모</label>
					<p class="first">0건</p>
					<p>0원</p>
				</li>
				<li id="treatment4">
					<label>기타</label>
					<p class="first">0건</p>
					<p>0원</p>
				</li>
			</ul>

			<article>
				<div class="title_box">
					<p class="title">진료 매출 트렌드</p>
				</div>

				<div class="box">
					<!--그래프박스-->
					<canvas id="dailyClinicStatistics" width="1500" height="300"></canvas>
				</div>

				<div class="graph">
					<div class="box_wrap first">
						<p class="title">진료 매출</p>
						<div class="box diff">
							<!--그래프박스-->
							<canvas id="treatmentPaymentStatistics" width="720" height="350"></canvas>
						</div>
					</div>
					<div class="box_wrap">
						<p class="title">진료 매출 비중</p>
						<div class="box diff">
							<!--그래프박스-->
							<canvas id="treatmentPercentStatistics" width="350" height="350"></canvas>
						</div>
					</div>
				</div>

				<div class="graph">
					<div class="box_wrap">
						<p class="title">닥터 매출 비중</p>
						<div class="box diff">
							<!--그래프박스-->
							<canvas id="memberPaymentStatistics" width="350" height="350"></canvas>
						</div>
					</div>
					<div class="box_wrap last">
						<p class="title">매출 TOP10 시술</p>
						<div class="box">
							<!--그래프박스-->
							<div id="topPaymentGrid" class="table_box ag-theme-balham" style="height:482px;"></div>
						</div>
					</div>
				</div>
			</article>

			<article class="pst">
				<div class="title_box">
					<p class="title">상세 내역</p>

					<div class="right_btn_box">
						<button class="download_btn" id="downLoadBtn">
							<img src="/image/web/download.svg" alt="내려받기">
							<p>내려받기</p>
						</button>
					</div>
				</div>

				<div class="box">
					<!--그래프박스-->
					<div id="paymentGrid" class="table_box ag-theme-balham" style="height:450px;"></div>
				</div>

				<!-- 페이지게이션 -->
				<div class="page_box">
					<nav ria-label="Page navigation" class="navigation">
						<ul class="pagination" id="clinicStatisticsPagination"></ul>
					</nav>
				</div>
			</article>
		</div>
	</div>
	<form id="memberSelectListForm" method="POST" target="_blank"></form>
</th:block>
<th:block layout:fragment="layout_popup">

</th:block>
<th:block layout:fragment="layout_script">
    <script src="/js/web/ag-grid-community-29.3.5.min.js"></script>
    <script src="/js/web/chart-4.4.3.js"></script>
    <script src="/js/web/statistics/statisticsClinic.js"></script>
</th:block>
</html>