3 Комити 829edf3486 ... 94c53a0113

Аутор SHA1 Порука Датум
  listKer 94c53a0113 feat: 提交 пре 2 година
  黎海 870a89e435 feat: .. пре 2 година
  黎海 596320359c feat: ** пре 2 година

+ 13 - 4
src/common/http.js

@@ -23,14 +23,16 @@ axios.defaults.timeout = 10000;
23 23
 
24 24
 // post请求头
25 25
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
26
-axios.defaults.headers.post['token'] = localStorage.getItem('token');
27
-axios.defaults.headers.get['token'] = localStorage.getItem('token');
26
+console.log(store.state.comVal.token, 'this.$store.state.comVal.token111', localStorage.getItem('token'));
27
+axios.defaults.headers.post['token'] = localStorage.getItem('token') || store.state.comVal.token;
28
+axios.defaults.headers.get['token'] = localStorage.getItem('token') || store.state.comVal.token;
28 29
 
29 30
 // 请求拦截器
30 31
 axios.interceptors.request.use(
31 32
   config => {
32 33
     // 每次发送请求之前判断是否存在token,如果存在,则统一在http请求的header都加上token,不用每次请求都手动添加了
33 34
     // 即使本地存在token,也有可能token是过期的,所以在响应拦截器中要对返回状态进行判断
35
+
34 36
     const token = localStorage.getItem('token');
35 37
     if (!token) {
36 38
       router.push('/login')
@@ -102,13 +104,17 @@ let reqUrl = ''
102 104
  * @param {Object} params [请求时携带的参数]
103 105
  */
104 106
 function get (url, params) {
107
+  if (!axios.defaults.headers.get['token']) {
108
+    axios.defaults.headers.get['token'] = localStorage.getItem('token') || store.state.comVal.token;
109
+
110
+  }
105 111
   reqUrl = basePath + url
106 112
   return new Promise((resolve, reject) => {
107 113
     axios.get(reqUrl, {
108 114
       params: params
109 115
     })
110 116
       .then(res => {
111
-        if (res.data.code != 200) {
117
+        if (res.data.code != 200 && localStorage.getItem('token')) {
112 118
           Message({
113 119
             message: res.data.msg,
114 120
             type: 'error'
@@ -128,12 +134,15 @@ function get (url, params) {
128 134
  * @param {Object} params [请求时携带的参数]
129 135
  */
130 136
 function post (url, params) {
137
+  if (!axios.defaults.headers.post['token']) {
138
+    axios.defaults.headers.post['token'] = localStorage.getItem('token') || store.state.comVal.token;
139
+  }
131 140
   reqUrl = basePath + url
132 141
   return new Promise((resolve, reject) => {
133 142
     axios.post(reqUrl, QS.stringify(params))
134 143
       .then(res => {
135 144
         console.log(res, 'resres');
136
-        if (res.data.code != 200) {
145
+        if (res.data.code != 200 && localStorage.getItem('token')) {
137 146
           Message({
138 147
             message: res.data.msg,
139 148
             type: 'error'

+ 3 - 2
src/common/utils.js

@@ -1,7 +1,7 @@
1 1
 // 自定义全局方法封装
2 2
 const utils = {
3
-  userInfo:{
4
-    
3
+  userInfo: {
4
+
5 5
   },
6 6
   test: function () { },
7 7
   isBack: false,
@@ -25,6 +25,7 @@ const utils = {
25 25
     }
26 26
     return fmt;
27 27
   },
28
+ 
28 29
 
29 30
 }
30 31
 

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

@@ -17,6 +17,17 @@
17 17
         <div class="right">
18 18
           <div class="news"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/news.png"></div>
19 19
           <div class="head-img"><img :src="userInfo.avatar_url"></div>
20
+          <el-dropdown trigger="click"
21
+                       placement="top"
22
+                       @command="loginOut">
23
+            <span class="el-dropdown-link">
24
+              <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/logOut.png"
25
+                   alt="">
26
+            </span>
27
+            <el-dropdown-menu slot="dropdown">
28
+              <el-dropdown-item>退出登录</el-dropdown-item>
29
+            </el-dropdown-menu>
30
+          </el-dropdown>
20 31
         </div>
21 32
       </header>
22 33
       <div class="main-wrapper">
@@ -59,11 +70,8 @@ export default {
59 70
       })
60 71
     },
61 72
     loginOut () {
62
-      let keys = document.cookie.match(/[^ =;]+(?=\=)/g);
63
-      if (keys) {
64
-        for (let i = keys.length; i--;)
65
-          document.cookie = keys[i] + '=0;expires=' + new Date(0).toUTCString()
66
-      }
73
+      localStorage.removeItem('token');
74
+      location.reload();
67 75
     },
68 76
     changeMenu (index) {
69 77
       this.menuIndex = index
@@ -153,6 +161,7 @@ export default {
153 161
     .right {
154 162
       float: right;
155 163
       display: flex;
164
+      align-items: center;
156 165
 
157 166
       .news {
158 167
         width: 24px;
@@ -173,6 +182,13 @@ export default {
173 182
           display: block;
174 183
         }
175 184
       }
185
+      .el-dropdown-link {
186
+        img {
187
+          width: 28px;
188
+          height: 28px;
189
+          display: block;
190
+        }
191
+      }
176 192
     }
177 193
   }
178 194
 

+ 12 - 1
src/components/common/layout/leftMenu.vue

@@ -86,6 +86,18 @@ export default {
86 86
       nowIndex: 0
87 87
     }
88 88
   },
89
+  watch: {
90
+    $route (to, from) {
91
+      let patname = `/${window.location.pathname.split('/')[1]}`
92
+      console.log(patname, 'patname');
93
+      this.menu.forEach((item, index) => {
94
+        if (patname == item.path) {
95
+          this.nowIndex = index
96
+          this.$emit('changeMenu', index)
97
+        }
98
+      })
99
+    }
100
+  },
89 101
   mounted () {
90 102
     let patname = `/${window.location.pathname.split('/')[1]}`
91 103
     console.log(patname, 'patname');
@@ -97,7 +109,6 @@ export default {
97 109
     })
98 110
   },
99 111
   methods: {
100
-
101 112
     handleSelect (index, item) {
102 113
       this.nowIndex = index
103 114
       this.$router.push({

+ 3 - 0
src/filters/filter.js

@@ -101,3 +101,6 @@ Vue.filter("ellipsis", function (value, lmit) {
101 101
   }
102 102
   return value
103 103
 })
104
+
105
+
106
+

+ 111 - 132
src/pages/confirmOrder/details/index.vue

@@ -5,24 +5,24 @@
5 5
         <div class="user-img"><img :src="userInfo.image"
6 6
                alt=""></div>
7 7
         <div class="user-span">
8
-          <div class="name">昵称:<span>{{userInfo.name}}</span></div>
8
+          <div class="name">昵称:<span>{{userInfo.nickname}}</span></div>
9 9
           <div class="sex">性别:<span>{{userInfo.sex}}</span></div>
10
-          <div class="age">肤龄:<span>{{userInfo.age}}</span></div>
11
-          <div class="skin-type">肤质:<span>{{userInfo.skinType}}</span></div>
10
+          <div class="age">肤龄:<span>{{userInfo.age==1?'男':userInfo.age==2?'女':'保密'}}</span></div>
11
+          <div class="skin-type">肤质:<span>{{userInfo.skin}}</span></div>
12 12
         </div>
13 13
       </div>
14 14
       <div class="user-record">
15 15
         <div class="fraction">
16 16
           <div class="title">肌肤得分</div>
17
-          <div class="num">37分</div>
17
+          <div class="num">{{userInfo.score}}分</div>
18 18
         </div>
19 19
         <div class="status">
20 20
           <div class="title">皮肤状态</div>
21
-          <div class="tips">肤质一般</div>
21
+          <div class="tips">{{userInfo.skin_status}}</div>
22 22
         </div>
23 23
         <div class="times">
24 24
           <div class="title">上传检测时间</div>
25
-          <div class="ts">2022.04.18 16:04</div>
25
+          <div class="ts">{{userInfo.check_time}}</div>
26 26
         </div>
27 27
       </div>
28 28
       <div class="lable">
@@ -33,7 +33,7 @@
33 33
           <div v-for="(item,index) in lableList"
34 34
                :key="index"
35 35
                class='lable-info'>
36
-            {{item.text}}
36
+            {{item}}
37 37
           </div>
38 38
         </div>
39 39
       </div>
@@ -41,7 +41,7 @@
41 41
         <div class="ps-title">
42 42
           备注
43 43
         </div>
44
-        <div class="ps-text">{{'富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆' | ellipsis(20)}}</div>
44
+        <div class="ps-text">{{remarks | ellipsis(20)}}</div>
45 45
       </div>
46 46
       <div class="programme">
47 47
         <div class="tab">
@@ -53,16 +53,16 @@
53 53
                :key="index"
54 54
                @click="onOperation(index)">
55 55
             <div class="programme-left">
56
-              <div class="programme-img"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
56
+              <div class="programme-img"><img :src="item.cover_url"
57 57
                      alt=""></div>
58 58
               <div class="programme-tips">
59
-                <div class="tips-title">{{'【清洁补水】华熙智慧…'|ellipsis(9)}}</div>
60
-                <div class="tips-title">{{'美白、祛痘、抗皱'|ellipsis(9)}}</div>
61
-                <div class="tips-title">仪器:<span>{{'无创水光'|ellipsis(9)}}</span></div>
59
+                <div class="tips-title">{{item.name|ellipsis(9)}}</div>
60
+                <div class="tips-title">{{item.desc|ellipsis(9)}}</div>
61
+                <div class="tips-title">仪器:<span>{{item.device_name|ellipsis(9)}}</span></div>
62 62
               </div>
63 63
             </div>
64 64
             <div class="programme-right">
65
-              <div class="frequency">执行频率:<span>{{item.frequency}}</span></div>
65
+              <div class="frequency">执行频率:<span>{{item.rate}}</span></div>
66 66
               <div class="duration">持续时长:<span>{{item.duration}}</span></div>
67 67
             </div>
68 68
             <div class="operation"
@@ -76,27 +76,36 @@
76 76
     </div>
77 77
     <div class="right">
78 78
       <div class="shop-info">
79
-        <div class="shpo-name">预约店铺:<span>JOLIJOLI(西安店)</span></div>
80
-        <div class="shpo-address">门店地址:<span>JOLIJOLI(西安店)</span></div>
81
-        <div class="shpo-ts">美容时间:<span>JOLIJOLI(西安店)</span></div>
79
+        <div class="shpo-name">预约店铺:<span>{{order_data.store_name}})</span></div>
80
+        <div class="shpo-address">门店地址:<span>{{order_data.address}}</span></div>
81
+        <div class="shpo-ts">美容时间:<span>{{order_data.order_time}}</span></div>
82 82
       </div>
83 83
       <div class="project">
84 84
         <div class="project-title">
85
-          <div>共<span>3个</span>项目</div>
86
-          <div class="add-project">添加</div>
85
+          <div>共<span>{{order_data.project_num}}个</span>项目</div>
86
+          <div class="add-project"
87
+               @click="isProject=true">添加</div>
87 88
         </div>
88 89
         <div class="project-list">
89 90
           <div class="project-info"
90
-               v-for="(item,index) in programmeList"
91
+               v-for="(item,index) in order_data.project_list"
91 92
                :key="index">
92
-            <div class="project-image"><img :src="item.image"></div>
93
+            <div class="project-image"><img :src="item.cover_url"></div>
93 94
             <div class="project-content">
94 95
               <div class="title-price">
95
-                <div class="project-tit">{{item.title | ellipsis(14)}}</div>
96
+                <div class="project-tit">{{item.name | ellipsis(14)}}</div>
96 97
                 <div class="project-price"><span class="min-size">¥</span>{{item.price}}</div>
97 98
               </div>
98
-              <div class="project-tips">{{item.tips}}</div>
99
-              <div class="project-zoom">{{item.zoom}}{{item.ts}}</div>
99
+              <div class="project-tips">{{item.product_names}}</div>
100
+              <div class="project-zoom">
101
+                <div> <span v-if="item.device_name">{{item.device_name}}({{item.room}}){{item.use_time}}分钟</span></div>
102
+                <div><img @click="eidt(item)"
103
+                       src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/eidt.png">
104
+                  <img class="delete"
105
+                       src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/delete.png"
106
+                       alt="">
107
+                </div>
108
+              </div>
100 109
             </div>
101 110
           </div>
102 111
         </div>
@@ -125,7 +134,7 @@
125 134
           合计: <span class="price-num"><span class="min-size">¥</span>399<span class="min-size">.00</span></span>
126 135
         </div>
127 136
       </div>
128
-      <div class="payment">立即支付</div>
137
+      <div class="payment">{{order_data.status==0?'立即支付':'确定订单'}}</div>
129 138
     </div>
130 139
     <!-- 选择优惠券 -->
131 140
     <mine-pupop :show="isCoupun">
@@ -176,11 +185,12 @@
176 185
           <el-select v-model="projectInfo"
177 186
                      placeholder="请选择项目"
178 187
                      style="width: 295px;"
188
+                     @change="getProducts"
179 189
                      size="mini">
180 190
             <el-option v-for="item in projectList"
181
-                       :key="item.value"
182
-                       :label="item.label"
183
-                       :value="item.value">
191
+                       :key="item.id"
192
+                       :label="item.name"
193
+                       :value="item.id">
184 194
             </el-option>
185 195
           </el-select>
186 196
         </div>
@@ -188,15 +198,17 @@
188 198
           <el-select v-model="productsInfo"
189 199
                      placeholder="请选择升级产品包"
190 200
                      style="width: 295px;"
201
+                     :disabled="projectInfo.length==0?true:false"
191 202
                      size="mini">
192 203
             <el-option v-for="item in productsList"
193
-                       :key="item.value"
194
-                       :label="item.label"
195
-                       :value="item.value">
204
+                       :key="item.id"
205
+                       :label="item.name"
206
+                       :value="item.id">
196 207
             </el-option>
197 208
           </el-select>
198 209
         </div>
199
-        <div class="products-button">确定</div>
210
+        <div class="products-button"
211
+             @click="orderUpdate">确定</div>
200 212
       </div>
201 213
     </mine-pupop>
202 214
     <!-- 选择时间 -->
@@ -270,109 +282,14 @@ export default {
270 282
       userInfo: {
271 283
       },
272 284
       //面部标签
273
-      lableList: [
274
-        {
275
-          text: '对话框的',
276
-          disabled: false
277
-        },
278
-        {
279
-          text: '对话框的',
280
-          disabled: true
281
-        },
282
-        {
283
-          text: '对话框的',
284
-          disabled: false
285
-        },
286
-        {
287
-          text: '对话框的',
288
-          disabled: false
289
-        },
290
-        {
291
-          text: '对话框的',
292
-          disabled: false
293
-        },
294
-        {
295
-          text: '对话框的',
296
-          disabled: false
297
-        },
298
-        {
299
-          text: '对话框的',
300
-          disabled: false
301
-        },
302
-        {
303
-          text: '对话框的',
304
-          disabled: false
305
-        },
306
-        {
307
-          text: '对话框的',
308
-          disabled: false
309
-        },
310
-        {
311
-          text: '对话框的',
312
-          disabled: false
313
-        },
314
-      ],
285
+      lableList: [],
315 286
       //执行方案
316
-      programmeList: [
317
-        {
318
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
319
-          title: '水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底',
320
-          tips: '+润百颜精华',
321
-          zoom: '皮肤综合仪(30号房)',
322
-          ts: '30分钟',
323
-          price: '79.00'
324
-        },
325
-        {
326
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
327
-          title: '水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底',
328
-          tips: '+润百颜精华',
329
-          zoom: '皮肤综合仪(30号房)',
330
-          ts: '30分钟',
331
-          price: '79.00'
332
-        },
333
-        {
334
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
335
-          title: '水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底',
336
-          tips: '+润百颜精华',
337
-          zoom: '皮肤综合仪(30号房)',
338
-          ts: '30分钟',
339
-          price: '79.00'
340
-        },
341
-      ],
287
+      programmeList: [],
288
+      order_data: {},//门店
342 289
       //项目列表
343
-      projectList: [{
344
-        value: '选项1',
345
-        label: '黄金糕'
346
-      }, {
347
-        value: '选项2',
348
-        label: '双皮奶'
349
-      }, {
350
-        value: '选项3',
351
-        label: '蚵仔煎'
352
-      }, {
353
-        value: '选项4',
354
-        label: '龙须面'
355
-      }, {
356
-        value: '选项5',
357
-        label: '北京烤鸭'
358
-      }],
359
-      //产品列表
360
-      productsList: [{
361
-        value: '选项1',
362
-        label: '黄金糕'
363
-      }, {
364
-        value: '选项2',
365
-        label: '双皮奶'
366
-      }, {
367
-        value: '选项3',
368
-        label: '蚵仔煎'
369
-      }, {
370
-        value: '选项4',
371
-        label: '龙须面'
372
-      }, {
373
-        value: '选项5',
374
-        label: '北京烤鸭'
375
-      }],
290
+      projectList: [],
291
+      //升级包列表
292
+      productsList: [],
376 293
       //时间列表(头部)
377 294
       tsTableList: [
378 295
         {
@@ -490,8 +407,60 @@ export default {
490 407
     getOrderInfo () {
491 408
       api.getOrderInfo({ id: this.id }).then(res => {
492 409
         this.userInfo = res.data.user
410
+        this.lableList = res.data.tags
411
+        this.remarks = res.data.remark
412
+        this.programmeList = res.data.scheme_list
413
+        this.order_data = res.data.order_data
414
+      })
415
+    },
416
+    getProjectList () {
417
+      api.getProjectList().then(res => {
418
+        this.projectList = res.data.list
419
+      })
420
+    },
421
+    getProducts (e) {
422
+      this.productsInfo = ''
423
+      api.getProducts({ id: e }).then(res => {
424
+        this.productsList = res.data.list
425
+      })
426
+    },
427
+    eidt () {
493 428
 
429
+    },
430
+    //新增
431
+    orderUpdate () {
432
+      if (this.projectInfo.length == 0) return
433
+      //项目包重组
434
+      let projectInfo = {}, nowProjectInfo = {}, productsInfo = {}
435
+      this.projectList.forEach(item => {
436
+        if (this.projectInfo == item.id) {
437
+          nowProjectInfo = item
438
+        }
494 439
       })
440
+      if (this.productsInfo.length != 0) {
441
+        this.productsList.forEach(item => {
442
+          if (item.id == this.productsInfo) {
443
+            productsInfo = item
444
+          }
445
+        })
446
+      }
447
+      console.log(nowProjectInfo, 'nowProjectInfo', productsInfo);
448
+      projectInfo['name'] = nowProjectInfo.name
449
+      projectInfo['cover_url'] = nowProjectInfo.cover_url
450
+      projectInfo['device_name'] = ''
451
+      projectInfo['room'] = ''
452
+      projectInfo['use_time'] = ''
453
+      projectInfo['price'] = nowProjectInfo.price
454
+      projectInfo['product_names'] = ''
455
+
456
+      if (Object.keys(productsInfo).length > 0) {
457
+        projectInfo['product_id'] = productsInfo.id
458
+        projectInfo.product_names = productsInfo.name
459
+        projectInfo.price += Number(productsInfo.price)
460
+      }
461
+      this.order_data.project_list.push(projectInfo)
462
+      this.isProject = false
463
+
495 464
     },
496 465
     onOperation (index) {
497 466
       if (this.programmeList[index].onSelect) {
@@ -512,6 +481,7 @@ export default {
512 481
       this.id = id
513 482
     }
514 483
     this.getOrderInfo()
484
+    this.getProjectList()
515 485
   },
516 486
 
517 487
   mounted () {
@@ -826,6 +796,15 @@ export default {
826 796
               font-weight: 400;
827 797
               color: #fa7d22;
828 798
               line-height: 18px;
799
+              display: flex;
800
+              align-items: center;
801
+              justify-content: space-between;
802
+              img {
803
+                width: 20px;
804
+              }
805
+              .delete {
806
+                margin-left: 10px;
807
+              }
829 808
             }
830 809
           }
831 810
         }

+ 66 - 50
src/pages/coupon/index.vue

@@ -1,57 +1,71 @@
1 1
 <template>
2 2
   <div class="mine">
3 3
     <div class="table">
4
-      <el-input
5
-        class="search-input"
6
-        placeholder="请输入内容"
7
-        prefix-icon="el-icon-search"
8
-        size="mini"
9
-        v-model="searckItem"
10
-      ></el-input>
11
-      <div class="search-button">搜索</div>
4
+      <el-input class="search-input"
5
+                placeholder="请输入内容"
6
+                prefix-icon="el-icon-search"
7
+                size="mini"
8
+                v-model="searckItem"></el-input>
9
+      <div class="search-button"
10
+           @click="getUserList">搜索</div>
12 11
       <div class="coupon">选择优惠券</div>
13
-      <el-select class="coupon-select" v-model="coupon" size="mini" placeholder="选择优惠券">
14
-        <el-option v-for="item in couponList" :key="item.id" :label="item.name" :value="item.id"></el-option>
12
+      <el-select class="coupon-select"
13
+                 v-model="coupon"
14
+                 size="mini"
15
+                 placeholder="选择优惠券">
16
+        <el-option v-for="item in couponList"
17
+                   :key="item.id"
18
+                   :label="item.name"
19
+                   :value="item.id"></el-option>
15 20
       </el-select>
16 21
       <div class="num-tips">数量</div>
17 22
       <div class="coupon-num">
18
-        <div class="reduce" @click="reduceNum">-</div>
23
+        <div class="reduce"
24
+             @click="reduceNum">-</div>
19 25
         <div class="num">{{couponNum}}</div>
20
-        <div class="add" @click="couponNum++">+</div>
26
+        <div class="add"
27
+             @click="couponNum++">+</div>
21 28
       </div>
22
-      <div class="send-coupon" style="margin-left: 39px;" @click="sendCoupon">发送</div>
29
+      <div class="send-coupon"
30
+           style="margin-left: 39px;"
31
+           @click="sendCoupon">发送</div>
23 32
     </div>
24 33
     <div class="user-list">
25
-      <el-table
26
-        ref="multipleTable"
27
-        :data="tableData"
28
-        tooltip-effect="dark"
29
-        height="354"
30
-        style="width: 100%;border-radius: 8px;"
31
-        @selection-change="handleSelectionChange"
32
-      >
33
-        <el-table-column type="selection" width="55"></el-table-column>
34
-        <el-table-column label="头像" width="120">
34
+      <el-table ref="multipleTable"
35
+                :data="tableData"
36
+                tooltip-effect="dark"
37
+                height="354"
38
+                style="width: 100%;border-radius: 8px;"
39
+                @selection-change="handleSelectionChange">
40
+        <el-table-column type="selection"
41
+                         width="55"></el-table-column>
42
+        <el-table-column label="头像"
43
+                         width="120">
35 44
           <template slot-scope="scope">
36 45
             <div class="head-img">
37
-              <img :src="scope.row.avatar_url" alt />
46
+              <img :src="scope.row.avatar_url"
47
+                   alt />
38 48
             </div>
39 49
           </template>
40 50
         </el-table-column>
41
-        <el-table-column prop="nickname" label="昵称" width="120"></el-table-column>
42
-        <el-table-column prop="mobile" label="联系电话" show-overflow-tooltip></el-table-column>
43
-        <el-table-column prop="create_time" label="注册时间" show-overflow-tooltip></el-table-column>
51
+        <el-table-column prop="nickname"
52
+                         label="昵称"
53
+                         width="120"></el-table-column>
54
+        <el-table-column prop="mobile"
55
+                         label="联系电话"
56
+                         show-overflow-tooltip></el-table-column>
57
+        <el-table-column prop="create_time"
58
+                         label="注册时间"
59
+                         show-overflow-tooltip></el-table-column>
44 60
       </el-table>
45 61
 
46 62
       <div class="pagin">
47
-        <el-pagination
48
-          background
49
-          layout="prev, pager, next"
50
-          @size-change="handleSizeChange"
51
-          @current-change="handleCurrentChange"
52
-          :current-page.sync="currentPage1"
53
-          :total="total"
54
-        ></el-pagination>
63
+        <el-pagination background
64
+                       layout="prev, pager, next"
65
+                       @size-change="handleSizeChange"
66
+                       @current-change="handleCurrentChange"
67
+                       :current-page.sync="currentPage1"
68
+                       :total="total"></el-pagination>
55 69
       </div>
56 70
     </div>
57 71
   </div>
@@ -62,7 +76,7 @@ import api from "../../server/home";
62 76
 
63 77
 export default {
64 78
   components: {},
65
-  data() {
79
+  data () {
66 80
     return {
67 81
       searckItem: "",
68 82
       couponList: [],
@@ -70,42 +84,44 @@ export default {
70 84
       multipleSelection: [], //选中的列表
71 85
       coupon: "",
72 86
       couponNum: 1, //优惠券数量
73
-      currentPage1: 1
87
+      currentPage1: 1,
88
+      total: 0,
89
+      limit: 10,
74 90
     };
75 91
   },
76 92
   computed: {},
77 93
   watch: {},
78 94
 
79 95
   methods: {
80
-    reduceNum() {
96
+    reduceNum () {
81 97
       this.couponNum > 1 ? this.couponNum-- : (this.couponNum = 1);
82 98
     },
83
-    handleSelectionChange(val) {
99
+    handleSelectionChange (val) {
84 100
       this.multipleSelection = val;
85 101
       console.log(this.multipleSelection);
86 102
     },
87 103
     // 发送优惠券
88
-    sendCoupon() {
104
+    sendCoupon () {
89 105
       console.log(this.coupon);
90 106
       let selectIds = "";
91 107
       for (let i = 0; i < this.multipleSelection.length; i++) {
92
-        selectIds = selectIds + ","+this.multipleSelection[i].id;
108
+        selectIds = selectIds + "," + this.multipleSelection[i].id;
93 109
       }
94 110
       let params = {
95 111
         id: this.coupon,
96
-        user_ids: selectIds.substring(1,selectIds.length),
112
+        user_ids: selectIds.substring(1, selectIds.length),
97 113
         num: this.couponNum
98 114
       };
99
-      api.sendCoupon(params).then(res => {});
115
+      api.sendCoupon(params).then(res => { });
100 116
     },
101 117
 
102 118
     // 获取订单列表
103
-    getUserList() {
119
+    getUserList () {
104 120
       console.log("xxxxxxx");
105 121
       let params = {
106 122
         page: this.currentPage1,
107 123
         limit: this.limit,
108
-        keywords: this.searchText
124
+        keywords: this.searckItem
109 125
       };
110 126
       api.getUserList(params).then(res => {
111 127
         if (res.code == 200) {
@@ -116,7 +132,7 @@ export default {
116 132
     },
117 133
 
118 134
     // 获取优惠券列表
119
-    getCouponInfo() {
135
+    getCouponInfo () {
120 136
       console.log("xxxxxxx");
121 137
       let params = {
122 138
         page: this.currentPage1,
@@ -129,23 +145,23 @@ export default {
129 145
       });
130 146
     },
131 147
 
132
-    handleCurrentChange(e) {
148
+    handleCurrentChange (e) {
133 149
       this.currentPage1 = e;
134 150
       this.getUserList();
135 151
       console.log(e, "eeeeee");
136 152
     },
137 153
 
138
-    handleSizeChange(val) {
154
+    handleSizeChange (val) {
139 155
       console.log(`每页 ${val} 条`);
140 156
     }
141 157
   },
142 158
 
143
-  created() {
159
+  created () {
144 160
     this.getUserList();
145 161
     this.getCouponInfo();
146 162
   },
147 163
 
148
-  mounted() {}
164
+  mounted () { }
149 165
 };
150 166
 </script>
151 167
 

+ 12 - 16
src/pages/historicalOrder/index.vue

@@ -8,22 +8,14 @@
8 8
         start-placeholder="开始日期"
9 9
         end-placeholder="结束日期"
10 10
       ></el-date-picker>
11
-      <el-select class="coupon-select" v-model="coupon" placeholder="项目名称">
12
-        <el-option
13
-          v-for="item in couponList"
14
-          :key="item.value"
15
-          :label="item.label"
16
-          :value="item.value"
17
-        ></el-option>
18
-      </el-select>
19
-      <el-select class="coupon-select" v-model="coupon" placeholder="卡券名称">
20
-        <el-option
21
-          v-for="item in couponList"
22
-          :key="item.value"
23
-          :label="item.label"
24
-          :value="item.value"
25
-        ></el-option>
26
-      </el-select>
11
+
12
+      <el-input placeholder="请输入项目" class="search" v-model="product">
13
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
14
+      </el-input>
15
+
16
+      <el-input placeholder="请输入优惠券" class="search" v-model="coupon">
17
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
18
+      </el-input>
27 19
 
28 20
       <el-input placeholder="请输入内容" class="search" v-model="searchText">
29 21
         <i slot="prefix" class="el-input__icon el-icon-search"></i>
@@ -83,6 +75,8 @@ export default {
83 75
       coupon: "",
84 76
       limit: 10,
85 77
       total: 0,
78
+      product:"",
79
+      coupon:"",
86 80
       statusStr: [
87 81
         "已预约",
88 82
         "未支付",
@@ -142,6 +136,8 @@ export default {
142 136
         page: this.currentPage1,
143 137
         limit: this.limit,
144 138
         keywords: this.searchText,
139
+        project_name:this.product,
140
+        coupon_name:this.coupon,
145 141
         start_date: start_date,
146 142
         end_date: end_date
147 143
       };

+ 6 - 5
src/pages/home/index.vue

@@ -16,11 +16,11 @@
16 16
     <div class="order-list">
17 17
       <div class="title">预约订单列表</div>
18 18
       <div v-if="orderList.length>0"
19
-           class="list-info"
20
-           @click="toOrderDetails(item)">
19
+           class="list-info">
21 20
         <div class="user-info"
22 21
              v-for="(item,index) in orderList"
23 22
              :key="index"
23
+             @click="toOrderDetails(item)"
24 24
              :style="index==orderList.length-1?'border-bottom:0px':''">
25 25
           <div class="head-img">
26 26
             <div class="new">新</div><img :src="item.avatar_url"
@@ -61,17 +61,17 @@ export default {
61 61
       tabList: [
62 62
         {
63 63
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
64
-          num: 3,
64
+          num: 0,
65 65
           name: '预约订单'
66 66
         },
67 67
         {
68 68
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
69
-          num: 4,
69
+          num: 0,
70 70
           name: '未支付订单'
71 71
         },
72 72
         {
73 73
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/cancelOrder.png',
74
-          num: 9,
74
+          num: 0,
75 75
           name: '取消订单'
76 76
         },
77 77
       ],
@@ -108,6 +108,7 @@ export default {
108 108
       })
109 109
     },
110 110
     toOrderDetails (e) {
111
+      console.log(e);
111 112
       if (e.status != 0) return
112 113
       this.$router.push({
113 114
         path: '/confirmOrder/details',

+ 122 - 84
src/pages/testSkin/details/index.vue

@@ -6,7 +6,7 @@
6 6
                alt=""></div>
7 7
         <div class="user-span">
8 8
           <div class="name">昵称:<span>{{userInfo.nickname}}</span></div>
9
-          <div class="sex">性别:<span>{{userInfo.sex}}</span></div>
9
+          <div class="sex">性别:<span>{{userInfo.sex==1?'男':userInfo.sex==2?'女':'未知'}}</span></div>
10 10
           <div class="age">肤龄:<span>{{userInfo.age}}</span></div>
11 11
           <div class="skin-type">肤质:<span>{{userInfo.skin}}</span></div>
12 12
         </div>
@@ -49,63 +49,51 @@
49 49
       </div>
50 50
     </div>
51 51
     <div class="right">
52
-      <div class="lable">
52
+      <div class="lable"
53
+           :style="isOpen?'height: 275px;':'height: 76px;'">
53 54
         <div class="lable-title">
54
-          面诊标签
55
+          <div>面诊标签</div>
56
+          <div class="edit">编辑</div>
55 57
         </div>
56
-        <div class="lable-list">
57
-          <div v-for="(item,index) in lableList"
58
-               :key="index"
59
-               :class="['lable-info', tags.indexOf(item)>-1?'active':'']">
60
-            {{item}}
58
+        <div class="problem">
59
+          <div class="problem-title">问题标签</div>
60
+          <div class="problem-lable">
61
+            <div class="lable-text"
62
+                 v-for="item,index in problem"
63
+                 :key="index"
64
+                 :style='{background:item.bgcolor,borderColor:item.bdcolor}'>
65
+              {{item.text}}
66
+            </div>
61 67
           </div>
62
-          <div class="add-lable">
63
-            +
68
+        </div>
69
+        <div class="problem">
70
+          <div class="problem-title">面部标签</div>
71
+          <div class="problem-lable">
72
+            <div class="lable-text"
73
+                 v-for="item,index in lableList"
74
+                 :key="index"
75
+                 :style='{background:item.bgcolor,borderColor:item.bdcolor}'>
76
+              {{item.text}}
77
+            </div>
64 78
           </div>
65 79
         </div>
80
+
66 81
         <div class="lable-title">
67 82
           备注
68 83
         </div>
69
-        <div class="remarks">
70
-          <el-input type="textarea"
71
-                    autosize
72
-                    resize="none"
73
-                    placeholder="多行输入"
74
-                    v-model="remarks">
75
-          </el-input>
76
-        </div>
84
+        <div class="remarks-text">{{remarks}}</div>
85
+        <div class="open-icon"
86
+             @click="isOpen = !isOpen"><img :src="isOpen?'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/unOpen.png':'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/open.png'"
87
+               alt=""></div>
77 88
       </div>
78
-      <div class="programme">
89
+      <div class="programme"
90
+           :style="isOpen?'height: 165px;':'height: 364px;'">
79 91
         <div class="tab">
80 92
           <div class="tab-title">执行方案</div>
81 93
           <div class="add"
82 94
                @click="isPupop=true">新增</div>
83 95
         </div>
84
-        <div class="programme-list">
85
-          <div :class="['programme-info',item.onSelect?'programme-active':'']"
86
-               v-for="(item,index) in programmeList"
87
-               :key="index"
88
-               @click="onOperation(index)">
89
-            <div class="programme-left">
90
-              <div class="programme-img"><img :src="item.cover_url"
91
-                     alt=""></div>
92
-              <div class="programme-tips">
93
-                <div class="tips-title">{{item.name|ellipsis(9)}}</div>
94
-                <div class="tips-title">{{item.desc|ellipsis(9)}}</div>
95
-                <div class="tips-title">仪器:<span>{{item.device_name|ellipsis(9)}}</span></div>
96
-              </div>
97
-            </div>
98
-            <div class="programme-right">
99
-              <div class="frequency">执行频率:<span>{{item.frequency}}</span></div>
100
-              <div class="duration">持续时长:<span>{{item.duration}}</span></div>
101
-            </div>
102
-            <div class="operation"
103
-                 v-if="item.onSelect">
104
-              <div class="edit">编辑</div>
105
-              <div class="delete">删除</div>
106
-            </div>
107
-          </div>
108
-        </div>
96
+        <div class=""></div>
109 97
       </div>
110 98
       <div class="submit"
111 99
            @click="onSubmit">保存</div>
@@ -170,8 +158,9 @@ export default {
170 158
       },
171 159
       //皮肤总结
172 160
       detail_list: [],
161
+      problem: [{ text: '干性(干燥)' }, { text: '干性(干燥、脱皮、缺水)' }, { text: '干性(干燥、脱皮、缺水)' }, { text: '干性(干燥、脱皮、缺水)' }, { text: '干性(干燥、脱皮、缺水)' }, { text: '干性(干燥、脱皮、缺水)' }],
173 162
       //面部标签
174
-      lableList: [],
163
+      lableList: [{ text: '干性(干燥)' }, { text: '干性(干燥、脱皮、缺水)' }, { text: '干性(干燥、脱皮、缺水)' }, { text: '干性(干燥、脱皮、缺水)' }, { text: '干性(干燥、脱皮、缺水)' }, { text: '干性(干燥、脱皮、缺水)' }],
175 164
       //后台默认的标签
176 165
       tags: [],
177 166
       //执行方案
@@ -231,9 +220,10 @@ export default {
231 220
       projectId: '',//项目id
232 221
       weekInfo: '',//周次
233 222
       programmeIndex: '',
234
-      remarks: '',//备注
223
+      remarks: '打架和考到几点拉进来的',//备注
235 224
       isPupop: false,
236
-      id: 0
225
+      id: 0,
226
+      isOpen: true,//是否展开
237 227
     };
238 228
   },
239 229
   computed: {
@@ -246,9 +236,8 @@ export default {
246 236
       api.getSkinInfo({ id: this.id }).then(res => {
247 237
         this.userInfo = res.data.user
248 238
         this.detail_list = res.data.detail_list
249
-        this.lableList = res.data.tags
250 239
         this.programmeList = res.data.scheme_list
251
-        this.remarks = res.data.remark
240
+        // this.remarks = res.data.remark
252 241
       })
253 242
     },
254 243
     getSkinTags () {
@@ -281,6 +270,25 @@ export default {
281 270
       this.getSkinUpdate()
282 271
     },
283 272
     submitFrequency () { },
273
+    randomColor (type) {
274
+      let arr = [
275
+        { background: 'rgba(244, 247, 255, 1)', border: 'rgba(85, 124, 255, 1)' },
276
+        { background: 'rgba(245, 252, 245, 1)', border: 'rgba(66, 211, 81, 1)' },
277
+        { background: 'rgba(254, 244, 237, 1)', border: 'rgba(250, 125, 34, 1)' },
278
+        { background: 'rgba(249, 245, 255, 1)', border: 'rgba(136, 50, 255, 1)' },
279
+        { background: 'rgba(255, 252, 245, 1)', border: 'rgba(204, 116, 42, 1)' },]
280
+      this.problem.forEach(res => {
281
+        let color = Math.floor((Math.random() * arr.length))
282
+        this.$set(res, 'bgcolor', arr[color].background)
283
+        this.$set(res, 'bdcolor', arr[color].border)
284
+      })
285
+      this.lableList.forEach(res => {
286
+        let color = Math.floor((Math.random() * arr.length))
287
+        this.$set(res, 'bgcolor', arr[color].background)
288
+        this.$set(res, 'bdcolor', arr[color].border)
289
+      })
290
+
291
+    }
284 292
   },
285 293
 
286 294
   created () {
@@ -292,7 +300,7 @@ export default {
292 300
   },
293 301
 
294 302
   mounted () {
295
-
303
+    this.randomColor()
296 304
   },
297 305
 }
298 306
 
@@ -429,64 +437,94 @@ export default {
429 437
     flex: 1;
430 438
     .lable {
431 439
       width: 100%;
432
-      height: 230px;
433
-      overflow: scroll;
434 440
       padding: 12px;
435 441
       background: #ffffff;
436 442
       box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
437 443
       border-radius: 8px;
444
+      overflow: hidden;
445
+      position: relative;
438 446
       .lable-title {
439 447
         font-size: 14px;
440 448
         font-family: PingFangSC-Medium, PingFang SC;
441 449
         font-weight: 500;
442 450
         color: #333333;
443 451
         line-height: 20px;
444
-        margin-bottom: 14px;
452
+        margin-bottom: 8px;
453
+        display: flex;
454
+        justify-content: space-between;
455
+        .edit {
456
+          width: 60px;
457
+          height: 28px;
458
+          background: #fa7d22;
459
+          border-radius: 8px;
460
+          font-size: 14px;
461
+          font-family: PingFangSC-Medium, PingFang SC;
462
+          font-weight: 500;
463
+          color: #ffffff;
464
+          line-height: 28px;
465
+          text-align: center;
466
+        }
445 467
       }
446
-      .lable-list {
447
-        width: 100%;
448
-        min-height: 105rpx;
449
-        .lable-info {
450
-          display: inline-block;
451
-          padding: 0 12px;
452
-          margin-left: 10px;
453
-          height: 24px;
454
-          line-height: 24px;
455
-          border-radius: 2px;
456
-          border: 1px solid #d6d6d6;
457
-          margin-bottom: 10px;
468
+      .remarks-text {
469
+        font-size: 12px;
470
+        font-family: PingFangSC-Regular, PingFang SC;
471
+        font-weight: 400;
472
+        color: #666666;
473
+        line-height: 17px;
474
+      }
475
+      .problem {
476
+        display: flex;
477
+        .problem-title {
478
+          font-size: 13px;
479
+          font-family: PingFangSC-Regular, PingFang SC;
480
+          font-weight: 400;
481
+          color: #333333;
482
+          line-height: 18px;
458 483
         }
459
-        .add-lable {
460
-          display: inline-block;
461
-          width: 27px;
462
-          height: 24px;
463
-          line-height: 24px;
484
+        .problem-lable {
485
+          flex: 1;
486
+          overflow-y: hidden;
487
+          width: 100%;
488
+          height: 68px;
464 489
           font-size: 12px;
465 490
           font-family: PingFang-SC-Regular, PingFang-SC;
466 491
           font-weight: 400;
467 492
           color: #333333;
468
-          text-align: center;
469
-          margin-left: 10px;
470
-          border-radius: 2px;
471
-          border: 1px solid #d6d6d6;
472
-        }
473
-        .active {
474
-          background: url(https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E9%80%89%E4%B8%AD2%402x.png)
475
-            no-repeat;
476
-          background-size: 100% 100%;
477
-          border: 0px solid #d6d6d6;
493
+          line-height: 17px;
494
+          display: flex;
495
+          flex-flow: column wrap;
496
+          list-style-type: none;
497
+          overflow-x: scroll;
498
+          align-items: baseline;
499
+
500
+          .lable-text {
501
+            margin-left: 10px;
502
+            margin-bottom: 10px;
503
+            height: 24px;
504
+            line-height: 24px;
505
+            border: 1px solid #42d351;
506
+            padding: 0 12px;
507
+            border-radius: 2px;
508
+          }
478 509
         }
479 510
       }
480
-      .remarks {
481
-        /deep/ .el-textarea__inner:focus {
482
-          border-color: #fa852f;
511
+      .open-icon {
512
+        width: 100%;
513
+        padding-top: 10px;
514
+        position: absolute;
515
+        height: 38px;
516
+        background: #ffffff;
517
+        bottom: 0;
518
+        text-align: center;
519
+
520
+        img {
521
+          width: 24px;
483 522
         }
484 523
       }
485 524
     }
486 525
     .programme {
487 526
       margin-top: 18px;
488 527
       width: 100%;
489
-      // height: 208px;
490 528
       background: #ffffff;
491 529
       box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
492 530
       border-radius: 8px;

+ 9 - 3
src/server/home.js

@@ -36,6 +36,12 @@ export default class Home {
36 36
   static getSkinUpdate (parms) {
37 37
     return $http.post(url.getSkinUpdate, parms);
38 38
   }
39
+  static getProjectList (parms) {
40
+    return $http.get(url.getProjectList, parms);
41
+  }
42
+  static getProducts (parms) {
43
+    return $http.get(url.getProducts, parms);
44
+  }
39 45
 
40 46
   // 获取历史订单
41 47
   static getOrderList (parms) {
@@ -51,12 +57,12 @@ export default class Home {
51 57
   static getUserList (parms) {
52 58
     return $http.get(url.getUserList, parms);
53 59
   }
54
-  
60
+
55 61
   // 获取用户详情
56 62
   static getUserInfo (parms) {
57 63
     return $http.get(url.getUserInfo, parms);
58 64
   }
59
-  
65
+
60 66
   // 获取优惠券列表
61 67
   static getCouponInfo (parms) {
62 68
     return $http.get(url.getCouponInfo, parms);
@@ -66,7 +72,7 @@ export default class Home {
66 72
   static sendCoupon (parms) {
67 73
     return $http.post(url.sendCoupon, parms);
68 74
   }
69
-  
75
+
70 76
 
71 77
 }
72 78
 

+ 13 - 9
src/server/urls.js

@@ -16,28 +16,32 @@ export default {
16 16
   //后台默认的标签
17 17
   getSkinTags: '/v2/pad/skin/tags',
18 18
   //保存测肤记录
19
-  getSkinUpdate:'/v2/pad/skin/update',
19
+  getSkinUpdate: '/v2/pad/skin/update',
20
+  //获取项目列表
21
+  getProjectList: '/v2/pad/project/list',
22
+  //获取升级包
23
+  getProducts:'/v2/pad/project/product',
20 24
 
21 25
   /**
22 26
    *  by ListKer
23 27
    */
24 28
 
25 29
   // 获取历史订单
26
-  getOrderList:'/v2/pad/order/list',
30
+  getOrderList: '/v2/pad/order/list',
27 31
 
28 32
   //获取订单详情
29 33
   getOrderInfo: '/v2/pad/order/info',
30 34
 
31 35
   // 获取用户列表
32
-  getUserList:'/v2/pad/user/list',
33
-  
36
+  getUserList: '/v2/pad/user/list',
37
+
34 38
   // 获取用户详情
35
-  getUserInfo:'/v2/pad/user/info',
36
-  
39
+  getUserInfo: '/v2/pad/account/info',
40
+
37 41
   // 获取优惠券列表
38
-  getCouponInfo:'/v2/pad/coupon/list',
39
-  
42
+  getCouponInfo: '/v2/pad/coupon/list',
43
+
40 44
   // 发送优惠券接口
41
-  sendCoupon:'/v2/pad/coupon/send',
45
+  sendCoupon: '/v2/pad/coupon/send',
42 46
 
43 47
 }