|
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+<template>
|
|
|
2
|
+<div class="divBox">
|
|
|
3
|
+ <el-card class="box-card">
|
|
|
4
|
+ <div slot="header" class="clearfix">
|
|
|
5
|
+ <div class="container">
|
|
|
6
|
+ <el-form size="small" label-width="100px">
|
|
|
7
|
+ <el-form-item label="时间选择:" class="width100">
|
|
|
8
|
+ <el-radio-group v-model="tableFrom.date" type="button" class="mr20" size="small" @change="selectChange(tableFrom.date)">
|
|
|
9
|
+ <el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
|
|
|
10
|
+ </el-radio-group>
|
|
|
11
|
+ <el-date-picker v-model="timeVal" value-format="yyyy/MM/dd" format="yyyy/MM/dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
|
|
|
12
|
+ </el-form-item>
|
|
|
13
|
+ <el-form-item label="用户手机号:" class="width100">
|
|
|
14
|
+ <el-input v-model="tableFrom.phone" placeholder="请输入" class="selWidth" size="small">
|
|
|
15
|
+ </el-input>
|
|
|
16
|
+ </el-form-item>
|
|
|
17
|
+ <!-- <el-form-item label="商户分润变动:" class="selected-kuang">
|
|
|
18
|
+ <el-select
|
|
|
19
|
+ v-model="tableFrom.pm"
|
|
|
20
|
+ placeholder="全部"
|
|
|
21
|
+ class="filter-item"
|
|
|
22
|
+ @change="getList(1)"
|
|
|
23
|
+ >
|
|
|
24
|
+ <el-option label="全部" value="" />
|
|
|
25
|
+ <el-option label="增加" value="1" />
|
|
|
26
|
+ <el-option label="扣减" value="2" />
|
|
|
27
|
+ </el-select>
|
|
|
28
|
+ </el-form-item> -->
|
|
|
29
|
+ <el-form-item label="分润状态:" class="selected-kuang">
|
|
|
30
|
+ <el-select
|
|
|
31
|
+ v-model="tableFrom.status"
|
|
|
32
|
+ placeholder="全部"
|
|
|
33
|
+ class="filter-item"
|
|
|
34
|
+ @change="getList(1)"
|
|
|
35
|
+ >
|
|
|
36
|
+ <el-option label="全部" value="" />
|
|
|
37
|
+ <el-option label="已结算" value="1" />
|
|
|
38
|
+ <el-option label="未结算" value="-1" />
|
|
|
39
|
+ <el-option label="已失效" value="0" />
|
|
|
40
|
+ </el-select>
|
|
|
41
|
+ </el-form-item>
|
|
|
42
|
+
|
|
|
43
|
+ </el-form>
|
|
|
44
|
+
|
|
|
45
|
+ <div class="bottom-button">
|
|
|
46
|
+ <el-button size="small" @click="reset" style="width: 100px; margin-top: 20px; border: 1px solid; " >重置</el-button>
|
|
|
47
|
+ <!-- <el-button type="primary" size="small" @click="exportSearchResult" style="width: 100px; margin-top: 20px;">导出</el-button> -->
|
|
|
48
|
+
|
|
|
49
|
+ <el-button type="primary" size="small" @click="getList(1)" style="width: 100px; margin-top: 20px;">查询</el-button>
|
|
|
50
|
+ </div>
|
|
|
51
|
+ </div>
|
|
|
52
|
+
|
|
|
53
|
+
|
|
|
54
|
+
|
|
|
55
|
+ </div>
|
|
|
56
|
+
|
|
|
57
|
+ <div style="display: flex">
|
|
|
58
|
+ <div class="jiangjintotal" v-for="(v,k) in cardLists" >
|
|
|
59
|
+ <span class="jiangjintotal-title">{{ v.name }}</span>
|
|
|
60
|
+ <span class="money">{{ v.count }}</span>
|
|
|
61
|
+ </div>
|
|
|
62
|
+ </div>
|
|
|
63
|
+
|
|
|
64
|
+ <el-table :data="tableData.data" style="width: 100%" size="mini" class="table" highlight-current-row >
|
|
|
65
|
+
|
|
|
66
|
+
|
|
|
67
|
+ <el-table-column label="ID" prop="id" min-width="100" />
|
|
|
68
|
+ <el-table-column label="时间" prop="addtime" min-width="150" />
|
|
|
69
|
+ <!-- <el-table-column label="用户昵称" prop="nickname" min-width="130" />
|
|
|
70
|
+ <el-table-column label="用户账号(手机号)" prop="phone" min-width="130" /> -->
|
|
|
71
|
+
|
|
|
72
|
+ <el-table-column label="商户分润金额" prop="number" min-width="130" />
|
|
|
73
|
+ <el-table-column label="订单金额" prop="total_price" min-width="130" />
|
|
|
74
|
+ <el-table-column label="状态" prop="status" min-width="130">
|
|
|
75
|
+ <template slot-scope="scope">
|
|
|
76
|
+ <span v-if="scope.row.status == 1">有效</span>
|
|
|
77
|
+ <span v-if="scope.row.status == -1">待确认</span>
|
|
|
78
|
+ <span v-if="scope.row.status == 0">已失效</span>
|
|
|
79
|
+ </template>
|
|
|
80
|
+ </el-table-column>
|
|
|
81
|
+ <el-table-column label="店铺名称" prop="mer_name" min-width="130" />
|
|
|
82
|
+ <!-- <el-table-column label="商户分润变动" prop="status" min-width="130">
|
|
|
83
|
+ <template slot-scope="scope">
|
|
|
84
|
+ <span v-if="scope.row.pm == 1">增加</span>
|
|
|
85
|
+ <span v-if="scope.row.pm == 2">扣减</span>
|
|
|
86
|
+ </template>
|
|
|
87
|
+ </el-table-column> -->
|
|
|
88
|
+ <el-table-column label="关联订单" prop="order_sn" min-width="130">
|
|
|
89
|
+ <template slot-scope="scope">
|
|
|
90
|
+ <span style="color: blue; cursor: pointer;" @click="pushToOrderList(scope.row.order_sn)">{{ scope.row.order_sn }}</span>
|
|
|
91
|
+ </template>
|
|
|
92
|
+ </el-table-column>
|
|
|
93
|
+ </el-table>
|
|
|
94
|
+ <div class="block">
|
|
|
95
|
+ <el-pagination :page-sizes="[20, 40, 60, 80]" :page-size="tableFrom.limit" :current-page="tableFrom.page"
|
|
|
96
|
+ layout="total, sizes, prev, pager, next, jumper" :total="tableData.total" @size-change="handleSizeChange"
|
|
|
97
|
+ @current-change="pageChange" />
|
|
|
98
|
+ </div>
|
|
|
99
|
+ </el-card>
|
|
|
100
|
+
|
|
|
101
|
+
|
|
|
102
|
+</div>
|
|
|
103
|
+</template>
|
|
|
104
|
+
|
|
|
105
|
+<script>
|
|
|
106
|
+import {
|
|
|
107
|
+ redPointListApi,
|
|
|
108
|
+ exportOrderApi,
|
|
|
109
|
+} from "@/api/order";
|
|
|
110
|
+
|
|
|
111
|
+import { performanceDivvyLstApi } from '@/api/protocol'
|
|
|
112
|
+
|
|
|
113
|
+import fileList from "@/components/exportFile/fileList";
|
|
|
114
|
+import cardsData from "@/components/cards/index";
|
|
|
115
|
+import {getZeroPointApi, getFenrunApi} from "@/api/accounts";
|
|
|
116
|
+import {roterPre} from "@/settings";
|
|
|
117
|
+export default {
|
|
|
118
|
+ components: {
|
|
|
119
|
+ cardsData,
|
|
|
120
|
+ fileList
|
|
|
121
|
+ },
|
|
|
122
|
+ data() {
|
|
|
123
|
+ return {
|
|
|
124
|
+ performanceList:[],
|
|
|
125
|
+ merSelect: [],
|
|
|
126
|
+ timeVal: '',
|
|
|
127
|
+ tableData: {
|
|
|
128
|
+ data: [],
|
|
|
129
|
+ total: 0,
|
|
|
130
|
+ },
|
|
|
131
|
+ listLoading: true,
|
|
|
132
|
+ tableFrom: {
|
|
|
133
|
+ uid: "",
|
|
|
134
|
+ date: "",
|
|
|
135
|
+ page: 1,
|
|
|
136
|
+ limit: 20,
|
|
|
137
|
+ type: "",
|
|
|
138
|
+ pm: ""
|
|
|
139
|
+ },
|
|
|
140
|
+ fromList: {
|
|
|
141
|
+ title: "选择时间",
|
|
|
142
|
+ custom: true,
|
|
|
143
|
+ fromTxt: [{
|
|
|
144
|
+ text: "全部",
|
|
|
145
|
+ val: ""
|
|
|
146
|
+ },
|
|
|
147
|
+ {
|
|
|
148
|
+ text: "今天",
|
|
|
149
|
+ val: "today"
|
|
|
150
|
+ },
|
|
|
151
|
+ {
|
|
|
152
|
+ text: "昨天",
|
|
|
153
|
+ val: "yesterday"
|
|
|
154
|
+ },
|
|
|
155
|
+ {
|
|
|
156
|
+ text: "最近7天",
|
|
|
157
|
+ val: "lately7"
|
|
|
158
|
+ },
|
|
|
159
|
+ {
|
|
|
160
|
+ text: "最近30天",
|
|
|
161
|
+ val: "lately30"
|
|
|
162
|
+ },
|
|
|
163
|
+ {
|
|
|
164
|
+ text: "本月",
|
|
|
165
|
+ val: "month"
|
|
|
166
|
+ },
|
|
|
167
|
+ {
|
|
|
168
|
+ text: "本年",
|
|
|
169
|
+ val: "year"
|
|
|
170
|
+ },
|
|
|
171
|
+ ],
|
|
|
172
|
+ },
|
|
|
173
|
+ fileVisible: false,
|
|
|
174
|
+ cardLists: [],
|
|
|
175
|
+ teamList: [],
|
|
|
176
|
+
|
|
|
177
|
+ };
|
|
|
178
|
+ },
|
|
|
179
|
+ mounted() {
|
|
|
180
|
+ this.getList(1);
|
|
|
181
|
+
|
|
|
182
|
+ performanceDivvyLstApi({'page':1,'limit':100,'state':1}).then(res => {
|
|
|
183
|
+ this.performanceList = res.data.list
|
|
|
184
|
+ }).catch(res => {
|
|
|
185
|
+ this.$message.error(res.message)
|
|
|
186
|
+ })
|
|
|
187
|
+ // 获取隶属团队
|
|
|
188
|
+ getZeroPointApi().then(res => {
|
|
|
189
|
+ this.teamList = res.data
|
|
|
190
|
+ console.log('隶属团队')
|
|
|
191
|
+ console.log(this.teamList)
|
|
|
192
|
+ }).catch((res) => {
|
|
|
193
|
+ this.$message.error(res.message);
|
|
|
194
|
+ });
|
|
|
195
|
+
|
|
|
196
|
+ },
|
|
|
197
|
+ methods: {
|
|
|
198
|
+
|
|
|
199
|
+ pushToOrderList(orderIds) {
|
|
|
200
|
+
|
|
|
201
|
+
|
|
|
202
|
+ // accounts/extract
|
|
|
203
|
+
|
|
|
204
|
+ this.$router.push({
|
|
|
205
|
+ path: roterPre + "/order/list/",
|
|
|
206
|
+ query: { order_sn: orderIds },
|
|
|
207
|
+ });
|
|
|
208
|
+ },
|
|
|
209
|
+
|
|
|
210
|
+ tanchuang() {
|
|
|
211
|
+ this.dialogVisible = true
|
|
|
212
|
+ },
|
|
|
213
|
+
|
|
|
214
|
+ selectData(name) {
|
|
|
215
|
+ if (name == '系统奖励红商户分润数') {
|
|
|
216
|
+ this.tableFrom.pm = '1'
|
|
|
217
|
+ } else if (name == '系统销毁红商户分润数') {
|
|
|
218
|
+ this.tableFrom.pm = '2'
|
|
|
219
|
+ } else if (name == '人工奖励红商户分润数') {
|
|
|
220
|
+ this.tableFrom.pm = '3'
|
|
|
221
|
+ } else if (name == '人工销毁红商户分润数') {
|
|
|
222
|
+ this.tableFrom.pm = '4'
|
|
|
223
|
+ }
|
|
|
224
|
+
|
|
|
225
|
+ this.getList(1)
|
|
|
226
|
+ },
|
|
|
227
|
+
|
|
|
228
|
+ // 重置
|
|
|
229
|
+ reset() {
|
|
|
230
|
+ this.tableFrom ={
|
|
|
231
|
+ uid: "",
|
|
|
232
|
+ date: "",
|
|
|
233
|
+ page: 1,
|
|
|
234
|
+ limit: 20,
|
|
|
235
|
+ type: "",
|
|
|
236
|
+ pm: ""
|
|
|
237
|
+ }
|
|
|
238
|
+ this.getList();
|
|
|
239
|
+ },
|
|
|
240
|
+ exportSearchResult() {
|
|
|
241
|
+ RewardExcelApi(this.paramsData).then(res => {
|
|
|
242
|
+ console.log( res.data)
|
|
|
243
|
+ console.log( res.data.path)
|
|
|
244
|
+ window.open( res.data.path)
|
|
|
245
|
+ // window.open(SettingMer.https + `/excel/download/0?token=` + getToken()+`&path=` + res.data.path)
|
|
|
246
|
+ }).catch((res) => {
|
|
|
247
|
+
|
|
|
248
|
+ })
|
|
|
249
|
+ },
|
|
|
250
|
+
|
|
|
251
|
+
|
|
|
252
|
+
|
|
|
253
|
+ // 表格某一行添加特定的样式
|
|
|
254
|
+ addTdClass(val) {
|
|
|
255
|
+ if (val.row.status > 0 && val.row.paid == 1) {
|
|
|
256
|
+ for (let i = 0; i < val.row.orderProduct.length; i++) {
|
|
|
257
|
+ if (val.row.orderProduct[i].refund_num > 0 && val.row.orderProduct[i].refund_num < val.row.orderProduct[i].product_num) {
|
|
|
258
|
+ return "row-bg";
|
|
|
259
|
+ }
|
|
|
260
|
+ }
|
|
|
261
|
+ } else {
|
|
|
262
|
+ return " ";
|
|
|
263
|
+ }
|
|
|
264
|
+ },
|
|
|
265
|
+
|
|
|
266
|
+ // 导出
|
|
|
267
|
+ exportOrder() {
|
|
|
268
|
+ exportOrderApi(this.tableFrom)
|
|
|
269
|
+ .then((res) => {
|
|
|
270
|
+ // this.$message.success(res.message);
|
|
|
271
|
+ // this.fileVisible = true;
|
|
|
272
|
+ // this.$refs.exportList.exportFileList();
|
|
|
273
|
+ const h = this.$createElement;
|
|
|
274
|
+ this.$msgbox({
|
|
|
275
|
+ title: '提示',
|
|
|
276
|
+ message: h('p', null, [
|
|
|
277
|
+ h('span', null, '文件正在生成中,请稍后点击"'),
|
|
|
278
|
+ h('span', { style: 'color: teal' }, '导出已生成列表'),
|
|
|
279
|
+ h('span', null, '"查看~ '),
|
|
|
280
|
+ ]),
|
|
|
281
|
+ confirmButtonText: '我知道了',
|
|
|
282
|
+ }).then(action => {
|
|
|
283
|
+
|
|
|
284
|
+ }); })
|
|
|
285
|
+ .catch((res) => {
|
|
|
286
|
+ this.$message.error(res.message);
|
|
|
287
|
+ });
|
|
|
288
|
+ },
|
|
|
289
|
+ getExportFileList() {
|
|
|
290
|
+ this.fileVisible = true;
|
|
|
291
|
+ this.$refs.exportList.exportFileList('order');
|
|
|
292
|
+ },
|
|
|
293
|
+
|
|
|
294
|
+ handleSelectionChange(val) {
|
|
|
295
|
+ this.selectionList = val;
|
|
|
296
|
+ const data = [];
|
|
|
297
|
+ this.selectionList.map((item) => {
|
|
|
298
|
+ data.push(item.order_id);
|
|
|
299
|
+ });
|
|
|
300
|
+ this.ids = data.join(",");
|
|
|
301
|
+ },
|
|
|
302
|
+ // 选择时间
|
|
|
303
|
+ selectChange(tab) {
|
|
|
304
|
+ this.timeVal = [];
|
|
|
305
|
+ this.tableFrom.date = tab;
|
|
|
306
|
+ this.getList(1);
|
|
|
307
|
+ },
|
|
|
308
|
+ // 具体日期
|
|
|
309
|
+ onchangeTime(e) {
|
|
|
310
|
+ this.timeVal = e;
|
|
|
311
|
+ this.tableFrom.date = e ? this.timeVal.join("-") : "";
|
|
|
312
|
+ this.getList(1);
|
|
|
313
|
+ },
|
|
|
314
|
+
|
|
|
315
|
+ // 列表
|
|
|
316
|
+ getList(num) {
|
|
|
317
|
+ this.tableFrom.page = num ? num : this.tableFrom.page;
|
|
|
318
|
+ getFenrunApi(this.tableFrom).then((res) => {
|
|
|
319
|
+ console.log(res,'aaaaa');
|
|
|
320
|
+ this.tableData.data = res.data.list;
|
|
|
321
|
+ this.tableData.total = res.data.count;
|
|
|
322
|
+
|
|
|
323
|
+ this.cardLists = [
|
|
|
324
|
+ { info: '', name: '商户分润总数', count: res.data.statistics.all },
|
|
|
325
|
+ { info: '', name: '已结算', count: res.data.statistics.clear },
|
|
|
326
|
+ { info: '', name: '未结算', count: res.data.statistics.nclear },
|
|
|
327
|
+ { info: '', name: '已失效', count: res.data.statistics.lost },
|
|
|
328
|
+ // {info: '', name: '商户分润扣减总数', count: res.data.statistics.deduct},
|
|
|
329
|
+ // {info: '', name: '剩余商户分润总数', count: res.data.statistics.all_mp1}
|
|
|
330
|
+ ]
|
|
|
331
|
+ }).catch((res) => {
|
|
|
332
|
+ this.$message.error(res.message);
|
|
|
333
|
+ });
|
|
|
334
|
+ },
|
|
|
335
|
+ pageChange(page) {
|
|
|
336
|
+ this.tableFrom.page = page;
|
|
|
337
|
+ this.getList('');
|
|
|
338
|
+ },
|
|
|
339
|
+ handleSizeChange(val) {
|
|
|
340
|
+ this.tableFrom.limit = val;
|
|
|
341
|
+ this.getList('');
|
|
|
342
|
+ },
|
|
|
343
|
+ }
|
|
|
344
|
+};
|
|
|
345
|
+</script>
|
|
|
346
|
+
|
|
|
347
|
+<style lang="scss" scoped>
|
|
|
348
|
+.selWidth {
|
|
|
349
|
+ width: 300px;
|
|
|
350
|
+}
|
|
|
351
|
+
|
|
|
352
|
+.el-dropdown-link {
|
|
|
353
|
+ cursor: pointer;
|
|
|
354
|
+ color: #409eff;
|
|
|
355
|
+ font-size: 12px;
|
|
|
356
|
+}
|
|
|
357
|
+
|
|
|
358
|
+.el-icon-arrow-down {
|
|
|
359
|
+ font-size: 12px;
|
|
|
360
|
+}
|
|
|
361
|
+
|
|
|
362
|
+.tabBox_tit {
|
|
|
363
|
+ width: 53%;
|
|
|
364
|
+ font-size: 12px !important;
|
|
|
365
|
+ margin: 0 2px 0 10px;
|
|
|
366
|
+ letter-spacing: 1px;
|
|
|
367
|
+ padding: 5px 0;
|
|
|
368
|
+ box-sizing: border-box;
|
|
|
369
|
+}
|
|
|
370
|
+
|
|
|
371
|
+/deep/.row-bg {
|
|
|
372
|
+ .cell {
|
|
|
373
|
+ color: red !important;
|
|
|
374
|
+ }
|
|
|
375
|
+}
|
|
|
376
|
+
|
|
|
377
|
+.filter-item {
|
|
|
378
|
+ width:50%;
|
|
|
379
|
+}
|
|
|
380
|
+
|
|
|
381
|
+
|
|
|
382
|
+.cancel-order-mark {
|
|
|
383
|
+ margin-top: 30px;
|
|
|
384
|
+
|
|
|
385
|
+ .cancel-order-select-reason {
|
|
|
386
|
+ height: 30px;
|
|
|
387
|
+ }
|
|
|
388
|
+
|
|
|
389
|
+ .canel-order-remark-input {
|
|
|
390
|
+ width: 75%;
|
|
|
391
|
+ margin-left: 35px;
|
|
|
392
|
+ }
|
|
|
393
|
+
|
|
|
394
|
+
|
|
|
395
|
+}
|
|
|
396
|
+
|
|
|
397
|
+.bottom-button {
|
|
|
398
|
+ margin-top: 30px;
|
|
|
399
|
+ margin-left: 300px;
|
|
|
400
|
+ width: 250px;
|
|
|
401
|
+ display: flex;
|
|
|
402
|
+ justify-content: space-between;
|
|
|
403
|
+ }
|
|
|
404
|
+
|
|
|
405
|
+.cancel-button {
|
|
|
406
|
+ display: flex;
|
|
|
407
|
+ justify-content: center;
|
|
|
408
|
+ margin-top: 20px;
|
|
|
409
|
+ gap:50px;
|
|
|
410
|
+ height: 30px;
|
|
|
411
|
+ // background-color: rebeccapurple;
|
|
|
412
|
+
|
|
|
413
|
+ .confirm {
|
|
|
414
|
+ width: 70px;
|
|
|
415
|
+ // height: 30px;
|
|
|
416
|
+ }
|
|
|
417
|
+ .cacnel-item {
|
|
|
418
|
+ width: 70px;
|
|
|
419
|
+ // height: 30px;
|
|
|
420
|
+ }
|
|
|
421
|
+ }
|
|
|
422
|
+
|
|
|
423
|
+.selected-kuang {
|
|
|
424
|
+ width: 500px;
|
|
|
425
|
+}
|
|
|
426
|
+
|
|
|
427
|
+
|
|
|
428
|
+.jiangjintotal {
|
|
|
429
|
+
|
|
|
430
|
+ display: flex;
|
|
|
431
|
+ flex-direction: column;
|
|
|
432
|
+ justify-content: center;
|
|
|
433
|
+ align-items: center;
|
|
|
434
|
+ margin-bottom: 10px;
|
|
|
435
|
+ border: 1px solid #999;
|
|
|
436
|
+ border-radius: 5px;
|
|
|
437
|
+ width: 150px;
|
|
|
438
|
+ height: 60px;
|
|
|
439
|
+ line-height: 25px;
|
|
|
440
|
+ margin-right: 10px;
|
|
|
441
|
+}
|
|
|
442
|
+
|
|
|
443
|
+.jiangjintotal .money {
|
|
|
444
|
+ font-size: 20px;
|
|
|
445
|
+}
|
|
|
446
|
+
|
|
|
447
|
+
|
|
|
448
|
+</style>
|