<!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('素材转化统计')" />
    <link rel="stylesheet" href="/css/bootstrap.min.css" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>应用：</label>
                            <select name="appName">
                                <option value="">全部</option>
                                <option value="黑猫搞定逾期">黑猫搞定逾期</option>
                                <option value="大象债务处理">大象债务处理</option>
                            </select>
                        </li>
                        <li>
                            <label>来源：</label>
                            <select name="appSource">
                                <option value="">全部</option>
                                <option value="1">OPPO</option>
                                <option value="2">vivo</option>
                                <option value="3">华为</option>
                                <option value="4">小米</option>
                                <option value="5">应用宝</option>
                                <option value="6">百度</option>
                            </select>
                        </li>
                        <li>
                            <label>开始日期：</label>
                            <input type="date" name="startDate"/>
                        </li>
                        <li>
                            <label>结束日期：</label>
                            <input type="date" name="endDate"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div id="summary" style="padding:10px"></div>
        </div>
    </div>
 </div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var prefix = ctx + "system/material/stats";
    $(function() {
        var options = {
            url: prefix + "/list",
            modalName: "素材转化统计",
            columns: [
                { field: 'statDate', title: '日期' },
                { field: 'appName', title: '应用' },
                { field: 'appSource', title: '来源' },
                { field: 'title', title: '标题' },
                { field: 'labels', title: '标签' },
                { field: 'clickCnt', title: '点击数' },
                { field: 'submitCnt', title: '提交数' },
                { field: 'conversionRate', title: '转化率(%)' }
            ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>
