ソースを参照

首页面板&参数设置

xialei 1 年間 前
コミット
7f12dfc59c

+ 18 - 0
src/api/system.js

@@ -279,4 +279,22 @@ export function configIdentityLst(page, limit) {
279 279
 export function configIdentityUpdateForm(id) {
280 280
   return request.get('config/identity/update/table/' + id)
281 281
 }
282
+  
282 283
 
284
+
285
+/**
286
+ * 奖励配置列表
287
+ * @param {Object} page
288
+ * @param {Object} limit
289
+ */
290
+export function configAwardLst(page, limit) {
291
+  return request.get('config/award/lst', { page, limit })
292
+}
293
+/**
294
+ * 奖励编辑表单
295
+ * @param {Object} page
296
+ * @param {Object} limit
297
+ */
298
+export function configAwardUpdateForm(data) {
299
+  return request.get('config/award/update/table', data)
300
+}

+ 41 - 14
src/router/modules/config.js

@@ -15,7 +15,7 @@ const configRouter =
15 15
         {
16 16
           path: 'classify',
17 17
           name: 'system_config_classify',
18
-          meta: {
18
+          meta: { 
19 19
             title: '配置分类',
20 20
             noCache: true
21 21
           },
@@ -61,15 +61,15 @@ const configRouter =
61 61
           path: 'helper',
62 62
           name: 'kefu',
63 63
           meta: {
64
-            title: '客服设置'
64
+            title: '客服设置' 
65 65
           },
66 66
           component: () => import('@/views/setting/helper/index')
67 67
         },
68
-        {
68
+        {     
69 69
           path: 'agree',
70 70
           name: 'system_config_agree',
71 71
           meta: {
72
-            title: '协议设置',
72
+            title: '协议设置',  
73 73
             noCache: true
74 74
           },
75 75
           component: () => import('@/views/agreement/agree/index')
@@ -83,15 +83,42 @@ const configRouter =
83 83
           },
84 84
           component: () => import('@/views/contribution/contribution/index')
85 85
         },
86
-		{
87
-		  path: 'identity',
88
-		  name: 'system_identity_up',
89
-		  meta: {
90
-		    title: '身份升级设置',
91
-		    noCache: true
92
-		  },
93
-		  component: () => import('@/views/system/identity/index')
94
-		}
95
-      ]
86
+        {
87
+          path: 'identity',
88
+          name: 'system_identity_up',
89
+          meta: {
90
+            title: '身份升级设置',
91
+            noCache: true
92
+          },
93
+          component: () => import('@/views/system/identity/index')
94
+        },
95
+        {
96
+          path: 'award',
97
+          name: 'system_award_up',
98
+          meta: {
99
+            title: '奖励设置',
100
+            noCache: true
101
+          },
102
+          component: () => import('@/views/system/award/index')
103
+        },
104
+        {   
105
+          path: 'hongbao',
106
+          name: 'system_hongbao_up',
107
+          meta: {
108
+            title: '红包设置',
109
+            noCache: true
110
+          },
111
+          component: () => import('@/views/system/hongbao/index')
112
+        },
113
+        {
114
+          path: 'hierarchy',
115
+          name: 'system_hierarchy_up',
116
+          meta: {
117
+            title: '团队业绩层级设置',
118
+            noCache: true
119
+          },  
120
+          component: () => import('@/views/system/hierarchy/index')
121
+        }
122
+      ] 
96 123
     }
97 124
 export default configRouter

+ 110 - 16
src/views/dashboard/index.vue

@@ -56,8 +56,8 @@
56 56
             <div class="conbox_cen_item_box">
57 57
               <img referrerpolicy='no-referrer' src="../../../static/index/con1.gif" alt="">
58 58
               <div class="item_r">
59
-                <div class="item_n">{{ orderData.orderNum }}</div>
60
-                <div class="item_t">订单</div>
59
+                <div class="item_n">{{ orderData.todayShangCount }}</div>
60
+                <div class="item_t">线上订单</div>
61 61
               </div>
62 62
             </div>
63 63
           </div>
@@ -65,8 +65,8 @@
65 65
             <div class="conbox_cen_item_box">
66 66
               <img referrerpolicy='no-referrer' src="../../../static/index/con2.gif" alt="">
67 67
               <div class="item_r">
68
-                <div class="item_n">{{ statisticsData.today.userVkeNum }}</div>
69
-                <div class="item_t">V客增长数</div>
68
+                <div class="item_n">{{ orderData.userDayCount }}</div>
69
+                <div class="item_t">新增用户</div>
70 70
               </div>
71 71
             </div>
72 72
           </div>
@@ -74,8 +74,8 @@
74 74
             <div class="conbox_cen_item_box">
75 75
               <img referrerpolicy='no-referrer' src="../../../static/index/con3.gif" alt="">
76 76
               <div class="item_r">
77
-                <div class="item_n">{{ statisticsData.today.userNum }}</div>
78
-                <div class="item_t">新增用户</div>
77
+                <div class="item_n">{{ orderData.todayXiaCount }}</div>
78
+                <div class="item_t">游客数</div>
79 79
               </div>
80 80
             </div>
81 81
           </div>
@@ -83,9 +83,9 @@
83 83
             <div class="conbox_cen_item_box">
84 84
               <img referrerpolicy='no-referrer' src="../../../static/index/con4.gif" alt="">
85 85
               <div class="item_r">
86
-                <div class="item_n">{{ statisticsData.today.visitNum }}</div>
86
+                <div class="item_n">{{ orderData.todayXiaCount }}</div>
87 87
                 <!-- <div class="item_n">9999999999999999999999999</div> -->
88
-                <div class="item_t">浏览量</div>
88
+                <div class="item_t">线下订单</div>
89 89
               </div>
90 90
             </div>
91 91
           </div>
@@ -93,8 +93,8 @@
93 93
             <div class="conbox_cen_item_box">
94 94
               <img referrerpolicy='no-referrer' src="../../../static/index/con5.gif" alt="">
95 95
               <div class="item_r">
96
-                <div class="item_n">{{ statisticsData.today.visitUserNum }}</div>
97
-                <div class="item_t">访客数</div>
96
+                <div class="item_n">{{ orderData.userHyDayCount }}</div>
97
+                <div class="item_t">新增会员数</div>
98 98
               </div>
99 99
             </div>
100 100
           </div>
@@ -102,12 +102,13 @@
102 102
             <div class="conbox_cen_item_box">
103 103
               <img referrerpolicy='no-referrer' src="../../../static/index/con6.gif" alt="">
104 104
               <div class="item_r">
105
-                <div class="item_n">{{ statisticsData.today.storeNum }}</div>
106
-                <div class="item_t">创客数</div>
105
+                <div class="item_n">{{ orderData.merchantCount }}</div>
106
+                <div class="item_t">商户数</div>
107 107
               </div>
108 108
             </div>
109 109
           </div>
110 110
         </div>
111
+
111 112
         <div class="conbox_bot">
112 113
           <!-- <div class="conbox_bot_t">
113 114
             <img referrerpolicy='no-referrer' src="../../../static/index/yhsj.png" alt="">
@@ -135,6 +136,33 @@
135 136
             <line-chart ref="lineChart" :date="time3" :style="{marginLeft:!indexfull&&sidebar.opened? '100px':'0px'}"/>
136 137
           </div>
137 138
         </div>
139
+
140
+        <div class="conbox_bot">
141
+    
142
+          <div class="conbox_bot_con">
143
+            <div style="{display:flex;width:100%;position:relative;}">
144
+              <img referrerpolicy='no-referrer' src="../../../static/index/gxzph.png" alt="" style="width:80%;">
145
+              <div class="acea-row row-between-wrapper mb20 chooseBox">
146
+                <span class="header-title"></span>
147
+                <span class="header-time">
148
+                </span>
149
+              </div>
150
+            </div>
151
+            <!-- 新增排行榜模块 -->
152
+            <div class="rank-list">
153
+              <ul>
154
+                <li v-for="(item, index) in gxz_users" :key="index" class="rank-item">
155
+                  <div class="rank-num" :class="{'top-rank': index++ <= 2}">{{ index++ }}</div>
156
+                  <div class="rank-info">
157
+                    <div class="rank-name">{{item.nickname}}</div>
158
+                    <div class="rank-value">{{item.contribute}}</div>
159
+                  </div>
160
+                </li>
161
+              </ul>
162
+            </div>
163
+          </div>
164
+        </div>
165
+
138 166
       </div>
139 167
       <div class="con_rightbox">
140 168
         <div class="con_righttbox_item">
@@ -204,6 +232,7 @@ export default {
204 232
         }
205 233
       },
206 234
       orderData: {},
235
+      gxz_users: [],
207 236
       merTitle: '商户销量排行',
208 237
       visitTitle: '商户访客量排行',
209 238
       currentRole: 'adminDashboard',
@@ -304,6 +333,7 @@ export default {
304 333
         const dataList = this.orderData.today.filter(item => {
305 334
           return item.total !== 0
306 335
         })
336
+        this.gxz_users = this.orderData.gxz_users;
307 337
         dataList.unshift({ time: '00:00', total: 0 })
308 338
 
309 339
       }).catch(res => {
@@ -394,7 +424,56 @@ export default {
394 424
   margin: 0;
395 425
   padding: 0;
396 426
 }
427
+.rank-list {
428
+  padding: 20px;
429
+  
430
+  ul {
431
+    display: flex;
432
+    flex-wrap: wrap;
433
+    gap: 10px;
434
+  }
397 435
 
436
+  .rank-item {
437
+    display: flex;
438
+    align-items: center;
439
+    width: calc(33.33% - 7px);
440
+    background: #06155E;
441
+    padding: 10px;
442
+    border-radius: 4px;
443
+
444
+    .rank-num {
445
+      width: 26px;
446
+      height: 26px;
447
+      background: #1D74F8;
448
+      border-radius: 4px;
449
+      color: #fff;
450
+      display: flex;
451
+      align-items: center;
452
+      justify-content: center;
453
+      margin-right: 10px;
454
+      font-size: 14px;
455
+    }
456
+
457
+    .rank-num.top-rank {
458
+      background: #F64B07;
459
+    }
460
+
461
+    .rank-info {
462
+      flex: 1;
463
+      
464
+      .rank-name {
465
+        color: #fff;
466
+        font-size: 14px;
467
+        margin-bottom: 4px;
468
+      }
469
+
470
+      .rank-value {
471
+        color: #13BADE;
472
+        font-size: 16px;
473
+      }
474
+    }
475
+  }
476
+}
398 477
 .divBox {
399 478
   width: 100%;
400 479
   min-width: 1400px;
@@ -562,7 +641,7 @@ export default {
562 641
     flex: 2;
563 642
     min-width: 700px;
564 643
     background-image: url('../../../static/index/conbackimg.png');
565
-    background-size: 100% 74%;
644
+    background-size: 100% 85%;  // 将背景尺寸从 74% 增加到 85%
566 645
     background-position-y: 200px;
567 646
     background-repeat: no-repeat;
568 647
 
@@ -639,7 +718,7 @@ export default {
639 718
           // flex:1;
640 719
           // min-width: 120px;
641 720
           // margin-left:40px;
642
-          width: 146px;
721
+          width: 166px;
643 722
           display: flex;
644 723
 
645 724
           img {
@@ -709,10 +788,25 @@ export default {
709 788
     .conbox_bot {
710 789
       box-sizing: border-box;
711 790
       padding: 0px 40px;
712
-      margin-bottom: 15px;
791
+      margin-bottom: 20px;  // 减小底部间距
792
+      position: relative;    
713 793
       
794
+      &::after {            
795
+        content: '';
796
+        position: absolute;
797
+        bottom: -10px;      // 相应调整装饰线位置
798
+        left: 0;
799
+        width: 100%;
800
+        height: 2px;
801
+        background: linear-gradient(to right, 
802
+          rgba(0,83,169,0) 0%,
803
+          rgba(0,83,169,0.8) 50%,
804
+          rgba(0,83,169,0) 100%
805
+        );
806
+      }
807
+
714 808
       .conbox_bot_t {
715
-        height: 54px;
809
+        height: 94px;
716 810
         box-sizing: border-box;
717 811
         padding: 0px 60px;
718 812
 

+ 1 - 1
src/views/merchant/list/index.vue

@@ -462,7 +462,7 @@ export default {
462 462
         .then((res) => {
463 463
           Cookies.set("merchantToken", res.data.token);
464 464
           // window.open(SettingMer.httpUrl + res.data.url); // 2023年9月2日 - 前后端分离 去掉httpUrl
465
-          window.open("http://testshop.hxxfb.com" + res.data.url); // 2023年9月2日 - 前后端分离 去掉httpUrl
465
+          window.open("http://shop.hxxfb.com" + res.data.url); // 2023年9月2日 - 前后端分离 去掉httpUrl
466 466
           // window.open(res.data.url);
467 467
           console.log('跳转到merchant res = ')
468 468
           console.log(res)

+ 143 - 0
src/views/system/award/index.vue

@@ -0,0 +1,143 @@
1
+<template>
2
+  <div class="divBox">
3
+    <el-card class="box-card">
4
+      <!-- <div slot="header" class="clearfix"> -->
5
+        <!-- <el-button size="small" type="primary" @click="onAdd">添加配置</el-button> -->
6
+      <!-- </div> -->
7
+      <el-table
8
+        v-loading="listLoading"
9
+        :data="tableData.data"
10
+        style="width: 100%"
11
+        size="small"
12
+      >
13
+        <el-table-column
14
+          prop="name"
15
+          label="名称"
16
+          min-width="60"
17
+        />
18
+        <el-table-column
19
+          prop="number_rate"
20
+          label="佣金占比(%)"
21
+          min-width="80"
22
+        />
23
+        <el-table-column
24
+          prop="lianchuang_rate"
25
+          label="联创占比(%)"
26
+          min-width="80"
27
+        />
28
+        <el-table-column
29
+          prop="guquan_rate"
30
+          label="股权占比(%)"
31
+          min-width="80"
32
+        />
33
+        <el-table-column
34
+          prop="user_groub_1"
35
+          label="消费者占比(%)"
36
+          min-width="80"
37
+        />
38
+        <el-table-column
39
+          prop="user_groub_2"
40
+          label="业务员占比(%)"
41
+          min-width="80"
42
+        />
43
+        <el-table-column
44
+          prop="user_groub_3"
45
+          label="业务经理占比(%)"
46
+          min-width="80"
47
+        />
48
+        <el-table-column
49
+          prop="user_groub_4"
50
+          label="初级合伙人占比(%)"
51
+          min-width="80"
52
+        />
53
+        <el-table-column
54
+          prop="user_groub_5"
55
+          label="中级合伙人占比(%)"
56
+          min-width="80"
57
+        />
58
+        <el-table-column
59
+          prop="user_groub_6"
60
+          label="高级合伙人占比(%)"
61
+          min-width="80"
62
+        />
63
+        <el-table-column
64
+          prop="user_groub_7"
65
+          label="董事占比(%)"
66
+          min-width="80"
67
+        />
68
+        <el-table-column label="操作" min-width="130" fixed="right">
69
+          <template slot-scope="scope">
70
+            <el-button type="text" size="small" @click="onEdit(scope.row)">编辑</el-button>
71
+          </template>
72
+        </el-table-column>
73
+      </el-table>
74
+      <div class="block">
75
+        <el-pagination
76
+          :page-sizes="[20, 40, 60, 80]"
77
+          :page-size="tableData.limit"
78
+          :current-page="tableData.page"
79
+          layout="total, sizes, prev, pager, next, jumper"
80
+          :total="tableData.total"
81
+          @size-change="handleSizeChange"
82
+          @current-change="pageChange"
83
+        />
84
+      </div>
85
+    </el-card>
86
+  </div>
87
+</template> 
88
+
89
+<script>
90
+import {
91
+  configAwardUpdateForm,
92
+  configAwardLst,
93
+} from '@/api/system.js'
94
+export default {
95
+  name: 'Setting',
96
+  data() {
97
+    return {
98
+      tableData: {
99
+        page: 1,
100
+        limit: 20,
101
+        data: [],
102
+        total: 0
103
+      },
104
+      listLoading: true
105
+    }
106
+  },
107
+  mounted() {   
108
+    this.getList()
109
+  },  
110
+  methods: {
111
+    // 列表
112
+    getList() {
113
+      this.listLoading = true
114
+      configAwardLst(this.tableData.page, this.tableData.limit).then(res => {
115
+        this.tableData.data = res.data.list
116
+        this.tableData.total = res.data.count
117
+        this.listLoading = false
118
+      }).catch(res => {
119
+        this.listLoading = false
120
+        this.$message.error(res.message)
121
+      })
122
+    },
123
+    pageChange(page) {
124
+      this.tableData.page = page
125
+      this.getList()
126
+    },
127
+    handleSizeChange(val) {
128
+      this.tableData.limit = val
129
+      this.getList()
130
+    },
131
+    // 编辑
132
+    onEdit(key) { 
133
+      console.log(123)
134
+      console.log(key)
135
+      this.$modalForm(configAwardUpdateForm(key)).then(() => this.getList())
136
+    },
137
+  }
138
+}
139
+</script>
140
+
141
+<style scoped lang="stylus">
142
+
143
+</style>

+ 139 - 0
src/views/system/hierarchy/index.vue

@@ -0,0 +1,139 @@
1
+<template>
2
+  <div class="divBox">
3
+    <el-form size="small" label-width="140px">
4
+      <el-form-item label="大团队业绩统计层级:">
5
+        <el-input v-model="userFrom.max_team_hierarchy" placeholder="请输入" element-id="max_team_hierarchy" style="width: 20%" /> 
6
+      </el-form-item>
7
+      <el-form-item label="小团队业绩统计层级:">
8
+        <el-input v-model="userFrom.min_team_hierarchy" placeholder="请输入" element-id="min_team_hierarchy" style="width: 20%" /> 
9
+      </el-form-item>
10
+      <el-button class="ResetSearch mr10" size="small" type="primary" @click="config()">确定</el-button>
11
+    </el-form>
12
+
13
+  </div>
14
+</template>
15
+
16
+<script>
17
+import { MemberSettingsUpdate, getMemberSettings } from '@/api/systemForm.js'
18
+
19
+export default {
20
+  name: 'Fenrunbili',
21
+  data() {
22
+    return {
23
+      userFrom: {
24
+        max_team_hierarchy:0,
25
+        min_team_hierarchy:0
26
+      },
27
+      params: {}
28
+    }
29
+  },
30
+
31
+  mounted() {
32
+    this.getMerchantProfit()
33
+    this.getMerchantProfitTow()
34
+  },
35
+
36
+  methods: {
37
+    getMerchantProfit() {
38
+      getMemberSettings('max_team_hierarchy').then(res => {
39
+        this.userFrom.max_team_hierarchy = res.message
40
+      }).catch(err => {
41
+        this.$message.error(err.message)
42
+      })
43
+    },  
44
+    getMerchantProfitTow() {
45
+      getMemberSettings('min_team_hierarchy').then(res => {
46
+        this.userFrom.min_team_hierarchy = res.message
47
+      }).catch(err => {
48
+        this.$message.error(err.message)
49
+      })
50
+    },  
51
+    // 修改商户分润比例
52
+    config() {
53
+      this.params = {
54
+        name: 'max_team_hierarchy',
55
+        value: this.userFrom.max_team_hierarchy
56
+      };
57
+      this.setMerchantProfit(this.params)
58
+      this.params = {
59
+        name: 'min_team_hierarchy',
60
+        value: this.userFrom.min_team_hierarchy
61
+      };
62
+      this.setMerchantProfit(this.params)
63
+      this.$message.success('设置成功')
64
+    },
65
+    // 修改商户分润比例
66
+    setMerchantProfit(params) {
67
+      MemberSettingsUpdate(params).then(res => {
68
+      }).catch(err => {
69
+        this.$message.error(err.message)
70
+      })
71
+    }
72
+  }
73
+}
74
+</script>
75
+
76
+<style lang="scss" scoped>
77
+.selWidth {
78
+    width: 300px;
79
+}
80
+
81
+.el-dropdown-link {
82
+    cursor: pointer;
83
+    color: #409eff;
84
+    font-size: 12px;
85
+}
86
+
87
+.el-icon-arrow-down {
88
+    font-size: 12px;
89
+}
90
+
91
+.tabBox_tit {
92
+    width: 53%;
93
+    font-size: 12px !important;
94
+    margin: 0 2px 0 10px;
95
+    letter-spacing: 1px;
96
+    padding: 5px 0;
97
+    box-sizing: border-box;
98
+}
99
+
100
+/deep/.row-bg {
101
+    .cell {
102
+        color: red !important;
103
+    }
104
+}
105
+
106
+.filter-item {
107
+  width:15%;
108
+}
109
+
110
+.cancel-order-mark {
111
+    margin-top: 30px;
112
+    .cancel-order-select-reason {
113
+        height: 30px;
114
+    }
115
+    .canel-order-remark-input {
116
+        width: 75%;
117
+        margin-left: 35px;
118
+    }
119
+} 
120
+
121
+.cancel-button {
122
+        display: flex;
123
+        justify-content: center;
124
+        margin-top: 20px;
125
+        gap:50px;
126
+        height: 30px;
127
+        .confirm {
128
+          width: 70px;
129
+        }
130
+        .cacnel-item {
131
+          width: 70px;
132
+        }
133
+    }
134
+
135
+.selected-kuang {
136
+  width: 500px;
137
+}
138
+</style>
139
+

+ 123 - 0
src/views/system/hongbao/index.vue

@@ -0,0 +1,123 @@
1
+<template>
2
+  <div class="divBox">
3
+    <el-form size="small" label-width="120px">
4
+      <el-form-item label="红包比例:">
5
+        <el-input v-model="userFrom.hongbao_rate" placeholder="请输入" element-id="hongbao_rate" style="width: 20%" /> %
6
+      </el-form-item>
7
+      <el-button class="ResetSearch mr10" size="small" type="primary" @click="config()">确定</el-button>
8
+    </el-form>
9
+
10
+  </div>
11
+</template>
12
+
13
+<script>
14
+import { MemberSettingsUpdate, getMemberSettings } from '@/api/systemForm.js'
15
+
16
+export default {
17
+  name: 'Fenrunbili',
18
+  data() {
19
+    return {
20
+      userFrom: {
21
+        hongbao_rate:0
22
+      },
23
+      params: {}
24
+    }
25
+  },
26
+
27
+  mounted() {
28
+    this.getMerchantProfit()
29
+  },
30
+
31
+  methods: {
32
+    // 获取商户分润比例
33
+    getMerchantProfit() {
34
+      getMemberSettings('hongbao_rate').then(res => {
35
+        this.userFrom.hongbao_rate = res.message
36
+      }).catch(err => {
37
+        this.$message.error(err.message)
38
+      })
39
+    },  
40
+    // 修改商户分润比例
41
+    config() {
42
+      this.params = {
43
+        name: 'hongbao_rate',
44
+        value: this.userFrom.hongbao_rate
45
+      };
46
+      this.setMerchantProfit(this.params)
47
+    },
48
+    // 修改商户分润比例
49
+    setMerchantProfit(params) {
50
+      MemberSettingsUpdate(params).then(res => {
51
+        this.$message.success('设置成功')
52
+      }).catch(err => {
53
+        this.$message.error(err.message)
54
+      })
55
+    }
56
+  }
57
+}
58
+</script>
59
+
60
+<style lang="scss" scoped>
61
+.selWidth {
62
+    width: 300px;
63
+}
64
+
65
+.el-dropdown-link {
66
+    cursor: pointer;
67
+    color: #409eff;
68
+    font-size: 12px;
69
+}
70
+
71
+.el-icon-arrow-down {
72
+    font-size: 12px;
73
+}
74
+
75
+.tabBox_tit {
76
+    width: 53%;
77
+    font-size: 12px !important;
78
+    margin: 0 2px 0 10px;
79
+    letter-spacing: 1px;
80
+    padding: 5px 0;
81
+    box-sizing: border-box;
82
+}
83
+
84
+/deep/.row-bg {
85
+    .cell {
86
+        color: red !important;
87
+    }
88
+}
89
+
90
+.filter-item {
91
+  width:15%;
92
+}
93
+
94
+.cancel-order-mark {
95
+    margin-top: 30px;
96
+    .cancel-order-select-reason {
97
+        height: 30px;
98
+    }
99
+    .canel-order-remark-input {
100
+        width: 75%;
101
+        margin-left: 35px;
102
+    }
103
+}
104
+
105
+.cancel-button {
106
+        display: flex;
107
+        justify-content: center;
108
+        margin-top: 20px;
109
+        gap:50px;
110
+        height: 30px;
111
+        .confirm {
112
+          width: 70px;
113
+        }
114
+        .cacnel-item {
115
+          width: 70px;
116
+        }
117
+    }
118
+
119
+.selected-kuang {
120
+  width: 500px;
121
+}
122
+</style>
123
+

BIN
static/index/gxzph.png