Browse Source

客户管理详情页面内容

yuhao 2 years ago
parent
commit
783eb6da21

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

@@ -312,7 +312,9 @@ export default {
312 312
       await this.queryHasUnreadMessage()
313 313
     }, 20000)
314 314
   },
315
-  mounted () { },
315
+  mounted () {
316
+    
317
+  },
316 318
   beforeDestroy () {
317 319
     // 关闭WebSocket连接并清除定时器
318 320
     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>

+ 242 - 66
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">
149
+              <div>面诊标签</div>
150
+              <div @click="goTestSkinDetials" v-if='userDetail.detection'>执行方案</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"
@@ -178,19 +213,27 @@
178 213
               <div class="consume-content">
179 214
                 <div class="consume-one">
180 215
                   <div class="consume-type">
181
-                    总消费金额:<span class="consume-price">999</span>
216
+                    总消费金额:<span class="consume-price">{{
217
+                      userDetail.total_price
218
+                    }}</span>
182 219
                   </div>
183 220
                   <div class="consume-type">
184
-                    项目叠加次数:<span class="consume-price">999</span>
221
+                    项目叠加次数:<span class="consume-price">{{
222
+                      userDetail.overlay
223
+                    }}</span>
185 224
                   </div>
186 225
                 </div>
187 226
                 <div class="consume-two">
188 227
                   <div class="consume-type">
189
-                    总储值金额:<span class="consume-price">999</span>
228
+                    总储值金额:<span class="consume-price">{{
229
+                      userDetail.balance==null?0:userDetail.balance
230
+                    }}</span>
190 231
                   </div>
191 232
 
192 233
                   <div class="consume-type">
193
-                    转化次数:<span class="consume-price">999</span>
234
+                    转化次数:<span class="consume-price">{{
235
+                      userDetail.conversion
236
+                    }}</span>
194 237
                   </div>
195 238
                 </div>
196 239
               </div>
@@ -200,46 +243,56 @@
200 243
               <div class="record-item">
201 244
                 <div class="record-title">项目</div>
202 245
                 :
203
-                <div class="record-name">
204
-                  【进店必做】寡肽小气泡温和清洁拔出黑头…
246
+                <div v-if="userDetail.project" class="record-name">
247
+                  {{ userDetail.project.project_name }}
248
+                </div>
249
+                <div v-if="userDetail.project">
250
+                  {{ userDetail.project.create_time }}
205 251
                 </div>
206
-                <div>2022.10.13 12:12</div>
207 252
               </div>
208 253
               <div class="record-item">
209 254
                 <div class="record-title">次卡</div>
210 255
                 :
211
-                <div class="record-name">
212
-                  【进店必做】寡肽小气泡温和清洁拔出黑头…
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 }}
213 261
                 </div>
214
-                <div>2022.10.13 12:12</div>
215 262
               </div>
216 263
               <div class="record-item">
217 264
                 <div class="record-title">美妆产品</div>
218 265
                 :
219
-                <div class="record-name">
220
-                  【进店必做】寡肽小气泡温和清洁拔出黑头…
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 }}
221 271
                 </div>
222
-                <div>2022.10.13 12:12</div>
223 272
               </div>
224 273
               <div class="record-item">
225 274
                 <div class="record-title">充值</div>
226 275
                 :
227
-                <div class="record-name">
228
-                  【进店必做】寡肽小气泡温和清洁拔出黑头…
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 }}
229 281
                 </div>
230
-                <div>2022.10.13 12:12</div>
231 282
               </div>
232 283
             </div>
233 284
             <div class="consume-title">最近消耗</div>
234 285
             <div class="card-record">
235
-                          <div class="record-item">
236
-              <div class="record-title">消耗次卡</div>
237
-              :
238
-              <div class="record-name">
239
-                【进店必做】寡肽小气泡温和清洁拔出黑头…
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 }}
294
+                </div>
240 295
               </div>
241
-              <div>2022.10.13 12:12</div>
242
-            </div>
243 296
             </div>
244 297
           </div>
245 298
         </div>
@@ -305,6 +358,20 @@ export default {
305 358
       isPupop: false,
306 359
       nameInpVisible: false,
307 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-混合型肌肤)
308 375
     };
309 376
   },
310 377
   components: { minePupop },
@@ -319,6 +386,42 @@ export default {
319 386
   watch: {},
320 387
 
321 388
   methods: {
389
+    // 获取客户管理详情
390
+    getUserDetail() {
391
+      api.getUserDetail({ id: this.id }).then((res) => {
392
+        this.userDetail = res.data;
393
+        this.sourceValue = this.sourceList[res.data.tag];
394
+      });
395
+    },
396
+    // 编辑客户管理用户标签
397
+    editSign(tag){
398
+      api.editSign({
399
+        tag,
400
+        id:this.id
401
+      }).then()
402
+    },
403
+    // 选择客户来源
404
+    selectSource(e) {
405
+      this.editSign(e)
406
+    },
407
+    // 跳转到测肤记录详情
408
+    goTestSkinDetials() {
409
+      this.$router.push({
410
+        path: "/testSkin/details",
411
+        query: {
412
+          id: this.userDetail.detection.id
413
+        }
414
+      });
415
+    },
416
+    // 跳转到测肤记录列表
417
+    goTestSkin() {
418
+      this.$router.push({
419
+        path: "/testSkin",
420
+        query: {
421
+          isback: true,
422
+        },
423
+      });
424
+    },
322 425
     getPadUserInfo() {
323 426
       api.getPadUserInfo({ id: this.id }).then((res) => {
324 427
         console.log(res, "aaaaaaaa");
@@ -397,6 +500,8 @@ export default {
397 500
         activeName = "second";
398 501
       } else if (index == 4) {
399 502
         activeName = "fourth";
503
+      }else if(index==5){
504
+        activeName = "five";
400 505
       }
401 506
       this.$router.push({
402 507
         path: "/customerMan/projectOrder",
@@ -443,6 +548,8 @@ export default {
443 548
   created() {
444 549
     let id = this.$route.query.id;
445 550
     this.id = id;
551
+    // 获取客户管理详情
552
+    this.getUserDetail();
446 553
     this.getPadUserInfo();
447 554
   },
448 555
 
@@ -507,11 +614,12 @@ export default {
507 614
             justify-content: space-between;
508 615
             .name {
509 616
               font-size: 14px;
617
+              width: 60px;
510 618
             }
511 619
             .sex {
512 620
               img {
513
-                width: 24px;
514
-                height: 24px;
621
+                width: 19px;
622
+                height: 19px;
515 623
               }
516 624
             }
517 625
             .age {
@@ -547,11 +655,55 @@ export default {
547 655
     }
548 656
     .personage-data {
549 657
       margin-top: 14px;
658
+      .assetInfo {
659
+        font-size: 14px;
660
+        color: #333;
661
+        font-weight: 600;
662
+        margin-top: 10px;
663
+      }
664
+      .detectionInfo {
665
+        margin-top: 10px;
666
+        display: flex;
667
+        justify-content: space-between;
668
+        font-size: 14px;
669
+        font-weight: 600;
670
+        color: #fa7d22;
671
+        div:first-child {
672
+          color: #333333;
673
+        }
674
+      }
675
+      .skin-type {
676
+        margin-top: 10px;
677
+        .dataListTitle {
678
+          display: inline-block;
679
+          font-size: 13px;
680
+          color: #999999;
681
+          width: 55px;
682
+          text-align: justify;
683
+          text-justify: distribute-all-lines;
684
+          text-align-last: justify;
685
+        }
686
+        .item{
687
+          color: #333;
688
+        }
689
+      }
690
+      .skin-color {
691
+        margin-top: 10px;
692
+        .dataListTitle {
693
+          display: inline-block;
694
+          font-size: 13px;
695
+          color: #999999;
696
+          width: 55px;
697
+          text-align: justify;
698
+          text-justify: distribute-all-lines;
699
+          text-align-last: justify;
700
+        }
701
+      }
550 702
       .myDataList {
551
-        margin-top: 15px;
703
+        margin-top: 10px;
552 704
         .bigSixe {
553 705
           font-size: 18px;
554
-          color: #fa7d22;
706
+          color: #ff3007;
555 707
         }
556 708
         span {
557 709
           color: #333333;
@@ -559,10 +711,21 @@ export default {
559 711
         .JEcolor {
560 712
           color: #fa7d22;
561 713
         }
714
+        .dataListTitle {
715
+          display: inline-block;
716
+          font-size: 13px;
717
+          color: #999999;
718
+          width: 55px;
719
+          text-align: justify;
720
+          text-justify: distribute-all-lines;
721
+          text-align-last: justify;
722
+        }
723
+        /deep/.el-select {
724
+          width: 150px;
725
+        }
562 726
       }
563 727
       .coupon-num {
564 728
         span {
565
-          color: #fa7d22;
566 729
           font-size: 16px;
567 730
           font-weight: 500;
568 731
         }
@@ -629,10 +792,15 @@ export default {
629 792
           .lable-title {
630 793
             font-size: 14px;
631 794
             font-family: PingFangSC-Medium, PingFang SC;
632
-            font-weight: 500;
795
+            font-weight: 600;
633 796
             color: #333333;
634 797
             line-height: 20px;
635 798
             margin-bottom: 14px;
799
+            display: flex;
800
+            justify-content: space-between;
801
+            div:last-child {
802
+              color: #fa7d22;
803
+            }
636 804
           }
637 805
           .problem {
638 806
             display: flex;
@@ -902,6 +1070,10 @@ export default {
902 1070
             font-weight: 700;
903 1071
             color: #333333;
904 1072
             line-height: 20px;
1073
+            margin-top: 15px;
1074
+          }
1075
+          .consume-title:first-child {
1076
+            margin-top: 0;
905 1077
           }
906 1078
           .consume-content {
907 1079
             display: flex;
@@ -923,7 +1095,8 @@ export default {
923 1095
               margin-left: 14px;
924 1096
             }
925 1097
           }
926
-          .consume-record,.card-record {
1098
+          .consume-record,
1099
+          .card-record {
927 1100
             .record-item {
928 1101
               display: flex;
929 1102
               font-size: 13px;
@@ -940,11 +1113,14 @@ export default {
940 1113
                 width: 260px;
941 1114
                 margin-left: 36px;
942 1115
                 margin-right: 36px;
1116
+                /* 强制超出不换行 */
1117
+                white-space: nowrap;
1118
+                /* 超出隐藏 */
1119
+                overflow: hidden;
1120
+                /* 文本超出显示成... */
1121
+                text-overflow: ellipsis;
943 1122
               }
944 1123
             }
945
-            .record-item:last-child {
946
-              margin-bottom: 15px;
947
-            }
948 1124
           }
949 1125
         }
950 1126
         .programme-list {

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

@@ -51,9 +51,9 @@
51 51
             </div>
52 52
           </template>
53 53
         </el-table-column>
54
-        <el-table-column prop="id" label="用户ID" width="120"></el-table-column>
55 54
         <el-table-column prop="nickname" label="昵称" width="120">
56 55
         </el-table-column>
56
+        <el-table-column prop="id" label="用户ID" width="120"></el-table-column>
57 57
         <el-table-column prop="mobile" label="联系电话" show-overflow-tooltip>
58 58
         </el-table-column>
59 59
         <el-table-column

+ 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
 

+ 29 - 22
src/pages/customerMan/selectPop/index.vue

@@ -2,7 +2,7 @@
2 2
   <div>
3 3
     <div class="filterPop">
4 4
       <el-dialog
5
-      top="130px"
5
+        top="130px"
6 6
         :visible.sync="visible"
7 7
         width="52.5%"
8 8
         :close-on-click-modal="false"
@@ -18,7 +18,7 @@
18 18
               <div
19 19
                 class="content-item"
20 20
                 :class="{
21
-                  activeFilter: index == customerSelect,
21
+                  activeFilter: customerSelect.indexOf(index) != -1,
22 22
                 }"
23 23
                 v-for="(item, index) in customerSource.title"
24 24
                 :key="index"
@@ -152,18 +152,18 @@ export default {
152 152
         name: "距离最近消费时间",
153 153
         title: ["3天", "5天", "7天", "15天", "15天以上"],
154 154
       },
155
-      customerSelect: 99,
156
-      couponSelect: 99,
157
-      cardSelect: 99,
158
-      latelySelect: 99,
155
+      customerSelect: [], //客户来源下标
156
+      couponSelect: 99, //优惠券快过期付费用户下标
157
+      cardSelect: 99, //此卡快过期下标
158
+      latelySelect: 99, //距离最近消费时间
159 159
       superpositionNum: 0, //项目叠加次数
160 160
       transitionNum: 0, //转换次数
161
-      minConsumePrice: "", //消费最小金额
161
+      minConsumePrice: 0, //消费最小金额
162 162
       maxConsumePrice: "", //消费最大金额
163
-      minStoredPricePrice: "", //储值最小金额
163
+      minStoredPricePrice: 0, //储值最小金额
164 164
       maxStoredPricePrice: "", //储值最大金额
165
+      customerKey: [], //选择客户来源列表
165 166
       conditionList: {
166
-        customerKey: "",
167 167
         couponKey: "",
168 168
         cardKey: "",
169 169
         latelyKey: "",
@@ -174,15 +174,14 @@ export default {
174 174
     // 重置筛选条件
175 175
     reset() {
176 176
       // 重置data里的值
177
-      Object.assign(this.$data, this.$options.data.call(this))
177
+      Object.assign(this.$data, this.$options.data.call(this));
178 178
     },
179 179
     // 保存筛选条件
180 180
     save() {
181
-      let selectList = []
182
-      selectList.push(this.conditionList.customerKey)
183
-      selectList.push(this.conditionList.couponKey)
184
-      selectList.push(this.conditionList.cardKey)
185
-      selectList.push(this.conditionList.latelyKey)
181
+      let selectList = [];
182
+      selectList.push(this.conditionList.couponKey);
183
+      selectList.push(this.conditionList.cardKey);
184
+      selectList.push(this.conditionList.latelyKey);
186 185
       console.log(selectList);
187 186
       this.$emit("update:visible", false);
188 187
     },
@@ -192,28 +191,36 @@ export default {
192 191
     },
193 192
     // 选择
194 193
     customerFilter(item, index) {
195
-      this.customerSelect = index;
196
-      this.$set(this.conditionList, "customerKey", item);
194
+      if (this.customerSelect.indexOf(index) != -1) {
195
+        this.customerSelect.splice(this.customerSelect.indexOf(index), 1);
196
+        this.customerKey.splice(this.customerKey.indexOf(index), 1);
197
+        return;
198
+      }
199
+      this.customerSelect.push(index);
200
+      this.customerKey.push(item)
197 201
     },
202
+    // 选择优惠券快过期付费用户
198 203
     couponFilter(item, index) {
199 204
       this.couponSelect = index;
200 205
       this.$set(this.conditionList, "couponKey", item);
201 206
     },
207
+    // 选择此卡快过期下标
202 208
     cardFilter(item, index) {
203 209
       this.cardSelect = index;
204 210
       this.$set(this.conditionList, "cardKey", item);
205 211
     },
212
+    // 选择距离最近消费时间
206 213
     latelyFilter(item, index) {
207 214
       this.latelySelect = index;
208 215
       this.$set(this.conditionList, "latelyKey", item);
209 216
     },
210 217
   },
211
-  watch:{
212
-    visible(newValue,oldValue){
218
+  watch: {
219
+    visible(newValue, oldValue) {
213 220
       // 关闭打开弹框重置数据
214
-      this.reset()
215
-    }
216
-  }
221
+      this.reset();
222
+    },
223
+  },
217 224
 };
218 225
 </script>
219 226
 

+ 23 - 6
src/pages/home/createOrder/index.vue

@@ -15,9 +15,16 @@
15 15
         <div class="create-content">
16 16
           <div class="create-title">预约时间:</div>
17 17
           <div class="filter-top">
18
-            <el-date-picker v-model="value1" type="date" placeholder="选择日期">
18
+            <el-date-picker
19
+              :picker-options="pickerOptions"
20
+              :editable="false"
21
+              v-model="value1"
22
+              type="date"
23
+              placeholder="选择日期"
24
+            >
19 25
             </el-date-picker>
20 26
             <el-time-select
27
+              :editable="false"
21 28
               :disabled="value1 == '' ? true : false"
22 29
               placeholder="起始时间"
23 30
               v-model="startTime"
@@ -25,10 +32,12 @@
25 32
                 start: '10:00',
26 33
                 step: '00:5',
27 34
                 end: '23:00',
35
+                minTime: this.nowTime,
28 36
               }"
29 37
             >
30 38
             </el-time-select>
31 39
             <el-time-select
40
+              :editable="false"
32 41
               :disabled="startTime == '' ? true : false"
33 42
               placeholder="结束时间"
34 43
               v-model="endTime"
@@ -64,11 +73,7 @@
64 73
                   <div class="phone">电话: 1234567890</div>
65 74
                 </div>
66 75
               </div>
67
-              <img
68
-                class="radio"
69
-                :src="unSelect"
70
-                alt=""
71
-              />
76
+              <img class="radio" :src="unSelect" alt="" />
72 77
             </div>
73 78
           </div>
74 79
         </div>
@@ -94,6 +99,13 @@ export default {
94 99
       startTime: "", //开始时间
95 100
       endTime: "", //结束时间
96 101
       searchText: "", //搜索框内容
102
+      nowTime: "", //当前的(小时分钟)时间
103
+      pickerOptions: {
104
+        disabledDate(time) {
105
+          let times = Date.now() - 24 * 60 * 60 * 1000;
106
+          return time.getTime() < times;
107
+        },
108
+      }, //限制只能选择今天及以后的时间
97 109
     };
98 110
   },
99 111
   methods: {
@@ -123,6 +135,11 @@ export default {
123 135
       }
124 136
     },
125 137
   },
138
+  created() {
139
+    let date = new Date();
140
+    // 限制选择的时间截止到当前之后
141
+    this.nowTime = `${date.getHours() - 1}:59`;
142
+  },
126 143
 };
127 144
 </script>
128 145
 

+ 12 - 0
src/server/home.js

@@ -217,4 +217,16 @@ 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
+  }
220 232
 }

+ 10 - 1
src/server/urls.js

@@ -131,5 +131,14 @@ 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'
135 144
 }