<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorate="~{admin/layout/layout}" th:with="title='',active='home'">
<th:block layout:fragment="html_head">
	<script>
	
	
	
	function goSearch(pageNo){
		var form = document.searchVO;
		
		form.action = "/stat/date";
		form.submit();
	}
	</script>
</th:block>
<th:block layout:fragment="content">

            <div class="container-fluid">
              <div class="page-name">
                  <h1>기간내 유저 수익 내역</h1>
              </div>
		      <ul class="tabletab">
              	 <li class="active"><a><span th:text="${searchVO.startDate}">12월 01일</span> ~ <span th:text="${searchVO.endDate}">12월 31일</span></a></li>               	        
              </ul>
              <span class="tabText">금일 00시 까지의 통계 데이터만 표시됩니다.</span>
                <form class="searchWrap-form" name="searchVO">
              <div class="tableserachwrap">                
                <div>
                  <ul class="tableserach">
                    <li>
                      <div class="input-group">
                        <div>
                          <label class="input-group-text">유저 아이디</label>
                        </div>
                       <input type="text" name="searchMemId" th:value="${searchVO.searchMemId}" >
                      </div>
                    </li>
                    <li class="mr10">
                      <div class="input-group">
                        <div>
                          <label class="input-group-text">기간</label>
                        </div>
                       <input type="date" name="startDate" th:value="${searchVO.startDate}"/>
                           <input type="date" name="endDate" th:value="${searchVO.endDate}"/>
                      </div>
                    </li>
                   <li> <a class="btn" href ="javascript:goSearch()">전체검색</a></li>
                  </ul>
                </div>
             
                <div class="download">
                	<a><img src="/img/icon_download.svg" />CSV</a>
                	<a><img src="/img/icon_download.svg" />Excel</a>
                </div>
              </div>
              </form>
              <div class="table">
                <!--div class="head"><h6 class="bold">12월 01일 ~ 12월 31일</h6><span class="text">2022-12-05 12:12:12 까지의 통계 데이터만 표시됩니다.</span></div-->
                <div class="body">                  
                  <div class="table-responsive">
                    <table class="center">
                      <thead>
                        <tr>
                          <th>유저명</th>
                          <th>베팅 금액</th>
                          <th>당첨 금액</th>
                          <th>손익 금액</th>
                          <th>베팅 횟수</th>
                          <th>당첨 횟수</th>
                        </tr>
                      </thead>
                      <tbody>
                        <th:block th:each="list,seq : ${list}">
                        <tr>
                          <!--td colspan="6" class="text-center">선택된 유저가 없습니다.</td-->
                          <td th:text ="${list.memberId}">aaa</td>
                           <td th:text="|${#numbers.formatInteger(list.depositAmt, 0, 'COMMA')} |">4,997,185,334 C</td>
	                          <td th:text="|${#numbers.formatInteger(list.creditAmt, 0, 'COMMA')} |">4,806,942,674 C</td>
	                          <td th:text="|${#numbers.formatInteger(list.depositAmt - list.creditAmt, 0, 'COMMA')} |">190,242,660 C</td>
	                          <td th:text="${#numbers.formatInteger(list.betCnt, 0, 'COMMA')}">2,660 건</td>
	                          <td th:text="${#numbers.formatInteger(list.betWinCnt, 0, 'COMMA')}">2,660 건</td>
                        </tr>
                        </th:block>
                          <th:block th:if="${list  == 0}">
                          	<tr><td colspan="6">데이터가 없습니다</td></tr>
                          </th:block>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div><!-- container-fluid -->

</th:block>