浏览代码

付费用户管理页面完成

yuhao 2 年之前
父节点
当前提交
2166796d0a
共有 2 个文件被更改,包括 474 次插入1 次删除
  1. 62 1
      src/pages/customerMan/index.vue
  2. 412 0
      src/pages/customerMan/selectPop/index.vue

+ 62 - 1
src/pages/customerMan/index.vue

@@ -7,6 +7,30 @@
7 7
       <el-button type="primary" class="searchButton" @click="getUserList()"
8 8
         >搜索</el-button
9 9
       >
10
+      <div class="silenceUser">
11
+        <div class="title">显示沉默付费用户</div>
12
+        <el-switch
13
+          v-model="silence"
14
+          active-color="#fa7d22"
15
+          inactive-color="#e7e7e7"
16
+        >
17
+        </el-switch>
18
+      </div>
19
+      <div class="faceUser">
20
+        <div class="title">显示未面诊付费用户</div>
21
+        <el-switch
22
+          v-model="face"
23
+          active-color="#fa7d22"
24
+          inactive-color="#e7e7e7"
25
+        >
26
+        </el-switch>
27
+      </div>
28
+      <div class="filter">
29
+        <div class="title">筛选</div>
30
+        <i @click="openFilterPop" class="el-icon-s-operation"></i>
31
+      </div>
32
+      <!-- 筛选条件弹窗 -->
33
+      <select-pop :visible.sync='dialogVisible'></select-pop>
10 34
     </div>
11 35
 
12 36
     <div class="user-list">
@@ -55,8 +79,9 @@
55 79
 
56 80
 <script>
57 81
 import api from "../../server/home";
82
+import selectPop from './selectPop/index.vue'
58 83
 export default {
59
-  components: {},
84
+  components: {selectPop},
60 85
   data() {
61 86
     return {
62 87
       searchText: "",
@@ -76,12 +101,19 @@ export default {
76 101
       currentPage1: 1,
77 102
       multipleSelection: "",
78 103
       total: 0,
104
+      face: false, //未面诊用户开关
105
+      silence: false, //沉默用户开关
106
+      dialogVisible:false // 控制筛选弹框
79 107
     };
80 108
   },
81 109
   computed: {},
82 110
   watch: {},
83 111
 
84 112
   methods: {
113
+    // 打开筛选条件弹框
114
+    openFilterPop() {
115
+      this.dialogVisible = true;
116
+    },
85 117
     // 获取订单列表
86 118
     getUserList() {
87 119
       let params = {
@@ -146,6 +178,35 @@ export default {
146 178
       border-radius: 2px;
147 179
       border-color: #fa7d22;
148 180
     }
181
+    .silenceUser {
182
+      display: flex;
183
+      margin-left: 53px;
184
+      align-items: center;
185
+      .title {
186
+        line-height: 40px;
187
+        margin-right: 16px;
188
+      }
189
+    }
190
+    .faceUser {
191
+      display: flex;
192
+      margin-left: 53px;
193
+      align-items: center;
194
+      .title {
195
+        line-height: 40px;
196
+        margin-right: 16px;
197
+      }
198
+    }
199
+    .filter {
200
+      display: flex;
201
+      align-items: center;
202
+      margin-left: 53px;
203
+      .title {
204
+        margin-right: 17px;
205
+      }
206
+      i {
207
+        font-size: 17px;
208
+      }
209
+    }
149 210
   }
150 211
   .user-list {
151 212
     margin-top: 18px;

+ 412 - 0
src/pages/customerMan/selectPop/index.vue

@@ -0,0 +1,412 @@
1
+<template>
2
+  <div>
3
+    <div class="filterPop">
4
+      <el-dialog
5
+        :visible.sync="visible"
6
+        width="48.5%"
7
+        :close-on-click-modal="false"
8
+      >
9
+        <span slot="title" class="slot-title">
10
+          <i @click="closeFilterPop" class="el-icon-arrow-left"></i>
11
+          筛选条件
12
+        </span>
13
+        <div class="customer-source">
14
+          <div class="center">
15
+            <div class="item-title">{{ customerSource.name }}</div>
16
+            <div class="content">
17
+              <div
18
+                class="content-item"
19
+                :class="{
20
+                  activeFilter: index == customerSelect,
21
+                }"
22
+                v-for="(item, index) in customerSource.title"
23
+                :key="index"
24
+                @click="customerFilter(item, index)"
25
+              >
26
+                {{ item }}
27
+              </div>
28
+            </div>
29
+          </div>
30
+          <div class="center">
31
+            <div class="item-title">{{ couponSource.name }}</div>
32
+            <div class="content">
33
+              <div
34
+                class="content-item"
35
+                :class="{
36
+                  activeFilter: index == couponSelect,
37
+                }"
38
+                v-for="(item, index) in couponSource.title"
39
+                :key="index"
40
+                @click="couponFilter(item, index)"
41
+              >
42
+                {{ item }}
43
+              </div>
44
+            </div>
45
+          </div>
46
+          <div class="center">
47
+            <div class="item-title">{{ cardSource.name }}</div>
48
+            <div class="content">
49
+              <div
50
+                class="content-item"
51
+                :class="{
52
+                  activeFilter: index == cardSelect,
53
+                }"
54
+                v-for="(item, index) in cardSource.title"
55
+                :key="index"
56
+                @click="cardFilter(item, index)"
57
+              >
58
+                {{ item }}
59
+              </div>
60
+            </div>
61
+          </div>
62
+          <div class="center">
63
+            <div class="item-title">{{ latelySource.name }}</div>
64
+            <div class="content">
65
+              <div
66
+                class="content-item"
67
+                :class="{
68
+                  activeFilter: index == latelySelect,
69
+                }"
70
+                v-for="(item, index) in latelySource.title"
71
+                :key="index"
72
+                @click="latelyFilter(item, index)"
73
+              >
74
+                {{ item }}
75
+              </div>
76
+            </div>
77
+          </div>
78
+          <div class="superposition">
79
+            <div class="superposition-title">项目叠加次数</div>
80
+            <el-input-number
81
+              v-model="superpositionNum"
82
+              :min="0"
83
+              size="mini"
84
+            ></el-input-number>
85
+          </div>
86
+          <div class="transition">
87
+            <div class="transition-title">转换次数</div>
88
+            <el-input-number
89
+              v-model="transitionNum"
90
+              :min="0"
91
+              size="mini"
92
+            ></el-input-number>
93
+          </div>
94
+          <div class="consumePrice">
95
+            <div class="consumePrice-title">总消费金额</div>
96
+            <div class="consumePrice-content">
97
+              <el-input v-model="minConsumePrice"></el-input>
98
+              <div>-</div>
99
+              <el-input v-model="maxConsumePrice"></el-input>
100
+            </div>
101
+          </div>
102
+          <div class="StoredPrice">
103
+            <div class="StoredPrice-title">总储值金额</div>
104
+            <div class="StoredPrice-content">
105
+              <el-input v-model="minStoredPricePrice"></el-input>
106
+              <div>-</div>
107
+              <el-input v-model="maxStoredPricePrice"></el-input>
108
+            </div>
109
+          </div>
110
+        </div>
111
+        <div class="slot-footer" slot="footer">
112
+          <div class="item-title">共有<i>50</i>位用户</div>
113
+          <div>
114
+            <button @click="reset">重置</button>
115
+            <button @click="save">保存</button>
116
+          </div>
117
+        </div>
118
+      </el-dialog>
119
+    </div>
120
+  </div>
121
+</template>
122
+
123
+<script>
124
+export default {
125
+  props: ["visible"],
126
+  data() {
127
+    return {
128
+      customerSource: {
129
+        name: "客户来源",
130
+        title: [
131
+          "线下进店",
132
+          "种子用户",
133
+          "美团/大众",
134
+          "抖音",
135
+          "达人探店",
136
+          "霸王餐",
137
+          "老带新/转介绍",
138
+        ],
139
+      },
140
+      couponSource: {
141
+        name: "优惠券快过期付费用户",
142
+        title: ["3天", "5天", "7天", "15天"],
143
+      },
144
+
145
+      cardSource: {
146
+        name: "次卡快过期付费用户",
147
+        title: ["3天", "5天", "7天", "15天", "30天"],
148
+      },
149
+
150
+      latelySource: {
151
+        name: "距离最近消费时间",
152
+        title: ["3天", "5天", "7天", "15天", "15天以上"],
153
+      },
154
+      customerSelect: 99,
155
+      couponSelect: 99,
156
+      cardSelect: 99,
157
+      latelySelect: 99,
158
+      superpositionNum: 0, //项目叠加次数
159
+      transitionNum: 0, //转换次数
160
+      minConsumePrice: "", //消费最小金额
161
+      maxConsumePrice: "", //消费最大金额
162
+      minStoredPricePrice: "", //储值最小金额
163
+      maxStoredPricePrice: "", //储值最大金额
164
+      conditionList: {
165
+        customerKey: "",
166
+        couponKey: "",
167
+        cardKey: "",
168
+        latelyKey: "",
169
+      },
170
+    };
171
+  },
172
+  methods: {
173
+    // 重置筛选条件
174
+    reset() {},
175
+    // 保存筛选条件
176
+    save() {
177
+      console.log(this.conditionList);
178
+    },
179
+    // 关闭弹窗
180
+    closeFilterPop() {
181
+      this.$emit("update:visible", false);
182
+    },
183
+    // 选择
184
+    customerFilter(item, index) {
185
+      this.customerSelect = index;
186
+      this.$set(this.conditionList, "customerKey", item);
187
+    },
188
+    couponFilter(item, index) {
189
+      this.couponSelect = index;
190
+      this.$set(this.conditionList, "couponKey", item);
191
+    },
192
+    cardFilter(item, index) {
193
+      this.cardSelect = index;
194
+      this.$set(this.conditionList, "cardKey", item);
195
+    },
196
+    latelyFilter(item, index) {
197
+      this.latelySelect = index;
198
+      this.$set(this.conditionList, "latelyKey", item);
199
+    },
200
+  },
201
+};
202
+</script>
203
+
204
+<style lang='less' scoped>
205
+// 筛选弹窗
206
+.filterPop {
207
+  .slot-title {
208
+    display: inline-block;
209
+    font-size: 14px;
210
+    margin-top: 24px;
211
+    font-weight: 600;
212
+    i {
213
+      font-size: 24px;
214
+      color: #666666;
215
+      margin-left: 22px;
216
+      margin-right: 165px;
217
+    }
218
+  }
219
+  // 筛选条件
220
+  .customer-source {
221
+    .item-title {
222
+      font-size: 14px;
223
+      color: #333;
224
+      margin-top: 10px;
225
+      font-weight: 600;
226
+    }
227
+    .content {
228
+      margin-top: 10px;
229
+      display: flex;
230
+      width: 442px;
231
+      flex-wrap: wrap;
232
+      box-sizing: border-box;
233
+    }
234
+    .content-item {
235
+      font-size: 12px;
236
+      height: 24px;
237
+      padding: 3px 12px;
238
+      background-color: #f5f5f5;
239
+      line-height: 18px;
240
+      border-radius: 2px;
241
+      margin-left: 20px;
242
+      box-sizing: border-box;
243
+    }
244
+    .activeFilter {
245
+      border: 1px solid #fa7d22;
246
+      color: #fa7d22;
247
+    }
248
+    .content-item:first-child,
249
+    .content-item:nth-child(6) {
250
+      margin-left: 0;
251
+    }
252
+    .content-item:nth-child(n + 6) {
253
+      margin-top: 10px;
254
+    }
255
+    .superposition {
256
+      display: flex;
257
+      .superposition-title {
258
+        font-size: 14px;
259
+        color: #333;
260
+        margin-top: 14px;
261
+        font-weight: 600;
262
+        margin-right: 20px;
263
+      }
264
+      /deep/.el-input-number {
265
+        margin-top: 10px;
266
+      }
267
+      /deep/input.el-input__inner,
268
+      /deep/span.el-input-number__decrease.is-disabled,
269
+      /deep/span.el-input-number__increase,
270
+      /deep/span.el-input-number__decrease {
271
+        border: none;
272
+      }
273
+    }
274
+    .transition {
275
+      display: flex;
276
+      .transition-title {
277
+        font-size: 14px;
278
+        color: #333;
279
+        margin-top: 14px;
280
+        font-weight: 600;
281
+        margin-right: 20px;
282
+      }
283
+      /deep/.el-input-number {
284
+        margin-top: 10px;
285
+      }
286
+      /deep/input.el-input__inner,
287
+      /deep/span.el-input-number__decrease.is-disabled,
288
+      /deep/span.el-input-number__increase,
289
+      /deep/span.el-input-number__decrease {
290
+        border: none;
291
+      }
292
+    }
293
+    .consumePrice {
294
+      display: flex;
295
+      .consumePrice-title {
296
+        font-size: 14px;
297
+        color: #333;
298
+        margin-top: 14px;
299
+        font-weight: 600;
300
+        margin-right: 20px;
301
+      }
302
+      .consumePrice-content {
303
+        width: 134px;
304
+        height: 24px;
305
+        border: 1px solid #f5f5f5;
306
+        border-radius: 2px;
307
+        margin-top: 10px;
308
+        display: flex;
309
+        align-items: center;
310
+        div {
311
+          color: #999999;
312
+        }
313
+        /deep/input.el-input__inner {
314
+          height: 21px;
315
+          width: 60px;
316
+          border: none;
317
+          text-align: center;
318
+          font-size: 12px;
319
+          padding: 0;
320
+        }
321
+      }
322
+    }
323
+    .StoredPrice {
324
+      display: flex;
325
+      .StoredPrice-title {
326
+        font-size: 14px;
327
+        color: #333;
328
+        margin-top: 14px;
329
+        font-weight: 600;
330
+        margin-right: 20px;
331
+      }
332
+      .StoredPrice-content {
333
+        width: 134px;
334
+        height: 24px;
335
+        border: 1px solid #f5f5f5;
336
+        border-radius: 2px;
337
+        margin-top: 10px;
338
+        display: flex;
339
+        align-items: center;
340
+        div {
341
+          color: #999999;
342
+        }
343
+        /deep/input.el-input__inner {
344
+          height: 21px;
345
+          width: 60px;
346
+          border: none;
347
+          text-align: center;
348
+          font-size: 12px;
349
+          padding: 0;
350
+        }
351
+      }
352
+    }
353
+  }
354
+  /deep/.el-dialog {
355
+    border-radius: 8px;
356
+    height: 400px;
357
+    position: relative;
358
+  }
359
+  /deep/.el-dialog__header {
360
+    padding: 0;
361
+    padding-bottom: 30px;
362
+  }
363
+  /deep/button.el-dialog__headerbtn {
364
+    display: none;
365
+  }
366
+  /deep/.el-dialog__body {
367
+    overflow: hidden;
368
+    height: 250px;
369
+    padding-left: 38px;
370
+    padding-top: 0;
371
+    color: #333;
372
+    overflow-y: auto; // 设置滚动条
373
+  }
374
+  .slot-footer {
375
+    padding: 0;
376
+    border-radius: 0 0 8px 8px;
377
+    border-top: solid 1px #f5f5f5;
378
+    position: absolute;
379
+    bottom: 0;
380
+    width: 100%;
381
+    height: 80px;
382
+    background-color: #ffffff;
383
+    text-align: center;
384
+    z-index: 999;
385
+    .item-title {
386
+      margin-top: 10px;
387
+      font-size: 14px;
388
+      color: #333;
389
+      i {
390
+        color: #ff3007;
391
+      }
392
+    }
393
+    button {
394
+      margin-top: 10px;
395
+      width: 176px;
396
+      height: 28px;
397
+      border: 1px solid #fa7d22;
398
+      border-radius: 14px;
399
+      color: #fa7d22;
400
+      background-color: #fff;
401
+    }
402
+    button:last-child {
403
+      background-color: #fa7d22;
404
+      margin-left: 14px;
405
+      color: #fff;
406
+    }
407
+  }
408
+  /deep/.el-dialog__footer {
409
+    padding: 0;
410
+  }
411
+}
412
+</style>