<@trade.accountHistoryList userId=userId status=status startCreateDate=startCreateDate endCreateDate=endCreateDate 
            orderType=orderType pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader card">
    <form class="pagerForm" action="tradeAccountHistory/list.html" autocomplete="off" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'user'/>:</label>
                    <#include "../include_page/userId.html"/>
                </li>
                <li>
                    <label><@t.page 'status'/>:</label>
                    <#list 0..3 as s>
                        <label>
                            <input <@t.compare status!'' s?string 'checked="checked"'/> name="status" class="form-check-input" value="${s}" type="checkbox"/>
                            <@t.page 'status.accountHistory.'+s/>
                        </label>
                    </#list>
                </li>
                <li>
                    <label><@t.page 'create_date'/>:</label>
                    <input type="text" name="startCreateDate" class="date" size="10" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${startCreateDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                    <span>-</span>
                    <input type="text" name="endCreateDate" class="date" size="10" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${endCreateDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="card">
    <table class="table" width="100%" layoutH orderField="${orderField!}" orderType="${orderType!}">
        <thead>
            <tr>
                <th><@t.page 'id'/></th>
                <th><@t.page 'serial_number'/></th>
                <th><@t.page 'account.id'/></th>
                <th><@t.page 'user'/></th>
                <th><@t.page 'operate_user'/></th>
                <th><@t.page 'amount'/></th>
                <th><@t.page 'amount_change'/></th>
                <th><@t.page 'balance'/></th>
                <th><@t.page 'status'/></th>
                <th><@t.page 'description'/></th>
                <th orderField="createDate"><@t.page 'create_date'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
                <@t.merge 'userIds' a.accountId!/>
                <@t.merge 'userIds' a.userId!/>
            </#list>
            <@sys.user ids=t.userIds!><#assign userMap=map!/></@sys.user>
            <#list page.list as a>
            <tr>
                <td>${a.id!}</td>
                <td>${a.serialNumber!}</td>
                <td>${a.accountId!}</td>
                <td class="center">
                    ${(userMap[a.accountId?string].nickname)!}
                </td>
                <td class="center">
                    ${(userMap[a.userId?string].nickname)!}
                </td>
                <td>${a.amount!}</td>
                <td>${a.amountChange!}</td>
                <td>${a.balance!}</td>
                <td><span class="statusText ${a.status?switch(1,'green',2,'green',3,'orange','')}"><@t.page 'status.accountHistory.'+a.status/></span></td>
                <td>${a.description!}</td>
                <td>${a.createDate!}</td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@trade.accountHistoryList>