yuhao 2 vuotta sitten
vanhempi
commit
40956785ea

+ 5 - 1
src/components/common/layout/layout.vue

@@ -312,7 +312,11 @@ export default {
312 312
       await this.queryHasUnreadMessage()
313 313
     }, 20000)
314 314
   },
315
-  mounted () { },
315
+  mounted () {
316
+    if(this.$route.path=='/customerMan/details'){
317
+      this.isback=true
318
+    }
319
+  },
316 320
   beforeDestroy () {
317 321
     // 关闭WebSocket连接并清除定时器
318 322
     this.wsInstance.close()

+ 86 - 61
src/components/common/layout/leftMenu.vue

@@ -1,17 +1,20 @@
1 1
 <template>
2
-  <el-menu :collapse="isCollapse"
3
-           background-color="#FA7D22"
4
-           text-color="#FFFFFF"
5
-           active-text-color="#FA7D22"
6
-           :default-active="$route.path"
7
-           style="width: 115px;"
8
-           router>
2
+  <el-menu
3
+    :collapse="isCollapse"
4
+    background-color="#FA7D22"
5
+    text-color="#FFFFFF"
6
+    active-text-color="#FA7D22"
7
+    :default-active="$route.path"
8
+    style="width: 115px"
9
+    router
10
+  >
9 11
     <div class="logo">
10
-      <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/logo.png"
11
-           alt="">
12
+      <img
13
+        src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/logo.png"
14
+        alt=""
15
+      />
12 16
     </div>
13
-    <div v-for="(item,index1) in menu"
14
-         :key="index1">
17
+    <div v-for="(item, index1) in menu" :key="index1">
15 18
       <!--      <el-submenu :index="index1+'a'" v-if="item.children && item.children.length > 0">-->
16 19
       <!--        <template slot="title">-->
17 20
       <!--          <i :class="item.icon"></i>-->
@@ -24,12 +27,23 @@
24 27
       <!--          </el-menu-item>-->
25 28
       <!--        </div>-->
26 29
       <!--      </el-submenu>-->
27
-      <div class="el-menu-item"
28
-           @click="handleSelect(index1,item)"
29
-           :index="item.path"
30
-           :class="index1==nowIndex?'active':''"
31
-           :style="index1+1==nowIndex?'padding-bottom:0px':index1-1==nowIndex?'padding-top:0px':''">
32
-        <img :src="index1==nowIndex?item.icon:item.unicon"><span slot="title">{{ item.name }}</span>
30
+      <div
31
+        class="el-menu-item"
32
+        @click="handleSelect(index1, item)"
33
+        :index="item.path"
34
+        :class="index1 == nowIndex ? 'active' : ''"
35
+        :style="
36
+          index1 + 1 == nowIndex
37
+            ? 'padding-bottom:0px'
38
+            : index1 - 1 == nowIndex
39
+            ? 'padding-top:0px'
40
+            : ''
41
+        "
42
+      >
43
+        <img :src="index1 == nowIndex ? item.icon : item.unicon" /><span
44
+          slot="title"
45
+          >{{ item.name }}</span
46
+        >
33 47
       </div>
34 48
     </div>
35 49
   </el-menu>
@@ -39,89 +53,100 @@
39 53
 // import memberLogic from '@/server/memberLogic.js'
40 54
 
41 55
 export default {
42
-  props: ['isCollapse'],
43
-  data () {
56
+  props: ["isCollapse"],
57
+  data() {
44 58
     return {
45 59
       menu: [
46 60
         {
47 61
           name: "首页",
48 62
           path: "/home",
49
-          unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unhome.png',
50
-          icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/home.png'
51
-
63
+          unicon:
64
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unhome.png",
65
+          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/home.png",
52 66
         },
53 67
         {
54 68
           name: "测肤记录",
55 69
           path: "/testSkin",
56
-          unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png',
57
-          icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png',
70
+          unicon:
71
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png",
72
+          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png",
58 73
         },
59 74
         {
60 75
           name: "发券中心",
61 76
           path: "/coupon",
62
-          unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/uncoupon.png',
63
-          icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/coupon.png',
64
-        }, {
77
+          unicon:
78
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/uncoupon.png",
79
+          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/coupon.png",
80
+        },
81
+        {
65 82
           name: "历史订单",
66 83
           path: "/historicalOrder",
67
-          unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unhistory.png',
68
-          icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/history.png',
69
-        }, {
84
+          unicon:
85
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unhistory.png",
86
+          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/history.png",
87
+        },
88
+        {
70 89
           name: "确定订单",
71 90
           path: "/confirmOrder",
72
-          unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unconfirmOrder.png',
73
-          icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/confirmOrder.png'
91
+          unicon:
92
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unconfirmOrder.png",
93
+          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/confirmOrder.png",
74 94
         },
75 95
         //  {
76 96
         //   name: "门店检测",
77 97
         //   path: "/storeDetection",
78 98
         //   icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/testing.png',
79 99
         //   unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/untesting.png'
80
-        // },   
100
+        // },
81 101
         {
82 102
           name: "客户管理",
83 103
           path: "/customerMan",
84
-          unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png',
85
-          icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png',
86
-        }
104
+          unicon:
105
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png",
106
+          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png",
107
+        },
87 108
       ],
88
-      nowIndex: 0
89
-    }
109
+      nowIndex: 0,
110
+    };
90 111
   },
91 112
   watch: {
92
-    $route (to, from) {
93
-      console.log(to, 'tootototo');
94
-      let patname = `/${to.path.split('/')[1]}`
95
-      console.log(window.location, 'window.location.pathname', to);
96
-      this.$emit('changeIsBack', to.meta.isback)
113
+    $route(to, from) {
114
+      console.log(to, "tootototo");
115
+      let patname = `/${to.path.split("/")[1]}`;
116
+      console.log(window.location, "window.location.pathname", to);
117
+      this.$emit("changeIsBack", to.meta.isback);
97 118
       this.menu.forEach((item, index) => {
98 119
         if (patname == item.path) {
99
-          this.nowIndex = index
100
-          this.$emit('changeMenu', index)
120
+          this.nowIndex = index;
121
+          this.$emit("changeMenu", index);
101 122
         }
102
-      })
103
-    }
123
+      });
124
+      // 客户管理详情跳转测肤记录修改返回键显示
125
+      if (from.path == "/customerMan/details") {
126
+        this.$emit("changeIsBack", this.$route.query.isback);
127
+      }
128
+    },
104 129
   },
105
-  mounted () {
106
-    let patname = `/${window.location.hash.substr(1).split('/')[1]}`
107
-    console.log(window.location, 'window.location.pathname', patname);
130
+  mounted() {
131
+    let patname = `/${window.location.hash.substr(1).split("/")[1]}`;
132
+    console.log(window.location, "window.location.pathname", patname);
108 133
     this.menu.forEach((item, index) => {
109 134
       if (patname == item.path) {
110
-        this.nowIndex = index
111
-        this.$emit('changeMenu', index)
135
+        this.nowIndex = index;
136
+        this.$emit("changeMenu", index);
112 137
       }
113
-    })
138
+    });
114 139
   },
115 140
   methods: {
116
-    handleSelect (index, item) {
117
-      this.nowIndex = index
141
+    handleSelect(index, item) {
142
+      this.nowIndex = index;
118 143
       this.$router.push({
119
-        path: item.path
120
-      })
121
-      this.$emit('changeMenu', index)
122
-    }
123
-  }
124
-}
144
+        path: item.path,
145
+      });
146
+      this.$emit("changeMenu", index);
147
+    },
148
+  },
149
+};
125 150
 </script>
126 151
 
127 152
 <style lang="less" scoped>

+ 336 - 92
src/pages/customerMan/details/index.vue

@@ -4,13 +4,13 @@
4 4
       <div class="user-info">
5 5
         <div class="title">
6 6
           <div class="txt">个人信息</div>
7
-          <div
7
+          <!-- <div
8 8
             class="test-record"
9 9
             @click="toTestRecord"
10 10
             v-if="userInfo.analysis_id"
11 11
           >
12 12
             测肤记录
13
-          </div>
13
+          </div> -->
14 14
         </div>
15 15
         <div class="detail-info">
16 16
           <div class="user-img">
@@ -21,14 +21,17 @@
21 21
               <div class="name">
22 22
                 <span>{{ userInfo.nickname | ellipsis(3) }}</span>
23 23
               </div>
24
+              <!-- <div class="skin-type">
25
+                肤龄:<span>{{ userInfo.age }}</span>
26
+              </div> -->
24 27
               <div class="sex"><img :src="gender" alt="" /></div>
25
-              <!-- <div class="age">
28
+              <div class="age">
26 29
                 <span>{{ userInfo.skin_age }}</span
27 30
                 ><span class="min-size">肤龄</span>
28
-              </div> -->
31
+              </div>
29 32
             </div>
30 33
             <div class="real-name">
31
-              姓名:
34
+              真实姓名:
32 35
               <span v-show="!nameInpVisible">{{ userInfo.real_name }}</span>
33 36
               <el-input
34 37
                 size="mini"
@@ -46,84 +49,116 @@
46 49
                 srcset=""
47 50
               />
48 51
             </div>
52
+
49 53
             <div class="skin-type">
50
-              肤质:<span>{{ userInfo.skin_type }}</span>
51
-            </div>
52
-            <div class="skin-type">
53
-              肤龄:<span>{{ userInfo.age }}</span>
54
-            </div>
55
-            <div class="skin-color">
56
-              肤色:<span>{{ userInfo.skin_color }}</span>
54
+              用户ID:<span> {{ userInfo.user_id }}</span>
57 55
             </div>
56
+            <!-- <div class="skin-type">
57
+              上传报告时间:<span> {{ userDetail.create_time }}</span>
58
+            </div> -->
58 59
           </div>
59 60
         </div>
60 61
       </div>
61 62
 
62 63
       <div class="personage-data">
63 64
         <div class="myDataList">
64
-          检测时间:
65
-          <span>{{ userInfo.check_time }}</span>
66
-        </div>
67
-        <div class="myDataList">
68
-          出生日期:
65
+          <span class="dataListTitle">出生日期</span> :
66
+
69 67
           <span>{{ userInfo.birthday }}</span>
70 68
         </div>
71 69
         <div class="myDataList">
72
-          手机号:
70
+          <span class="dataListTitle">联系电话</span> :
73 71
           <span>{{ userInfo.mobile }}</span>
74 72
         </div>
75 73
 
76 74
         <div class="myDataList">
77
-          所在地:
75
+          <span class="dataListTitle">所在地</span> :
78 76
           <span>{{ userInfo.city }}</span>
79 77
         </div>
80 78
 
81 79
         <div class="myDataList">
82
-          开卡店铺:
83
-          <span>{{ userInfo.store_name }}</span>
80
+          <span class="dataListTitle">客户来源</span> :
81
+          <!-- <span>{{ userInfo.store_name }}</span> -->
82
+          <el-select
83
+            v-model="sourceValue"
84
+            placeholder="请选择"
85
+            size="mini"
86
+            @change="selectSource"
87
+          >
88
+            <el-option
89
+              v-for="(item, index) in sourceList"
90
+              :key="index"
91
+              :label="item"
92
+              :value="index"
93
+            >
94
+            </el-option>
95
+          </el-select>
84 96
         </div>
97
+        <div class="assetInfo">资产信息</div>
85 98
 
86 99
         <div class="myDataList coupon-num">
87
-          次卡数量:
100
+          <span class="dataListTitle">次卡数量</span> :
88 101
           <span @click="toOrder(2)">{{ order_total.card_num }}</span>
89 102
         </div>
90 103
 
91 104
         <div class="myDataList coupon-num">
92
-          优惠券数量:
105
+          <span class="dataListTitle">优惠券</span> :
93 106
           <span @click="toOrder(4)">{{ userInfo.card_num }}</span>
94 107
         </div>
95 108
 
96 109
         <div class="myDataList">
97
-          储值金额:
98
-          <span class="JEcolor">
99
-            ¥
100
-            <span class="bigSixe">{{ userInfo.amount }}</span>
110
+          <span class="dataListTitle">储值金额</span> :
111
+          <span class="JEcolor" @click="toOrder(5)"> 
112
+            ¥<span class="bigSixe">{{ userInfo.amount }}</span>
101 113
             <!-- .00 -->
102 114
           </span>
103 115
         </div>
104 116
         <div class="myDataList">
105
-          积分:
117
+          <span class="dataListTitle">积分</span> :
106 118
           <span>{{ userInfo.coin }}</span>
107 119
         </div>
108
-        <div class="myDataList" @click="remarkPupopVisible = true">
120
+        <div class="detectionInfo">
121
+          <div>检测信息</div>
122
+          <div @click="goTestSkin">测肤记录</div>
123
+        </div>  
124
+        <div class="skin-type">
125
+          <span class="dataListTitle">肤质</span> :
126
+          <span class="item" v-if="userDetail.detection">{{
127
+            skin_type[userDetail.detection.skin_type - 1]
128
+          }}</span>
129
+        </div>
130
+        <!-- <div class="skin-color">
131
+          <span class="dataListTitle">肤色</span> :
132
+          <span>{{ userInfo.skin_color }}</span>
133
+        </div> -->
134
+        <div class="myDataList">
135
+          <span class="dataListTitle">测肤时间</span> :
136
+          <span v-if="userDetail.detection">{{ userDetail.detection.create_time }}</span>
137
+        </div>
138
+        <!-- <div class="myDataList" @click="remarkPupopVisible = true">
109 139
           备注信息:
110 140
           <span>{{ userInfo.remark | ellipsis(20) }}</span>
111
-        </div>
141
+        </div> -->
112 142
       </div>
113 143
     </div>
114 144
     <div class="right">
115 145
       <div class="right-top">
116 146
         <div class="right-top-data">
117 147
           <div class="lable">
118
-            <div class="lable-title">面诊标签</div>
148
+            <div class="lable-title" v-if="userDetail.detection">
149
+              <div>面诊标签</div>
150
+              <div @click="goTestSkinDetials" v-if='userDetail.detection.id'>执行方案</div>
151
+            </div>
119 152
             <div class="problem">
120
-              <div class="problem-title">问题标签</div>
153
+              <div class="problem-title">问题标签&nbsp;</div>
154
+              :
121 155
               <div class="problem-lable">
122 156
                 <div class="lable-text problem-text">{{ problem }}</div>
123 157
               </div>
124 158
             </div>
125 159
             <div class="problem">
126
-              <div class="problem-title">面部标签</div>
160
+              <div class="problem-title">面部标签&nbsp;</div>
161
+              :
127 162
               <div class="problem-lable">
128 163
                 <div
129 164
                   class="lable-text"
@@ -172,54 +207,90 @@
172 207
       </div>
173 208
       <div class="right-bottom">
174 209
         <div class="programme">
175
-          <div class="tab">
176
-            <div class="tab-title">执行方案</div>
177
-          </div>
178
-          <div class="programmeList" v-if="programmeList.length > 0">
179
-            <div class="programmeWeek">
180
-              <div
181
-                class="programmeItem"
182
-                v-for="(item, index) in programmeList"
183
-                :key="index"
184
-              >
185
-                <div
186
-                  :class="selectWeek == index ? 'weekItemSelect' : 'weekItem'"
187
-                  @click="weekSelect(index)"
188
-                >
189
-                  {{ item.name }}
210
+          <div class="consume">
211
+            <div class="consume-box">
212
+              <div class="consume-title">总消费</div>
213
+              <div class="consume-content">
214
+                <div class="consume-one">
215
+                  <div class="consume-type">
216
+                    总消费金额:<span class="consume-price">{{
217
+                      userDetail.total_price
218
+                    }}</span>
219
+                  </div>
220
+                  <div class="consume-type">
221
+                    项目叠加次数:<span class="consume-price">{{
222
+                      userDetail.overlay
223
+                    }}</span>
224
+                  </div>
225
+                </div>
226
+                <div class="consume-two">
227
+                  <div class="consume-type">
228
+                    总储值金额:<span class="consume-price">{{
229
+                      userDetail.balance==null?0:userDetail.balance
230
+                    }}</span>
231
+                  </div>
232
+
233
+                  <div class="consume-type">
234
+                    转化次数:<span class="consume-price">{{
235
+                      userDetail.conversion
236
+                    }}</span>
237
+                  </div>
190 238
                 </div>
191
-                <div class="weekLine" v-if="index == 3 ? false : true"></div>
192 239
               </div>
193 240
             </div>
194
-            <div class="doTime">{{ programmeList[selectWeek].time }}</div>
195
-            <div class="weekDetails" v-if="programmeList.length > 0">
196
-              <div
197
-                class="contentItem"
198
-                v-for="(item, index1) in programmeList[selectWeek].list"
199
-                :key="index1"
200
-              >
201
-                <div class="itemTitle">
202
-                  <div>{{ item.name }}</div>
203
-                  <div>{{ item.classify_name }}</div>
204
-                  <!-- <div>{{item.time}}</div> -->
241
+            <div class="consume-title">最近消费记录</div>
242
+            <div class="consume-record">
243
+              <div class="record-item">
244
+                <div class="record-title">项目</div>
245
+                :
246
+                <div v-if="userDetail.project" class="record-name">
247
+                  {{ userDetail.project.project_name }}
205 248
                 </div>
206
-                <div
207
-                  class="itemContent"
208
-                  v-for="(items, index2) in item.list"
209
-                  :key="index2"
210
-                >
211
-                  <img class="itemContent-img" :src="items.cover_url" />
212
-                  <div class="itemContent-right">
213
-                    <div class="right-content">
214
-                      <div class="right-name">
215
-                        {{ items.name | ellipsis(14) }}
216
-                      </div>
217
-                      <div class="right-price">
218
-                        {{ items.price | doubleNum(2) }}
219
-                      </div>
220
-                    </div>
221
-                    <div class="right-project">{{ items.product_name }}</div>
222
-                  </div>
249
+                <div v-if="userDetail.project">
250
+                  {{ userDetail.project.create_time }}
251
+                </div>
252
+              </div>
253
+              <div class="record-item">
254
+                <div class="record-title">次卡</div>
255
+                :
256
+                <div v-if="userDetail.user_card" class="record-name">
257
+                  {{ userDetail.user_card.card_name }}
258
+                </div>
259
+                <div v-if="userDetail.user_card">
260
+                  {{ userDetail.user_card.create_time }}
261
+                </div>
262
+              </div>
263
+              <div class="record-item">
264
+                <div class="record-title">美妆产品</div>
265
+                :
266
+                <div v-if="userDetail.goods" class="record-name">
267
+                  {{ userDetail.goods.goods_name }}
268
+                </div>
269
+                <div v-if="userDetail.goods">
270
+                  {{ userDetail.goods.create_time }}
271
+                </div>
272
+              </div>
273
+              <div class="record-item">
274
+                <div class="record-title">充值</div>
275
+                :
276
+                <div v-if="userDetail.recharge" class="record-name">
277
+                  {{ userDetail.recharge.price }}
278
+                </div>
279
+                <div v-if="userDetail.recharge">
280
+                  {{ userDetail.recharge.create_time }}
281
+                </div>
282
+              </div>
283
+            </div>
284
+            <div class="consume-title">最近消耗</div>
285
+            <div class="card-record">
286
+              <div class="record-item">
287
+                <div class="record-title">消耗次卡</div>
288
+                :
289
+                <div v-if="userDetail.time_card" class="record-name">
290
+                  {{ userDetail.time_card.card_name }}
291
+                </div>
292
+                <div v-if="userDetail.time_card">
293
+                  {{ userDetail.time_card.create_time }}
223 294
                 </div>
224 295
               </div>
225 296
             </div>
@@ -287,6 +358,20 @@ export default {
287 358
       isPupop: false,
288 359
       nameInpVisible: false,
289 360
       remarkPupopVisible: false,
361
+      sourceList: [
362
+        " ",
363
+        "线下进店",
364
+        "种子用户",
365
+        "美团/大众",
366
+        "抖音",
367
+        "达人探店",
368
+        "霸王餐",
369
+        "老带新/转介绍",
370
+      ], //客户来源下拉选择
371
+      sourceValue: "", //客户来源值
372
+      id: this.$route.id, //用户的id
373
+      userDetail: [], //客户管理详情
374
+      skin_type: ["干性肌肤", "中性肌肤", "油性肌肤", "混合型肌肤"], //肤质 (肤质类型 1-干性肌肤 2-中性肌肤 3-油性肌肤 4-混合型肌肤)
290 375
     };
291 376
   },
292 377
   components: { minePupop },
@@ -299,8 +384,50 @@ export default {
299 384
     },
300 385
   },
301 386
   watch: {},
302
-
387
+  // 返回页面缓存客户管理页面
388
+    beforeRouteLeave(to,from,next){
389
+    to.meta.keepAlive=true
390
+    next()
391
+  },
303 392
   methods: {
393
+    // 获取客户管理详情
394
+    getUserDetail() {
395
+      api.getUserDetail({ id: this.id }).then((res) => {
396
+        this.userDetail = res.data;
397
+        this.sourceValue = this.sourceList[res.data.tag];
398
+      });
399
+    },
400
+    // 编辑客户管理用户标签
401
+    editSign(tag){
402
+      api.editSign({
403
+        tag,
404
+        id:this.id
405
+      }).then()
406
+    },
407
+    // 选择客户来源
408
+    selectSource(e) {
409
+      this.editSign(e)
410
+    },
411
+    // 跳转到测肤记录详情
412
+    goTestSkinDetials() {
413
+      this.$router.push({
414
+        path: "/testSkin/details",
415
+        query: {
416
+          id: this.userDetail.detection.id,
417
+          isback:true
418
+        }
419
+      });
420
+    },
421
+    // 跳转到测肤记录列表
422
+    goTestSkin() {
423
+      this.$router.push({
424
+        path: "/testSkin",
425
+        query: {
426
+          isback: true,
427
+          id:this.id
428
+        },
429
+      });
430
+    },
304 431
     getPadUserInfo() {
305 432
       api.getPadUserInfo({ id: this.id }).then((res) => {
306 433
         console.log(res, "aaaaaaaa");
@@ -377,14 +504,17 @@ export default {
377 504
         activeName = "third";
378 505
       } else if (index == 2) {
379 506
         activeName = "second";
380
-      }else if(index==4){
381
-        activeName = 'fourth'
507
+      } else if (index == 4) {
508
+        activeName = "fourth";
509
+      }else if(index==5){
510
+        activeName = "five";
382 511
       }
383 512
       this.$router.push({
384 513
         path: "/customerMan/projectOrder",
385 514
         query: {
386 515
           id: this.id,
387 516
           activeName: activeName,
517
+          isback:true
388 518
         },
389 519
       });
390 520
     },
@@ -425,6 +555,8 @@ export default {
425 555
   created() {
426 556
     let id = this.$route.query.id;
427 557
     this.id = id;
558
+    // 获取客户管理详情
559
+    this.getUserDetail();
428 560
     this.getPadUserInfo();
429 561
   },
430 562
 
@@ -489,11 +621,12 @@ export default {
489 621
             justify-content: space-between;
490 622
             .name {
491 623
               font-size: 14px;
624
+              width: 60px;
492 625
             }
493 626
             .sex {
494 627
               img {
495
-                width: 24px;
496
-                height: 24px;
628
+                width: 19px;
629
+                height: 19px;
497 630
               }
498 631
             }
499 632
             .age {
@@ -529,11 +662,55 @@ export default {
529 662
     }
530 663
     .personage-data {
531 664
       margin-top: 14px;
665
+      .assetInfo {
666
+        font-size: 14px;
667
+        color: #333;
668
+        font-weight: 600;
669
+        margin-top: 10px;
670
+      }
671
+      .detectionInfo {
672
+        margin-top: 10px;
673
+        display: flex;
674
+        justify-content: space-between;
675
+        font-size: 14px;
676
+        font-weight: 600;
677
+        color: #fa7d22;
678
+        div:first-child {
679
+          color: #333333;
680
+        }
681
+      }
682
+      .skin-type {
683
+        margin-top: 10px;
684
+        .dataListTitle {
685
+          display: inline-block;
686
+          font-size: 13px;
687
+          color: #999999;
688
+          width: 55px;
689
+          text-align: justify;
690
+          text-justify: distribute-all-lines;
691
+          text-align-last: justify;
692
+        }
693
+        .item{
694
+          color: #333;
695
+        }
696
+      }
697
+      .skin-color {
698
+        margin-top: 10px;
699
+        .dataListTitle {
700
+          display: inline-block;
701
+          font-size: 13px;
702
+          color: #999999;
703
+          width: 55px;
704
+          text-align: justify;
705
+          text-justify: distribute-all-lines;
706
+          text-align-last: justify;
707
+        }
708
+      }
532 709
       .myDataList {
533
-        margin-top: 15px;
710
+        margin-top: 10px;
534 711
         .bigSixe {
535 712
           font-size: 18px;
536
-          color: #fa7d22;
713
+          color: #ff3007;
537 714
         }
538 715
         span {
539 716
           color: #333333;
@@ -541,10 +718,21 @@ export default {
541 718
         .JEcolor {
542 719
           color: #fa7d22;
543 720
         }
721
+        .dataListTitle {
722
+          display: inline-block;
723
+          font-size: 13px;
724
+          color: #999999;
725
+          width: 55px;
726
+          text-align: justify;
727
+          text-justify: distribute-all-lines;
728
+          text-align-last: justify;
729
+        }
730
+        /deep/.el-select {
731
+          width: 150px;
732
+        }
544 733
       }
545 734
       .coupon-num {
546 735
         span {
547
-          color: #fa7d22;
548 736
           font-size: 16px;
549 737
           font-weight: 500;
550 738
         }
@@ -611,10 +799,15 @@ export default {
611 799
           .lable-title {
612 800
             font-size: 14px;
613 801
             font-family: PingFangSC-Medium, PingFang SC;
614
-            font-weight: 500;
802
+            font-weight: 600;
615 803
             color: #333333;
616 804
             line-height: 20px;
617 805
             margin-bottom: 14px;
806
+            display: flex;
807
+            justify-content: space-between;
808
+            div:last-child {
809
+              color: #fa7d22;
810
+            }
618 811
           }
619 812
           .problem {
620 813
             display: flex;
@@ -874,16 +1067,67 @@ export default {
874 1067
             color: #ffc630;
875 1068
           }
876 1069
         }
877
-        .tab {
878
-          display: flex;
879
-          align-items: center;
880
-          justify-content: space-between;
881
-          .tab-title {
1070
+        .consume {
1071
+          .consume-box {
1072
+            display: flex;
1073
+          }
1074
+          .consume-title {
882 1075
             font-size: 14px;
883 1076
             font-family: PingFangSC-Medium, PingFang SC;
884
-            font-weight: 500;
1077
+            font-weight: 700;
885 1078
             color: #333333;
886 1079
             line-height: 20px;
1080
+            margin-top: 15px;
1081
+          }
1082
+          .consume-title:first-child {
1083
+            margin-top: 0;
1084
+          }
1085
+          .consume-content {
1086
+            display: flex;
1087
+            justify-content: space-between;
1088
+            flex-wrap: wrap;
1089
+            .consume-two {
1090
+              margin-left: 90px;
1091
+            }
1092
+            .consume-type {
1093
+              line-height: 25px;
1094
+              width: 160px;
1095
+              font-size: 13px;
1096
+              color: #999999;
1097
+              margin-left: 20px;
1098
+            }
1099
+            .consume-price {
1100
+              font-size: 13px;
1101
+              color: #333333;
1102
+              margin-left: 14px;
1103
+            }
1104
+          }
1105
+          .consume-record,
1106
+          .card-record {
1107
+            .record-item {
1108
+              display: flex;
1109
+              font-size: 13px;
1110
+              color: #666666;
1111
+              margin-top: 15px;
1112
+              .record-title {
1113
+                width: 65px;
1114
+                text-align: justify;
1115
+                text-justify: distribute-all-lines;
1116
+                text-align-last: justify;
1117
+              }
1118
+              .record-name {
1119
+                color: #333333;
1120
+                width: 260px;
1121
+                margin-left: 36px;
1122
+                margin-right: 36px;
1123
+                /* 强制超出不换行 */
1124
+                white-space: nowrap;
1125
+                /* 超出隐藏 */
1126
+                overflow: hidden;
1127
+                /* 文本超出显示成... */
1128
+                text-overflow: ellipsis;
1129
+              }
1130
+            }
887 1131
           }
888 1132
         }
889 1133
         .programme-list {

+ 146 - 7
src/pages/customerMan/index.vue

@@ -7,6 +7,37 @@
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
+          @change="showSilence"
17
+        >
18
+        </el-switch>
19
+      </div>
20
+      <div class="faceUser">
21
+        <div class="title">显示未面诊付费用户</div>
22
+        <el-switch
23
+          v-model="face"
24
+          active-color="#fa7d22"
25
+          inactive-color="#e7e7e7"
26
+          @change="showFace"
27
+        >
28
+        </el-switch>
29
+      </div>
30
+      <div class="filter">
31
+        <div class="title">筛选</div>
32
+        <i @click="openFilterPop" class="el-icon-s-operation"></i>
33
+      </div>
34
+      <!-- 筛选条件弹窗 -->
35
+      <select-pop
36
+        :visible.sync="dialogVisible"
37
+        @saveSelectList="saveSelectList"
38
+        :resetPop='resetPop'
39
+        :key='key'
40
+      ></select-pop>
10 41
     </div>
11 42
 
12 43
     <div class="user-list">
@@ -25,9 +56,9 @@
25 56
             </div>
26 57
           </template>
27 58
         </el-table-column>
28
-        <el-table-column prop="id" label="用户ID" width="120"></el-table-column>
29 59
         <el-table-column prop="nickname" label="昵称" width="120">
30 60
         </el-table-column>
61
+        <el-table-column prop="id" label="用户ID" width="120"></el-table-column>
31 62
         <el-table-column prop="mobile" label="联系电话" show-overflow-tooltip>
32 63
         </el-table-column>
33 64
         <el-table-column
@@ -36,6 +67,12 @@
36 67
           show-overflow-tooltip
37 68
         >
38 69
         </el-table-column>
70
+        <el-table-column
71
+          prop="last_login_time"
72
+          label="最后登录时间"
73
+          show-overflow-tooltip
74
+        >
75
+        </el-table-column>
39 76
       </el-table>
40 77
 
41 78
       <div class="pagin">
@@ -55,8 +92,9 @@
55 92
 
56 93
 <script>
57 94
 import api from "../../server/home";
95
+import selectPop from "./selectPop/index.vue";
58 96
 export default {
59
-  components: {},
97
+  components: { selectPop },
60 98
   data() {
61 99
     return {
62 100
       searchText: "",
@@ -76,29 +114,87 @@ export default {
76 114
       currentPage1: 1,
77 115
       multipleSelection: "",
78 116
       total: 0,
79
-      // limit:10
117
+      face: false, //未面诊用户开关
118
+      silence: false, //沉默用户开关
119
+      dialogVisible: false, // 控制筛选弹框
120
+      // 筛选框内的变量内容
121
+      customerKey: 0,
122
+      couponKey: 0,
123
+      cardKey: 0,
124
+      latelyKey: 0,
125
+      superpositionNum: 0,
126
+      StoredPrice: 0,
127
+      transitionNum: 0,
128
+      consumeprice:0,
129
+      resetPop:false, //设置筛选弹窗开关
130
+      key:1 //筛选弹框组件刷新加载
80 131
     };
81 132
   },
82 133
   computed: {},
83 134
   watch: {},
84
-
85 135
   methods: {
136
+    // 筛选其他条件
137
+    saveSelectList(
138
+      customerKey,
139
+      couponKey,
140
+      cardKey,
141
+      latelyKey,
142
+      superpositionNum,
143
+      StoredPrice,
144
+      transitionNum,
145
+      consumeprice,
146
+    ) {
147
+      (this.customerKey = customerKey),
148
+        (this.couponKey = couponKey),
149
+        (this.cardKey = cardKey),
150
+        (this.latelyKey = latelyKey),
151
+        (this.superpositionNum = superpositionNum),
152
+        (this.StoredPrice = StoredPrice),
153
+        (this.transitionNum = transitionNum),
154
+        this.consumeprice = consumeprice
155
+        this.getUserList();
156
+    },
157
+    // 筛选沉默用户
158
+    showSilence(e) {
159
+      this.getUserList();
160
+    },
161
+    // 筛选未面诊用户
162
+    showFace(e) {
163
+      this.getUserList();
164
+    },
165
+    // 打开筛选条件弹框
166
+    openFilterPop() {
167
+      this.dialogVisible = true;
168
+    },
86 169
     // 获取订单列表
87 170
     getUserList() {
88 171
       let params = {
89 172
         page: this.currentPage1,
90 173
         limit: this.limit,
91 174
         keywords: this.searchText,
175
+        silence_user: this.silence ? 1 : 0, //沉默付费用户1是显示 0是不显示
176
+        face_user: this.face ? 1 : 0, //显示未面诊付费用户 1是显示 0是不显示
177
+        tag: this.customerKey,
178
+        coupon_days: this.couponKey,
179
+        card_days: this.cardKey,
180
+        buying_time: this.latelyKey,
181
+        project_add: this.superpositionNum,
182
+        balance_money: this.StoredPrice,
183
+        change_add: this.transitionNum,
184
+        consume_money:this.consumeprice
92 185
       };
93
-      api.getUserList(params).then((res) => {
186
+      api.getUserPayList(params).then((res) => {
94 187
         if (res.code == 200) {
95 188
           // 将用户手机号中间四位变成****
96 189
           res.data.list.map((item) => {
97
-            item.mobile =
98
-              item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
190
+            if (item.mobile) {
191
+              item.mobile =
192
+                item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
193
+            }
99 194
           });
100 195
           this.tableData = res.data.list;
101 196
           this.total = res.data.total;
197
+          console.log(this.tableData);
102 198
         }
103 199
       });
104 200
     },
@@ -124,6 +220,20 @@ export default {
124 220
   },
125 221
 
126 222
   mounted() {},
223
+  // 不是客户详情页面返回重置数据
224
+  beforeRouteEnter(to, from, next) {
225
+    if (from.path != "/customerMan/details") {
226
+      next((vm)=>{
227
+        let key = vm.key
228
+        Object.assign(vm.$data, vm.$options.data());
229
+        vm.key=key+1 
230
+        vm.resetPop = true
231
+        vm.getUserList()
232
+      })
233
+    }else{
234
+      next()
235
+    }
236
+  },
127 237
 };
128 238
 </script>
129 239
 
@@ -147,6 +257,35 @@ export default {
147 257
       border-radius: 2px;
148 258
       border-color: #fa7d22;
149 259
     }
260
+    .silenceUser {
261
+      display: flex;
262
+      margin-left: 53px;
263
+      align-items: center;
264
+      .title {
265
+        line-height: 40px;
266
+        margin-right: 16px;
267
+      }
268
+    }
269
+    .faceUser {
270
+      display: flex;
271
+      margin-left: 53px;
272
+      align-items: center;
273
+      .title {
274
+        line-height: 40px;
275
+        margin-right: 16px;
276
+      }
277
+    }
278
+    .filter {
279
+      display: flex;
280
+      align-items: center;
281
+      margin-left: 53px;
282
+      .title {
283
+        margin-right: 17px;
284
+      }
285
+      i {
286
+        font-size: 17px;
287
+      }
288
+    }
150 289
   }
151 290
   .user-list {
152 291
     margin-top: 18px;

+ 112 - 3
src/pages/customerMan/myOrder/index.vue

@@ -79,7 +79,12 @@
79 79
                   <div>{{ scope.row.card_name | ellipsis(8) }}</div>
80 80
                 </template>
81 81
               </el-table-column>
82
-              <el-table-column prop="total_num" label="总次数" show-overflow-tooltip align="center">
82
+              <el-table-column
83
+                prop="total_num"
84
+                label="总次数"
85
+                show-overflow-tooltip
86
+                align="center"
87
+              >
83 88
               </el-table-column>
84 89
               <el-table-column
85 90
                 prop="num"
@@ -258,6 +263,88 @@ type: "全额券" -->
258 263
             </div>
259 264
           </div>
260 265
         </el-tab-pane>
266
+        <el-tab-pane label="余额记录" name="five">
267
+          <div class="user-list">
268
+            <el-table
269
+              ref="multipleTable"
270
+              :data="balanceListData"
271
+              tooltip-effect="dark"
272
+              height="354"
273
+              style="width: 100%; border-radius: 8px"
274
+            >
275
+              <el-table-column prop="goods" label="变更时间" width="200">
276
+                <template slot-scope="scope">
277
+                  <div>{{ scope.row.create_time }}</div>
278
+                </template>
279
+              </el-table-column>
280
+              <el-table-column prop="goods" label="变更前金额">
281
+                <template slot-scope="scope">
282
+                  <div>{{ scope.row.before_amount }}</div>
283
+                </template>
284
+              </el-table-column>
285
+              <el-table-column
286
+                prop="goods"
287
+                label="变更后金额"
288
+                show-overflow-tooltip
289
+              >
290
+                <template slot-scope="scope">
291
+                  <div>{{ scope.row.after_amount }}</div>
292
+                </template>
293
+              </el-table-column>
294
+              <el-table-column
295
+                prop="price"
296
+                label="变更金额"
297
+                show-overflow-tooltip
298
+              >
299
+                <template slot-scope="scope">
300
+                  <div>
301
+                    {{ scope.row.is_add == 1 ? "+" : "-" }}{{ scope.row.amount }}
302
+                  </div>
303
+                </template>
304
+              </el-table-column>
305
+              <!-- <el-table-column prop="status" label="状态" show-overflow-tooltip>
306
+                <template slot-scope="scope">
307
+                  <div>{{ scope.row.msg }}</div>
308
+                </template>
309
+              </el-table-column> -->
310
+              <!--  余额类型(记录类型,1充值,2充值赠送,3订单退款,5提现驳回,-1消费,-2提现冻结,10客服添加,-10客服扣除) -->
311
+              <el-table-column prop="status" label="类型" show-overflow-tooltip>
312
+                <template slot-scope="scope">
313
+                  <div>
314
+                    {{
315
+                      scope.row.type == 1
316
+                        ? "充值"
317
+                        : scope.row.type == 2
318
+                        ? "充值赠送"
319
+                        : scope.row.type == 3
320
+                        ? "订单退款"
321
+                        : scope.row.type == 5
322
+                        ? "提现驳回"
323
+                        : scope.row.type == -1
324
+                        ? "消费"
325
+                        : scope.row.type == -2
326
+                        ? "提现冻结"
327
+                        : scope.row.type == 10
328
+                        ? "客服添加"
329
+                        : scope.row.type == -10
330
+                        ? "客服扣除"
331
+                        : ""
332
+                    }}
333
+                  </div>
334
+                </template>
335
+              </el-table-column>
336
+            </el-table>
337
+            <div class="pagin">
338
+              <el-pagination
339
+                background
340
+                layout="prev, pager, next"
341
+                @current-change="handleCurrentChange"
342
+                :current-page.sync="currentPage1"
343
+                :total="total"
344
+              ></el-pagination>
345
+            </div>
346
+          </div>
347
+        </el-tab-pane>
261 348
       </el-tabs>
262 349
     </div>
263 350
     <!-- 次卡详情 -->
@@ -380,6 +467,7 @@ export default {
380 467
       cardInfo: {}, //订单详情
381 468
       cardLogList: [], //次卡消耗记录
382 469
       cardListData: [], //用户次卡列表
470
+      balanceListData: [], //用户余额变更记录
383 471
     };
384 472
   },
385 473
   computed: {},
@@ -496,6 +584,20 @@ export default {
496 584
         this.total = resp.data.total;
497 585
       }
498 586
     },
587
+    // 获取余额变更记录
588
+    async getBalanceRecord() {
589
+      let params = {
590
+        page: this.currentPage1,
591
+        limit: this.limit,
592
+        id: this.id,
593
+      };
594
+      let resp = await api.getBalanceRecord(params);
595
+      if (resp.code === 200) {
596
+        console.log(resp, "asdasdasd");
597
+        this.balanceListData = resp.data.list;
598
+        this.total = resp.data.count;
599
+      }
600
+    },
499 601
     handleCurrentChange(val) {
500 602
       this.currentPage1 = val;
501 603
       if (this.activeName == "first") {
@@ -507,6 +609,8 @@ export default {
507 609
         this.getUserGoods();
508 610
       } else if (this.activeName == "fourth") {
509 611
         this.getUserCoupon();
612
+      } else if (this.activeName == "five") {
613
+        this.getBalanceRecord();
510 614
       }
511 615
     },
512 616
     handleSelectionChange(row, column, event) {
@@ -521,6 +625,7 @@ export default {
521 625
     submitFrequency() {},
522 626
     changeTab(e) {
523 627
       this.currentPage1 = 1;
628
+      console.log(this.currentPage1);
524 629
       if (e.index == 0) {
525 630
         this.getUserProject();
526 631
       } else if (e.index == 1) {
@@ -530,6 +635,8 @@ export default {
530 635
         this.getUserGoods();
531 636
       } else if (e.index == 3) {
532 637
         this.getUserCoupon();
638
+      } else if (e.index == 4) {
639
+        this.getBalanceRecord();
533 640
       }
534 641
     },
535 642
   },
@@ -546,8 +653,10 @@ export default {
546 653
       this.getCardList();
547 654
     } else if (this.activeName == "third") {
548 655
       this.getUserGoods();
549
-    }else if (this.activeName == 'fourth'){
550
-      this.getUserCoupon()
656
+    } else if (this.activeName == "fourth") {
657
+      this.getUserCoupon();
658
+    } else if (this.activeName == "five") {
659
+      this.getBalanceRecord();
551 660
     }
552 661
   },
553 662
 

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

@@ -0,0 +1,555 @@
1
+<template>
2
+  <div>
3
+    <div class="filterPop">
4
+      <el-dialog
5
+        top="130px"
6
+        :visible.sync="visible"
7
+        width="52.5%"
8
+        :close-on-click-modal="false"
9
+      >
10
+        <span slot="title" class="slot-title">
11
+          <i @click="closeFilterPop" class="el-icon-arrow-left"></i>
12
+          筛选条件
13
+        </span>
14
+        <div class="customer-source">
15
+          <div class="center">
16
+            <div class="item-title">{{ customerSource.name }}</div>
17
+            <div class="content">
18
+              <div
19
+                class="content-item"
20
+                :class="{
21
+                  activeFilter: customerSelect.indexOf(index) != -1,
22
+                }"
23
+                v-for="(item, index) in customerSource.title"
24
+                :key="index"
25
+                @click="customerFilter(item, index)"
26
+              >
27
+                {{ item }}
28
+              </div>
29
+            </div>
30
+          </div>
31
+          <div class="center">
32
+            <div class="item-title">{{ couponSource.name }}</div>
33
+            <div class="content">
34
+              <div
35
+                class="content-item"
36
+                :class="{
37
+                  activeFilter: index == couponSelect,
38
+                }"
39
+                v-for="(item, index) in couponSource.title"
40
+                :key="index"
41
+                @click="couponFilter(item, index)"
42
+              >
43
+                {{ item }}
44
+              </div>
45
+            </div>
46
+          </div>
47
+          <div class="center">
48
+            <div class="item-title">{{ cardSource.name }}</div>
49
+            <div class="content">
50
+              <div
51
+                class="content-item"
52
+                :class="{
53
+                  activeFilter: index == cardSelect,
54
+                }"
55
+                v-for="(item, index) in cardSource.title"
56
+                :key="index"
57
+                @click="cardFilter(item, index)"
58
+              >
59
+                {{ item }}
60
+              </div>
61
+            </div>
62
+          </div>
63
+          <div class="center">
64
+            <div class="item-title">{{ latelySource.name }}</div>
65
+            <div class="content">
66
+              <div
67
+                class="content-item"
68
+                :class="{
69
+                  activeFilter: index == latelySelect,
70
+                }"
71
+                v-for="(item, index) in latelySource.title"
72
+                :key="index"
73
+                @click="latelyFilter(item, index)"
74
+              >
75
+                {{ item }}
76
+              </div>
77
+            </div>
78
+          </div>
79
+          <div class="superposition">
80
+            <div class="superposition-title">项目叠加次数</div>
81
+            <el-input-number
82
+              v-model="superpositionNum"
83
+              :min="0"
84
+              size="mini"
85
+              @change="superpositionChange"
86
+            ></el-input-number>
87
+          </div>
88
+          <div class="transition">
89
+            <div class="transition-title">转换次数</div>
90
+            <el-input-number
91
+              v-model="transitionNum"
92
+              :min="0"
93
+              size="mini"
94
+              @change="transitionChange"
95
+            ></el-input-number>
96
+          </div>
97
+          <div class="consumePrice">
98
+            <div class="consumePrice-title">总消费金额</div>
99
+            <div class="consumePrice-content">
100
+              <el-input
101
+                v-model="minConsumePrice"
102
+                @change="minConsume"
103
+              ></el-input>
104
+              <div>-</div>
105
+              <el-input
106
+                v-model="maxConsumePrice"
107
+                @change="maxConsume"
108
+              ></el-input>
109
+            </div>
110
+          </div>
111
+          <div class="StoredPrice">
112
+            <div class="StoredPrice-title">总储值金额</div>
113
+            <div class="StoredPrice-content">
114
+              <el-input
115
+                @change="minChange"
116
+                v-model="minStoredPricePrice"
117
+              ></el-input>
118
+              <div>-</div>
119
+              <el-input
120
+                @change="maxChange"
121
+                v-model="maxStoredPricePrice"
122
+              ></el-input>
123
+            </div>
124
+          </div>
125
+        </div>
126
+        <div class="slot-footer" slot="footer">
127
+          <div class="item-title">
128
+            共有<i>{{ total }}</i
129
+            >位用户
130
+          </div>
131
+          <div>
132
+            <button @click="reset">重置</button>
133
+            <button @click="save">保存</button>
134
+          </div>
135
+        </div>
136
+      </el-dialog>
137
+    </div>
138
+  </div>
139
+</template>
140
+
141
+<script>
142
+import api from "../../../server/home";
143
+export default {
144
+  props: ["visible",'resetPop'],
145
+  data() {
146
+    return {
147
+      total: 0,
148
+      currentPage1: 1,
149
+      customerSource: {
150
+        name: "客户来源",
151
+        title: [
152
+          "线下进店",
153
+          "种子用户",
154
+          "美团/大众",
155
+          "抖音",
156
+          "达人探店",
157
+          "霸王餐",
158
+          "老带新/转介绍",
159
+        ],
160
+      },
161
+      couponSource: {
162
+        name: "优惠券快过期付费用户",
163
+        title: ["3天", "5天", "7天", "15天"],
164
+        day: ["3", "5", "7", "15"],
165
+      },
166
+
167
+      cardSource: {
168
+        name: "次卡快过期付费用户",
169
+        title: ["3天", "5天", "7天", "15天", "30天"],
170
+        day: ["3", "5", "7", "15", "30"],
171
+      },
172
+
173
+      latelySource: {
174
+        name: "距离最近消费时间",
175
+        title: ["3天", "5天", "7天", "15天", "15天以上"],
176
+        day: ["3", "5", "7", "15", "16"],
177
+      },
178
+      customerSelect: [], //客户来源下标
179
+      couponSelect: 99, //优惠券快过期付费用户下标
180
+      cardSelect: 99, //此卡快过期下标
181
+      latelySelect: 99, //距离最近消费时间
182
+      superpositionNum: 0, //项目叠加次数
183
+      transitionNum: 0, //转换次数
184
+      minConsumePrice: 0, //消费最小金额
185
+      maxConsumePrice: "", //消费最大金额
186
+      minStoredPricePrice: 0, //储值最小金额
187
+      maxStoredPricePrice: "", //储值最大金额
188
+      customerKey: [], //选择客户来源列表
189
+      couponKey: "", //优惠券快过期天数
190
+      cardKey: "", //此卡过期天数
191
+      latelyKey: "", //距离最近消费时间天数
192
+    };
193
+  },
194
+  methods: {
195
+    // 获取订单列表
196
+    getUserList() {
197
+      let StoredPrice = [];
198
+      StoredPrice.push(this.minStoredPricePrice);
199
+      StoredPrice.push(this.maxStoredPricePrice);
200
+      let consumeprice = [];
201
+      consumeprice.push(this.minConsumePrice);
202
+      consumeprice.push(this.maxConsumePrice);
203
+      let params = {
204
+        page: this.currentPage1,
205
+        limit: this.limit,
206
+        tag: this.customerKey.length == 0 ? 0 : this.customerKey,
207
+        coupon_days: this.couponKey.length == 0 ? 0 : this.couponKey,
208
+        card_days: this.cardKey.length == 0 ? 0 : this.cardKey,
209
+        buying_time: this.latelyKey.length == 0 ? 0 : this.latelyKey,
210
+        project_add: this.superpositionNum,
211
+        balance_money:
212
+          this.maxStoredPricePrice.length == 0 ? 0 : StoredPrice.toString(),
213
+        change_add: this.transitionNum,
214
+        consume_money:
215
+          this.maxConsumePrice.length == 0 ? 0 : consumeprice.toString(),
216
+      };
217
+      api.getUserPayList(params).then((res) => {
218
+        if (
219
+          this.customerKey.length == 0 &&
220
+          this.couponKey.length == 0 &&
221
+          this.cardKey.length == 0 &&
222
+          this.latelyKey.length == 0 &&
223
+          this.superpositionNum == 0 &&
224
+          this.maxStoredPricePrice.length == 0 &&
225
+          this.maxConsumePrice.length == 0
226
+        ) {
227
+          this.total = 0;
228
+          return;
229
+        }
230
+        this.total = res.data.total;
231
+      });
232
+    },
233
+    // 重置筛选条件
234
+    reset() {
235
+      // 重置data里的值
236
+      Object.assign(this.$data, this.$options.data.call(this));
237
+    },
238
+    // 保存筛选条件
239
+    save() {
240
+      let StoredPrice = [];
241
+      StoredPrice.push(this.minStoredPricePrice);
242
+      StoredPrice.push(this.maxStoredPricePrice);
243
+      let consumeprice = [];
244
+      consumeprice.push(this.minConsumePrice);
245
+      consumeprice.push(this.maxConsumePrice);
246
+      this.$emit("update:visible", false);
247
+      this.$emit(
248
+        "saveSelectList",
249
+        this.customerKey.length == 0 ? 0 : this.customerKey,
250
+        this.couponKey.length == 0 ? 0 : this.couponKey,
251
+        this.cardKey.length == 0 ? 0 : this.cardKey,
252
+        this.latelyKey.length == 0 ? 0 : this.latelyKey,
253
+        this.superpositionNum,
254
+        this.maxStoredPricePrice.length == 0 ? 0 : StoredPrice.toString(),
255
+        this.transitionNum,
256
+        this.maxConsumePrice.length == 0 ? 0 : consumeprice.toString()
257
+      );
258
+    },
259
+    // 关闭弹窗
260
+    closeFilterPop() {
261
+      this.$emit("update:visible", false);
262
+    },
263
+    // 消费最小值改变
264
+    minConsume() {
265
+      this.getUserList();
266
+    },
267
+    // 消费最大值改变
268
+    maxConsume() {
269
+      this.getUserList();
270
+    },
271
+    // 最小值改变
272
+    minChange() {
273
+      this.getUserList();
274
+    },
275
+    // 最大值改变
276
+    maxChange() {
277
+      this.getUserList();
278
+    },
279
+    // 项目叠加事件
280
+    superpositionChange() {
281
+      this.getUserList();
282
+    },
283
+    // 转换次数事件
284
+    transitionChange() {
285
+      this.getUserList();
286
+    },
287
+    // 选择
288
+    customerFilter(item, index) {
289
+      if (this.customerSelect.indexOf(index) != -1) {
290
+        this.customerSelect.splice(this.customerSelect.indexOf(index), 1);
291
+        this.customerKey.splice(this.customerKey.indexOf(index), 1);
292
+        this.getUserList();
293
+        return;
294
+      }
295
+      this.customerSelect.push(index);
296
+      // 0 无1线下进店 2种子用户 3美团/大众 4抖音 5达人探店 6霸王餐 7老带新/转介绍,多个使用数组
297
+      this.customerKey.push(index + 1);
298
+      this.getUserList();
299
+    },
300
+    // 选择优惠券快过期付费用户
301
+    couponFilter(item, index) {
302
+      if (this.couponSelect == index) {
303
+        this.couponSelect = 99;
304
+        this.couponKey = "";
305
+        this.getUserList();
306
+        return;
307
+      }
308
+      this.couponSelect = index;
309
+      this.couponKey = this.couponSource.day[index];
310
+      this.getUserList();
311
+    },
312
+    // 选择此卡快过期下标
313
+    cardFilter(item, index) {
314
+      if (this.cardSelect == index) {
315
+        this.cardSelect = 99;
316
+        this.cardKey = "";
317
+        this.getUserList();
318
+        return;
319
+      }
320
+      this.cardSelect = index;
321
+      this.cardKey = this.cardSource.day[index];
322
+      this.getUserList();
323
+    },
324
+    // 选择距离最近消费时间
325
+    latelyFilter(item, index) {
326
+      if (this.latelySelect == index) {
327
+        this.latelySelect = 99;
328
+        this.latelyKey = "";
329
+        this.getUserList();
330
+        return;
331
+      }
332
+      this.latelySelect = index;
333
+      this.latelyKey = this.latelySource.day[index];
334
+      this.getUserList();
335
+    },
336
+  },
337
+  watch: {
338
+    resetPop(newValue,oldValue){
339
+      this.reset()
340
+    }
341
+  },
342
+};
343
+</script>
344
+
345
+<style lang='less' scoped>
346
+// 筛选弹窗
347
+.filterPop {
348
+  .slot-title {
349
+    display: inline-block;
350
+    font-size: 14px;
351
+    margin-top: 24px;
352
+    font-weight: 600;
353
+    i {
354
+      font-size: 24px;
355
+      color: #666666;
356
+      margin-left: 22px;
357
+      margin-right: 175px;
358
+    }
359
+  }
360
+  // 筛选条件
361
+  .customer-source {
362
+    .item-title {
363
+      font-size: 14px;
364
+      color: #333;
365
+      margin-top: 10px;
366
+      font-weight: 600;
367
+    }
368
+    .content {
369
+      margin-top: 10px;
370
+      display: flex;
371
+      width: 442px;
372
+      flex-wrap: wrap;
373
+      box-sizing: border-box;
374
+    }
375
+    .content-item {
376
+      font-size: 12px;
377
+      height: 24px;
378
+      padding: 3px 12px;
379
+      background-color: #f5f5f5;
380
+      line-height: 18px;
381
+      border-radius: 2px;
382
+      margin-left: 20px;
383
+      box-sizing: border-box;
384
+    }
385
+    .activeFilter {
386
+      border: 1px solid #fa7d22;
387
+      color: #fa7d22;
388
+    }
389
+    .content-item:first-child,
390
+    .content-item:nth-child(6) {
391
+      margin-left: 0;
392
+    }
393
+    .content-item:nth-child(n + 6) {
394
+      margin-top: 10px;
395
+    }
396
+    .superposition {
397
+      display: flex;
398
+      .superposition-title {
399
+        font-size: 14px;
400
+        color: #333;
401
+        margin-top: 14px;
402
+        font-weight: 600;
403
+        margin-right: 20px;
404
+      }
405
+      /deep/.el-input-number {
406
+        margin-top: 10px;
407
+      }
408
+      /deep/input.el-input__inner,
409
+      /deep/span.el-input-number__decrease.is-disabled,
410
+      /deep/span.el-input-number__increase,
411
+      /deep/span.el-input-number__decrease {
412
+        border: none;
413
+      }
414
+    }
415
+    .transition {
416
+      display: flex;
417
+      .transition-title {
418
+        font-size: 14px;
419
+        color: #333;
420
+        margin-top: 14px;
421
+        font-weight: 600;
422
+        margin-right: 20px;
423
+      }
424
+      /deep/.el-input-number {
425
+        margin-top: 10px;
426
+      }
427
+      /deep/input.el-input__inner,
428
+      /deep/span.el-input-number__decrease.is-disabled,
429
+      /deep/span.el-input-number__increase,
430
+      /deep/span.el-input-number__decrease {
431
+        border: none;
432
+      }
433
+    }
434
+    .consumePrice {
435
+      display: flex;
436
+      .consumePrice-title {
437
+        font-size: 14px;
438
+        color: #333;
439
+        margin-top: 14px;
440
+        font-weight: 600;
441
+        margin-right: 20px;
442
+      }
443
+      .consumePrice-content {
444
+        width: 134px;
445
+        height: 24px;
446
+        border: 1px solid #f5f5f5;
447
+        border-radius: 2px;
448
+        margin-top: 10px;
449
+        display: flex;
450
+        align-items: center;
451
+        div {
452
+          color: #999999;
453
+        }
454
+        /deep/input.el-input__inner {
455
+          height: 21px;
456
+          width: 60px;
457
+          border: none;
458
+          text-align: center;
459
+          font-size: 12px;
460
+          padding: 0;
461
+        }
462
+      }
463
+    }
464
+    .StoredPrice {
465
+      display: flex;
466
+      .StoredPrice-title {
467
+        font-size: 14px;
468
+        color: #333;
469
+        margin-top: 14px;
470
+        font-weight: 600;
471
+        margin-right: 20px;
472
+      }
473
+      .StoredPrice-content {
474
+        width: 134px;
475
+        height: 24px;
476
+        border: 1px solid #f5f5f5;
477
+        border-radius: 2px;
478
+        margin-top: 10px;
479
+        display: flex;
480
+        align-items: center;
481
+        div {
482
+          color: #999999;
483
+        }
484
+        /deep/input.el-input__inner {
485
+          height: 21px;
486
+          width: 60px;
487
+          border: none;
488
+          text-align: center;
489
+          font-size: 12px;
490
+          padding: 0;
491
+        }
492
+      }
493
+    }
494
+  }
495
+  /deep/.el-dialog {
496
+    border-radius: 8px;
497
+    height: 500px;
498
+    margin-left: 300px;
499
+    position: relative;
500
+  }
501
+  /deep/.el-dialog__header {
502
+    padding: 0;
503
+    padding-bottom: 30px;
504
+  }
505
+  /deep/button.el-dialog__headerbtn {
506
+    display: none;
507
+  }
508
+  /deep/.el-dialog__body {
509
+    overflow: hidden;
510
+    height: 350px;
511
+    padding-left: 38px;
512
+    padding-top: 0;
513
+    color: #333;
514
+    overflow-y: auto; // 设置滚动条
515
+    padding-bottom: 60px;
516
+  }
517
+  .slot-footer {
518
+    padding: 0;
519
+    border-radius: 0 0 8px 8px;
520
+    border-top: solid 1px #f5f5f5;
521
+    position: absolute;
522
+    bottom: 0;
523
+    width: 100%;
524
+    height: 80px;
525
+    background-color: #ffffff;
526
+    text-align: center;
527
+    z-index: 999;
528
+    .item-title {
529
+      margin-top: 10px;
530
+      font-size: 14px;
531
+      color: #333;
532
+      i {
533
+        color: #ff3007;
534
+      }
535
+    }
536
+    button {
537
+      margin-top: 10px;
538
+      width: 176px;
539
+      height: 28px;
540
+      border: 1px solid #fa7d22;
541
+      border-radius: 14px;
542
+      color: #fa7d22;
543
+      background-color: #fff;
544
+    }
545
+    button:last-child {
546
+      background-color: #fa7d22;
547
+      margin-left: 14px;
548
+      color: #fff;
549
+    }
550
+  }
551
+  /deep/.el-dialog__footer {
552
+    padding: 0;
553
+  }
554
+}
555
+</style>

+ 1 - 1
src/pages/testSkin/index.vue

@@ -86,7 +86,7 @@ export default {
86 86
       let params = {
87 87
         page: this.currentPage1,
88 88
         limit: this.limit,
89
-        keywords: this.searchText,
89
+        keywords: this.searchText||this.$route.query.id,
90 90
         start_date: start_date,
91 91
         end_date: end_date,
92 92
       };

+ 4 - 1
src/router/map/home.js

@@ -54,7 +54,10 @@ export default {
54 54
   },
55 55
   {
56 56
     path: '/customerMan',
57
-    component: CustomerMan
57
+    component: CustomerMan,
58
+    meta:{
59
+      keepAlive:true
60
+    }
58 61
   },
59 62
   {
60 63
     path: '/customerMan/details',

+ 16 - 0
src/server/home.js

@@ -217,4 +217,20 @@ export default class Home {
217 217
   static getOrderCard (params) {
218 218
     return $http.get(url.getOrderCard, params)
219 219
   }
220
+  // 获取项目可用的次卡
221
+  static getUserDetail (params) {
222
+    return $http.post(url.getUserDetail, params)
223
+  }
224
+  // 客户管理编辑用户标签
225
+  static editSign (params) {
226
+    return $http.post(url.editSign, params)
227
+  }
228
+  // 余额变更记录
229
+  static getBalanceRecord (params) {
230
+    return $http.post(url.getBalanceRecord, params)
231
+  }
232
+  // 获取付费用户列表
233
+  static getUserPayList (params) {
234
+    return $http.get(url.getUserPayList, params)
235
+  }
220 236
 }

+ 13 - 1
src/server/urls.js

@@ -131,5 +131,17 @@ export default {
131 131
   getCardOrders: '/v2/pad/user/card',
132 132
 
133 133
   //获取用户次卡列表
134
-  getCardList:'/v2/pad/user/card_list'
134
+  getCardList:'/v2/pad/user/card_list',
135
+  
136
+  // 获取客户管理详情
137
+  getUserDetail:'/v2/pad/detail/user_detail',
138
+
139
+  // 客户管理编辑用户标签
140
+  editSign:'/v2/pad/detail/sign',
141
+
142
+  // 余额变更记录
143
+  getBalanceRecord:'/v2/pad/detail/balance',
144
+
145
+  // 获取付费用户列表
146
+  getUserPayList:'/v2/pad/user/pay_list',
135 147
 }

+ 4 - 4
vue.config.js

@@ -4,11 +4,11 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4 4
 
5 5
 module.exports = {
6 6
   // 测试
7
-  // publicPath: process.env.env_config === 'prod' ? 'https://h5-cms-vue.ijolijoli.com/test_pad/dist' :
8
-  //   process.env.env_config === 'test' ? '/vapps/calory/' : '/dist/',
9
-  // 正式
10
-  publicPath: process.env.env_config === 'prod' ? 'https://h5-cms-vue.ijolijoli.com/dist' :
7
+  publicPath: process.env.env_config === 'prod' ? 'https://h5-cms-vue.ijolijoli.com/test_pad/dist' :
11 8
     process.env.env_config === 'test' ? '/vapps/calory/' : '/dist/',
9
+  // 正式
10
+  // publicPath: process.env.env_config === 'prod' ? 'https://h5-cms-vue.ijolijoli.com/dist' :
11
+  //   process.env.env_config === 'test' ? '/vapps/calory/' : '/dist/',
12 12
   // 设置跨域
13 13
   crossorigin: 'anonymous',
14 14
   /**