<!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/stock_inventory_close.css?v1.1">
		<link rel="stylesheet" href="/css/web/modal_stock_inventory_close.css?v1.1">
		<link rel="stylesheet" href="/css/web/grid.css?v1.1">
	</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 stockCloseSearchKeywordParam = "[[${param.stockCloseSearchKeywordParam}]]";
let stockCloseSort               = "[[${param.stockCloseSort}]]";
let stockCloseDir                = "[[${param.stockCloseDir}]]";
let stockCloseStart              = "[[${param.stockCloseStart}]]"==""?0:"[[${param.stockCloseStart}]]";
let stockCloseLimit              = "[[${param.stockCloseLimit}]]"==""?100:"[[${param.stockCloseLimit}]]";

let stockCloseSearchStartDate    = "[[${param.stockCloseSearchStartDate}]]";
let stockCloseSearchEndDate      = "[[${param.stockCloseSearchEndDate}]]";
let stockCloseSearchDateType     = "[[${param.stockCloseSearchDateType}]]"==""?"A":"[[${param.stockCloseSearchDateType}]]";

</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="select_list period first">
				<div class="select_box dropdown">
					<button type="button" class="label dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">기간</button>
					<input type="hidden" id="stockCloseSearchDateType"></input>

					<ul class="select_option_list dropdown-menu">
						<li id="li_A" class="option_list_item first" >오늘</li>
						<li id="li_B" class="option_list_item">최근30일</li>
						<li id="li_C" class="option_list_item">최근90일</li>
						<li id="li_D" class="option_list_item">이번주</li>
						<li id="li_E" class="option_list_item">이번달</li>
						<li id="li_F" class="option_list_item">올해</li>
						<li id="li_G" class="option_list_item">지난주</li>
						<li id="li_H" class="option_list_item">지난달</li>
					</ul>
				</div>
			</div>


			<!-- 캘린더input -->
			<div class="calendar_box">
				<div class="date_box date" id="divStockCloseSearchStartDate">
					<img src="/image/web/calendar.svg" alt="calendar"/>
					<input type="date" class="date_picker" id="stockCloseSearchStartDate">
				</div>

				<span class="slash">-</span>

				<div class="date_box last date" id="divStockCloseSearchEndDate">
					<img src="/image/web/calendar.svg" alt="calendar"/>
					<input type="date" class="date_picker" id="stockCloseSearchEndDate">
				</div>
			</div>

			<!-- 검색input -->
			<div class="search_list">
				<button id="btnSearchStockClose" class="search_btn" style="transition: all 0.2s ease-in-out 0s;">조회</button>
			</div>
			
			<div class="right_btn_box">
				<button id="btnInsertStockClose" class="stock_closing_btn">
					<img src="/image/web/add2.svg" alt="재고 마감 생성"/>
					<p>재고 마감 생성</p>
				</button>
				
				<button id="btnDownloadStockClose" class="download_btn">
					<img src="/image/web/download.svg" alt="내려받기"/>
					<p>내려받기</p>
				</button>
			</div>
		</div>
	</div>


	<div id="stockCloseGrid" class="table_box ag-theme-balham"></div>


	<!-- 페이지게이션 -->
	<div class="page_box">
		<nav ria-label="Page navigation" class="navigation">
			<ul class="pagination" id="stockClosePagination"></ul>
		</nav>
	</div>
</div>
<form id="stockCloseSelectListForm" 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/stockclose/stockCloseSelectList.js"></script>
<script src="/js/web/stockclose/popup/stockCloseInsertPop.js"></script>

</th:block>
</html>
