|
|
@@ -4,7 +4,7 @@
|
|
4
|
4
|
<div slot="header" class="clearfix">
|
|
5
|
5
|
<div class="container">
|
|
6
|
6
|
<el-form size="small" label-width="100px">
|
|
7
|
|
- <el-row gutter={20}> <!-- 使用el-row来包裹所有表单项,并设置间距 -->
|
|
|
7
|
+ <el-row :gutter="20"> <!-- 使用el-row来包裹所有表单项,并设置间距 -->
|
|
8
|
8
|
<!-- 用户手机号 -->
|
|
9
|
9
|
<el-col :span="8">
|
|
10
|
10
|
<el-form-item label="用户手机号:" class="width100">
|
|
|
@@ -32,16 +32,17 @@
|
|
32
|
32
|
value-format="yyyy-MM-dd"
|
|
33
|
33
|
placeholder="请选择时间范围"
|
|
34
|
34
|
class="small"
|
|
35
|
|
- @change="onchangeTime" />
|
|
|
35
|
+ @change="onchangeTime"/>
|
|
36
|
36
|
</el-form-item>
|
|
37
|
37
|
</el-col>
|
|
38
|
38
|
</el-row>
|
|
39
|
39
|
|
|
40
|
|
- <el-row gutter={20}> <!-- 第二行 -->
|
|
|
40
|
+ <el-row :gutter="20"> <!-- 第二行 -->
|
|
41
|
41
|
<!-- 身份筛选 -->
|
|
42
|
42
|
<el-col :span="8">
|
|
43
|
43
|
<el-form-item label="身份筛选:" class="width100">
|
|
44
|
|
- <el-select v-model="tableFrom.user_group" placeholder="请选择身份" size="small" clearable class="small">
|
|
|
44
|
+ <el-select v-model="tableFrom.user_group" placeholder="请选择身份" size="small" clearable
|
|
|
45
|
+ class="small">
|
|
45
|
46
|
<el-option label="初级合伙人" value="4"></el-option>
|
|
46
|
47
|
<el-option label="中级合伙人" value="5"></el-option>
|
|
47
|
48
|
<el-option label="高级合伙人" value="6"></el-option>
|
|
|
@@ -56,10 +57,12 @@
|
|
56
|
57
|
</el-button>
|
|
57
|
58
|
<el-button type="primary" size="small" @click="getList(1)" style="width: 100px; margin-top: 20px;">查询
|
|
58
|
59
|
</el-button>
|
|
|
60
|
+ <el-button size="mini" type="primary" style="width: 100px; margin-top: 20px;" @click="exportSearchResult">
|
|
|
61
|
+ 导出
|
|
|
62
|
+ </el-button>
|
|
59
|
63
|
</div>
|
|
60
|
64
|
</div>
|
|
61
|
65
|
</div>
|
|
62
|
|
-
|
|
63
|
66
|
<div style="display: flex">
|
|
64
|
67
|
<div
|
|
65
|
68
|
class="jiangjintotal"
|
|
|
@@ -78,9 +81,6 @@
|
|
78
|
81
|
<el-table-column label="ID" prop="id" min-width="30"/>
|
|
79
|
82
|
<el-table-column label="用户昵称" prop="nickname" min-width="60"/>
|
|
80
|
83
|
<el-table-column label="用户账号" prop="account" min-width="80"/>
|
|
81
|
|
- <!-- <el-table-column label="用户昵称" prop="nickname" min-width="130" />
|
|
82
|
|
- <el-table-column label="用户账号(手机号)" prop="phone" min-width="130" /> -->
|
|
83
|
|
- <!-- <el-table-column label="用户姓名" prop="real_name" min-width="50"/>-->
|
|
84
|
84
|
<el-table-column label="合伙人等级" prop="user_group_name" min-width="80"/>
|
|
85
|
85
|
<el-table-column label="账期开始时间" prop="start_time" min-width="50"/>
|
|
86
|
86
|
<el-table-column label="账期结束时间" prop="end_time" min-width="50"/>
|
|
|
@@ -98,17 +98,7 @@
|
|
98
|
98
|
<el-table-column label="分红佣金" prop="brokerage" min-width="80"/>
|
|
99
|
99
|
<el-table-column label="分红复购金" prop="fugou" min-width="80"/>
|
|
100
|
100
|
<el-table-column label="分红状态" prop="radio" min-width="80"/>
|
|
101
|
|
- <el-table-column
|
|
102
|
|
- prop="create_time"
|
|
103
|
|
- label="创建时间"
|
|
104
|
|
- min-width="100"
|
|
105
|
|
- />
|
|
106
|
|
- <!-- <el-table-column label="PV变动" prop="status" min-width="130">
|
|
107
|
|
- <template slot-scope="scope">
|
|
108
|
|
- <span v-if="scope.row.pm == 1">增加</span>
|
|
109
|
|
- <span v-if="scope.row.pm == 2">扣减</span>
|
|
110
|
|
- </template>
|
|
111
|
|
- </el-table-column> -->
|
|
|
101
|
+ <el-table-column label="创建时间" prop="create_time" min-width="100"/>
|
|
112
|
102
|
</el-table>
|
|
113
|
103
|
</div>
|
|
114
|
104
|
<div class="block">
|
|
|
@@ -130,7 +120,10 @@
|
|
130
|
120
|
|
|
131
|
121
|
// import fileList from "@/components/exportFile/fileList";
|
|
132
|
122
|
// import cardsData from "@/components/cards/index";
|
|
133
|
|
-import {getPvCountApi, getWeekAwardListApi} from "@/api/accounts";
|
|
|
123
|
+import {
|
|
|
124
|
+ // getPvCountApi,
|
|
|
125
|
+ getWeekAwardListApi
|
|
|
126
|
+} from "@/api/accounts";
|
|
134
|
127
|
import {roterPre} from "@/settings";
|
|
135
|
128
|
|
|
136
|
129
|
export default {
|
|
|
@@ -154,7 +147,8 @@ export default {
|
|
154
|
147
|
page: 1,
|
|
155
|
148
|
limit: 20,
|
|
156
|
149
|
type: "",
|
|
157
|
|
- pm: ""
|
|
|
150
|
+ pm: "",
|
|
|
151
|
+ is_excel: 0
|
|
158
|
152
|
},
|
|
159
|
153
|
fromList: {
|
|
160
|
154
|
title: "选择时间",
|
|
|
@@ -220,13 +214,13 @@ export default {
|
|
220
|
214
|
},
|
|
221
|
215
|
|
|
222
|
216
|
selectData(name) {
|
|
223
|
|
- if (name == '系统奖励红PV数') {
|
|
|
217
|
+ if (name === '系统奖励红PV数') {
|
|
224
|
218
|
this.tableFrom.pm = '1'
|
|
225
|
|
- } else if (name == '系统销毁红PV数') {
|
|
|
219
|
+ } else if (name === '系统销毁红PV数') {
|
|
226
|
220
|
this.tableFrom.pm = '2'
|
|
227
|
|
- } else if (name == '人工奖励红PV数') {
|
|
|
221
|
+ } else if (name === '人工奖励红PV数') {
|
|
228
|
222
|
this.tableFrom.pm = '3'
|
|
229
|
|
- } else if (name == '人工销毁红PV数') {
|
|
|
223
|
+ } else if (name === '人工销毁红PV数') {
|
|
230
|
224
|
this.tableFrom.pm = '4'
|
|
231
|
225
|
}
|
|
232
|
226
|
|
|
|
@@ -247,21 +241,11 @@ export default {
|
|
247
|
241
|
},
|
|
248
|
242
|
exportSearchResult() {
|
|
249
|
243
|
this.tableFrom.is_excel = 1;
|
|
250
|
|
- getPvCountApi(this.tableFrom).then(res => {
|
|
251
|
|
- // console.log(res.data)
|
|
252
|
|
- // console.log(res.data.path)
|
|
253
|
|
- this.tableFrom.is_excel = 0;
|
|
254
|
|
- this.$message.success('导出成功')
|
|
255
|
|
- window.open(res.data.path)
|
|
256
|
|
- }).catch(() => {
|
|
257
|
|
- this.$message.error('导出失败');
|
|
258
|
|
- })
|
|
|
244
|
+ this.getList(this.tableFrom.page)
|
|
259
|
245
|
},
|
|
260
|
|
-
|
|
261
|
|
-
|
|
262
|
246
|
// 表格某一行添加特定的样式
|
|
263
|
247
|
addTdClass(val) {
|
|
264
|
|
- if (val.row.status > 0 && val.row.paid == 1) {
|
|
|
248
|
+ if (val.row.status > 0 && val.row.paid === 1) {
|
|
265
|
249
|
for (let i = 0; i < val.row.orderProduct.length; i++) {
|
|
266
|
250
|
if (val.row.orderProduct[i].refund_num > 0 && val.row.orderProduct[i].refund_num < val.row.orderProduct[i].product_num) {
|
|
267
|
251
|
return "row-bg";
|
|
|
@@ -324,16 +308,26 @@ export default {
|
|
324
|
308
|
|
|
325
|
309
|
// 列表
|
|
326
|
310
|
getList(num) {
|
|
327
|
|
- this.tableFrom.page = num ? num : this.tableFrom.page;
|
|
|
311
|
+ if (this.tableFrom.is_excel !== 1) {
|
|
|
312
|
+ this.listLoading = true
|
|
|
313
|
+ this.tableFrom.page = num || this.tableFrom.page
|
|
|
314
|
+ }
|
|
|
315
|
+
|
|
328
|
316
|
getWeekAwardListApi(this.tableFrom).then((res) => {
|
|
329
|
|
- this.tableData.data = res.data.list;
|
|
330
|
|
- this.tableData.total = res.data.count;
|
|
331
|
|
-
|
|
332
|
|
- this.cardLists = [
|
|
333
|
|
- {info: '', name: '初级合伙人分红总额', count: res.data.partner_profit_primary},
|
|
334
|
|
- {info: '', name: '中级合伙人分红总额', count: res.data.partner_profit_intermediate},
|
|
335
|
|
- {info: '', name: '高级合伙人分红总额', count: res.data.partner_profit_advanced}
|
|
336
|
|
- ];
|
|
|
317
|
+ if (this.tableFrom.is_excel === 1) {
|
|
|
318
|
+ this.tableFrom.is_excel = 0;
|
|
|
319
|
+ this.$message.success('导出成功')
|
|
|
320
|
+ window.open(res.data.path)
|
|
|
321
|
+ } else {
|
|
|
322
|
+ this.tableData.data = res.data.list;
|
|
|
323
|
+ this.tableData.total = res.data.count;
|
|
|
324
|
+
|
|
|
325
|
+ this.cardLists = [
|
|
|
326
|
+ {info: '', name: '初级合伙人分红总额', count: res.data.partner_profit_primary},
|
|
|
327
|
+ {info: '', name: '中级合伙人分红总额', count: res.data.partner_profit_intermediate},
|
|
|
328
|
+ {info: '', name: '高级合伙人分红总额', count: res.data.partner_profit_advanced}
|
|
|
329
|
+ ];
|
|
|
330
|
+ }
|
|
337
|
331
|
}).catch((res) => {
|
|
338
|
332
|
this.$message.error(res.message);
|
|
339
|
333
|
});
|