Bladeren bron

增加分红统计

hefei 1 jaar geleden
bovenliggende
commit
8437bc91dc

+ 44 - 0
src/api/accounts.js

@@ -275,3 +275,47 @@ export function getDayBillListApi(data) {
275 275
 export function getMonthBillListApi(data) {
276 276
   return request.get('finance/month_bill/list', data)
277 277
 }
278
+
279
+/**
280
+ * @description 联创奖励记录
281
+ */
282
+export function getOriginatorListApi(data) {
283
+  return request.get('user/get_originator_list', data)
284
+} 
285
+
286
+/**
287
+ * @description 股权分红
288
+ */
289
+export function getStockListApi(data) {
290
+  return request.get('user/get_stock_list', data)
291
+} 
292
+
293
+/**
294
+ * @description 合伙人分红记录
295
+ */
296
+export function getWeekAwardListApi(data) {
297
+  return request.get('user/get_week_award_list', data)
298
+} 
299
+
300
+/**
301
+ * @description 股权分红添加
302
+ */
303
+export function stockCreateForm() {
304
+  return request.get('user/stock/form')
305
+}
306
+
307
+/**
308
+ * @description 股权分红修改
309
+ */
310
+export function stockUpdateForm(id) {
311
+  return request.get(`user/stock/update/form/${id}`)
312
+}
313
+
314
+/**
315
+ * @description 股权分红删除
316
+ */
317
+export function stockDelete(id) {
318
+  return request.delete(`user/stock/delete/${id}`)
319
+}
320
+
321
+

+ 27 - 0
src/router/modules/accounts.js

@@ -257,6 +257,33 @@ const accountsRouter =
257 257
         },
258 258
         component: () => import('@/views/accounts/caiwuOperate/userTiXian/index')
259 259
       },
260
+	  {
261
+	    path: 'count/weekaward',
262
+	    name: 'weekaward',
263
+	    meta: {
264
+	      title: '合伙人分红记录',
265
+	      noCache: true
266
+	    },
267
+	    component: () => import('@/views/accounts/caiwutongji/weekaward/index')
268
+	  },
269
+	  {
270
+	    path: 'count/originator',
271
+	    name: 'originator',
272
+	    meta: {
273
+	      title: '联创奖励记录',
274
+	      noCache: true
275
+	    },
276
+	    component: () => import('@/views/accounts/caiwutongji/originator/index')
277
+	  },
278
+	  {
279
+	    path: 'count/stock',
280
+	    name: 'stock',
281
+	    meta: {
282
+	      title: '股权分红',
283
+	      noCache: true
284
+	    },
285
+	    component: () => import('@/views/accounts/caiwutongji/stock/index')
286
+	  },
260 287
     ]
261 288
   }
262 289
 

+ 393 - 0
src/views/accounts/caiwutongji/originator/index.vue

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

+ 425 - 0
src/views/accounts/caiwutongji/stock/index.vue

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

+ 398 - 0
src/views/accounts/caiwutongji/weekaward/index.vue

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