无关风月
2025-03-20 2ad97245d64b65132507cab36ad89d968edb7705
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
@layout("/common/_container.html"){
<link rel="stylesheet" href="${ctxPath}/static/js/layui/css/layui.css"  media="all">
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>会员等级数据统计</h5>
            </div>
            <div class="ibox-content">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <div class="row">
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <div class="input-group-btn">
                                        <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
                                            类型
                                        </button>
                                    </div>
                                    <select class="form-control" id="dateType">
                                        <option value="1">天</option>
                                        <option value="2">月</option>
                                        <option value="3">季度</option>
                                        <option value="4">年</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-sm-3">
                                <div class="day">
                                    <div class="input-group">
                                        <div class="input-group-btn">
                                            <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
                                                时间
                                            </button>
                                        </div>
                                        <input type="text" class="form-control" id="dayTime">
                                    </div>
                                </div>
                                <div class="month" style="display: none;">
                                    <div class="input-group">
                                        <div class="input-group-btn">
                                            <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
                                                时间
                                            </button>
                                        </div>
                                        <input type="text" class="form-control" id="monthTime">
                                    </div>
                                </div>
                                <div class="quarter" style="display: none;">
                                    <div class="input-group">
                                        <div class="input-group-btn">
                                            <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
                                                时间
                                            </button>
                                        </div>
                                        <input type="text" class="form-control" id="quarterTime" style="width: 50%;">
                                        <select id="quarter" class="form-control" style="width: 50%;">
                                            <option value="1">一季度</option>
                                            <option value="2">二季度</option>
                                            <option value="3">三季度</option>
                                            <option value="4">四季度</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="year" style="display: none;">
                                    <div class="input-group">
                                        <div class="input-group-btn">
                                            <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">
                                                时间
                                            </button>
                                        </div>
                                        <input type="text" class="form-control" id="yearTime">
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-3 pull-right">
                                <#button name="搜索" icon="fa-search" clickFun="Statistics.search()"/>
                                <#button name="重置" icon="fa-trash" clickFun="Statistics.resetSearch()" space="true"/>
                            </div>
                        </div>
                        <div class="hidden-xs" id="StatisticsTableToolbar" role="group">
                        </div>
                        <div style="width: 300px;height: 40px;margin-bottom: 20px;">
                            <div style="float: left;width: 100px;height: 40px;margin-right: 15px;text-align: center;line-height: 40px; background-color: #1ab394;color: #fff;" onclick="chooseType(this, 1)">当前等级人数</div>
                            <div style="float: left;width: 100px;height: 40px;margin-right: 15px;text-align: center;line-height: 40px;" onclick="chooseType(this, 2)">权益领取人数</div>
                        </div>
                        <div id="container" style="min-width: 400px; height: 400px"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/static/modular/system/statistics/vipLevelNumberSummaryGraph.js"></script>
<script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
<script src="${ctxPath}/static/js/layui/layui.js" charset="utf-8"></script>
<script>
 
    Date.prototype.format = function(fmt) {
        var o = {
            "M+" : this.getMonth()+1,                 //月份
            "d+" : this.getDate(),                    //日
            "h+" : this.getHours(),                   //小时
            "m+" : this.getMinutes(),                 //分
            "s+" : this.getSeconds(),                 //秒
            "q+" : Math.floor((this.getMonth()+3)/3), //季度
            "S"  : this.getMilliseconds()             //毫秒
        };
        if(/(y+)/.test(fmt)) {
            fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
        }
        for(var k in o) {
            if(new RegExp("("+ k +")").test(fmt)){
                fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
            }
        }
        return fmt;
    }
 
    let end = new Date().format("yyyy-MM-dd");
    let start = new Date(new Date().getTime() - (1000 * 60 * 60 * 24 * 30)).format("yyyy-MM-dd");
    //年范围
    layui.use('laydate', function() {
        var laydate = layui.laydate;
        laydate.render({
            elem: '#dayTime'
            ,type: 'date'
            ,value: (start + ' - ' + end)
            ,range: true
        });
        laydate.render({
            elem: '#monthTime'
            ,type: 'month'
            ,range: true
        });
        laydate.render({
            elem: '#quarterTime'
            ,type: 'year'
        });
        laydate.render({
            elem: '#yearTime'
            ,type: 'year'
            ,range: true
        });
    });
 
    function chooseType(e, type) {
        $(e).css({
            'background-color': '#1ab394',
            'color': '#fff'
        })
        $(e).siblings('div').css({
            'background-color': '#fff',
            'color': '#676a6c'
        })
        Statistics.type = type;
        Statistics.search();
    }
 
 
</script>
@}