Explorar o código

财务-分红统计-合伙人分红记录-修改

sunxbiao hai 1 ano
pai
achega
5d348392ad
Modificáronse 1 ficheiros con 316 adicións e 307 borrados
  1. 316 307
      src/views/accounts/caiwutongji/weekaward/index.vue

+ 316 - 307
src/views/accounts/caiwutongji/weekaward/index.vue

@@ -1,374 +1,383 @@
1 1
 <template>
2
-<div class="divBox">
2
+  <div class="divBox">
3 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" />
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; ">重置
27
+            </el-button>
28
+            <el-button type="primary" size="small" @click="getList(1)" style="width: 100px; margin-top: 20px;">查询
29
+            </el-button>
30
+          </div>
67 31
         </div>
32
+      </div>
33
+
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="nickname" min-width="50"/>
40
+        <!-- <el-table-column label="用户昵称" prop="nickname"  min-width="130" />
41
+        <el-table-column label="用户账号(手机号)" prop="phone"  min-width="130" /> -->
42
+        <!--        <el-table-column label="用户姓名" prop="real_name" min-width="50"/>-->
43
+        <el-table-column label="合伙人等级" prop="user_group_name" min-width="50"/>
44
+        <el-table-column label="账期开始时间" prop="start_time" min-width="50"/>
45
+        <el-table-column label="账期结束时间" prop="end_time" min-width="50"/>
46
+        <el-table-column label="账期平台业绩" prop="performance" min-width="50"/>
47
+        <el-table-column label="账期内发放红包" prop="red_envelope" min-width="50"/>
48
+        <el-table-column label="实际分红业绩" prop="reality_performance" min-width="50"/>
49
+        <el-table-column label="分红比例(%)" prop="dividend_ratio" min-width="70"/>
50
+        <el-table-column label="分红金额" prop="dividend" min-width="80"/>
51
+        <el-table-column label="个人小区业绩" prop="performance_part" min-width="80"/>
52
+        <el-table-column label="等级内小区业绩和" prop="performance_part_all" min-width="80"/>
53
+        <el-table-column label="小区业绩占比分红金额" prop="part_money" min-width="80"/>
54
+        <el-table-column label="个人总业绩" prop="performance_total" min-width="80"/>
55
+        <el-table-column label="等级内总业绩和" prop="performance_total_all" min-width="80"/>
56
+        <el-table-column label="总业绩占比分红金额" prop="total_money" min-width="80"/>
57
+        <el-table-column label="分红佣金" prop="brokerage" min-width="80"/>
58
+        <el-table-column label="分红复购金" prop="fugou" min-width="80"/>
59
+        <el-table-column label="分红状态" prop="radio" min-width="80"/>
60
+        <el-table-column
61
+            prop="create_time"
62
+            label="创建时间"
63
+            min-width="100"
64
+        />
65
+        <!-- <el-table-column label="PV变动" prop="status"  min-width="130">
66
+          <template slot-scope="scope">
67
+            <span v-if="scope.row.pm == 1">增加</span>
68
+            <span v-if="scope.row.pm == 2">扣减</span>
69
+          </template>
70
+        </el-table-column> -->
71
+      </el-table>
72
+      <div class="block">
73
+        <el-pagination :page-sizes="[20, 40, 60, 80]" :page-size="tableFrom.limit" :current-page="tableFrom.page"
74
+                       layout="total, sizes, prev, pager, next, jumper" :total="tableData.total"
75
+                       @size-change="handleSizeChange"
76
+                       @current-change="pageChange"/>
77
+      </div>
68 78
     </el-card>
69 79
 
70 80
 
71
-</div>
81
+  </div>
72 82
 </template>
73 83
 
74 84
 <script>
75 85
 import {
76
-    redPointListApi,
77
-    exportOrderApi,
86
+  exportOrderApi,
78 87
 } from "@/api/order";
79 88
 
80
-import { performanceDivvyLstApi } from '@/api/protocol'
81
-
82 89
 import fileList from "@/components/exportFile/fileList";
83 90
 import cardsData from "@/components/cards/index";
84 91
 import {getWeekAwardListApi} from "@/api/accounts";
85 92
 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 93
 
157
-      pushToOrderList(orderIds) {
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: [],
158 157
 
158
+    };
159
+  },
160
+  mounted() {
161
+    this.getList(1);
162
+  },
163
+  methods: {
159 164
 
160
-        // accounts/extract
165
+    pushToOrderList(orderIds) {
161 166
 
162
-        this.$router.push({
163
-          path: roterPre + "/order/list/",
164
-          query: { order_sn: orderIds },
165
-        });
166
-      },
167 167
 
168
-      tanchuang() {
169
-        this.dialogVisible = true
170
-      },
168
+      // accounts/extract
171 169
 
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
-        }
170
+      this.$router.push({
171
+        path: roterPre + "/order/list/",
172
+        query: {order_sn: orderIds},
173
+      });
174
+    },
182 175
 
183
-        this.getList(1)
184
-      },
176
+    tanchuang() {
177
+      this.dialogVisible = true
178
+    },
185 179
 
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
-      },
180
+    selectData(name) {
181
+      if (name == '系统奖励红PV数') {
182
+        this.tableFrom.pm = '1'
183
+      } else if (name == '系统销毁红PV数') {
184
+        this.tableFrom.pm = '2'
185
+      } else if (name == '人工奖励红PV数') {
186
+        this.tableFrom.pm = '3'
187
+      } else if (name == '人工销毁红PV数') {
188
+        this.tableFrom.pm = '4'
189
+      }
190
+
191
+      this.getList(1)
192
+    },
210 193
 
194
+    // 重置
195
+    reset() {
196
+      this.tableFrom = {
197
+        uid: "",
198
+        date: "",
199
+        page: 1,
200
+        limit: 20,
201
+        type: "",
202
+        pm: ""
203
+      }
204
+      this.getList();
205
+    },
206
+    exportSearchResult() {
207
+      this.tableFrom.is_excel = 1;
208
+      getPvCountApi(this.tableFrom).then(res => {
209
+        console.log(res.data)
210
+        console.log(res.data.path)
211
+        this.tableFrom.is_excel = 0;
212
+        this.$message.success('导出成功')
213
+        window.open(res.data.path)
214
+      }).catch((res) => {
215
+        this.$message.error('导出失败');
216
+      })
217
+    },
211 218
 
212 219
 
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
-        },
220
+    // 表格某一行添加特定的样式
221
+    addTdClass(val) {
222
+      if (val.row.status > 0 && val.row.paid == 1) {
223
+        for (let i = 0; i < val.row.orderProduct.length; i++) {
224
+          if (val.row.orderProduct[i].refund_num > 0 && val.row.orderProduct[i].refund_num < val.row.orderProduct[i].product_num) {
225
+            return "row-bg";
226
+          }
227
+        }
228
+      } else {
229
+        return " ";
230
+      }
231
+    },
225 232
 
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
-        },
233
+    // 导出
234
+    exportOrder() {
235
+      exportOrderApi(this.tableFrom)
236
+          .then((res) => {
237
+            // this.$message.success(res.message);
238
+            // this.fileVisible = true;
239
+            // this.$refs.exportList.exportFileList();
240
+            const h = this.$createElement;
241
+            this.$msgbox({
242
+              title: '提示',
243
+              message: h('p', null, [
244
+                h('span', null, '文件正在生成中,请稍后点击"'),
245
+                h('span', {style: 'color: teal'}, '导出已生成列表'),
246
+                h('span', null, '"查看~ '),
247
+              ]),
248
+              confirmButtonText: '我知道了',
249
+            }).then(action => {
253 250
 
254
-        handleSelectionChange(val) {
255
-            this.selectionList = val;
256
-            const data = [];
257
-            this.selectionList.map((item) => {
258
-                data.push(item.order_id);
259 251
             });
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
-        },
252
+          })
253
+          .catch((res) => {
254
+            this.$message.error(res.message);
255
+          });
256
+    },
257
+    getExportFileList() {
258
+      this.fileVisible = true;
259
+      this.$refs.exportList.exportFileList('order');
260
+    },
274 261
 
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
-    }
262
+    handleSelectionChange(val) {
263
+      this.selectionList = val;
264
+      const data = [];
265
+      this.selectionList.map((item) => {
266
+        data.push(item.order_id);
267
+      });
268
+      this.ids = data.join(",");
269
+    },
270
+    // 选择时间
271
+    selectChange(tab) {
272
+      this.timeVal = [];
273
+      this.tableFrom.date = tab;
274
+      this.getList(1);
275
+    },
276
+    // 具体日期
277
+    onchangeTime(e) {
278
+      this.timeVal = e;
279
+      this.tableFrom.date = e ? this.timeVal.join("-") : "";
280
+      this.getList(1);
281
+    },
282
+
283
+    // 列表
284
+    getList(num) {
285
+      this.tableFrom.page = num ? num : this.tableFrom.page;
286
+      getWeekAwardListApi(this.tableFrom).then((res) => {
287
+        this.tableData.data = res.data.list;
288
+        this.tableData.total = res.data.count;
289
+      }).catch((res) => {
290
+        this.$message.error(res.message);
291
+      });
292
+    },
293
+    pageChange(page) {
294
+      this.tableFrom.page = page;
295
+      this.getList('');
296
+    },
297
+    handleSizeChange(val) {
298
+      this.tableFrom.limit = val;
299
+      this.getList('');
300
+    },
301
+  }
294 302
 };
295 303
 </script>
296 304
 
297 305
 <style lang="scss" scoped>
298 306
 .selWidth {
299
-    width: 300px;
307
+  width: 300px;
300 308
 }
301 309
 
302 310
 .el-dropdown-link {
303
-    cursor: pointer;
304
-    color: #409eff;
305
-    font-size: 12px;
311
+  cursor: pointer;
312
+  color: #409eff;
313
+  font-size: 12px;
306 314
 }
307 315
 
308 316
 .el-icon-arrow-down {
309
-    font-size: 12px;
317
+  font-size: 12px;
310 318
 }
311 319
 
312 320
 .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;
321
+  width: 53%;
322
+  font-size: 12px !important;
323
+  margin: 0 2px 0 10px;
324
+  letter-spacing: 1px;
325
+  padding: 5px 0;
326
+  box-sizing: border-box;
319 327
 }
320 328
 
321 329
 ::v-deep .row-bg {
322
-    .cell {
323
-        color: red !important;
324
-    }
330
+  .cell {
331
+    color: red !important;
332
+  }
325 333
 }
326 334
 
327 335
 .filter-item {
328
-  width:50%;
336
+  width: 50%;
329 337
 }
330 338
 
331 339
 
332 340
 .cancel-order-mark {
333
-    margin-top: 30px;
341
+  margin-top: 30px;
334 342
 
335
-    .cancel-order-select-reason {
336
-        height: 30px;
337
-    }
343
+  .cancel-order-select-reason {
344
+    height: 30px;
345
+  }
338 346
 
339
-    .canel-order-remark-input {
340
-        width: 75%;
341
-        margin-left: 35px;
342
-    }
347
+  .canel-order-remark-input {
348
+    width: 75%;
349
+    margin-left: 35px;
350
+  }
343 351
 
344 352
 
345 353
 }
346 354
 
347 355
 .bottom-button {
348
-    margin-top: 30px;
349
-    margin-left: 300px;
350
-    width: 250px;
351
-    display: flex;
352
-    justify-content: space-between;
353
-  }
356
+  margin-top: 30px;
357
+  margin-left: 300px;
358
+  width: 250px;
359
+  display: flex;
360
+  justify-content: space-between;
361
+}
354 362
 
355 363
 .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
-    }
364
+  display: flex;
365
+  justify-content: center;
366
+  margin-top: 20px;
367
+  gap: 50px;
368
+  height: 30px;
369
+  // background-color: rebeccapurple;
370
+
371
+  .confirm {
372
+    width: 70px;
373
+    // height: 30px;
374
+  }
375
+
376
+  .cacnel-item {
377
+    width: 70px;
378
+    // height: 30px;
379
+  }
380
+}
372 381
 
373 382
 .selected-kuang {
374 383
   width: 500px;