<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('Conversion details')" />
    <th:block th:include="include :: layout-latest-css" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="gray-bg">

<div class="ui-layout-center">
    <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="user-form">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p th:utext="#{adam.transquery.query.conversion.transactionId}"></p>：<input type="text" name="transactionId"/>
                            </li>
                            <li>
                                <p th:utext="#{adam.transquery.query.conversion.fromWallet}"></p>：<input type="text" name="fromWallet"/>
                            </li>
                            <li>
                                <p th:utext="#{adam.transquery.query.conversion.toWallet}"></p>：<input type="text" name="toWallet"/>
                            </li>
                            <li>
                                <p th:utext="#{adam.transquery.query.conversion.currency}"></p>：
                                <select name="fromCurrency" th:with="type=${@dict.getType('adam_trans_currency')}">
                                    <option value=""><p th:utext="#{admin.page.common.all}"></p></option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
                                </select>
                                <select name="toCurrency" th:with="type=${@dict.getType('adam_trans_currency')}">
                                    <option value=""><p th:utext="#{admin.page.common.all}"></p></option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
                                </select>
                            </li>
                            <li>
                                <p th:utext="#{adam.transquery.query.conversion.soldAmount}"></p>：
                                <select name="amountType">
                                    <option value=""><p th:utext="#{admin.page.common.all}"></p></option>
                                    <option th:text="SoldAmount" th:value="sell"></option>
                                    <option th:text="BoughtAmlount" th:value="buy"></option>
                                </select>
                                <input type="text" name="transactionAmountBegin"/> To <input type="text" name="transactionAmountEnd"/>
                            </li>
                        </ul>
                        <ul>
                            <li>
                                <p th:utext="#{adam.transquery.query.conversion.transactionStatus}"></p>：
                                <select name="transactionStatus" th:with="type=${@dict.getType('adam_conversion_status')}">
                                    <option value=""><p th:utext="#{admin.page.common.all}"></p></option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
                                </select>
                            </li>
                            <li class="select-time">
                                <label><p th:utext="#{adam.transquery.query.conversion.createDate}"></p>： </label>
                                <input type="text" class="time-input" id="createDateBegin" th:placeholder="#{admin.page.common.startTime}" name="createDateBegin"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="createDateEnd" th:placeholder="#{admin.page.common.endTime}" name="createDateEnd"/>
                            </li>
                            <li class="select-time">
                                <label><p th:utext="#{adam.transquery.query.conversion.conversionDate}"></p>： </label>
                                <input type="text" class="time-input" id="conversionDateBegin" th:placeholder="#{admin.page.common.startTime}" name="conversionDateBegin"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="conversionDateEnd" th:placeholder="#{admin.page.common.endTime}" name="conversionDateEnd"/>
                            </li>
                            <li class="select-time">
                                <label><p th:utext="#{adam.transquery.query.conversion.settlementDate}"></p>： </label>
                                <input type="text" class="time-input" id="settlementDateBegin" th:placeholder="#{admin.page.common.startTime}" name="settlementDateBegin"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="settlementDateEnd" th:placeholder="#{admin.page.common.endTime}" name="settlementDateEnd"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;<p th:utext="#{admin.page.common.search}"></p></a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;<p th:utext="#{admin.page.common.reset}"></p></a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="btn-group-sm" id="toolbar" role="group">
                <!--                <a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="system:user:add">-->
                <!--                    <i class="fa fa-plus"></i> <p th:utext="#{admin.page.common.new}"></p>-->
                <!--                </a>-->
                <!--                <a class="btn btn-primary single disabled" onclick="$.operate.editTab()" shiro:hasPermission="system:user:edit">-->
                <!--                    <i class="fa fa-edit"></i> <p th:utext="#{admin.page.common.modify}"></p>-->
                <!--                </a>-->
                <!--                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:user:remove">-->
                <!--                    <i class="fa fa-remove"></i> <p th:utext="#{admin.page.common.delete}"></p>-->
                <!--                </a>-->
                <!--                <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:user:import">-->
                <!--                    <i class="fa fa-upload"></i> <p th:utext="#{admin.page.common.import}"></p>-->
                <!--                </a>-->
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:user:export">
                    <i class="fa fa-download"></i> <p th:utext="#{admin.page.common.export}"></p>
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
</div>

<th:block th:include="include :: footer" />
<th:block th:include="include :: layout-latest-js" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:user:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
    var resetPwdFlag = [[${@permission.hasPermi('system:user:resetPwd')}]];
    var prefix = ctx + "adam/trans-query";

    $(function() {
        var panehHidden = false;
        if ($(this).width() < 769) {
            panehHidden = true;
        }
        $('body').layout({ initClosed: panehHidden, west__size: 185 });
        queryUserList();
    });

    function queryUserList() {
        var options = {
            url: prefix + "/conversionList",
            updateUrl: prefix + "/conversionDetail/{id}",
            exportUrl: prefix + "/conversionListExport",
            sortName: "createTime",
            sortOrder: "desc",
            modalName: "conversionList",
            columns: [{
                checkbox: false
            },
                {
                    field: 'transactionId',
                    title: [[#{adam.transquery.conversionList.transactionId}]]
                },
                {
                    field: 'fromWallet',
                    title: [[#{adam.transquery.conversionList.fromWallet}]],
                    sortable: true
                },
                {
                    field: 'toWallet',
                    title: [[#{adam.transquery.conversionList.toWallet}]],
                    sortable: true
                },
                {
                    field: 'soldCurrency',
                    title: [[#{adam.transquery.conversionList.soldCurrency}]]
                },
                {
                    field: 'soldAmount',
                    title: [[#{adam.transquery.conversionList.soldAmount}]]
                },
                {
                    field: 'boughtCurrency',
                    title: [[#{adam.transquery.conversionList.boughtCurrency}]]
                },
                {
                    field: 'boughtAmount',
                    title: [[#{adam.transquery.conversionList.boughtAmount}]]
                },
                {
                    field: 'exchangeRate',
                    title: [[#{adam.transquery.conversionList.exchangeRate}]]
                },
                {
                    field: 'createDate',
                    title: [[#{adam.transquery.conversionList.createDate}]]
                },
                {
                    field: 'completedDate',
                    title: [[#{adam.transquery.conversionList.completedDate}]]
                },
                {
                    field: 'conversionDate',
                    title: [[#{adam.transquery.conversionList.conversionDate}]]
                },
                {
                    field: 'settlementDate',
                    title: [[#{adam.transquery.conversionList.settlementDate}]]
                },
                {
                    field: 'transactionStatus',
                    title: [[#{adam.transquery.conversionList.transactionStatus}]]
                },
                {
                    field: 'errorMessage',
                    title: [[#{adam.transquery.conversionList.errorMessage}]]
                }]
        };
        $.table.init(options);
    }

    $('#btnExpand').click(function() {
        $._tree.expandAll(true);
        $(this).hide();
        $('#btnCollapse').show();
    });

    $('#btnCollapse').click(function() {
        $._tree.expandAll(false);
        $(this).hide();
        $('#btnExpand').show();
    });


</script>
</body>
</html>
