<!DOCTYPE html>
<html lang="zh">
<#include "/include/header.html">
<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        <#include "/include/left.html">
        <!--End 左侧导航-->
        <!--头部信息-->
        <#include "/include/topbar.html">
        <!--End 头部信息-->
        <!--页面主要内容-->
        <main class="lyear-layout-content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-toolbar clearfix">
                                <div class="toolbar-btn-action" id="toolBar">
                                    <button id="batch_recharge" onclick="selleQuery()" class="btn btn-label btn-purple"><label><i class="mdi mdi-restore"></i></label> 支付查询</button>
                                    <#include "/include/table/table-batch.html">
                                </div>
                            </div>
                            <!--快速搜索框-->
                            <div class="card-body">
                                <!--<div class="pull-right" id="id_search_column">
                                    <input type="hidden" name="search_field" id="search-field" value="">
                                    <button class="btn btn-default dropdown-toggle" id="search-btn"
                                            data-toggle="dropdown" type="button" aria-haspopup="true"
                                            aria-expanded="false">
                                        全部 <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu" style="min-width: auto">
                                        <li><a tabindex="-1" href="javascript:void(0)" data-field="">全部</a></li>
                                        <#list pageTemplate.tableSearch as search>
                                        <li><a tabindex="-1" href="javascript:void(0)" data-field="${search.key!}">${search.name}</a></li>
                                    </#list>
                                    </ul>
                                </div>-->
                                <!--Bootstarp Table插入-->
                                <p id="mulu" style="text-align: justify;">
                                <p id="sellers" style="text-align: justify;">
                                </p>
                            </div>
                        </div>

                    </div>

                </div>
            </div>

        </main>
        <!--End 页面主要内容-->
    </div>
</div>
</div>
</div>
<#include "/include/footer.html">
<#include "/include/table/table-model.html">
<!--以下为业务流程处理-->
<!--模态框-->
<!--选择快递员模态框-->
<div>
    <div class="modal fade" id="id_code_model" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" data-backdrop="static">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="exampleModalLabel">支付查询</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label class="control-label">开始时间：</label>
                        <input type="text" id="id_strat_time"  class="form-control" value="">
                       <!-- <div style="margin-top: 220px;">请使用微信扫一扫,扫描二维码支付</div>-->
                    </div>
                    <div class="form-group">
                        <label class="control-label">结束时间：</label>
                        <input type="text" id="id_end_time"  class="form-control" value="">
                        <!-- <div style="margin-top: 220px;">请使用微信扫一扫,扫描二维码支付</div>-->
                    </div>
                    <div class="form-group">
                        <label class="control-label">查询类型：</label>
                        <select id="id_seller_type" class="form-control">
                            <option value="payment" selected="selected">支付查询</option>
                            <option value="refund">退款查询</option>
                            <option value="settle">分账查询</option>
                        </select>
                    </div>
                   <!-- <div class="form-group">
                        <label class="control-label">查询类型：</label>
                        <input type="text" id="id_seller_type"  class="form-control" value="" onchange="makeCode()">
                    </div>-->
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" onclick="makeCode()">确认查询</button>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<!--页面生成二维码插件-->
<script type="text/javascript" src="${static}/js/qrcode.js"></script>
<script>

    /**
     * 支付配置
     */
    function selleQuery() {
        //let clm=getTableSelectOne();
        $("#id_code_model").modal("show");
    }
    /**
     * 生成二维码
     */
    function makeCode() {
        $("#sellers").empty();
        console.log("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
        let data={
            startDate:$("#id_strat_time").val(),
            endDate:$("#id_end_time").val(),
            type:$("#id_seller_type").val()
        }
        $.ajax({
            data:data,
            type: "GET",
            url: "${ctx!}/settle/record/query",
            success : function (res) {
                if (res.status==200){
                    var sellers = res.body;
                    var cata =  sellers.substr(0,sellers.indexOf(1)-1);
                    var date =  sellers.substr(sellers.indexOf(1),sellers.length);
                    //qrcode.makeCode(ewmUrl);
                    console.log("@@@@@@@@@@@@@@@@@@@@",cata);
                    $("#mulu").append(cata.replaceAll(",","&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;").replaceAll("\n","<br><br>"));
                    $("#sellers").append(date.replaceAll(",","&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;").replaceAll("\n","<br><br>"));
                    $("#id_code_model").modal("hide");
                }
            }
        });
       /* runAjax("${ctx!}/settle/record/query","GET",data,function (res) {
            $("#id_order_model").modal("hide");
        });*/
    }
   /* .substr(0,sellers.indexOf(1)-1)*/
</script>
</body>
</html>