Bladeren bron

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

sunxbiao 1 jaar geleden
bovenliggende
commit
af285d2b1f
1 gewijzigde bestanden met toevoegingen van 135 en 87 verwijderingen
  1. 135 87
      src/views/accounts/caiwutongji/weekaward/index.vue

+ 135 - 87
src/views/accounts/caiwutongji/weekaward/index.vue

@@ -4,22 +4,51 @@
4 4
       <div slot="header" class="clearfix">
5 5
         <div class="container">
6 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
-
7
+            <el-row gutter={20}> <!-- 使用el-row来包裹所有表单项,并设置间距 -->
8
+              <!-- 用户手机号 -->
9
+              <el-col :span="8">
10
+                <el-form-item label="用户手机号:" class="width100">
11
+                  <el-input v-model="tableFrom.account" placeholder="请输入" class="selWidth" size="small">
12
+                  </el-input>
13
+                </el-form-item>
14
+              </el-col>
15
+
16
+              <!-- 用户姓名 -->
17
+              <el-col :span="8">
18
+                <el-form-item label="用户姓名:" class="width100">
19
+                  <el-input v-model="tableFrom.nickname" placeholder="请输入" class="selWidth" size="small">
20
+                  </el-input>
21
+                </el-form-item>
22
+              </el-col>
23
+
24
+              <!-- 时间范围 -->
25
+              <el-col :span="8">
26
+                <el-form-item label="时间范围:" class="width100">
27
+                  <el-date-picker
28
+                      v-model="tableFrom.dateRange"
29
+                      type="daterange"
30
+                      size="small"
31
+                      format="yyyy-MM-dd"
32
+                      value-format="yyyy-MM-dd"
33
+                      placeholder="请选择时间范围"
34
+                      class="small"
35
+                      @change="onchangeTime" />
36
+                </el-form-item>
37
+              </el-col>
38
+            </el-row>
39
+
40
+            <el-row gutter={20}> <!-- 第二行 -->
41
+              <!-- 身份筛选 -->
42
+              <el-col :span="8">
43
+                <el-form-item label="身份筛选:" class="width100">
44
+                  <el-select v-model="tableFrom.user_group" placeholder="请选择身份" size="small" clearable class="small">
45
+                    <el-option label="初级合伙人" value="4"></el-option>
46
+                    <el-option label="中级合伙人" value="5"></el-option>
47
+                    <el-option label="高级合伙人" value="6"></el-option>
48
+                  </el-select>
49
+                </el-form-item>
50
+              </el-col>
51
+            </el-row>
23 52
           </el-form>
24 53
 
25 54
           <div class="bottom-button">
@@ -31,44 +60,57 @@
31 60
         </div>
32 61
       </div>
33 62
 
63
+      <div style="display: flex">
64
+        <div
65
+            class="jiangjintotal"
66
+            v-for="(v, k) in cardLists"
67
+            :key="k"
68
+        >
69
+          <span class="jiangjintotal-title">
70
+            {{ v.name }}
71
+          </span>
72
+          <span class="money">{{ v.count }}</span>
73
+        </div>
74
+      </div>
34 75
 
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>
76
+      <div style="overflow-x: auto;">
77
+        <el-table :data="tableData.data" size="mini" class="table" highlight-current-row>
78
+          <el-table-column label="ID" prop="id" min-width="30"/>
79
+          <el-table-column label="用户昵称" prop="nickname" min-width="60"/>
80
+          <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
+          <el-table-column label="合伙人等级" prop="user_group_name" min-width="80"/>
85
+          <el-table-column label="账期开始时间" prop="start_time" min-width="50"/>
86
+          <el-table-column label="账期结束时间" prop="end_time" min-width="50"/>
87
+          <el-table-column label="账期平台业绩" prop="performance" min-width="50"/>
88
+          <el-table-column label="账期内发放红包" prop="red_envelope" min-width="50"/>
89
+          <el-table-column label="实际分红业绩" prop="reality_performance" min-width="50"/>
90
+          <el-table-column label="分红比例(%)" prop="dividend_ratio" min-width="70"/>
91
+          <el-table-column label="分红金额" prop="dividend" min-width="80"/>
92
+          <el-table-column label="个人小区业绩" prop="performance_part" min-width="80"/>
93
+          <el-table-column label="等级内小区业绩和" prop="performance_part_all" min-width="80"/>
94
+          <el-table-column label="小区业绩占比分红金额" prop="part_money" min-width="80"/>
95
+          <el-table-column label="个人总业绩" prop="performance_total" min-width="80"/>
96
+          <el-table-column label="等级内总业绩和" prop="performance_total_all" min-width="80"/>
97
+          <el-table-column label="总业绩占比分红金额" prop="total_money" min-width="80"/>
98
+          <el-table-column label="分红佣金" prop="brokerage" min-width="80"/>
99
+          <el-table-column label="分红复购金" prop="fugou" min-width="80"/>
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> -->
112
+        </el-table>
113
+      </div>
72 114
       <div class="block">
73 115
         <el-pagination :page-sizes="[20, 40, 60, 80]" :page-size="tableFrom.limit" :current-page="tableFrom.page"
74 116
                        layout="total, sizes, prev, pager, next, jumper" :total="tableData.total"
@@ -82,19 +124,19 @@
82 124
 </template>
83 125
 
84 126
 <script>
85
-import {
86
-  exportOrderApi,
87
-} from "@/api/order";
127
+// import {
128
+//   exportOrderApi,
129
+// } from "@/api/order";
88 130
 
89
-import fileList from "@/components/exportFile/fileList";
90
-import cardsData from "@/components/cards/index";
91
-import {getWeekAwardListApi} from "@/api/accounts";
131
+// import fileList from "@/components/exportFile/fileList";
132
+// import cardsData from "@/components/cards/index";
133
+import {getPvCountApi, getWeekAwardListApi} from "@/api/accounts";
92 134
 import {roterPre} from "@/settings";
93 135
 
94 136
 export default {
95 137
   components: {
96
-    cardsData,
97
-    fileList
138
+    // cardsData,
139
+    // fileList
98 140
   },
99 141
   data() {
100 142
     return {
@@ -206,12 +248,12 @@ export default {
206 248
     exportSearchResult() {
207 249
       this.tableFrom.is_excel = 1;
208 250
       getPvCountApi(this.tableFrom).then(res => {
209
-        console.log(res.data)
210
-        console.log(res.data.path)
251
+        // console.log(res.data)
252
+        // console.log(res.data.path)
211 253
         this.tableFrom.is_excel = 0;
212 254
         this.$message.success('导出成功')
213 255
         window.open(res.data.path)
214
-      }).catch((res) => {
256
+      }).catch(() => {
215 257
         this.$message.error('导出失败');
216 258
       })
217 259
     },
@@ -231,29 +273,29 @@ export default {
231 273
     },
232 274
 
233 275
     // 导出
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 => {
250
-
251
-            });
252
-          })
253
-          .catch((res) => {
254
-            this.$message.error(res.message);
255
-          });
256
-    },
276
+    // exportOrder() {
277
+    //   exportOrderApi(this.tableFrom)
278
+    //       .then((res) => {
279
+    //         // this.$message.success(res.message);
280
+    //         // this.fileVisible = true;
281
+    //         // this.$refs.exportList.exportFileList();
282
+    //         const h = this.$createElement;
283
+    //         this.$msgbox({
284
+    //           title: '提示',
285
+    //           message: h('p', null, [
286
+    //             h('span', null, '文件正在生成中,请稍后点击"'),
287
+    //             h('span', {style: 'color: teal'}, '导出已生成列表'),
288
+    //             h('span', null, '"查看~ '),
289
+    //           ]),
290
+    //           confirmButtonText: '我知道了',
291
+    //         }).then(action => {
292
+    //
293
+    //         });
294
+    //       })
295
+    //       .catch((res) => {
296
+    //         this.$message.error(res.message);
297
+    //       });
298
+    // },
257 299
     getExportFileList() {
258 300
       this.fileVisible = true;
259 301
       this.$refs.exportList.exportFileList('order');
@@ -286,6 +328,12 @@ export default {
286 328
       getWeekAwardListApi(this.tableFrom).then((res) => {
287 329
         this.tableData.data = res.data.list;
288 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
+        ];
289 337
       }).catch((res) => {
290 338
         this.$message.error(res.message);
291 339
       });