1
935090232@qq.com
2020-12-01 611146e69aaa62296cf84f2ccb5aca5ebba17677
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!-- 本框架基本脚本和样式 -->
    <script type="text/javascript"
            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
    <script type="text/javascript"
            th:src="@{/js/systools/MBase.js}"></script>
    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
    <script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
    <script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
    <script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
    <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
</head>
<body class="container-fluid">
<div id="app" class="pd-10">
    <!-- 搜索框部分start -->
    <div class="row form-head">
        <form class="form-inline" id="serchform">
        </form>
    </div>
 
    <div class="row mt-10" style="padding: 20px;">
        <el-table ref="multipleTable" :data="tableData" border style="width: 100%">
            <el-table-column prop="createTime" label="建团时间"></el-table-column>
            <el-table-column prop="headName" label="团长名称"></el-table-column>
            <el-table-column prop="groupPrice.gpCount" label="几人团"></el-table-column>
            <el-table-column prop="groupPrice.gpPrice" label="拼团价格"></el-table-column>
            <el-table-column prop="groupPrice.gpHeadPrice" label="团长价格"></el-table-column>
            <el-table-column prop="gjStatus" :formatter="statusFormatter" label="拼团状态"></el-table-column>
            <el-table-column prop="status" label="操作">
                <template slot-scope="scope">
                    <el-popover
                            placement="left"
                            trigger="click">
                        <el-table :data="gridData">
                            <el-table-column property="userName" label="会员名称"></el-table-column>
                            <el-table-column property="orderNo" label="订单编号"></el-table-column>
                            <el-table-column property="orderMoney" label="订单金额"></el-table-column>
                            <el-table-column property="count" label="购买数量"></el-table-column>
                            <el-table-column property="orderStatus" :formatter="orderStatusFormatter" label="订单状态"></el-table-column>
                            <el-table-column property="payStatus" :formatter="payStatusFormatter" label="支付状态"></el-table-column>
                            <el-table-column property="isHead" :formatter="isHeadFormatter" label="是否团长"></el-table-column>
                            <el-table-column property="isHasCancel" :formatter="isHasCancelFormatter" label="是否取消"></el-table-column>
                        </el-table>
                        <el-button slot="reference" @click="asyncLoadData(scope.row)">查看</el-button>
                    </el-popover>
                </template>
            </el-table-column>
        </el-table>
 
        <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="pageVo.pageNum"
                :page-sizes="[10, 20, 30, 50]"
                :page-size="pageVo.limit"
                layout="total, sizes, prev, pager, next, jumper"
                :total="pageVo.total">
        </el-pagination>
    </div>
</div>
<script type="text/javascript">
    var vue = new Vue({
        el: "#app",
        data: {
            id: "",
            tableData: [],
            pageVo: {
                pageNum : 1,
                offset: 0,
                limit: 10,
                total: 0
            },
            gridData:[]
        },
        created: function () {
            var id = $.query.get("id");
            this.id = id;
            this.initTableData(id, this.pageVo.limit, this.pageVo.offset);
        },
        methods: {
            initTableData: function (id, limit, offset) {
                var _this = this;
                var data = {};
                data.offset = offset;
                data.limit = limit;
                data.actId = id;
                AjaxProxy.requst({
                    app: _this,
                    data: data,
                    url: basePath + '/admin/shopActivitiesGroupJoin/findGroupBuyRecord',
                    callback: function (data) {
                        _this.pageVo.total = data.total;
                        _this.tableData = [];
                        for (var i = 0, length = data.rows.length; i < length; i++) {
                            _this.tableData.push(data.rows[i]);
                        }
                        console.log(data);
                    }
                })
            },
            statusFormatter: function (row, column) {
                switch (row.gjStatus) {
                    case 1 :
                        return "拼团成功";
                    case 2 :
                        return "拼团失败";
                    case 3:
                        return "拼团进行中";
                    case 4:
                        return "团长付款中";
                    default:
                        return "-";
                }
            },
            orderStatusFormatter: function (row, column) {
                switch (row.orderStatus) {
                    case 1 :
                        return "待付款";
                    case 2 :
                        return "待配送";
                    case 3:
                        return "待收货";
                    case 4:
                        return "待评价";
                    case 5:
                        return "已评价";
                    case 6:
                        return "申请退款";
                    case 7:
                        return "退款成功";
                    case 8:
                        return "退款拒绝";
                    case 9:
                        return "已取消";
                    default:
                        return "-";
                }
            },
            payStatusFormatter: function (row, column) {
                switch (row.payStatus) {
                    case 1 :
                        return "待支付";
                    case 2 :
                        return "支付成功";
                    case 3:
                        return "支付失败";
                    default:
                        return "-";
                }
            },
            isHeadFormatter : function (row, column) {
                switch (row.isHead) {
                    case 1 :
                        return "团长";
                    case 2 :
                        return "团员";
                    default:
                        return "-";
                }c
            },
            isHasCancelFormatter : function(row, column) {
                switch (row.isHasCancel) {
                    case 1 :
                        return "已取消";
                    case 2 :
                        return "正常";
                    default:
                        return "-";
                }
            },
            handleCurrentChange: function (val) {
                console.log("handleCurrentChange", val);
                this.pageVo.offset = (val - 1) * this.pageVo.limit;
                this.pageVo.pageNum = val;
                this.initTableData(this.id, this.pageVo.limit, this.pageVo.offset);
            },
            handleSizeChange: function (val) {
                console.log("handleSizeChange", val);
                this.pageVo.limit = val;
                this.initTableData(this.id, this.pageVo.limit, this.pageVo.offset);
            },
            asyncLoadData : function(row) {
                console.log(row);
                var _this = this;
                _this.gridData = [];
                $.AjaxProxy().invoke(basePath + '/admin/shopActivitiesGroupJoin/findGroupBuyJoinUser/' + row.id , function(loj) {
                    var result = loj[0].result;
                    _this.gridData = result.rows;
                })
            }
        }
    });
</script>
</body>
</html>