<!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/user";
		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"><span th:text="${searchVO.startDate}"></span> 수익 통계월</li>               	        
              </ul>
               <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>
                        <i class="fa fa-caret-left" aria-hidden="true"></i>
                        <select name="startDate" th:value="${searchVO.startDate}">
                        	<option th:selected="${searchVO.startDate eq '2022'}" value="2022">2022</option>                     
                        	<option th:selected="${searchVO.startDate eq '2023'}" value="2023">2023</option>
                        </select>
                        <select name="endDate">
                        	<option  th:selected="${searchVO.endDate eq '01'}" value="01">1</option>
                        	<option  th:selected="${searchVO.endDate eq '02'}" value="02">2</option>
                        	<option  th:selected="${searchVO.endDate eq '03'}" value="03">3</option>
                        	<option  th:selected="${searchVO.endDate eq '04'}" value="04">4</option>
                        	<option  th:selected="${searchVO.endDate eq '05'}" value="05">5</option>
                        	<option  th:selected="${searchVO.endDate eq '06'}" value="06">6</option>
                        	<option  th:selected="${searchVO.endDate eq '07'}" value="07">7</option>
                        	<option  th:selected="${searchVO.endDate eq '08'}" value="08">8</option>
                        	<option  th:selected="${searchVO.endDate eq '09'}" value="09">9</option>
                        	<option  th:selected="${searchVO.endDate eq '10'}" value="10">10</option>
                        	<option  th:selected="${searchVO.endDate eq '11'}" value="11">11</option>
                        	<option  th:selected="${searchVO.endDate eq '12'}" value="12">12</option>
                        </select>
                        <i class="fa fa-caret-right" aria-hidden="true"></i>
                      </div>
                    </li>
                    <li> <a class="btn" href ="javascript:goSearch()">전체검색</a></li>
                  </ul>
                </div>
              </div>
              </form>
              <div class="table">
                <!--div class="head"><h6 class="bold">2022년 07월 수익 통계</h6></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.dt}">2022-07-01</td>
	                          <td th:text="|${#numbers.formatInteger(list.depositAmt, 0, 'COMMA')} C|">4,997,185,334 C</td>
	                          <td th:text="|${#numbers.formatInteger(list.creditAmt, 0, 'COMMA')} C|">4,806,942,674 C</td>
	                          <td th:text="|${#numbers.formatInteger(list.depositAmt - list.creditAmt, 0, 'COMMA')} C|">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.size()  == 0}">
                          	<tr><td colspan="6">데이터가 없습니다</td></tr>
                          </th:block>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div><!-- container-fluid -->

</th:block>