yuhao 2 年之前
父節點
當前提交
86d0cca61f

+ 17 - 2
src/components/common/layout/leftMenu.vue

@@ -78,9 +78,17 @@ export default {
78 78
             "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/uncoupon.png",
79 79
           icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/coupon.png",
80 80
         },
81
+        // {
82
+        //   name: "历史订单",
83
+        //   path: "/historicalOrder",
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
+        // },
81 88
         {
82
-          name: "历史订单",
83
-          path: "/historicalOrder",
89
+          name: "订单中心",
90
+          path: "/orderCenter",
91
+          // /orderCenter
84 92
           unicon:
85 93
             "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unhistory.png",
86 94
           icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/history.png",
@@ -112,6 +120,13 @@ export default {
112 120
             "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png",
113 121
           icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png",
114 122
         },
123
+        {
124
+          name: "店铺排班",
125
+          path: "/scheduling/details",
126
+          unicon:
127
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png",
128
+          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png",
129
+        },
115 130
       ],
116 131
       nowIndex: 0,
117 132
     };

+ 727 - 0
src/pages/cardOrder/details/index.vue

@@ -0,0 +1,727 @@
1
+<template>
2
+  <div class="mine">
3
+    <div class="left">
4
+      <div class="user-info">
5
+        <div class="user-img"><img :src="userInfo.avatar_url"
6
+               alt=""></div>
7
+        <div class="user-span">
8
+          <div class="info">
9
+            <div class="name"><span>{{userInfo.nickname}}</span></div>
10
+            <div class="sex"><img :src="gender"
11
+                   alt=""></div>
12
+            <div class="age"><span>{{userInfo.skin_age}}</span><span>肤龄</span></div>
13
+          </div>
14
+          <div class="skin-type">肤质:<span>{{userInfo.skin_type}}</span></div>
15
+          <div class="skin-color">肤色:<span>{{userInfo.skin_color}}</span></div>
16
+          <div class="skin-color">上传报告时间:<span>{{userInfo.check_time}}</span></div>
17
+        </div>
18
+      </div>
19
+      <div class="ps">
20
+        <div class="ps-title">
21
+          备注
22
+        </div>
23
+        <div class="ps-text">{{remarks || '无' | ellipsis(20)}}</div>
24
+      </div>
25
+      <div class="lable">
26
+        <div class="lable-title">
27
+          问题标签
28
+        </div>
29
+        <div class="problem-lable">
30
+          <div class="lable-text problem-text">{{problem}}</div>
31
+        </div>
32
+      </div>
33
+      <div class="lable">
34
+        <div class="lable-title">
35
+          面部标签
36
+        </div>
37
+        <div class="lable-list">
38
+          <div v-for="(item,index) in lableList"
39
+               :key="index"
40
+               :style='{background:item.bgcolor,borderColor:item.bdcolor}'
41
+               class='lable-info'>
42
+            {{item.text}}
43
+          </div>
44
+        </div>
45
+      </div>
46
+    </div>
47
+    <div class="right">
48
+      <div class="shop-info">
49
+        <div class="shpo-name">
50
+          预约店铺:
51
+          <span>{{order_data.store_name}}</span>
52
+        </div>
53
+        <div class="shpo-address">
54
+          门店地址:
55
+          <span>{{order_data.address}}</span>
56
+        </div>
57
+        <div class="shpo-ts">
58
+          美容时间:
59
+          <span>{{order_data.order_time}}</span>
60
+        </div>
61
+      </div>
62
+      <div class="project">
63
+        <div class="project-title">
64
+          共
65
+          <span>{{order_data.project_num}}个</span>项目
66
+        </div>
67
+        <div class="project-list">
68
+          <div class="project-info"
69
+               v-for="(item,index) in programmeList"
70
+               :key="index">
71
+            <div class="project-image">
72
+              <img :src="item.cover_url" />
73
+            </div>
74
+            <div class="project-content">
75
+              <div class="title-price">
76
+                <div class="project-tit">{{item.name}}</div>
77
+                <div class="project-price">
78
+                  <span class="min-size">¥</span>
79
+                  {{item.price}}
80
+                </div>
81
+              </div>
82
+              <div class="project-tips">{{item.product_names}}</div>
83
+              <div class="project-zoom">
84
+                <el-select v-model="item.tot_name"
85
+                           v-if="order_data.status<3"
86
+                           @visible-change="openList($event,item,index)"
87
+                           @change="changeRoom($event,item,index)"
88
+                           size="mini"
89
+                           style="min-width: 150px;"
90
+                           :placeholder="item.tot_name">
91
+                  <el-option v-for="i in roomList"
92
+                             :key="i.id"
93
+                             :label="i.tot_name"
94
+                             :value="i.tot_name">
95
+                  </el-option>
96
+                </el-select>
97
+                <div v-else>{{item.tot_name}}</div>
98
+              </div>
99
+            </div>
100
+          </div>
101
+        </div>
102
+      </div>
103
+      <div class="cost">
104
+        <div class="cost-title">
105
+          <div>预约费用</div>
106
+          <div>¥{{order_data.original_price}}</div>
107
+        </div>
108
+        <div class="cost-coupon-list">
109
+          <!-- 次卡 -->
110
+          <div class="coupon">
111
+            <div class="coupon-tips">
112
+              <div class="coupon-icon">
113
+                <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/couponIcon.png"
114
+                     alt />
115
+              </div>
116
+              <div class="coupon-title">次卡</div>
117
+              <div class="coupon-tip"
118
+                   v-if="coupon_list.length>0">已选择次卡</div>
119
+            </div>
120
+            <div class="on-icon">></div>
121
+          </div>
122
+          <div class="coupon-ps"
123
+               v-for="(item,index) in coupon_list"
124
+               :key="index">
125
+            <div>{{item.coupon_name}}</div>
126
+            <div class="cou-price">-¥{{item.price}}</div>
127
+          </div>
128
+          <!-- 优惠券 -->
129
+          <div class="coupon">
130
+            <div class="coupon-tips">
131
+              <div class="coupon-icon">
132
+                <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/couponIcon.png"
133
+                     alt />
134
+              </div>
135
+              <div class="coupon-title">优惠卷</div>
136
+              <div class="coupon-tip"
137
+                   v-if="coupon_list.length>0">已选推荐优惠</div>
138
+            </div>
139
+            <div class="on-icon">></div>
140
+          </div>
141
+          <div class="coupon-ps"
142
+               v-for="(item,index) in coupon_list"
143
+               :key="index">
144
+            <div>{{item.coupon_name}}</div>
145
+            <div class="cou-price">-¥{{item.price}}</div>
146
+          </div>
147
+        </div>
148
+        <div class="over-price">
149
+          合计:
150
+          <span>
151
+            <span class="min-size">¥</span>{{order_data.price}}
152
+            <!-- <span class="min-size">.00</span> -->
153
+          </span>
154
+        </div>
155
+      </div>
156
+    </div>
157
+  </div>
158
+</template>
159
+<script>
160
+import api from "../../../server/home";
161
+export default {
162
+  data () {
163
+    return {
164
+      userInfo: {
165
+      },
166
+      lableList: [],
167
+      programmeList: {},
168
+      scheme_list: {},
169
+      timesInfo: "",
170
+      projectInfo: "",
171
+      weekInfo: "",
172
+      programmeIndex: "",
173
+      remarks: "",
174
+      coupon_list: "",
175
+      order_data: "",
176
+      isPupop: false,
177
+      id: "",
178
+      problem: '',
179
+      roomList: [],//设备房间列表
180
+    };
181
+  },
182
+  computed: {
183
+    gender () {
184
+      // 性别,1男,2女,0保密
185
+      return this.userInfo.sex == 1 ?
186
+        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/male.png' :
187
+        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/female.png'
188
+    }
189
+  },
190
+  watch: {},
191
+
192
+  methods: {
193
+    getOrderInfo () {
194
+      api.getOrderInfo({ id: this.id }).then(res => {
195
+        this.userInfo = res.data.user;
196
+        res.data.order_data.project_list.forEach(e => {
197
+          e["tot_name"] = `${e.device_name}(${e.room})`
198
+        })
199
+        this.order_data = res.data.order_data;
200
+        this.problem = res.data.skin_name
201
+        let _problem = []
202
+        res.data.face_names.forEach(item => {
203
+          let info = {}
204
+          info['text'] = item
205
+          _problem.push(info)
206
+          console.log(_problem, '_problem');
207
+        })
208
+        this.lableList = _problem
209
+        this.randomColor();
210
+        this.programmeList = res.data.order_data.project_list;
211
+        this.coupon_list = res.data.order_data.coupon_list;
212
+        this.remarks = res.data.remark;
213
+      });
214
+    },
215
+
216
+    openList (e, item, index) {
217
+      console.log(e, item, index, 'e,item,index');
218
+      if (e) {
219
+        this.value = ''
220
+        this.roomList = []
221
+        let params = {
222
+          id: this.id,
223
+          project_id: item.id
224
+        }
225
+        api.getDevice_list(params).then(res => {
226
+          if (res.code == 200) {
227
+            res.data.list.forEach(item => {
228
+              item['tot_name'] = `${item.name}(${item.room})`
229
+            })
230
+            this.roomList = res.data.list
231
+          }
232
+        })
233
+      }
234
+    },
235
+    changeRoom (e, item, index) {
236
+      let _id = 0
237
+      this.roomList.forEach(res => {
238
+        if (res.tot_name == e) {
239
+          _id = res.id
240
+        }
241
+      })
242
+      console.log(e, item, index, 'e,item,index');
243
+      let params = {
244
+        id: this.id,
245
+        project_id: item.id,
246
+        device_id: _id
247
+      }
248
+      api.device_change(params).then(res => {
249
+        if (res.code == 200) {
250
+          this.$message({
251
+            message: `${res.msg}`,
252
+            type: "success"
253
+          });
254
+          this.getOrderInfo()
255
+        }
256
+      })
257
+    },
258
+    onOperation (index) {
259
+      if (this.programmeList[index].onSelect) {
260
+        this.$set(
261
+          this.programmeList[index],
262
+          "onSelect",
263
+          !this.programmeList[index].onSelect
264
+        );
265
+      } else {
266
+        this.$set(this.programmeList[index], "onSelect", true);
267
+      }
268
+    },
269
+    randomColor (type) {
270
+      let arr = [
271
+        { background: 'rgba(244, 247, 255, 1)', border: 'rgba(85, 124, 255, 1)' },
272
+        { background: 'rgba(245, 252, 245, 1)', border: 'rgba(66, 211, 81, 1)' },
273
+        { background: 'rgba(254, 244, 237, 1)', border: 'rgba(250, 125, 34, 1)' },
274
+        { background: 'rgba(249, 245, 255, 1)', border: 'rgba(136, 50, 255, 1)' },
275
+        { background: 'rgba(255, 252, 245, 1)', border: 'rgba(204, 116, 42, 1)' },]
276
+      this.lableList.forEach(res => {
277
+        let color = Math.floor((Math.random() * arr.length))
278
+        this.$set(res, 'bgcolor', arr[color].background)
279
+        this.$set(res, 'bdcolor', arr[color].border)
280
+      })
281
+
282
+    },
283
+    onSubmit () { },
284
+    submitFrequency () { }
285
+  },
286
+
287
+  created () {
288
+    let id = this.$route.query.id;
289
+    this.id = id;
290
+    this.getOrderInfo();
291
+  },
292
+
293
+  mounted () { }
294
+};
295
+</script>
296
+
297
+<style lang='less' scoped>
298
+.mine {
299
+  height: 100%;
300
+  display: flex;
301
+  .left {
302
+    width: 318px;
303
+    padding: 12px 12px 0 12px;
304
+    background: #ffffff;
305
+    box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
306
+    border-radius: 8px;
307
+    font-size: 13px;
308
+    font-family: PingFangSC-Regular, PingFang SC;
309
+    font-weight: 400;
310
+    color: #999999;
311
+    line-height: 18px;
312
+    overflow: scroll;
313
+    height: 100%;
314
+    .user-info {
315
+      display: flex;
316
+      align-items: center;
317
+      .user-img {
318
+        width: 96px;
319
+        img {
320
+          width: 100%;
321
+          display: block;
322
+          border-radius: 6px;
323
+        }
324
+      }
325
+      .user-span {
326
+        margin-left: 12px;
327
+
328
+        span {
329
+          color: #333333;
330
+        }
331
+        .info {
332
+          display: flex;
333
+          justify-content: space-between;
334
+
335
+          .name {
336
+            font-size: 22px;
337
+          }
338
+          .sex {
339
+            img {
340
+              width: 24px;
341
+              height: 24px;
342
+            }
343
+          }
344
+          .age {
345
+            margin-left: 13px;
346
+            span:nth-child(1) {
347
+              font-size: 22px;
348
+            }
349
+            span:nth-child(2) {
350
+              margin-left: 4px;
351
+              color: #999999;
352
+            }
353
+          }
354
+        }
355
+        div:nth-child(2),
356
+        div:nth-child(3) {
357
+          margin-bottom: 8px;
358
+        }
359
+      }
360
+    }
361
+    .user-record {
362
+      margin-top: 16px;
363
+      display: flex;
364
+      justify-content: space-between;
365
+      .num {
366
+        font-size: 18px;
367
+        font-family: OPPOSans-B, OPPOSans;
368
+        font-weight: normal;
369
+        color: #fa7d22;
370
+        line-height: 29px;
371
+      }
372
+      .tips {
373
+        font-size: 13px;
374
+        font-family: PingFangSC-Regular, PingFang SC;
375
+        font-weight: 400;
376
+        color: #333333;
377
+        line-height: 30px;
378
+      }
379
+      .ts {
380
+        font-size: 13px;
381
+        font-family: PingFangSC-Regular, PingFang SC;
382
+        font-weight: 400;
383
+        color: #333333;
384
+        line-height: 30px;
385
+      }
386
+    }
387
+    .lable {
388
+      margin-top: 23px;
389
+      width: 100%;
390
+      overflow: scroll;
391
+      background: #ffffff;
392
+      .lable-title {
393
+        font-size: 14px;
394
+        font-family: PingFangSC-Medium, PingFang SC;
395
+        font-weight: 500;
396
+        color: #333333;
397
+        line-height: 20px;
398
+      }
399
+      .problem-lable {
400
+        flex: 1;
401
+        overflow-y: hidden;
402
+        width: 100%;
403
+        font-size: 12px;
404
+        font-family: PingFang-SC-Regular, PingFang-SC;
405
+        font-weight: 400;
406
+        color: #333333;
407
+        line-height: 17px;
408
+        display: flex;
409
+        flex-flow: column wrap;
410
+        list-style-type: none;
411
+        overflow-x: scroll;
412
+        align-items: baseline;
413
+
414
+        .lable-text {
415
+          margin-top: 10px;
416
+          margin-bottom: 10px;
417
+          height: 24px;
418
+          line-height: 24px;
419
+          border: 1px solid #42d351;
420
+          padding: 0 12px;
421
+          border-radius: 2px;
422
+        }
423
+        .problem-text {
424
+          background: rgba(244, 247, 255, 1);
425
+          border: 1px solid rgba(85, 124, 255, 1);
426
+        }
427
+      }
428
+      .lable-list {
429
+        width: 100%;
430
+        min-height: 105rpx;
431
+        .lable-info {
432
+          padding: 3px 12px;
433
+          display: inline-block;
434
+          line-height: 17px;
435
+          border-radius: 2px;
436
+          border: 1px solid #d6d6d6;
437
+          margin-top: 10px;
438
+          margin-right: 10px;
439
+        }
440
+        .add-lable {
441
+          display: inline-block;
442
+          width: 27px;
443
+          height: 24px;
444
+          line-height: 24px;
445
+          font-size: 12px;
446
+          font-family: PingFang-SC-Regular, PingFang-SC;
447
+          font-weight: 400;
448
+          color: #333333;
449
+          text-align: center;
450
+          margin-left: 10px;
451
+          border-radius: 2px;
452
+          border: 1px solid #d6d6d6;
453
+        }
454
+      }
455
+      .remarks {
456
+        /deep/ .el-textarea__inner:focus {
457
+          border-color: #fa852f;
458
+        }
459
+      }
460
+    }
461
+    .ps {
462
+      font-size: 14px;
463
+      font-family: PingFangSC-Medium, PingFang SC;
464
+      font-weight: 500;
465
+      color: #333333;
466
+      line-height: 20px;
467
+      margin-top: 20px;
468
+      .ps-text {
469
+        margin-top: 10px;
470
+        font-size: 12px;
471
+        font-family: PingFang-SC-Regular, PingFang-SC;
472
+        font-weight: 400;
473
+        color: #666666;
474
+        line-height: 17px;
475
+      }
476
+    }
477
+    .programme {
478
+      margin-top: 20px;
479
+      width: 100%;
480
+      background: #ffffff;
481
+      border-radius: 8px;
482
+
483
+      .tab {
484
+        display: flex;
485
+        align-items: center;
486
+        justify-content: space-between;
487
+        .tab-title {
488
+          font-size: 14px;
489
+          font-family: PingFangSC-Medium, PingFang SC;
490
+          font-weight: 500;
491
+          color: #333333;
492
+          line-height: 20px;
493
+        }
494
+      }
495
+      .programme-list {
496
+        margin-top: 10px;
497
+        position: relative;
498
+        z-index: 1;
499
+        .programme-info {
500
+          position: relative;
501
+          margin-bottom: 10px;
502
+          border-radius: 4px;
503
+          border: 1px solid #f5f5f5;
504
+          display: flex;
505
+          justify-content: space-between;
506
+          padding: 8px 8px 8px 10px;
507
+          align-items: center;
508
+          .programme-left {
509
+            display: flex;
510
+            align-items: center;
511
+            .programme-img {
512
+              width: 48px;
513
+              display: inline-block;
514
+              img {
515
+                width: 100%;
516
+                display: block;
517
+              }
518
+            }
519
+            .programme-tips {
520
+              display: inline-block;
521
+              margin-left: 10px;
522
+              font-size: 10px;
523
+              font-family: PingFangSC-Regular, PingFang SC;
524
+              font-weight: 400;
525
+              color: #999999;
526
+              line-height: 14px;
527
+              zoom: 0.83;
528
+            }
529
+          }
530
+          .programme-right {
531
+            font-size: 12px;
532
+            font-family: PingFangSC-Regular, PingFang SC;
533
+            font-weight: 400;
534
+            color: #333333;
535
+            line-height: 17px;
536
+            .duration {
537
+              margin-top: 14px;
538
+            }
539
+          }
540
+          .operation {
541
+            position: absolute;
542
+            left: 50%;
543
+            transform: translateX(-50%);
544
+            top: 10px;
545
+            z-index: 10;
546
+            width: 44px;
547
+            background: #ffffff;
548
+            box-shadow: 0px 9px 28px 8px rgba(0, 0, 0, 0.05),
549
+              0px 6px 16px 0px rgba(0, 0, 0, 0.08),
550
+              0px 3px 6px -4px rgba(0, 0, 0, 0.12);
551
+            border-radius: 2px;
552
+            padding: 10px;
553
+            font-size: 12px;
554
+            font-family: PingFangSC-Regular, PingFang SC;
555
+            font-weight: 400;
556
+            color: #333333;
557
+            line-height: 17px;
558
+            .delete {
559
+              margin-top: 20px;
560
+            }
561
+          }
562
+        }
563
+        .programme-active {
564
+          border: 1px solid #fa852f;
565
+        }
566
+      }
567
+    }
568
+  }
569
+  .right {
570
+    margin-left: 18px;
571
+    position: relative;
572
+    flex: 1;
573
+    .shop-info {
574
+      background: #ffffff;
575
+      box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
576
+      border-radius: 8px;
577
+      padding: 12px;
578
+      font-size: 13px;
579
+      font-family: PingFangSC-Regular, PingFang SC;
580
+      font-weight: 400;
581
+      color: #999999;
582
+      line-height: 28px;
583
+      span {
584
+        font-weight: 500;
585
+        color: #333333;
586
+      }
587
+    }
588
+    .project {
589
+      margin-top: 18px;
590
+      background: #ffffff;
591
+      box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
592
+      border-radius: 8px;
593
+      padding: 16px 12px 12px 12px;
594
+      .project-title {
595
+        font-size: 14px;
596
+        font-family: PingFangSC-Medium, PingFang SC;
597
+        font-weight: 500;
598
+        color: #333333;
599
+        line-height: 20px;
600
+        span {
601
+          color: #fa7d22;
602
+        }
603
+      }
604
+      .project-list {
605
+        padding-top: 10px;
606
+        height: 130px;
607
+        overflow: scroll;
608
+        .project-info {
609
+          margin-bottom: 10px;
610
+          display: flex;
611
+          .project-image {
612
+            width: 60px;
613
+            height: 60px;
614
+            img {
615
+              width: 100%;
616
+              display: block;
617
+            }
618
+          }
619
+          .project-content {
620
+            flex: 1;
621
+            margin-left: 10px;
622
+            .title-price {
623
+              display: flex;
624
+              justify-content: space-between;
625
+              font-size: 14px;
626
+              font-family: PingFangSC-Medium, PingFang SC;
627
+              font-weight: 500;
628
+              color: #292929;
629
+              line-height: 22px;
630
+            }
631
+            .project-tips {
632
+              font-size: 12px;
633
+              font-family: PingFangSC-Regular, PingFang SC;
634
+              font-weight: 400;
635
+              color: #999999;
636
+              line-height: 18px;
637
+            }
638
+            .project-zoom {
639
+              font-size: 14px;
640
+              font-family: PingFangSC-Regular, PingFang SC;
641
+              font-weight: 400;
642
+              color: #fa7d22;
643
+              line-height: 18px;
644
+              /deep/ .el-input__inner {
645
+                color: #fa7d22;
646
+              }
647
+            }
648
+          }
649
+        }
650
+      }
651
+    }
652
+    .cost {
653
+      height: 186px;
654
+      overflow: scroll;
655
+      background: #ffffff;
656
+      border-radius: 8px;
657
+      margin-top: 18px;
658
+      padding: 10px 19px 11px 12px;
659
+      font-size: 14px;
660
+      font-family: PingFangSC-Regular, PingFang SC;
661
+      font-weight: 400;
662
+      color: #333333;
663
+      line-height: 20px;
664
+      .cost-coupon-list {
665
+        height: 110px;
666
+        overflow: scroll;
667
+        border-bottom: 1px solid #f9f9f9;
668
+      }
669
+      .cost-title {
670
+        display: flex;
671
+        justify-content: space-between;
672
+      }
673
+      .coupon {
674
+        margin-top: 10px;
675
+        display: flex;
676
+        justify-content: space-between;
677
+        .coupon-tips {
678
+          display: flex;
679
+          align-items: center;
680
+          .coupon-icon {
681
+            width: 16px;
682
+            img {
683
+              width: 100%;
684
+              display: block;
685
+            }
686
+          }
687
+          .coupon-title {
688
+            margin-left: 3px;
689
+          }
690
+          .coupon-tip {
691
+            margin-left: 10px;
692
+            background: #ffefeb;
693
+            border-radius: 4px;
694
+            border: 1px solid #ff3007;
695
+            font-size: 10px;
696
+            font-family: PingFangSC-Regular, PingFang SC;
697
+            font-weight: 400;
698
+            color: #ff3007;
699
+            line-height: 14px;
700
+            padding: 2px 6px;
701
+            zoom: 0.83;
702
+          }
703
+        }
704
+      }
705
+      .coupon-ps {
706
+        margin-left: -6px;
707
+        margin-top: 11px;
708
+        display: flex;
709
+        justify-content: space-between;
710
+        font-size: 12px;
711
+        font-family: PingFangSC-Regular, PingFang SC;
712
+        font-weight: 400;
713
+        color: #333333;
714
+        line-height: 17px;
715
+        .cou-price {
716
+          font-weight: 500;
717
+          color: #ff3007;
718
+        }
719
+      }
720
+      .over-price {
721
+        margin-top: 14px;
722
+        text-align: right;
723
+      }
724
+    }
725
+  }
726
+}
727
+</style>

+ 366 - 0
src/pages/cardOrder/index.vue

@@ -0,0 +1,366 @@
1
+<template>
2
+  <div class="mine">
3
+    <div class="condition">
4
+      <el-date-picker
5
+        v-model="dates"
6
+        type="daterange"
7
+        range-separator="->"
8
+        start-placeholder="开始日期"
9
+        end-placeholder="结束日期"
10
+      ></el-date-picker>
11
+      <el-input placeholder="请输入内容" class="search" v-model="searchText">
12
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
13
+      </el-input>
14
+      <el-button type="primary" class="searchButton" @click="getOrderList()"
15
+        >搜索</el-button
16
+      >
17
+    </div>
18
+
19
+    <div class="user-list">
20
+      <el-table
21
+        ref="multipleTable"
22
+        :data="tableData"
23
+        tooltip-effect="dark"
24
+        height="500"
25
+        style="width: 100%; border-radius: 8px"
26
+        @row-click="handleSelectionChange"
27
+      >
28
+        <el-table-column label="头像" width="120">
29
+          <template slot-scope="scope">
30
+            <div class="head-img">
31
+              <img :src="scope.row.avatar_url" alt />
32
+            </div>
33
+          </template>
34
+        </el-table-column>
35
+        <el-table-column
36
+          prop="nickname"
37
+          label="昵称"
38
+          width="120"
39
+        ></el-table-column>
40
+        <el-table-column
41
+          prop="real_name"
42
+          label="真实姓名"
43
+          width="80"
44
+        ></el-table-column>
45
+        <el-table-column
46
+          prop="mobile"
47
+          label="联系电话"
48
+          show-overflow-tooltip
49
+        ></el-table-column>
50
+        <el-table-column
51
+          prop="card_name"
52
+          label="次卡名称"
53
+          show-overflow-tooltip
54
+        ></el-table-column>
55
+        <el-table-column
56
+          prop="create_time"
57
+          label="下单时间"
58
+          show-overflow-tooltip
59
+        ></el-table-column>
60
+        <el-table-column
61
+          prop="date"
62
+          label="订单状态"
63
+          show-overflow-tooltip
64
+          width="100"
65
+        >
66
+          <template slot-scope="scope">
67
+            <div
68
+              :style="
69
+                scope.row.status == 0
70
+                  ? 'color: #FC3019'
71
+                  : scope.row.status == 5
72
+                  ? 'color: #A999EA'
73
+                  : 'color: #61D09D;'
74
+              "
75
+            >
76
+              {{
77
+                scope.row.status == -1
78
+                  ? "已取消"
79
+                  : scope.row.status == 0
80
+                  ? "待支付"
81
+                  : scope.row.status == 1
82
+                  ? "已支付"
83
+                  : ""
84
+              }}
85
+              <!-- -1已取消,0待支付,1已支付 -->
86
+            </div>
87
+          </template>
88
+        </el-table-column>
89
+        <el-table-column
90
+          width="80"
91
+          prop="realname"
92
+          label="美容师"
93
+          show-overflow-tooltip
94
+        ></el-table-column>
95
+        <el-table-column
96
+          class="amendTop"
97
+          width="140"
98
+          prop=""
99
+          label="分配"
100
+          show-overflow-tooltip
101
+          v-if="level == 10"
102
+        >
103
+          <template slot-scope="scope">
104
+            <el-dropdown
105
+              @command="(command) => selectType(command, scope.$index)"
106
+              trigger="click"
107
+            >
108
+              <el-button @click.stop type="primary" class="amend" size="mini">
109
+                分配
110
+              </el-button>
111
+              <el-dropdown-menu slot="dropdown">
112
+                <el-dropdown-item
113
+                  v-for="(item, index) in nameList"
114
+                  :key="index"
115
+                  :command="item.realname"
116
+                  >{{ item.realname }}</el-dropdown-item
117
+                >
118
+              </el-dropdown-menu>
119
+            </el-dropdown>
120
+          </template>
121
+        </el-table-column>
122
+      </el-table>
123
+
124
+      <div class="pagin">
125
+        <el-pagination
126
+          background
127
+          layout="prev, pager, next"
128
+          @size-change="handleSizeChange"
129
+          @current-change="handleCurrentChange"
130
+          :current-page.sync="currentPage1"
131
+          :total="total"
132
+        ></el-pagination>
133
+      </div>
134
+    </div>
135
+  </div>
136
+</template>
137
+
138
+<script>
139
+import api from "../../server/home";
140
+
141
+export default {
142
+  components: {},
143
+  data() {
144
+    return {
145
+      searchText: "",
146
+      dates: "",
147
+      coupon: "",
148
+      limit: 10,
149
+      total: 0,
150
+      product: "",
151
+      coupon: "",
152
+      level: "", //等级权限
153
+      couponList: [
154
+        {
155
+          value: "选项1",
156
+          label: "黄金糕",
157
+        },
158
+        {
159
+          value: "选项2",
160
+          label: "双皮奶",
161
+        },
162
+      ],
163
+      tableData: [
164
+        {
165
+          date: "2022.04.25  14:30",
166
+          name: "滴滴滴",
167
+          headImg:
168
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
169
+          phone: "13346783645",
170
+          status: "已完成",
171
+        },
172
+        {
173
+          date: "2022.04.25  14:30",
174
+          name: "滴滴滴",
175
+          headImg:
176
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
177
+          phone: "13346783645",
178
+          status: "已完成",
179
+        },
180
+      ],
181
+      currentPage1: 1,
182
+      multipleSelection: "",
183
+      nameList: "", //员工列表
184
+    };
185
+  },
186
+  computed: {},
187
+  watch: {},
188
+
189
+  methods: {
190
+    // 分配美容师
191
+    selectType(type, index) {
192
+      // 给表单添加美容师
193
+      this.$set(this.tableData[index], ["realname"], type);
194
+      let user_id = "";
195
+      this.nameList.map((item) => {
196
+        if (item.realname == type) {
197
+          user_id = item.id;
198
+        }
199
+      });
200
+      let order_id = this.tableData[index].id;
201
+      let params = {
202
+        user_id,
203
+        type: 2, //1项目 2次卡 3美妆产品 4充值
204
+        order_id,
205
+      };
206
+      // 店长分配
207
+      api.orderAllocation(params).then((res) => {
208
+        if (res.code == 200) {
209
+        }
210
+      });
211
+    },
212
+    // 获取订单列表
213
+    getOrderList() {
214
+      let start_date = "",
215
+        end_date = "";
216
+      if (this.dates && this.dates.length > 0) {
217
+        start_date = utils.formatTime(this.dates[0], "yyyy-MM-dd");
218
+        end_date = utils.formatTime(this.dates[1], "yyyy-MM-dd");
219
+      }
220
+      let params = {
221
+        page: this.currentPage1,
222
+        limit: this.limit,
223
+        keywords: this.searchText,
224
+        start_time: start_date,
225
+        end_time: end_date,
226
+      };
227
+      api.getCardOrderList(params).then((res) => {
228
+        if (res.code == 200) {
229
+          // 将用户手机号中间四位变成****
230
+          res.data.list.map((item) => {
231
+            item.mobile =
232
+              item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
233
+          });
234
+          this.tableData = res.data.list;
235
+          this.total = res.data.total;
236
+        }
237
+      });
238
+    },
239
+
240
+    handleCurrentChange(e) {
241
+      this.currentPage1 = e;
242
+      this.getOrderList();
243
+    },
244
+
245
+    handleSizeChange(val) {},
246
+    handleSelectionChange(row, column, event) {
247
+      // this.$router.push({
248
+      //   path: "/cardOrder/details",
249
+      //   query: {
250
+      //     id: row.id,
251
+      //   },
252
+      // });
253
+    },
254
+    // 获取美容师列表
255
+    getStaffList() {
256
+      api.getStaffList().then((res) => {
257
+        if (res.code == 200) {
258
+          this.nameList = res.data;
259
+          console.log(res);
260
+        }
261
+      });
262
+    },
263
+  },
264
+
265
+  created() {
266
+    this.level = localStorage.getItem("level");
267
+    this.getOrderList();
268
+    // 获取员工列表
269
+    this.getStaffList();
270
+  },
271
+
272
+  mounted() {},
273
+};
274
+</script>
275
+
276
+<style lang='less' scoped>
277
+.mine {
278
+  .condition {
279
+    display: flex;
280
+    .coupon-select {
281
+      width: 174px;
282
+      margin-left: 18px;
283
+    }
284
+    .search {
285
+      width: 535px;
286
+      margin-left: 18px;
287
+    }
288
+
289
+    .searchButton {
290
+      margin-left: 18px;
291
+      width: 68px;
292
+      background: #fa7d22;
293
+      border-radius: 2px;
294
+      border-color: #fa7d22;
295
+    }
296
+  }
297
+  .user-list {
298
+    margin-top: 18px;
299
+    padding: 0 12px;
300
+    width: 100%;
301
+    background: #ffffff;
302
+    box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
303
+    border-radius: 8px;
304
+    .head-img {
305
+      width: 36px;
306
+      height: 36px;
307
+      border-radius: 50%;
308
+
309
+      img {
310
+        width: 100%;
311
+        height: 100%;
312
+      }
313
+    }
314
+    .pagin {
315
+      padding: 20px 0;
316
+      .el-pagination {
317
+        text-align: center;
318
+      }
319
+    }
320
+    /deep/ .el-table th > .cell {
321
+      font-size: 14px !important;
322
+      font-family: PingFangSC-Regular, PingFang SC;
323
+      font-weight: 400;
324
+      color: #999999;
325
+      line-height: 20px;
326
+    }
327
+    /deep/ .el-table td,
328
+    .el-table th.is-leaf {
329
+      border-bottom: none;
330
+    }
331
+    .amend {
332
+      background-color: #fa7d22;
333
+      color: white;
334
+      font-size: 14px;
335
+      border: #fa7d22;
336
+    }
337
+    /deep/ th.el-table_1_column_7.is-leaf.el-table__cell {
338
+      text-align: center;
339
+    }
340
+    /deep/ td.el-table_1_column_7.el-table__cell {
341
+      text-align: center;
342
+    }
343
+  }
344
+  .color0 {
345
+    color: #fc3019;
346
+  }
347
+  .color1 {
348
+    color: #3ef3ed;
349
+  }
350
+  .color2 {
351
+    color: #00eeee;
352
+  }
353
+  .color3 {
354
+    color: #61d09d;
355
+  }
356
+  .color4 {
357
+    color: #3115cc;
358
+  }
359
+  .color5 {
360
+    color: #fc3019;
361
+  }
362
+  .color6 {
363
+    color: #a999ea;
364
+  }
365
+}
366
+</style>

+ 85 - 1
src/pages/historicalOrder/index.vue

@@ -41,7 +41,11 @@
41 41
             </div>
42 42
           </template>
43 43
         </el-table-column>
44
-        <el-table-column prop="user_id" label="用户ID" width="120"></el-table-column>
44
+        <el-table-column
45
+          prop="user_id"
46
+          label="用户ID"
47
+          width="120"
48
+        ></el-table-column>
45 49
         <el-table-column
46 50
           prop="nickname"
47 51
           label="昵称"
@@ -84,6 +88,39 @@
84 88
             </div>
85 89
           </template>
86 90
         </el-table-column>
91
+        <el-table-column
92
+          width="80"
93
+          prop="realname"
94
+          label="美容师"
95
+          show-overflow-tooltip
96
+        ></el-table-column>
97
+        <el-table-column
98
+          class="amendTop"
99
+          width="140"
100
+          prop=""
101
+          label="分配"
102
+          show-overflow-tooltip
103
+          v-if="level == 10"
104
+        >
105
+          <template slot-scope="scope">
106
+            <el-dropdown
107
+              @command="(command) => selectType(command, scope.$index)"
108
+              trigger="click"
109
+            >
110
+              <el-button @click.stop type="primary" class="amend" size="mini">
111
+                分配
112
+              </el-button>
113
+              <el-dropdown-menu slot="dropdown">
114
+                <el-dropdown-item
115
+                  v-for="(item, index) in nameList"
116
+                  :key="index"
117
+                  :command="item.realname"
118
+                  >{{ item.realname }}</el-dropdown-item
119
+                >
120
+              </el-dropdown-menu>
121
+            </el-dropdown>
122
+          </template>
123
+        </el-table-column>
87 124
       </el-table>
88 125
 
89 126
       <div class="pagin">
@@ -144,12 +181,36 @@ export default {
144 181
       ],
145 182
       currentPage1: 1,
146 183
       multipleSelection: "",
184
+      nameList: "", //员工列表
185
+      level: "",
147 186
     };
148 187
   },
149 188
   computed: {},
150 189
   watch: {},
151 190
 
152 191
   methods: {
192
+    // 分配美容师
193
+    selectType(type, index) {
194
+      // 给表单添加美容师
195
+      this.$set(this.tableData[index], ["realname"], type);
196
+      let user_id = "";
197
+      this.nameList.map((item) => {
198
+        if (item.realname == type) {
199
+          user_id = item.id;
200
+        }
201
+      });
202
+      let order_id = this.tableData[index].id;
203
+      let params = {
204
+        user_id,
205
+        type: 1, //1项目 2次卡 3美妆产品 4充值
206
+        order_id,
207
+      };
208
+      // 店长分配
209
+      api.orderAllocation(params).then((res) => {
210
+        if (res.code == 200) {
211
+        }
212
+      });
213
+    },
153 214
     // 获取订单列表
154 215
     getOrderList() {
155 216
       let start_date = "",
@@ -194,10 +255,21 @@ export default {
194 255
         },
195 256
       });
196 257
     },
258
+    // 获取美容师列表
259
+    getStaffList() {
260
+      api.getStaffList().then((res) => {
261
+        if (res.code == 200) {
262
+          this.nameList = res.data;
263
+        }
264
+      });
265
+    },
197 266
   },
198 267
 
199 268
   created() {
269
+    this.level = localStorage.getItem("level");
200 270
     this.getOrderList();
271
+    // 获取员工列表
272
+    this.getStaffList();
201 273
   },
202 274
 
203 275
   mounted() {},
@@ -259,6 +331,18 @@ export default {
259 331
     .el-table th.is-leaf {
260 332
       border-bottom: none;
261 333
     }
334
+    .amend {
335
+      background-color: #fa7d22;
336
+      color: white;
337
+      font-size: 14px;
338
+      border: #fa7d22;
339
+    }
340
+    /deep/ th.el-table_1_column_7.is-leaf.el-table__cell {
341
+      text-align: center;
342
+    }
343
+    /deep/ td.el-table_1_column_7.el-table__cell {
344
+      text-align: center;
345
+    }
262 346
   }
263 347
   .color0 {
264 348
     color: #fc3019;

+ 48 - 47
src/pages/login/login.vue

@@ -2,92 +2,93 @@
2 2
   <div class="mine">
3 3
     <div class="login-info">
4 4
       <div class="logo">
5
-        <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/logo%402x.png"
6
-             alt="">
5
+        <img
6
+          src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/logo%402x.png"
7
+          alt=""
8
+        />
7 9
       </div>
8 10
       <div class="login-title">JOLIJOLI店员端</div>
9 11
       <div class="content">
10 12
         <div class="value-inp">
11
-          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/num_icon.png"
12
-               alt="">
13
-          <el-input placeholder="请输入账号名"
14
-                    v-model="account"></el-input>
13
+          <img
14
+            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/num_icon.png"
15
+            alt=""
16
+          />
17
+          <el-input placeholder="请输入账号名" v-model="account"></el-input>
15 18
         </div>
16 19
         <div class="value-inp">
17
-          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/password_icon.png"
18
-               alt="">
19
-          <el-input placeholder="请输入密码"
20
-                    v-model="password"
21
-                    show-password></el-input>
22
-        </div>
23
-        <div class="onLogin"
24
-             @click="onLogin">
25
-          登录
20
+          <img
21
+            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/password_icon.png"
22
+            alt=""
23
+          />
24
+          <el-input
25
+            placeholder="请输入密码"
26
+            v-model="password"
27
+            show-password
28
+          ></el-input>
26 29
         </div>
30
+        <div class="onLogin" @click="onLogin">登录</div>
27 31
       </div>
28 32
     </div>
29 33
   </div>
30 34
 </template>
31 35
 
32 36
 <script>
33
-import { mapMutations } from 'vuex'
34
-import api from '../../server/home'
35
-import axios from 'axios';
37
+import { mapMutations } from "vuex";
38
+import api from "../../server/home";
39
+import axios from "axios";
36 40
 // import Cookies from "js-cookie"
37 41
 export default {
38 42
   components: {},
39
-  data () {
43
+  data() {
40 44
     return {
41 45
       account: "",
42
-      password: ""
43
-
46
+      password: "",
44 47
     };
45 48
   },
46 49
   computed: {},
47 50
   watch: {},
48 51
 
49 52
   methods: {
50
-    ...mapMutations(['SAVE_COMMON_VALUE']),
51
-    onLogin () {
53
+    ...mapMutations(["SAVE_COMMON_VALUE"]),
54
+    onLogin() {
52 55
       let params = {
53 56
         username: this.account,
54
-        password: this.password
55
-      }
56
-      api.getToken(params).then(res => {
57
+        password: this.password,
58
+      };
59
+      api.getToken(params).then((res) => {
57 60
         if (res.code == 200) {
58
-          localStorage.setItem("token", res.data.token)
61
+          localStorage.setItem("token", res.data.token);
62
+          localStorage.setItem("level", res.data.level);
59 63
           this.SAVE_COMMON_VALUE({
60
-            'key': 'token',
61
-            'value': res.data.token
62
-          })
64
+            key: "token",
65
+            value: res.data.token,
66
+          });
63 67
           this.SAVE_COMMON_VALUE({
64
-            'key': 'isLogin',
65
-            'value': true
66
-          })
67
-          axios.defaults.headers.token = res.data.token
68
+            key: "isLogin",
69
+            value: true,
70
+          });
71
+          axios.defaults.headers.token = res.data.token;
68 72
           this.$router.push({
69
-            path: '/home'
70
-          })
73
+            path: "/home",
74
+          });
71 75
         } else {
72
-          this.$message.error('账号或密码错误,请核对后输入');
76
+          this.$message.error("账号或密码错误,请核对后输入");
73 77
         }
74
-      })
75
-    }
78
+      });
79
+    },
76 80
   },
77 81
 
78
-  created () {
82
+  created() {
79 83
     if (localStorage.getItem("token")) {
80 84
       this.$router.push({
81
-        path: '/home'
82
-      })
85
+        path: "/home",
86
+      });
83 87
     }
84 88
   },
85 89
 
86
-  mounted () {
87
-
88
-  },
89
-}
90
-
90
+  mounted() {},
91
+};
91 92
 </script>
92 93
 
93 94
 <style lang='less' scoped>

+ 69 - 0
src/pages/orderCenter/orderCenter.vue

@@ -0,0 +1,69 @@
1
+<template>
2
+  <div class="box">
3
+    <div class="orderForm" @click="$router.push('/historicalOrder')">
4
+      <img
5
+        src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E7%BE%8E%E5%A6%86%E4%BA%A7%E5%93%81%402x%281%29.png"
6
+        alt=""
7
+      />
8
+      <div class="title">订单项目</div>
9
+    </div>
10
+        <div class="orderForm" @click="$router.push('/cardOrder')">
11
+      <img
12
+        src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E5%8D%A1%402x.png"
13
+        alt=""
14
+      />
15
+      <div class="title">次卡订单</div>
16
+    </div>
17
+        <div class="orderForm" @click="$router.push('/productOrder')">
18
+      <img
19
+        src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E7%BE%8E%E5%A6%86%E4%BA%A7%E5%93%81%402x.png"
20
+        alt=""
21
+      />
22
+      <div class="title">美妆产品订单</div>
23
+    </div>
24
+        <div class="orderForm" @click="$router.push('/rechargeOrder')">
25
+      <img
26
+        src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E5%85%85%E5%80%BC%20%281%29%402x.png"
27
+        alt=""
28
+      />
29
+      <div class="title">充值订单</div>
30
+    </div>
31
+  </div>
32
+</template>
33
+
34
+<script>
35
+export default {
36
+  data() {
37
+    return {};
38
+  },
39
+};
40
+</script>
41
+
42
+<style lang='less' scoped>
43
+.box {
44
+  display: flex;
45
+  flex-wrap: wrap;
46
+  // justify-content: space-around;
47
+}
48
+.orderForm {
49
+  width: 371.5px;
50
+  height: 195px;
51
+  background-color: #ffffff;
52
+  margin-left: 50px;
53
+  margin-top: 30px;
54
+    display: flex;
55
+    align-items: center;
56
+  img {
57
+    height: 80px;
58
+    width: 80px;
59
+    margin-left: 40px;
60
+  }
61
+  .title {
62
+    font-size: 28px;
63
+    font-family: PingFangSC-Semibold, PingFang SC;
64
+    font-weight: 600;
65
+    color: #333333;
66
+    margin-left: 40px;
67
+  }
68
+}
69
+</style>

+ 727 - 0
src/pages/productOrder/details/index.vue

@@ -0,0 +1,727 @@
1
+<template>
2
+  <div class="mine">
3
+    <div class="left">
4
+      <div class="user-info">
5
+        <div class="user-img"><img :src="userInfo.avatar_url"
6
+               alt=""></div>
7
+        <div class="user-span">
8
+          <div class="info">
9
+            <div class="name"><span>{{userInfo.nickname}}</span></div>
10
+            <div class="sex"><img :src="gender"
11
+                   alt=""></div>
12
+            <div class="age"><span>{{userInfo.skin_age}}</span><span>肤龄</span></div>
13
+          </div>
14
+          <div class="skin-type">肤质:<span>{{userInfo.skin_type}}</span></div>
15
+          <div class="skin-color">肤色:<span>{{userInfo.skin_color}}</span></div>
16
+          <div class="skin-color">上传报告时间:<span>{{userInfo.check_time}}</span></div>
17
+        </div>
18
+      </div>
19
+      <div class="ps">
20
+        <div class="ps-title">
21
+          备注
22
+        </div>
23
+        <div class="ps-text">{{remarks || '无' | ellipsis(20)}}</div>
24
+      </div>
25
+      <div class="lable">
26
+        <div class="lable-title">
27
+          问题标签
28
+        </div>
29
+        <div class="problem-lable">
30
+          <div class="lable-text problem-text">{{problem}}</div>
31
+        </div>
32
+      </div>
33
+      <div class="lable">
34
+        <div class="lable-title">
35
+          面部标签
36
+        </div>
37
+        <div class="lable-list">
38
+          <div v-for="(item,index) in lableList"
39
+               :key="index"
40
+               :style='{background:item.bgcolor,borderColor:item.bdcolor}'
41
+               class='lable-info'>
42
+            {{item.text}}
43
+          </div>
44
+        </div>
45
+      </div>
46
+    </div>
47
+    <div class="right">
48
+      <div class="shop-info">
49
+        <div class="shpo-name">
50
+          预约店铺:
51
+          <span>{{order_data.store_name}}</span>
52
+        </div>
53
+        <div class="shpo-address">
54
+          门店地址:
55
+          <span>{{order_data.address}}</span>
56
+        </div>
57
+        <div class="shpo-ts">
58
+          美容时间:
59
+          <span>{{order_data.order_time}}</span>
60
+        </div>
61
+      </div>
62
+      <div class="project">
63
+        <div class="project-title">
64
+          共
65
+          <span>{{order_data.project_num}}个</span>项目
66
+        </div>
67
+        <div class="project-list">
68
+          <div class="project-info"
69
+               v-for="(item,index) in programmeList"
70
+               :key="index">
71
+            <div class="project-image">
72
+              <img :src="item.cover_url" />
73
+            </div>
74
+            <div class="project-content">
75
+              <div class="title-price">
76
+                <div class="project-tit">{{item.name}}</div>
77
+                <div class="project-price">
78
+                  <span class="min-size">¥</span>
79
+                  {{item.price}}
80
+                </div>
81
+              </div>
82
+              <div class="project-tips">{{item.product_names}}</div>
83
+              <div class="project-zoom">
84
+                <el-select v-model="item.tot_name"
85
+                           v-if="order_data.status<3"
86
+                           @visible-change="openList($event,item,index)"
87
+                           @change="changeRoom($event,item,index)"
88
+                           size="mini"
89
+                           style="min-width: 150px;"
90
+                           :placeholder="item.tot_name">
91
+                  <el-option v-for="i in roomList"
92
+                             :key="i.id"
93
+                             :label="i.tot_name"
94
+                             :value="i.tot_name">
95
+                  </el-option>
96
+                </el-select>
97
+                <div v-else>{{item.tot_name}}</div>
98
+              </div>
99
+            </div>
100
+          </div>
101
+        </div>
102
+      </div>
103
+      <div class="cost">
104
+        <div class="cost-title">
105
+          <div>预约费用</div>
106
+          <div>¥{{order_data.original_price}}</div>
107
+        </div>
108
+        <div class="cost-coupon-list">
109
+          <!-- 次卡 -->
110
+          <div class="coupon">
111
+            <div class="coupon-tips">
112
+              <div class="coupon-icon">
113
+                <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/couponIcon.png"
114
+                     alt />
115
+              </div>
116
+              <div class="coupon-title">次卡</div>
117
+              <div class="coupon-tip"
118
+                   v-if="coupon_list.length>0">已选择次卡</div>
119
+            </div>
120
+            <div class="on-icon">></div>
121
+          </div>
122
+          <div class="coupon-ps"
123
+               v-for="(item,index) in coupon_list"
124
+               :key="index">
125
+            <div>{{item.coupon_name}}</div>
126
+            <div class="cou-price">-¥{{item.price}}</div>
127
+          </div>
128
+          <!-- 优惠券 -->
129
+          <div class="coupon">
130
+            <div class="coupon-tips">
131
+              <div class="coupon-icon">
132
+                <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/couponIcon.png"
133
+                     alt />
134
+              </div>
135
+              <div class="coupon-title">优惠卷</div>
136
+              <div class="coupon-tip"
137
+                   v-if="coupon_list.length>0">已选推荐优惠</div>
138
+            </div>
139
+            <div class="on-icon">></div>
140
+          </div>
141
+          <div class="coupon-ps"
142
+               v-for="(item,index) in coupon_list"
143
+               :key="index">
144
+            <div>{{item.coupon_name}}</div>
145
+            <div class="cou-price">-¥{{item.price}}</div>
146
+          </div>
147
+        </div>
148
+        <div class="over-price">
149
+          合计:
150
+          <span>
151
+            <span class="min-size">¥</span>{{order_data.price}}
152
+            <!-- <span class="min-size">.00</span> -->
153
+          </span>
154
+        </div>
155
+      </div>
156
+    </div>
157
+  </div>
158
+</template>
159
+<script>
160
+import api from "../../../server/home";
161
+export default {
162
+  data () {
163
+    return {
164
+      userInfo: {
165
+      },
166
+      lableList: [],
167
+      programmeList: {},
168
+      scheme_list: {},
169
+      timesInfo: "",
170
+      projectInfo: "",
171
+      weekInfo: "",
172
+      programmeIndex: "",
173
+      remarks: "",
174
+      coupon_list: "",
175
+      order_data: "",
176
+      isPupop: false,
177
+      id: "",
178
+      problem: '',
179
+      roomList: [],//设备房间列表
180
+    };
181
+  },
182
+  computed: {
183
+    gender () {
184
+      // 性别,1男,2女,0保密
185
+      return this.userInfo.sex == 1 ?
186
+        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/male.png' :
187
+        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/female.png'
188
+    }
189
+  },
190
+  watch: {},
191
+
192
+  methods: {
193
+    getOrderInfo () {
194
+      api.getOrderInfo({ id: this.id }).then(res => {
195
+        this.userInfo = res.data.user;
196
+        res.data.order_data.project_list.forEach(e => {
197
+          e["tot_name"] = `${e.device_name}(${e.room})`
198
+        })
199
+        this.order_data = res.data.order_data;
200
+        this.problem = res.data.skin_name
201
+        let _problem = []
202
+        res.data.face_names.forEach(item => {
203
+          let info = {}
204
+          info['text'] = item
205
+          _problem.push(info)
206
+          console.log(_problem, '_problem');
207
+        })
208
+        this.lableList = _problem
209
+        this.randomColor();
210
+        this.programmeList = res.data.order_data.project_list;
211
+        this.coupon_list = res.data.order_data.coupon_list;
212
+        this.remarks = res.data.remark;
213
+      });
214
+    },
215
+
216
+    openList (e, item, index) {
217
+      console.log(e, item, index, 'e,item,index');
218
+      if (e) {
219
+        this.value = ''
220
+        this.roomList = []
221
+        let params = {
222
+          id: this.id,
223
+          project_id: item.id
224
+        }
225
+        api.getDevice_list(params).then(res => {
226
+          if (res.code == 200) {
227
+            res.data.list.forEach(item => {
228
+              item['tot_name'] = `${item.name}(${item.room})`
229
+            })
230
+            this.roomList = res.data.list
231
+          }
232
+        })
233
+      }
234
+    },
235
+    changeRoom (e, item, index) {
236
+      let _id = 0
237
+      this.roomList.forEach(res => {
238
+        if (res.tot_name == e) {
239
+          _id = res.id
240
+        }
241
+      })
242
+      console.log(e, item, index, 'e,item,index');
243
+      let params = {
244
+        id: this.id,
245
+        project_id: item.id,
246
+        device_id: _id
247
+      }
248
+      api.device_change(params).then(res => {
249
+        if (res.code == 200) {
250
+          this.$message({
251
+            message: `${res.msg}`,
252
+            type: "success"
253
+          });
254
+          this.getOrderInfo()
255
+        }
256
+      })
257
+    },
258
+    onOperation (index) {
259
+      if (this.programmeList[index].onSelect) {
260
+        this.$set(
261
+          this.programmeList[index],
262
+          "onSelect",
263
+          !this.programmeList[index].onSelect
264
+        );
265
+      } else {
266
+        this.$set(this.programmeList[index], "onSelect", true);
267
+      }
268
+    },
269
+    randomColor (type) {
270
+      let arr = [
271
+        { background: 'rgba(244, 247, 255, 1)', border: 'rgba(85, 124, 255, 1)' },
272
+        { background: 'rgba(245, 252, 245, 1)', border: 'rgba(66, 211, 81, 1)' },
273
+        { background: 'rgba(254, 244, 237, 1)', border: 'rgba(250, 125, 34, 1)' },
274
+        { background: 'rgba(249, 245, 255, 1)', border: 'rgba(136, 50, 255, 1)' },
275
+        { background: 'rgba(255, 252, 245, 1)', border: 'rgba(204, 116, 42, 1)' },]
276
+      this.lableList.forEach(res => {
277
+        let color = Math.floor((Math.random() * arr.length))
278
+        this.$set(res, 'bgcolor', arr[color].background)
279
+        this.$set(res, 'bdcolor', arr[color].border)
280
+      })
281
+
282
+    },
283
+    onSubmit () { },
284
+    submitFrequency () { }
285
+  },
286
+
287
+  created () {
288
+    let id = this.$route.query.id;
289
+    this.id = id;
290
+    this.getOrderInfo();
291
+  },
292
+
293
+  mounted () { }
294
+};
295
+</script>
296
+
297
+<style lang='less' scoped>
298
+.mine {
299
+  height: 100%;
300
+  display: flex;
301
+  .left {
302
+    width: 318px;
303
+    padding: 12px 12px 0 12px;
304
+    background: #ffffff;
305
+    box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
306
+    border-radius: 8px;
307
+    font-size: 13px;
308
+    font-family: PingFangSC-Regular, PingFang SC;
309
+    font-weight: 400;
310
+    color: #999999;
311
+    line-height: 18px;
312
+    overflow: scroll;
313
+    height: 100%;
314
+    .user-info {
315
+      display: flex;
316
+      align-items: center;
317
+      .user-img {
318
+        width: 96px;
319
+        img {
320
+          width: 100%;
321
+          display: block;
322
+          border-radius: 6px;
323
+        }
324
+      }
325
+      .user-span {
326
+        margin-left: 12px;
327
+
328
+        span {
329
+          color: #333333;
330
+        }
331
+        .info {
332
+          display: flex;
333
+          justify-content: space-between;
334
+
335
+          .name {
336
+            font-size: 22px;
337
+          }
338
+          .sex {
339
+            img {
340
+              width: 24px;
341
+              height: 24px;
342
+            }
343
+          }
344
+          .age {
345
+            margin-left: 13px;
346
+            span:nth-child(1) {
347
+              font-size: 22px;
348
+            }
349
+            span:nth-child(2) {
350
+              margin-left: 4px;
351
+              color: #999999;
352
+            }
353
+          }
354
+        }
355
+        div:nth-child(2),
356
+        div:nth-child(3) {
357
+          margin-bottom: 8px;
358
+        }
359
+      }
360
+    }
361
+    .user-record {
362
+      margin-top: 16px;
363
+      display: flex;
364
+      justify-content: space-between;
365
+      .num {
366
+        font-size: 18px;
367
+        font-family: OPPOSans-B, OPPOSans;
368
+        font-weight: normal;
369
+        color: #fa7d22;
370
+        line-height: 29px;
371
+      }
372
+      .tips {
373
+        font-size: 13px;
374
+        font-family: PingFangSC-Regular, PingFang SC;
375
+        font-weight: 400;
376
+        color: #333333;
377
+        line-height: 30px;
378
+      }
379
+      .ts {
380
+        font-size: 13px;
381
+        font-family: PingFangSC-Regular, PingFang SC;
382
+        font-weight: 400;
383
+        color: #333333;
384
+        line-height: 30px;
385
+      }
386
+    }
387
+    .lable {
388
+      margin-top: 23px;
389
+      width: 100%;
390
+      overflow: scroll;
391
+      background: #ffffff;
392
+      .lable-title {
393
+        font-size: 14px;
394
+        font-family: PingFangSC-Medium, PingFang SC;
395
+        font-weight: 500;
396
+        color: #333333;
397
+        line-height: 20px;
398
+      }
399
+      .problem-lable {
400
+        flex: 1;
401
+        overflow-y: hidden;
402
+        width: 100%;
403
+        font-size: 12px;
404
+        font-family: PingFang-SC-Regular, PingFang-SC;
405
+        font-weight: 400;
406
+        color: #333333;
407
+        line-height: 17px;
408
+        display: flex;
409
+        flex-flow: column wrap;
410
+        list-style-type: none;
411
+        overflow-x: scroll;
412
+        align-items: baseline;
413
+
414
+        .lable-text {
415
+          margin-top: 10px;
416
+          margin-bottom: 10px;
417
+          height: 24px;
418
+          line-height: 24px;
419
+          border: 1px solid #42d351;
420
+          padding: 0 12px;
421
+          border-radius: 2px;
422
+        }
423
+        .problem-text {
424
+          background: rgba(244, 247, 255, 1);
425
+          border: 1px solid rgba(85, 124, 255, 1);
426
+        }
427
+      }
428
+      .lable-list {
429
+        width: 100%;
430
+        min-height: 105rpx;
431
+        .lable-info {
432
+          padding: 3px 12px;
433
+          display: inline-block;
434
+          line-height: 17px;
435
+          border-radius: 2px;
436
+          border: 1px solid #d6d6d6;
437
+          margin-top: 10px;
438
+          margin-right: 10px;
439
+        }
440
+        .add-lable {
441
+          display: inline-block;
442
+          width: 27px;
443
+          height: 24px;
444
+          line-height: 24px;
445
+          font-size: 12px;
446
+          font-family: PingFang-SC-Regular, PingFang-SC;
447
+          font-weight: 400;
448
+          color: #333333;
449
+          text-align: center;
450
+          margin-left: 10px;
451
+          border-radius: 2px;
452
+          border: 1px solid #d6d6d6;
453
+        }
454
+      }
455
+      .remarks {
456
+        /deep/ .el-textarea__inner:focus {
457
+          border-color: #fa852f;
458
+        }
459
+      }
460
+    }
461
+    .ps {
462
+      font-size: 14px;
463
+      font-family: PingFangSC-Medium, PingFang SC;
464
+      font-weight: 500;
465
+      color: #333333;
466
+      line-height: 20px;
467
+      margin-top: 20px;
468
+      .ps-text {
469
+        margin-top: 10px;
470
+        font-size: 12px;
471
+        font-family: PingFang-SC-Regular, PingFang-SC;
472
+        font-weight: 400;
473
+        color: #666666;
474
+        line-height: 17px;
475
+      }
476
+    }
477
+    .programme {
478
+      margin-top: 20px;
479
+      width: 100%;
480
+      background: #ffffff;
481
+      border-radius: 8px;
482
+
483
+      .tab {
484
+        display: flex;
485
+        align-items: center;
486
+        justify-content: space-between;
487
+        .tab-title {
488
+          font-size: 14px;
489
+          font-family: PingFangSC-Medium, PingFang SC;
490
+          font-weight: 500;
491
+          color: #333333;
492
+          line-height: 20px;
493
+        }
494
+      }
495
+      .programme-list {
496
+        margin-top: 10px;
497
+        position: relative;
498
+        z-index: 1;
499
+        .programme-info {
500
+          position: relative;
501
+          margin-bottom: 10px;
502
+          border-radius: 4px;
503
+          border: 1px solid #f5f5f5;
504
+          display: flex;
505
+          justify-content: space-between;
506
+          padding: 8px 8px 8px 10px;
507
+          align-items: center;
508
+          .programme-left {
509
+            display: flex;
510
+            align-items: center;
511
+            .programme-img {
512
+              width: 48px;
513
+              display: inline-block;
514
+              img {
515
+                width: 100%;
516
+                display: block;
517
+              }
518
+            }
519
+            .programme-tips {
520
+              display: inline-block;
521
+              margin-left: 10px;
522
+              font-size: 10px;
523
+              font-family: PingFangSC-Regular, PingFang SC;
524
+              font-weight: 400;
525
+              color: #999999;
526
+              line-height: 14px;
527
+              zoom: 0.83;
528
+            }
529
+          }
530
+          .programme-right {
531
+            font-size: 12px;
532
+            font-family: PingFangSC-Regular, PingFang SC;
533
+            font-weight: 400;
534
+            color: #333333;
535
+            line-height: 17px;
536
+            .duration {
537
+              margin-top: 14px;
538
+            }
539
+          }
540
+          .operation {
541
+            position: absolute;
542
+            left: 50%;
543
+            transform: translateX(-50%);
544
+            top: 10px;
545
+            z-index: 10;
546
+            width: 44px;
547
+            background: #ffffff;
548
+            box-shadow: 0px 9px 28px 8px rgba(0, 0, 0, 0.05),
549
+              0px 6px 16px 0px rgba(0, 0, 0, 0.08),
550
+              0px 3px 6px -4px rgba(0, 0, 0, 0.12);
551
+            border-radius: 2px;
552
+            padding: 10px;
553
+            font-size: 12px;
554
+            font-family: PingFangSC-Regular, PingFang SC;
555
+            font-weight: 400;
556
+            color: #333333;
557
+            line-height: 17px;
558
+            .delete {
559
+              margin-top: 20px;
560
+            }
561
+          }
562
+        }
563
+        .programme-active {
564
+          border: 1px solid #fa852f;
565
+        }
566
+      }
567
+    }
568
+  }
569
+  .right {
570
+    margin-left: 18px;
571
+    position: relative;
572
+    flex: 1;
573
+    .shop-info {
574
+      background: #ffffff;
575
+      box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
576
+      border-radius: 8px;
577
+      padding: 12px;
578
+      font-size: 13px;
579
+      font-family: PingFangSC-Regular, PingFang SC;
580
+      font-weight: 400;
581
+      color: #999999;
582
+      line-height: 28px;
583
+      span {
584
+        font-weight: 500;
585
+        color: #333333;
586
+      }
587
+    }
588
+    .project {
589
+      margin-top: 18px;
590
+      background: #ffffff;
591
+      box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
592
+      border-radius: 8px;
593
+      padding: 16px 12px 12px 12px;
594
+      .project-title {
595
+        font-size: 14px;
596
+        font-family: PingFangSC-Medium, PingFang SC;
597
+        font-weight: 500;
598
+        color: #333333;
599
+        line-height: 20px;
600
+        span {
601
+          color: #fa7d22;
602
+        }
603
+      }
604
+      .project-list {
605
+        padding-top: 10px;
606
+        height: 130px;
607
+        overflow: scroll;
608
+        .project-info {
609
+          margin-bottom: 10px;
610
+          display: flex;
611
+          .project-image {
612
+            width: 60px;
613
+            height: 60px;
614
+            img {
615
+              width: 100%;
616
+              display: block;
617
+            }
618
+          }
619
+          .project-content {
620
+            flex: 1;
621
+            margin-left: 10px;
622
+            .title-price {
623
+              display: flex;
624
+              justify-content: space-between;
625
+              font-size: 14px;
626
+              font-family: PingFangSC-Medium, PingFang SC;
627
+              font-weight: 500;
628
+              color: #292929;
629
+              line-height: 22px;
630
+            }
631
+            .project-tips {
632
+              font-size: 12px;
633
+              font-family: PingFangSC-Regular, PingFang SC;
634
+              font-weight: 400;
635
+              color: #999999;
636
+              line-height: 18px;
637
+            }
638
+            .project-zoom {
639
+              font-size: 14px;
640
+              font-family: PingFangSC-Regular, PingFang SC;
641
+              font-weight: 400;
642
+              color: #fa7d22;
643
+              line-height: 18px;
644
+              /deep/ .el-input__inner {
645
+                color: #fa7d22;
646
+              }
647
+            }
648
+          }
649
+        }
650
+      }
651
+    }
652
+    .cost {
653
+      height: 186px;
654
+      overflow: scroll;
655
+      background: #ffffff;
656
+      border-radius: 8px;
657
+      margin-top: 18px;
658
+      padding: 10px 19px 11px 12px;
659
+      font-size: 14px;
660
+      font-family: PingFangSC-Regular, PingFang SC;
661
+      font-weight: 400;
662
+      color: #333333;
663
+      line-height: 20px;
664
+      .cost-coupon-list {
665
+        height: 110px;
666
+        overflow: scroll;
667
+        border-bottom: 1px solid #f9f9f9;
668
+      }
669
+      .cost-title {
670
+        display: flex;
671
+        justify-content: space-between;
672
+      }
673
+      .coupon {
674
+        margin-top: 10px;
675
+        display: flex;
676
+        justify-content: space-between;
677
+        .coupon-tips {
678
+          display: flex;
679
+          align-items: center;
680
+          .coupon-icon {
681
+            width: 16px;
682
+            img {
683
+              width: 100%;
684
+              display: block;
685
+            }
686
+          }
687
+          .coupon-title {
688
+            margin-left: 3px;
689
+          }
690
+          .coupon-tip {
691
+            margin-left: 10px;
692
+            background: #ffefeb;
693
+            border-radius: 4px;
694
+            border: 1px solid #ff3007;
695
+            font-size: 10px;
696
+            font-family: PingFangSC-Regular, PingFang SC;
697
+            font-weight: 400;
698
+            color: #ff3007;
699
+            line-height: 14px;
700
+            padding: 2px 6px;
701
+            zoom: 0.83;
702
+          }
703
+        }
704
+      }
705
+      .coupon-ps {
706
+        margin-left: -6px;
707
+        margin-top: 11px;
708
+        display: flex;
709
+        justify-content: space-between;
710
+        font-size: 12px;
711
+        font-family: PingFangSC-Regular, PingFang SC;
712
+        font-weight: 400;
713
+        color: #333333;
714
+        line-height: 17px;
715
+        .cou-price {
716
+          font-weight: 500;
717
+          color: #ff3007;
718
+        }
719
+      }
720
+      .over-price {
721
+        margin-top: 14px;
722
+        text-align: right;
723
+      }
724
+    }
725
+  }
726
+}
727
+</style>

+ 360 - 0
src/pages/productOrder/index.vue

@@ -0,0 +1,360 @@
1
+<template>
2
+  <div class="mine">
3
+    <div class="condition">
4
+      <el-date-picker
5
+        v-model="dates"
6
+        type="daterange"
7
+        range-separator="->"
8
+        start-placeholder="开始日期"
9
+        end-placeholder="结束日期"
10
+      ></el-date-picker>
11
+      <el-input placeholder="请输入内容" class="search" v-model="searchText">
12
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
13
+      </el-input>
14
+      <el-button type="primary" class="searchButton" @click="getOrderList()"
15
+        >搜索</el-button
16
+      >
17
+    </div>
18
+
19
+    <div class="user-list">
20
+      <el-table
21
+        ref="multipleTable"
22
+        :data="tableData"
23
+        tooltip-effect="dark"
24
+        height="500"
25
+        style="width: 100%; border-radius: 8px"
26
+        @row-click="handleSelectionChange"
27
+      >
28
+        <el-table-column label="头像" width="120">
29
+          <template slot-scope="scope">
30
+            <div class="head-img">
31
+              <img :src="scope.row.avatar_url" alt />
32
+            </div>
33
+          </template>
34
+        </el-table-column>
35
+        <el-table-column
36
+          prop="nickname"
37
+          label="昵称"
38
+          width="120"
39
+        ></el-table-column>
40
+        <el-table-column
41
+          prop="real_name"
42
+          label="真实姓名"
43
+          width="80"
44
+        ></el-table-column>
45
+        <el-table-column
46
+          prop="mobile"
47
+          label="联系电话"
48
+          show-overflow-tooltip
49
+        ></el-table-column>
50
+        <el-table-column
51
+          prop="create_time"
52
+          label="下单时间"
53
+          show-overflow-tooltip
54
+        ></el-table-column>
55
+        <el-table-column
56
+          prop="date"
57
+          label="订单状态"
58
+          show-overflow-tooltip
59
+          width="100"
60
+        >
61
+          <template slot-scope="scope">
62
+            <div
63
+              :style="
64
+                scope.row.status == 2 || scope.row.status == 3
65
+                  ? 'color: #61D09D;'
66
+                  : scope.row.status == 5
67
+                  ? 'color: #A999EA'
68
+                  : 'color: #A999EA'
69
+              "
70
+            >
71
+              {{
72
+                scope.row.status == 2 || scope.row.status == 3
73
+                  ? "已取货"
74
+                  : scope.row.status == 1
75
+                  ? "待取货"
76
+                  : ""
77
+              }}
78
+              <!-- 1是待取货  2,3是已取货 -1已取消,0待支付-->
79
+            </div>
80
+          </template>
81
+        </el-table-column>
82
+        <el-table-column
83
+          width="80"
84
+          prop="realname"
85
+          label="美容师"
86
+          show-overflow-tooltip
87
+        ></el-table-column>
88
+        <el-table-column
89
+          class="amendTop"
90
+          width="140"
91
+          prop=""
92
+          label="分配"
93
+          show-overflow-tooltip
94
+          v-if="level == 10"
95
+        >
96
+          <template slot-scope="scope">
97
+            <el-dropdown
98
+              @command="(command) => selectType(command, scope.$index)"
99
+              trigger="click"
100
+            >
101
+              <el-button @click.stop type="primary" class="amend" size="mini">
102
+                分配
103
+              </el-button>
104
+              <el-dropdown-menu slot="dropdown">
105
+                <el-dropdown-item
106
+                  v-for="(item, index) in nameList"
107
+                  :key="index"
108
+                  :command="item.realname"
109
+                  >{{ item.realname }}</el-dropdown-item
110
+                >
111
+              </el-dropdown-menu>
112
+            </el-dropdown>
113
+          </template>
114
+        </el-table-column>
115
+      </el-table>
116
+
117
+      <div class="pagin">
118
+        <el-pagination
119
+          background
120
+          layout="prev, pager, next"
121
+          @size-change="handleSizeChange"
122
+          @current-change="handleCurrentChange"
123
+          :current-page.sync="currentPage1"
124
+          :total="total"
125
+        ></el-pagination>
126
+      </div>
127
+    </div>
128
+  </div>
129
+</template>
130
+
131
+<script>
132
+import api from "../../server/home";
133
+
134
+export default {
135
+  components: {},
136
+  data() {
137
+    return {
138
+      level: "", //等级权限
139
+      searchText: "",
140
+      dates: "",
141
+      coupon: "",
142
+      limit: 10,
143
+      total: 0,
144
+      product: "",
145
+      coupon: "",
146
+      couponList: [
147
+        {
148
+          value: "选项1",
149
+          label: "黄金糕",
150
+        },
151
+        {
152
+          value: "选项2",
153
+          label: "双皮奶",
154
+        },
155
+      ],
156
+      tableData: [
157
+        {
158
+          date: "2022.04.25  14:30",
159
+          name: "滴滴滴",
160
+          headImg:
161
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
162
+          phone: "13346783645",
163
+          status: "已完成",
164
+        },
165
+        {
166
+          date: "2022.04.25  14:30",
167
+          name: "滴滴滴",
168
+          headImg:
169
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
170
+          phone: "13346783645",
171
+          status: "已完成",
172
+        },
173
+      ],
174
+      currentPage1: 1,
175
+      multipleSelection: "",
176
+      nameList: "", //员工列表
177
+    };
178
+  },
179
+  computed: {},
180
+  watch: {},
181
+
182
+  methods: {
183
+    // 分配美容师
184
+    selectType(type, index) {
185
+      // 给表单添加美容师
186
+      this.$set(this.tableData[index], ["realname"], type);
187
+      let user_id = "";
188
+      this.nameList.map((item) => {
189
+        if (item.realname == type) {
190
+          user_id = item.id;
191
+        }
192
+      });
193
+      let order_id = this.tableData[index].id;
194
+      let params = {
195
+        user_id,
196
+        type: 3, //1项目 2次卡 3美妆产品 4充值
197
+        order_id,
198
+      };
199
+      // 店长分配
200
+      api.orderAllocation(params).then((res) => {
201
+        if (res.code == 200) {
202
+        }
203
+      });
204
+    },
205
+    // 获取订单列表
206
+    getOrderList() {
207
+      let start_date = "",
208
+        end_date = "";
209
+      if (this.dates && this.dates.length > 0) {
210
+        start_date = utils.formatTime(this.dates[0], "yyyy-MM-dd");
211
+        end_date = utils.formatTime(this.dates[1], "yyyy-MM-dd");
212
+      }
213
+      let params = {
214
+        page: this.currentPage1,
215
+        limit: this.limit,
216
+        keywords: this.searchText,
217
+        start_time: start_date,
218
+        end_time: end_date,
219
+      };
220
+      api.getGoodsOrderList(params).then((res) => {
221
+        if (res.code == 200) {
222
+          // 将用户手机号中间四位变成****
223
+          res.data.list.map((item) => {
224
+            item.mobile =
225
+              item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
226
+          });
227
+          this.tableData = res.data.list;
228
+          this.total = res.data.total;
229
+        }
230
+      });
231
+    },
232
+
233
+    handleCurrentChange(e) {
234
+      this.currentPage1 = e;
235
+      this.getOrderList();
236
+      console.log(this.tableData);
237
+    },
238
+
239
+    handleSizeChange(val) {},
240
+    handleSelectionChange(row, column, event) {
241
+      // this.$router.push({
242
+      //   path: "/productOrder/details",
243
+      //   query: {
244
+      //     id: row.id,
245
+      //   },
246
+      // });
247
+    },
248
+    // 获取美容师列表
249
+    getStaffList() {
250
+      api.getStaffList().then((res) => {
251
+        if (res.code == 200) {
252
+          this.nameList = res.data;
253
+          // console.log(res);
254
+        }
255
+      });
256
+    },
257
+  },
258
+
259
+  created() {
260
+    this.level = localStorage.getItem("level");
261
+    this.getOrderList();
262
+    // 获取员工列表
263
+    this.getStaffList();
264
+  },
265
+
266
+  mounted() {},
267
+};
268
+</script>
269
+
270
+<style lang='less' scoped>
271
+.mine {
272
+  .condition {
273
+    display: flex;
274
+    .coupon-select {
275
+      width: 174px;
276
+      margin-left: 18px;
277
+    }
278
+    .search {
279
+      width: 535px;
280
+      margin-left: 18px;
281
+    }
282
+
283
+    .searchButton {
284
+      margin-left: 18px;
285
+      width: 68px;
286
+      background: #fa7d22;
287
+      border-radius: 2px;
288
+      border-color: #fa7d22;
289
+    }
290
+  }
291
+  .user-list {
292
+    margin-top: 18px;
293
+    padding: 0 12px;
294
+    width: 100%;
295
+    background: #ffffff;
296
+    box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
297
+    border-radius: 8px;
298
+    .head-img {
299
+      width: 36px;
300
+      height: 36px;
301
+      border-radius: 50%;
302
+
303
+      img {
304
+        width: 100%;
305
+        height: 100%;
306
+      }
307
+    }
308
+    .pagin {
309
+      padding: 20px 0;
310
+      .el-pagination {
311
+        text-align: center;
312
+      }
313
+    }
314
+    /deep/ .el-table th > .cell {
315
+      font-size: 14px !important;
316
+      font-family: PingFangSC-Regular, PingFang SC;
317
+      font-weight: 400;
318
+      color: #999999;
319
+      line-height: 20px;
320
+    }
321
+    /deep/ .el-table td,
322
+    .el-table th.is-leaf {
323
+      border-bottom: none;
324
+    }
325
+    .amend {
326
+      background-color: #fa7d22;
327
+      color: white;
328
+      font-size: 14px;
329
+      border: #fa7d22;
330
+    }
331
+    /deep/ th.el-table_1_column_7.is-leaf.el-table__cell {
332
+      text-align: center;
333
+    }
334
+    /deep/ td.el-table_1_column_7.el-table__cell {
335
+      text-align: center;
336
+    }
337
+  }
338
+  .color0 {
339
+    color: #fc3019;
340
+  }
341
+  .color1 {
342
+    color: #3ef3ed;
343
+  }
344
+  .color2 {
345
+    color: #00eeee;
346
+  }
347
+  .color3 {
348
+    color: #61d09d;
349
+  }
350
+  .color4 {
351
+    color: #3115cc;
352
+  }
353
+  .color5 {
354
+    color: #fc3019;
355
+  }
356
+  .color6 {
357
+    color: #a999ea;
358
+  }
359
+}
360
+</style>

+ 356 - 0
src/pages/rechargeOrder/index.vue

@@ -0,0 +1,356 @@
1
+<template>
2
+  <div class="mine">
3
+    <div class="condition">
4
+      <el-date-picker
5
+        v-model="dates"
6
+        type="daterange"
7
+        range-separator="->"
8
+        start-placeholder="开始日期"
9
+        end-placeholder="结束日期"
10
+      ></el-date-picker>
11
+      <el-input placeholder="请输入内容" class="search" v-model="searchText">
12
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
13
+      </el-input>
14
+      <el-button type="primary" class="searchButton" @click="getOrderList()"
15
+        >搜索</el-button
16
+      >
17
+    </div>
18
+
19
+    <div class="user-list">
20
+      <el-table
21
+        ref="multipleTable"
22
+        :data="tableData"
23
+        tooltip-effect="dark"
24
+        height="500"
25
+        style="width: 100%; border-radius: 8px"
26
+      >
27
+        <el-table-column label="头像" width="120">
28
+          <template slot-scope="scope">
29
+            <div class="head-img">
30
+              <img :src="scope.row.avatar_url" alt />
31
+            </div>
32
+          </template>
33
+        </el-table-column>
34
+        <el-table-column
35
+          prop="nickname"
36
+          label="昵称"
37
+          width="120"
38
+        ></el-table-column>
39
+        <el-table-column
40
+          prop="real_name"
41
+          label="真实姓名"
42
+          width="80"
43
+        ></el-table-column>
44
+        <el-table-column
45
+          prop="mobile"
46
+          label="联系电话"
47
+          show-overflow-tooltip
48
+        ></el-table-column>
49
+        <el-table-column
50
+          prop="create_time"
51
+          label="下单时间"
52
+          show-overflow-tooltip
53
+        ></el-table-column>
54
+        <el-table-column
55
+          prop="amount"
56
+          label="充值金额"
57
+          show-overflow-tooltip
58
+        ></el-table-column>
59
+        <!-- <el-table-column
60
+          prop="date"
61
+          label="订单状态"
62
+          show-overflow-tooltip
63
+          width="100"
64
+        >
65
+          <template slot-scope="scope">
66
+            <div
67
+              :style="
68
+                scope.row.status == 0
69
+                  ? 'color: #FC3019'
70
+                  : scope.row.status == 5
71
+                  ? 'color: #A999EA'
72
+                  : 'color: #61D09D;'
73
+              "
74
+            >
75
+              {{
76
+                scope.row.status == 0
77
+                  ? "未支付"
78
+                  : scope.row.status == 5
79
+                  ? "已取消"
80
+                  : scope.row.status == 1
81
+                  ? "待使用"
82
+                  : scope.row.status == 2
83
+                  ? "正在使用"
84
+                  : scope.row.status == 3
85
+                  ? "已结算"
86
+                  : ""
87
+              }}
88
+            </div>
89
+          </template>
90
+        </el-table-column> -->
91
+        <el-table-column
92
+          width="80"
93
+          prop="realname"
94
+          label="美容师"
95
+          show-overflow-tooltip
96
+        ></el-table-column>
97
+        <el-table-column
98
+          class="amendTop"
99
+          width="140"
100
+          prop=""
101
+          label="分配"
102
+          show-overflow-tooltip
103
+          v-if='level==10'
104
+        >
105
+          <template slot-scope="scope">
106
+            <el-dropdown
107
+              @command="(command) => selectType(command, scope.$index)" trigger='click'
108
+            >
109
+              <el-button @click.stop type="primary" class="amend" size="mini">
110
+                分配
111
+              </el-button>
112
+              <el-dropdown-menu slot="dropdown">
113
+                <el-dropdown-item
114
+                  v-for="(item, index) in nameList"
115
+                  :key="index"
116
+                  :command="item.realname"
117
+                  >{{ item.realname }}</el-dropdown-item
118
+                >
119
+              </el-dropdown-menu>
120
+            </el-dropdown>
121
+          </template>
122
+        </el-table-column>
123
+      </el-table>
124
+
125
+      <div class="pagin">
126
+        <el-pagination
127
+          background
128
+          layout="prev, pager, next"
129
+          @current-change="handleCurrentChange"
130
+          :current-page.sync="currentPage1"
131
+          :total="total"
132
+        ></el-pagination>
133
+      </div>
134
+    </div>
135
+  </div>
136
+</template>
137
+
138
+<script>
139
+import api from "../../server/home";
140
+
141
+export default {
142
+  components: {},
143
+  data() {
144
+    return {
145
+      searchText: "",
146
+      dates: "",
147
+      coupon: "",
148
+      limit: 10,
149
+      total: 0,
150
+      product: "",
151
+      coupon: "",
152
+      level:'', //等级权限
153
+      couponList: [
154
+        {
155
+          value: "选项1",
156
+          label: "黄金糕",
157
+        },
158
+        {
159
+          value: "选项2",
160
+          label: "双皮奶",
161
+        },
162
+      ],
163
+      tableData: [
164
+        {
165
+          date: "2022.04.25  14:30",
166
+          name: "滴滴滴",
167
+          headImg:
168
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
169
+          phone: "13346783645",
170
+          status: "已完成",
171
+        },
172
+        {
173
+          date: "2022.04.25  14:30",
174
+          name: "滴滴滴",
175
+          headImg:
176
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
177
+          phone: "13346783645",
178
+          status: "已完成",
179
+        },
180
+      ],
181
+      currentPage1: 1,
182
+      multipleSelection: "",
183
+      nameList: "", //员工列表
184
+    };
185
+  },
186
+  computed: {},
187
+  watch: {},
188
+
189
+  methods: {
190
+    // 分配美容师
191
+    selectType(type, index) {
192
+      // 给表单添加美容师
193
+      this.$set(this.tableData[index], ["realname"], type);
194
+      let user_id = "";
195
+      this.nameList.map((item) => {
196
+        if (item.realname == type) {
197
+          user_id = item.id;
198
+        }
199
+      });
200
+      let order_id = this.tableData[index].id;
201
+      let params = {
202
+        user_id,
203
+        type: 4, //1项目 2次卡 3美妆产品 4充值
204
+        order_id,
205
+      };
206
+      // 店长分配
207
+      api.orderAllocation(params).then((res) => {
208
+        if (res.code == 200) {
209
+        }
210
+      });
211
+    },
212
+    // 获取订单列表
213
+    getOrderList() {
214
+      let start_date = "",
215
+        end_date = "";
216
+      if (this.dates && this.dates.length > 0) {
217
+        start_date = utils.formatTime(this.dates[0], "yyyy-MM-dd");
218
+        end_date = utils.formatTime(this.dates[1], "yyyy-MM-dd");
219
+      }
220
+      let params = {
221
+        page: this.currentPage1,
222
+        limit: this.limit,
223
+        keywords: this.searchText,
224
+        start_time: start_date,
225
+        end_time: end_date,
226
+      };
227
+      api.getRechargeOrderList(params).then((res) => {
228
+        if (res.code == 200) {
229
+          // 将用户手机号中间四位变成****
230
+          res.data.list.map((item) => {
231
+            item.mobile =
232
+              item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
233
+          });
234
+          this.tableData = res.data.list;
235
+          this.total = res.data.total;
236
+        }
237
+      });
238
+    },
239
+
240
+    handleCurrentChange(e) {
241
+      this.currentPage1 = e;
242
+      this.getOrderList();
243
+    },
244
+    // 获取美容师列表
245
+    getStaffList() {
246
+      api.getStaffList().then((res) => {
247
+        if (res.code == 200) {
248
+          this.nameList = res.data;
249
+          console.log(res);
250
+        }
251
+      });
252
+    },
253
+  },
254
+
255
+  created() {
256
+    this.level = localStorage.getItem("level");
257
+    this.getOrderList();
258
+    // 获取员工列表
259
+    this.getStaffList();
260
+  },
261
+
262
+  mounted() {},
263
+};
264
+</script>
265
+
266
+<style lang='less' scoped>
267
+.mine {
268
+  .condition {
269
+    display: flex;
270
+    .coupon-select {
271
+      width: 174px;
272
+      margin-left: 18px;
273
+    }
274
+    .search {
275
+      width: 535px;
276
+      margin-left: 18px;
277
+    }
278
+
279
+    .searchButton {
280
+      margin-left: 18px;
281
+      width: 68px;
282
+      background: #fa7d22;
283
+      border-radius: 2px;
284
+      border-color: #fa7d22;
285
+    }
286
+  }
287
+  .user-list {
288
+    margin-top: 18px;
289
+    padding: 0 12px;
290
+    width: 100%;
291
+    background: #ffffff;
292
+    box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
293
+    border-radius: 8px;
294
+    .head-img {
295
+      width: 36px;
296
+      height: 36px;
297
+      border-radius: 50%;
298
+
299
+      img {
300
+        width: 100%;
301
+        height: 100%;
302
+      }
303
+    }
304
+    .pagin {
305
+      padding: 20px 0;
306
+      .el-pagination {
307
+        text-align: center;
308
+      }
309
+    }
310
+    /deep/ .el-table th > .cell {
311
+      font-size: 14px !important;
312
+      font-family: PingFangSC-Regular, PingFang SC;
313
+      font-weight: 400;
314
+      color: #999999;
315
+      line-height: 20px;
316
+    }
317
+    /deep/ .el-table td,
318
+    .el-table th.is-leaf {
319
+      border-bottom: none;
320
+    }
321
+    .amend {
322
+      background-color: #fa7d22;
323
+      color: white;
324
+      font-size: 14px;
325
+      border: #fa7d22;
326
+    }
327
+    /deep/ th.el-table_1_column_7.is-leaf.el-table__cell {
328
+      text-align: center;
329
+    }
330
+    /deep/ td.el-table_1_column_7.el-table__cell {
331
+      text-align: center;
332
+    }
333
+  }
334
+  .color0 {
335
+    color: #fc3019;
336
+  }
337
+  .color1 {
338
+    color: #3ef3ed;
339
+  }
340
+  .color2 {
341
+    color: #00eeee;
342
+  }
343
+  .color3 {
344
+    color: #61d09d;
345
+  }
346
+  .color4 {
347
+    color: #3115cc;
348
+  }
349
+  .color5 {
350
+    color: #fc3019;
351
+  }
352
+  .color6 {
353
+    color: #a999ea;
354
+  }
355
+}
356
+</style>

+ 521 - 0
src/pages/scheduling/details/index.vue

@@ -0,0 +1,521 @@
1
+<template>
2
+  <div>
3
+    <!-- 头部添加查询排班=表 -->
4
+    <div class="header">
5
+      <div class="header-left">
6
+        <div
7
+          class="title"
8
+          :class="activeClass == index ? 'titleActive' : ''"
9
+          v-for="(item, index) in titleList"
10
+          :key="index"
11
+          @click="checkTitle(index)"
12
+        >
13
+          {{ item }}月排班表
14
+          <i class="el-icon-close" @click="delTitle" v-if="index == 1"></i>
15
+        </div>
16
+        <div class="add" @click="addList"><i class="el-icon-plus"></i></div>
17
+      </div>
18
+      <div class="header-right">
19
+        <div class="selectTime">
20
+          <el-date-picker
21
+            popper-class="mydatestyle"
22
+            @change="selectTime"
23
+            v-model="dateList"
24
+            type="month"
25
+            placeholder="查询时间"
26
+            :editable="false"
27
+            :clearable="false"
28
+            :picker-options="pickerOptions"
29
+          >
30
+            <!-- :picker-options="pickerOptions" -->
31
+          </el-date-picker>
32
+        </div>
33
+        <div @click="search" class="search">查询</div>
34
+      </div>
35
+    </div>
36
+    <!-- 排班表 -->
37
+    <div class="list">
38
+      <el-table
39
+        :data="tableData"
40
+        @cell-click="handle"
41
+        :cell-class-name="tableCellClassName"
42
+        :row-class-name="overTime"
43
+        height="550"
44
+      >
45
+        <el-table-column prop="date" label="日期" align="center" width="155">
46
+        </el-table-column>
47
+        <el-table-column
48
+          v-for="(item, index) in nameList"
49
+          :prop="'name' + index"
50
+          :label="item.realname"
51
+          align="center"
52
+          width="155"
53
+          :key="index"
54
+        >
55
+          <template slot-scope="scope">
56
+            <el-dropdown
57
+              @command="selectType"
58
+              :disabled="disabled"
59
+              trigger="click"
60
+            >
61
+              <div
62
+                class="amend"
63
+                :class="
64
+                  tableData[scope.row.index]['name' + index] == '早班'
65
+                    ? 'color1'
66
+                    : tableData[scope.row.index]['name' + index] == '中班'
67
+                    ? 'color2'
68
+                    : tableData[scope.row.index]['name' + index] == '晚班'
69
+                    ? 'color3'
70
+                    : tableData[scope.row.index]['name' + index] == '休息'
71
+                    ? 'color4'
72
+                    : 'color5'
73
+                "
74
+              >
75
+                {{ tableData[scope.row.index]["name" + index] }}
76
+              </div>
77
+              <span v-if="false">{{ scope.row }}</span>
78
+              <el-dropdown-menu slot="dropdown">
79
+                <el-dropdown-item class="color1" command="早班"
80
+                  >早班</el-dropdown-item
81
+                >
82
+                <el-dropdown-item class="color2" command="中班"
83
+                  >中班</el-dropdown-item
84
+                >
85
+                <el-dropdown-item class="color3" command="晚班"
86
+                  >晚班</el-dropdown-item
87
+                >
88
+                <el-dropdown-item class="color4" command="休息"
89
+                  >休息</el-dropdown-item
90
+                >
91
+                <el-dropdown-item class="color5" command="离职"
92
+                  >离职</el-dropdown-item
93
+                >
94
+              </el-dropdown-menu>
95
+            </el-dropdown>
96
+          </template>
97
+        </el-table-column>
98
+      </el-table>
99
+    </div>
100
+  </div>
101
+</template>
102
+
103
+<script>
104
+import api from "../../../server/home";
105
+export default {
106
+  data() {
107
+    return {
108
+      level: "", //10店长可排班
109
+      dateList: "", //选择日期的绑定
110
+      tableData: [], //值班列表
111
+      nameList: [], //员工列表
112
+      row: "", //存入数据的行
113
+      column: "", //存入数据的列
114
+      titleList: [], //月份数组(最多两个月份)
115
+      month: "", //今月
116
+      year: "", //今年
117
+      day: "", //今日
118
+      activeClass: 0, //月份活动类名
119
+      one_selectMonth: "",
120
+      one_selectYear: "",
121
+      selectMonth: "", //选择的月份
122
+      selectYear: "", //选择的年份
123
+      pickerOptions: {
124
+        disabledDate: (time) => {
125
+          const sixMonth = new Date().setMonth(new Date().getMonth() - 5);
126
+          const maxValue = new Date().setMonth(new Date().getMonth() + 1);
127
+          return time.getTime() > maxValue || time.getTime() < sixMonth;
128
+        },
129
+      }, // 筛选选择日期只能查看前6个月 后一个月
130
+      disabled: false, // 之前的日期不可分配
131
+      addYear: "",
132
+      typeList: ["早班", "中班", "晚班", "休息", "离职"], //1是早班 2是中班 3是晚班 9是休息 10离职
133
+    };
134
+  },
135
+  methods: {
136
+    // 将本月过去的时间添加背景色
137
+    overTime({ row, rowIndex }) {
138
+      if (row.date.split("日")[0].split("月")[0] != this.month) {
139
+        return;
140
+      }
141
+      let one_selectTime =
142
+        this.year +
143
+        "-" +
144
+        row.date.split("日")[0].split("月")[0] +
145
+        "-" +
146
+        row.date.split("日")[0].split("月")[1];
147
+      //现在的时间
148
+      let one_nowTime = this.year + "-" + this.month + "-" + this.day;
149
+      if (
150
+        new Date(one_selectTime.replace(/-/g, "/")) <
151
+        new Date(one_nowTime.replace(/-/g, "/"))
152
+      ) {
153
+        return "over-row";
154
+      }
155
+    },
156
+    // 删除最后一个标题
157
+    delTitle() {
158
+      // 删除标题数组最后一个
159
+      this.titleList.pop();
160
+      // 自动切换到本月月份
161
+      this.checkTitle(0);
162
+      this.selectMonth = "";
163
+      this.selectYear = "";
164
+      this.addYear = "";
165
+    },
166
+    // 查询日期
167
+    search() {
168
+      // 没有选择日期,返回
169
+      if (this.one_selectMonth == "" || this.one_selectMonth == this.month) {
170
+        return;
171
+      }
172
+      this.activeClass = 1;
173
+      this.selectMonth = this.one_selectMonth;
174
+      this.selectYear = this.one_selectYear;
175
+      // 设置月份数组最后一个为当前选择月份
176
+      this.titleList[1] = this.selectMonth;
177
+      // 获取数据月份
178
+      this.currentMonthDays(this.selectMonth);
179
+      this.getWorkList(this.selectMonth, this.selectYear);
180
+    },
181
+    // 选择日期
182
+    selectTime(e) {
183
+      // 获取月份
184
+      this.one_selectMonth = e.getMonth() + 1;
185
+      this.one_selectYear = e.getFullYear();
186
+    },
187
+    // 获取本月所有的日期
188
+    currentMonthDays(month1) {
189
+      let now = new Date();
190
+      // 这个月的月份
191
+      this.month = now.getMonth() + 1;
192
+      this.year = now.getFullYear();
193
+      this.day = now.getDate();
194
+      const daysOfMonth = [];
195
+      let year = month1 == 1 ? now.getFullYear() + 1 : now.getFullYear();
196
+      let month = month1 || now.getMonth() + 1;
197
+      if (!month1) {
198
+        this.titleList.push(month);
199
+      }
200
+      month = parseInt(month, 10);
201
+      const lastDayOfMonth = new Date(year, month, 0).getDate();
202
+      var weekDay = [
203
+        "(周天)",
204
+        "(周一)",
205
+        "(周二)",
206
+        "(周三)",
207
+        "(周四)",
208
+        "(周五)",
209
+        "(周六)",
210
+      ];
211
+      for (let i = 1; i <= lastDayOfMonth; i++) {
212
+        let arr = year + "/" + month + "/" + i;
213
+        var myDate = new Date(Date.parse(arr));
214
+        let week = weekDay[myDate.getDay()];
215
+        daysOfMonth.push(month + "月" + i + "日" + " " + week);
216
+      }
217
+      let arr = [];
218
+      daysOfMonth.map((item) => {
219
+        arr.push({ date: item });
220
+      });
221
+      this.tableData = arr;
222
+    },
223
+    // 选择上班类型
224
+    selectType(e) {
225
+      this.$set(this.tableData[this.row], [`name${this.column - 1}`], e);
226
+      // 选择的类型 (1是早班 2是中班 3是晚班 9是休息 10离职)
227
+      let type = "";
228
+      e == "早班"
229
+        ? (type = 1)
230
+        : e == "中班"
231
+        ? (type = 2)
232
+        : e == "晚班"
233
+        ? (type = 3)
234
+        : e == "休息"
235
+        ? (type = 4)
236
+        : (type = 5);
237
+      let year = this.year;
238
+      // 判断是否选择的是明年的1月
239
+      if (this.selectYear > this.year && this.activeClass != 0) {
240
+        year = this.year + 1;
241
+      } else {
242
+        year = this.year;
243
+      }
244
+      // 判断添加下一个月是1月
245
+      if (this.addYear && this.titleList[1] == 1) {
246
+        year = this.addYear;
247
+      }
248
+      // 选择的时间
249
+      let day =
250
+        year +
251
+        "-" +
252
+        this.tableData[this.row].date.split("日")[0].split("月")[0] +
253
+        "-" +
254
+        this.tableData[this.row].date.split("日")[0].split("月")[1];
255
+      let user_id = this.nameList[this.column - 1].id;
256
+      let params = {
257
+        day,
258
+        type,
259
+        user_id,
260
+      };
261
+      // 添加排班
262
+      api.selectScheduling(params).then((res) => {
263
+        if (res.code == 200) {
264
+        }
265
+      });
266
+    },
267
+    tableCellClassName({ row, column, rowIndex, columnIndex }) {
268
+      //注意这里是解构
269
+      //利用单元格的 className 的回调方法,给行列索引赋值
270
+      row.index = rowIndex;
271
+      column.index = columnIndex;
272
+    },
273
+    // 获取填写日期的行列
274
+    handle(row, column, event, cell) {
275
+      this.row = row.index; //行
276
+      this.column = column.index; //列
277
+      let one_year = this.selectYear == "" ? this.year : this.selectYear;
278
+      if (this.activeClass == 0) {
279
+        one_year = this.year;
280
+      }
281
+      if (this.month + 1 == this.titleList[1]) {
282
+        one_year = this.year;
283
+      } else if (this.titleList[this.activeClass] == 1) {
284
+        one_year = this.addYear || this.selectYear;
285
+      } else {
286
+        one_year = this.selectYear || this.year;
287
+      }
288
+      //选择的时间
289
+      let one_selectTime =
290
+        one_year +
291
+        "-" +
292
+        this.tableData[this.row].date.split("日")[0].split("月")[0] +
293
+        "-" +
294
+        this.tableData[this.row].date.split("日")[0].split("月")[1];
295
+      //现在的时间
296
+      let one_nowTime = this.year + "-" + this.month + "-" + this.day;
297
+      // 判断是否是今天以前的时间  是否可选择
298
+      new Date(one_selectTime.replace(/-/g, "/")) <
299
+      new Date(one_nowTime.replace(/-/g, "/"))
300
+        ? (this.disabled = true)
301
+        : (this.disabled = false);
302
+        // 如果是店员不予操作
303
+      if (this.level != 10) {
304
+        this.disabled = true;
305
+      }
306
+    },
307
+    // 添加表单
308
+    addList() {
309
+      // 最多可有两个月
310
+      if (this.titleList.length >= 2) {
311
+        return;
312
+      }
313
+      // 判断是否是最后一个月是的话添加表单就为1月份
314
+      if (this.month == 12) {
315
+        this.currentMonthDays(1);
316
+        this.titleList.push(1);
317
+        this.addYear = this.year + 1;
318
+      } else {
319
+        this.currentMonthDays(this.month + 1);
320
+        this.titleList.push(this.month + 1);
321
+      }
322
+      this.activeClass = this.activeClass + 1;
323
+      this.getWorkList(this.month + 1, this.addYear || this.year);
324
+    },
325
+    // 切换表单
326
+    checkTitle(index) {
327
+      this.activeClass = index;
328
+      // 获取切换月的月份
329
+      this.month = this.titleList[index];
330
+      this.currentMonthDays(this.month);
331
+      this.getWorkList(
332
+        this.titleList[this.activeClass],
333
+        this.activeClass == 0
334
+          ? this.year
335
+          : this.addYear == ""
336
+          ? this.selectYear || this.year
337
+          : this.addYear
338
+      );
339
+    },
340
+    // 获取员工列表
341
+    getStaffList() {
342
+      api.getStaffList().then((res) => {
343
+        if (res.code == 200) {
344
+          this.nameList = res.data;
345
+        }
346
+      });
347
+    },
348
+    // 获取排班列表
349
+    getWorkList(month, year) {
350
+      let month1 = year + "-" + month;
351
+      let params = {
352
+        month: month1,
353
+      };
354
+      api.getWorkList(params).then((res) => {
355
+        if (res.code == 200) {
356
+          // 获取全部排班
357
+          let arr = [];
358
+          res.data.map((item) => {
359
+            arr.push(item.type);
360
+          });
361
+          arr.map((item, index) => {
362
+            let newArr = this.tableData[index];
363
+            item.map((item1, index1) => {
364
+              this.$set(newArr, `name${index1}`, this.typeList[item1[0] - 1]);
365
+            });
366
+          });
367
+        }
368
+      });
369
+    },
370
+  },
371
+  created() {
372
+    // 获取店长员工等级
373
+    this.level = localStorage.getItem("level");
374
+    // 获取日期列表
375
+    this.currentMonthDays();
376
+    // 获取员工列表
377
+    this.getStaffList();
378
+    // 获取排班列表
379
+    this.getWorkList(this.month, this.year);
380
+  },
381
+};
382
+</script>
383
+
384
+<style lang='less' scoped>
385
+.header {
386
+  width: 857px;
387
+  height: 70px;
388
+  background: #ffffff;
389
+  border-radius: 8px;
390
+  display: flex;
391
+  align-items: center;
392
+  justify-content: space-between;
393
+  .header-left {
394
+    display: flex;
395
+    align-items: center;
396
+    .title {
397
+      width: 217px;
398
+      height: 70px;
399
+      // background: #fa7d22;
400
+      border-radius: 8px;
401
+      // color: #ffffff;
402
+      text-align: center;
403
+      line-height: 70px;
404
+      font-size: 24px;
405
+      font-weight: 400;
406
+      position: relative;
407
+      .el-icon-close {
408
+        color: #ffffff;
409
+        font-size: 24px;
410
+        position: absolute;
411
+        top: 3px;
412
+        right: 3px;
413
+        padding: 0;
414
+      }
415
+    }
416
+    .titleActive {
417
+      background: #fa7d22;
418
+      color: #ffffff;
419
+    }
420
+    .add {
421
+      width: 60px;
422
+      height: 60px;
423
+      border-radius: 8px;
424
+      border: 1px solid #e6e6e6;
425
+      margin-left: 5px;
426
+      text-align: center;
427
+      line-height: 60px;
428
+      /deep/i {
429
+        font-size: 19px;
430
+        color: #e6e6e6;
431
+      }
432
+    }
433
+  }
434
+  .header-right {
435
+    display: flex;
436
+    align-items: center;
437
+    .el-date-editor.el-input.el-input--prefix.el-input--suffix.el-date-editor--month {
438
+      width: 132px;
439
+      height: 32px;
440
+      background: #ffffff;
441
+      border-radius: 2px;
442
+    }
443
+    .search {
444
+      width: 80px;
445
+      height: 30px;
446
+      background: #fa7d22;
447
+      border-radius: 20px;
448
+      line-height: 30px;
449
+      text-align: center;
450
+      color: #ffffff;
451
+      margin-right: 20px;
452
+      margin-left: 10px;
453
+    }
454
+  }
455
+}
456
+.list {
457
+  height: 420px;
458
+  width: 857px;
459
+  background: #ffffff;
460
+  border-radius: 8px;
461
+  margin-top: 18px;
462
+  padding: 0 11px;
463
+  overflow-x: scroll;
464
+  overflow-y: scroll;
465
+  .el-dropdown {
466
+    width: 100%;
467
+    height: 100%;
468
+  }
469
+  .amend {
470
+    width: 100%;
471
+    height: 100%;
472
+  }
473
+}
474
+/deep/ .el-table tbody tr:hover > td {
475
+  background: #fff !important;
476
+}
477
+/deep/tr.el-table__row > * {
478
+  border-left: 1px solid #ebeef5;
479
+  border-right: 1px solid #ebeef5;
480
+  height: 41px;
481
+  width: 115px;
482
+}
483
+/deep/.cell {
484
+  height: 100%;
485
+  width: 100%;
486
+}
487
+.color1 {
488
+  color: #19d1ca !important;
489
+}
490
+.color2 {
491
+  color: #ffafaf !important;
492
+}
493
+.color3 {
494
+  color: #4d5e8e !important ;
495
+}
496
+.color4 {
497
+  color: #fa7d22 !important;
498
+}
499
+.color5 {
500
+  color: #999999 !important;
501
+}
502
+.el-month-table td.current:not(.disabled) .cell {
503
+  color: #4d5e8e;
504
+}
505
+/deep/ .el-month-table td.today .cell {
506
+  color: #4d5e8e;
507
+  font-size: 40px;
508
+}
509
+/deep/.el-picker-panel__body {
510
+  background-color: red;
511
+}
512
+/deep/.el-table {
513
+  .el-table__body-wrapper {
514
+    height: calc(100% - 48px) !important; // 表格高度减去表头的高度
515
+  }
516
+}
517
+/deep/.el-table .over-row {
518
+  background: #f7f8fa;
519
+  pointer-events: none;
520
+}
521
+</style>

+ 238 - 0
src/pages/scheduling/index.vue

@@ -0,0 +1,238 @@
1
+<template>
2
+  <div>
3
+    <div class="mine">
4
+      <!-- 表头月份 -->
5
+      <div class="month">
6
+        <div class="title">{{ month }}月排班</div>
7
+        <div @click="schedulingDetails" class="btn" v-if="level == 10">
8
+          排班
9
+        </div>
10
+        <!-- v-if='level==10' -->
11
+      </div>
12
+      <!-- 日历 -->
13
+      <el-calendar>
14
+        <template slot="dateCell" slot-scope="{ date, data }">
15
+          <div
16
+            v-for="(item, index) in stateType(getDay(date), data)"
17
+            :key="index"
18
+            class="dateContent"
19
+            :class="
20
+              thisDay == getDay(date) ? 'today' : item.type == 4 ? 'color5' : ''
21
+            "
22
+          >
23
+            <span
24
+              class="date"
25
+              :class="item.type == 4 && thisDay != getDay(date) ? 'color4' : ''"
26
+              >{{ getDay(date) }}
27
+            </span>
28
+            <span
29
+              class="type"
30
+              :class="
31
+                item.type == 1
32
+                  ? 'color1'
33
+                  : item.type == 2
34
+                  ? 'color2'
35
+                  : item.type == 4 && thisDay != getDay(date)
36
+                  ? 'color4'
37
+                  : item.type == 3
38
+                  ? 'color3'
39
+                  : 'color6'
40
+              "
41
+              >{{ typeList[item.type - 1] }}</span
42
+            >
43
+          </div>
44
+        </template>
45
+      </el-calendar>
46
+    </div>
47
+  </div>
48
+</template>
49
+
50
+<script>
51
+import api from "../../server/home";
52
+export default {
53
+  data() {
54
+    return {
55
+      thisDay: "", //今天日期(日)
56
+      stateList: [], //值班列表
57
+      typeList: ["早班", "中班", "晚班", "休息", "离职"], //1是早班 2是中班 3是晚班 4是休息 5离职
58
+      month: "",
59
+      level: "", //等级权限
60
+    };
61
+  },
62
+  methods: {
63
+    // 标注今天日期
64
+    getDay(date) {
65
+      return date.getDate();
66
+    },
67
+    schedulingDetails() {
68
+      this.$router.push("/scheduling/details");
69
+    },
70
+    // 获取排班列表
71
+    getScheduling() {
72
+      let now = new Date();
73
+      let year = now.getFullYear();
74
+      let month = now.getMonth() + 1;
75
+      if (month < 10) {
76
+        month = "0" + month;
77
+      }
78
+      let start_time = `${year}-${month}-01`;
79
+      const enddate = new Date(year, month, 0);
80
+      var end_time =
81
+        enddate.getFullYear() +
82
+        "-" +
83
+        (enddate.getMonth() + 1) +
84
+        "-" +
85
+        enddate.getDate();
86
+      let parems = {
87
+        start_time: start_time,
88
+        end_time: end_time,
89
+      };
90
+      api.getScheduling(parems).then((res) => {
91
+        if (res.code == 200) {
92
+          this.stateList = res.data;
93
+        }
94
+      });
95
+    },
96
+    // 筛选每天对应的排班数据
97
+    stateType(date, data) {
98
+      // 获取月份
99
+      if (!data) {
100
+        return;
101
+      }
102
+      let month = data.day.split("-")[1];
103
+      return this.stateList.filter((item) => {
104
+        if (date == item.day && month == this.month) {
105
+          return item;
106
+        }
107
+      });
108
+    },
109
+  },
110
+  created() {
111
+    this.level = localStorage.getItem("level");
112
+    let now = new Date();
113
+    this.thisDay = now.getDate();
114
+    this.month = now.getMonth() + 1;
115
+    // 获取排班列表
116
+    this.getScheduling();
117
+    this.stateType();
118
+  },
119
+};
120
+</script>
121
+
122
+<style lang='less' scoped>
123
+.mine {
124
+  width: 857px;
125
+  height: 504px;
126
+  background-color: #ffffff;
127
+  margin: auto auto;
128
+  border-radius: 10px;
129
+  // 表头月份样式
130
+  .month {
131
+    width: 857px;
132
+    height: 80px;
133
+    border-radius: 10px;
134
+    border: 1px solid #fa7d22;
135
+    font-size: 24px;
136
+    font-family: PingFangSC-Semibold, PingFang SC;
137
+    font-weight: 600;
138
+    color: #fa7d22;
139
+    text-align: center;
140
+    line-height: 80px;
141
+    display: flex;
142
+    align-items: center;
143
+    .title {
144
+      margin-left: 385px;
145
+    }
146
+    .btn {
147
+      font-weight: 400;
148
+      width: 80px;
149
+      line-height: 30px;
150
+      height: 30px;
151
+      background: #fa7d22;
152
+      border-radius: 20px;
153
+      color: #ffffff;
154
+      font-size: 14px;
155
+      margin-left: 285px;
156
+    }
157
+  }
158
+  // 日历样式
159
+  /deep/.el-calendar__header {
160
+    display: none;
161
+  }
162
+  /deep/.el-calendar-day {
163
+    text-align: center;
164
+    color: #333333;
165
+    border: none;
166
+  }
167
+  /deep/ thead {
168
+    font-size: 20px;
169
+    font-weight: 400;
170
+    color: #333;
171
+  }
172
+  /deep/td.current {
173
+    border: none;
174
+  }
175
+  /deep/td.next {
176
+    pointer-events: none;
177
+    border: none;
178
+    .dateContent {
179
+      color: #d4d4d4;
180
+    }
181
+  }
182
+  /deep/td.prev {
183
+    pointer-events: none;
184
+    border: none;
185
+    .dateContent {
186
+      color: #d4d4d4 !important;
187
+    }
188
+  }
189
+  .dateContent {
190
+    display: flex;
191
+    font-size: 20px;
192
+    flex-direction: column;
193
+    width: 60px;
194
+    height: 60px;
195
+    margin: auto auto;
196
+    margin-top: 10px;
197
+    border-radius: 8px;
198
+    padding-top: 6px;
199
+    box-sizing: border-box;
200
+    .date {
201
+      margin-top: 4px;
202
+    }
203
+    .type {
204
+      font-size: 14px;
205
+      margin-top: 4px;
206
+    }
207
+  }
208
+  .today {
209
+    border: 1px solid #fa7d22 !important;
210
+  }
211
+  /deep/tr.el-calendar-table__row:last-child {
212
+    display: none;
213
+  }
214
+  .el-calendar {
215
+    pointer-events: none;
216
+  }
217
+}
218
+/deep/td.current {
219
+  .color1 {
220
+    color: #19d1ca; //早班
221
+  }
222
+  .color2 {
223
+    color: #ffa5a5; //午班
224
+  }
225
+  .color3 {
226
+    color: #4b5d8d; //晚班
227
+  }
228
+  .color4 {
229
+    color: #ffffff; //休息
230
+  }
231
+  .color5 {
232
+    background-color: #fa7d22;
233
+  }
234
+  .color6 {
235
+    color: #999999; //离职
236
+  }
237
+}
238
+</style>

+ 62 - 2
src/router/map/home.js

@@ -20,7 +20,14 @@ import projectOrder from '@/pages/customerMan/myOrder'
20 20
 import payUser from '@/pages/payUser/index'
21 21
 import payUserDetails from '@/pages/payUser/details/index'
22 22
 import payUserOrder from '@/pages/payUser/myOrder/index'
23
-
23
+import scheduling from '@/pages/scheduling/index'
24
+import schedulingDetails from '@/pages/scheduling/details/index'
25
+import orderCenter from '@/pages/orderCenter/orderCenter'
26
+import productOrder from '@/pages/productOrder/index'
27
+import productOrderDetails from '@/pages/productOrder/details/index'
28
+import cardOrderDetails from '@/pages/cardOrder/details/index'
29
+import cardOrder from '@/pages/cardOrder/index'
30
+import rechargeOrder from '@/pages/rechargeOrder/index'
24 31
 export default {
25 32
   path: '/layout',
26 33
   name: '首页',
@@ -72,7 +79,7 @@ export default {
72 79
       isback: true,
73 80
     },
74 81
     component: projectOrder
75
-  }, 
82
+  },
76 83
   {
77 84
     path: '/payUser',
78 85
     component: payUser,
@@ -90,6 +97,9 @@ export default {
90 97
   },
91 98
   {
92 99
     path: '/historicalOrder',
100
+    meta: {
101
+      isback: true,
102
+    },
93 103
     component: HistoricalOrder
94 104
   },
95 105
   {
@@ -126,5 +136,55 @@ export default {
126 136
     path: '/coupon',
127 137
     component: Coupon
128 138
   },
139
+  {
140
+    path: '/scheduling',
141
+    component: scheduling,
142
+  },
143
+  {
144
+    path: '/scheduling/details',
145
+    component: schedulingDetails,
146
+    meta: {
147
+      isback: true,
148
+    },
149
+  },
150
+  {
151
+    path: '/orderCenter',
152
+    component: orderCenter
153
+  },
154
+  {
155
+    path: '/productOrder',
156
+    component: productOrder,
157
+    meta: {
158
+      isback: true,
159
+    },
160
+  },
161
+  {
162
+    path: '/productOrder/details',
163
+    component: productOrderDetails,
164
+    meta: {
165
+      isback: true,
166
+    },
167
+  },
168
+  {
169
+    path: '/cardOrder',
170
+    component: cardOrder,
171
+    meta: {
172
+      isback: true,
173
+    },
174
+  },
175
+  {
176
+    path: '/cardOrder/details',
177
+    component: cardOrderDetails,
178
+    meta: {
179
+      isback: true,
180
+    },
181
+  },
182
+  {
183
+    path: '/rechargeOrder',
184
+    component: rechargeOrder,
185
+    meta: {
186
+      isback: true,
187
+    },
188
+  },
129 189
   ]
130 190
 }

+ 94 - 62
src/server/home.js

@@ -6,100 +6,100 @@ export default class Home {
6 6
   /**
7 7
    * @描述  1.1	获取用户信息
8 8
    */
9
-  static getToken (parms) {
9
+  static getToken(parms) {
10 10
     return $http.post(url.getToken, parms);
11 11
   }
12 12
 
13
-  static getTotal (parms) {
13
+  static getTotal(parms) {
14 14
     return $http.get(url.getTotal, parms);
15 15
   }
16 16
 
17
-  static getToday (parms) {
17
+  static getToday(parms) {
18 18
     return $http.get(url.getToday, parms);
19 19
   }
20 20
 
21
-  static getSkinList (parms) {
21
+  static getSkinList(parms) {
22 22
     return $http.get(url.getSkinList, parms);
23 23
   }
24
-  static getSkinInfo (parms) {
24
+  static getSkinInfo(parms) {
25 25
     return $http.get(url.getSkinInfo, parms);
26 26
   }
27
-  static getProject (parms) {
27
+  static getProject(parms) {
28 28
     return $http.get(url.getProject, parms);
29 29
   }
30
-  static getUserInfo (parms) {
30
+  static getUserInfo(parms) {
31 31
     return $http.get(url.getUserInfo, parms);
32 32
   }
33
-  static getSkinTags (parms) {
33
+  static getSkinTags(parms) {
34 34
     return $http.get(url.getSkinTags, parms);
35 35
   }
36
-  static getSkinUpdate (parms) {
36
+  static getSkinUpdate(parms) {
37 37
     return $http.post(url.getSkinUpdate, parms);
38 38
   }
39
-  static getProjectList (parms) {
39
+  static getProjectList(parms) {
40 40
     return $http.get(url.getProjectList, parms);
41 41
   }
42
-  static getProducts (parms) {
42
+  static getProducts(parms) {
43 43
     return $http.get(url.getProducts, parms);
44 44
   }
45
-  static getOrderTime (parms) {
45
+  static getOrderTime(parms) {
46 46
     return $http.get(url.getOrderTime, parms);
47 47
   }
48
-  static setOrderUpdate (parms) {
48
+  static setOrderUpdate(parms) {
49 49
     return $http.post(url.setOrderUpdate, parms);
50 50
   }
51
-  static getOrderCoupon (parms) {
51
+  static getOrderCoupon(parms) {
52 52
     return $http.get(url.getOrderCoupon, parms);
53 53
   }
54
-  static getAuthCode (parms) {
54
+  static getAuthCode(parms) {
55 55
     return $http.get(url.getAuthCode, parms);
56 56
   }
57
-  static checkCode (parms) {
57
+  static checkCode(parms) {
58 58
     return $http.get(url.checkCode, parms);
59 59
   }
60
-  static getOrderByCode (parms) {
60
+  static getOrderByCode(parms) {
61 61
     return $http.get(url.getOrderByCode, parms);
62 62
   }
63
-  static orderPay (parms) {
63
+  static orderPay(parms) {
64 64
     return $http.post(url.orderPay, parms);
65 65
   }
66
-  static payStatus (parms) {
66
+  static payStatus(parms) {
67 67
     return $http.get(url.payStatus, parms);
68 68
   }
69
-  static getOrderDiscount (parms) {
69
+  static getOrderDiscount(parms) {
70 70
     return $http.get(url.getOrderDiscount, parms);
71 71
   }
72
-  static projectClassify (parms) {
72
+  static projectClassify(parms) {
73 73
     return $http.get(url.projectClassify, parms);
74 74
   }
75
-  static schemeDelete (parms) {
75
+  static schemeDelete(parms) {
76 76
     return $http.post(url.schemeDelete, parms);
77 77
   }
78
-  static timesAdd (parms) {
78
+  static timesAdd(parms) {
79 79
     return $http.post(url.timesAdd, parms);
80 80
   }
81
-  static addUpdate (parms) {
81
+  static addUpdate(parms) {
82 82
     return $http.post(url.addUpdate, parms);
83 83
   }
84
-  static getDevice_list (parms) {
84
+  static getDevice_list(parms) {
85 85
     return $http.get(url.getDevice_list, parms);
86 86
   }
87
-  static device_change (parms) {
87
+  static device_change(parms) {
88 88
     return $http.post(url.device_change, parms);
89 89
   }
90 90
 
91 91
   // 获取历史订单
92
-  static getOrderList (parms) {
92
+  static getOrderList(parms) {
93 93
     return $http.get(url.getOrderList, parms);
94 94
   }
95 95
 
96 96
   // 获取订单详情
97
-  static getOrderInfo (parms) {
97
+  static getOrderInfo(parms) {
98 98
     return $http.get(url.getOrderInfo, parms);
99 99
   }
100 100
 
101 101
   // 获取用户列表
102
-  static getUserList (parms) {
102
+  static getUserList(parms) {
103 103
     return $http.get(url.getUserList, parms);
104 104
   }
105 105
 
@@ -109,152 +109,184 @@ export default class Home {
109 109
   // }
110 110
 
111 111
   // 获取优惠券列表
112
-  static getCouponInfo (parms) {
112
+  static getCouponInfo(parms) {
113 113
     return $http.get(url.getCouponInfo, parms);
114 114
   }
115 115
 
116 116
   // 发送优惠券接口
117
-  static sendCoupon (parms) {
117
+  static sendCoupon(parms) {
118 118
     return $http.post(url.sendCoupon, parms);
119 119
   }
120 120
 
121 121
   // 获取用户详情接口
122
-  static getPadUserInfo (parms) {
122
+  static getPadUserInfo(parms) {
123 123
     return $http.get(url.getPadUserInfo, parms);
124 124
   }
125 125
 
126 126
   // 获取优惠券订单
127
-  static getUserCoupon (parms) {
127
+  static getUserCoupon(parms) {
128 128
     return $http.get(url.getUserCoupon, parms);
129 129
   }
130 130
 
131 131
   // 获取商品订单
132
-  static getUserGoods (parms) {
132
+  static getUserGoods(parms) {
133 133
     return $http.get(url.getUserGoods, parms);
134 134
   }
135 135
 
136 136
   // 获取项目订单
137
-  static getUserProject (parms) {
137
+  static getUserProject(parms) {
138 138
     return $http.get(url.getUserProject, parms);
139 139
   }
140 140
 
141 141
   // 新增项目订单
142
-  static padOrderAdd (parms) {
142
+  static padOrderAdd(parms) {
143 143
     return $http.post(url.padOrderAdd, parms);
144 144
   }
145 145
 
146 146
   // 面部问题标签
147
-  static skinFace_tags (parms) {
147
+  static skinFace_tags(parms) {
148 148
     return $http.get(url.skinFace_tags, parms);
149 149
   }
150 150
 
151 151
   // 皮肤问题标签
152
-  static skinSkin_tags (parms) {
152
+  static skinSkin_tags(parms) {
153 153
     return $http.get(url.skinSkin_tags, parms);
154 154
   }
155 155
 
156 156
   // 新增项目订单
157
-  static schemeSave (parms) {
157
+  static schemeSave(parms) {
158 158
     return $http.post(url.schemeSave, parms);
159 159
   }
160 160
 
161 161
   // 用户预约记录
162
-  static reservedRecords (params) {
162
+  static reservedRecords(params) {
163 163
     return $http.get(url.reservedRecords, params)
164 164
   }
165 165
 
166 166
   // 清除未读消息  0清除所有 1清除预约成功 2清除取消
167
-  static clearMessage (type) {
167
+  static clearMessage(type) {
168 168
     return $http.get(url.clearMessage, type)
169 169
   }
170 170
 
171 171
   // 根据Id清除未读消息  消息记录id
172
-  static clearMessageById (id) {
172
+  static clearMessageById(id) {
173 173
     return $http.get(url.clearMessageById, id)
174 174
   }
175 175
 
176 176
   // 获取消息列表 (成功/失败)  1预约成功 2取消预约
177
-  static getMessageByType ({ type, page, limit }) {
177
+  static getMessageByType({ type, page, limit }) {
178 178
     return $http.get(url.getMessageByType, { type, page, limit })
179 179
   }
180 180
 
181 181
   // 获取消息列表
182
-  static getMessageList ({ page, limit }) {
182
+  static getMessageList({ page, limit }) {
183 183
     return $http.get(url.getMessageList, { page, limit })
184 184
   }
185 185
 
186 186
   // 获取是否有未读消息
187
-  static hasUnreadMessage () {
187
+  static hasUnreadMessage() {
188 188
     return $http.get(url.hasUnreadMessage)
189 189
   }
190 190
 
191 191
   // 更新用户信息
192
-  static updateUserProfile (params) {
192
+  static updateUserProfile(params) {
193 193
     return $http.post(url.updateUserProfile, params)
194 194
   }
195 195
 
196 196
   // 获取用户卡券订单
197
-  static getCardOrders (params) {
197
+  static getCardOrders(params) {
198 198
     return $http.get(url.getCardOrders, params)
199 199
   }
200 200
   // 获取用户次卡列表
201
-  static getCardList (params) {
201
+  static getCardList(params) {
202 202
     return $http.get(url.getCardList, params)
203 203
   }
204 204
   // 次卡订单详情
205
-  static cardInfo (params) {
205
+  static cardInfo(params) {
206 206
     return $http.get(url.cardInfo, params)
207 207
   }
208 208
   // 次卡消耗详情
209
-  static cardLog (params) {
209
+  static cardLog(params) {
210 210
     return $http.get(url.cardLog, params)
211 211
   }
212 212
   // 修改次数
213
-  static cardUpdate (params) {
213
+  static cardUpdate(params) {
214 214
     return $http.post(url.cardUpdate, params)
215 215
   }
216 216
   // 获取项目可用的次卡
217
-  static getOrderCard (params) {
217
+  static getOrderCard(params) {
218 218
     return $http.get(url.getOrderCard, params)
219 219
   }
220 220
   // 获取项目可用的次卡
221
-  static getUserDetail (params) {
221
+  static getUserDetail(params) {
222 222
     return $http.post(url.getUserDetail, params)
223 223
   }
224 224
   // 客户管理编辑用户标签
225
-  static editSign (params) {
225
+  static editSign(params) {
226 226
     return $http.post(url.editSign, params)
227 227
   }
228 228
   // 余额变更记录
229
-  static getBalanceRecord (params) {
229
+  static getBalanceRecord(params) {
230 230
     return $http.post(url.getBalanceRecord, params)
231 231
   }
232 232
   // 获取付费用户列表
233
-  static getUserPayList (params) {
233
+  static getUserPayList(params) {
234 234
     return $http.get(url.getUserPayList, params)
235 235
   }
236 236
   // 获取付费用户列表
237
-  static searchOrderUser (params) {
237
+  static searchOrderUser(params) {
238 238
     return $http.post(url.searchOrderUser, params)
239 239
   }
240 240
   // 创建订单
241
-  static createUserOrder (params) {
241
+  static createUserOrder(params) {
242 242
     return $http.post(url.createUserOrder, params)
243 243
   }
244 244
   // 获取预约人数统计
245
-  static OrderSum (params) {
245
+  static OrderSum(params) {
246 246
     return $http.post(url.OrderSum, params)
247 247
   }
248 248
   // 删除预约订单
249
-  static delOrder (params) {
249
+  static delOrder(params) {
250 250
     return $http.get(url.delOrder, params)
251 251
   }
252 252
   // 用户预约详情
253
-  static userOrderDetail (params) {
253
+  static userOrderDetail(params) {
254 254
     return $http.get(url.userOrderDetail, params)
255 255
   }
256 256
   // 修改次卡时间
257
-  static amendCardTime (params) {
257
+  static amendCardTime(params) {
258 258
     return $http.post(url.amendCardTime, params)
259 259
   }
260
+  // 店员查看排班
261
+  static getScheduling(params) {
262
+    return $http.get(url.getScheduling, params)
263
+  }
264
+  // 设置排班
265
+  static selectScheduling(params) {
266
+    return $http.post(url.selectScheduling, params)
267
+  }
268
+  // 员工列表
269
+  static getStaffList() {
270
+    return $http.get(url.getStaffList)
271
+  }
272
+  // 所有人排班列表
273
+  static getWorkList(params) {
274
+    return $http.post(url.getWorkList, params)
275
+  }
276
+  // 店长分配订单
277
+  static orderAllocation(params) {
278
+    return $http.post(url.orderAllocation, params)
279
+  }
280
+  // 次卡订单列表
281
+  static getCardOrderList(params) {
282
+    return $http.get(url.getCardOrderList, params)
283
+  }
284
+  // 充值订单列表
285
+  static getRechargeOrderList(params) {
286
+    return $http.get(url.getRechargeOrderList, params)
287
+  }
288
+  // 美妆订单列表
289
+  static getGoodsOrderList(params) {
290
+    return $http.get(url.getGoodsOrderList, params)
291
+  }
260 292
 }

+ 42 - 18
src/server/urls.js

@@ -48,17 +48,17 @@ export default {
48 48
   //新增项目
49 49
   addUpdate: '/v2/pad/scheme/update',
50 50
   //次卡订单详情
51
-  cardInfo:'/v2/pad/card/info',
51
+  cardInfo: '/v2/pad/card/info',
52 52
   //消耗详情
53
-  cardLog:'/v2/pad/card/log',
53
+  cardLog: '/v2/pad/card/log',
54 54
   //修改次数
55
-  cardUpdate:'/v2/pad/card/update',
55
+  cardUpdate: '/v2/pad/card/update',
56 56
   //获取项目可用的次卡
57
-  getOrderCard:'/v2/pad/order/card',
57
+  getOrderCard: '/v2/pad/order/card',
58 58
   //获取可更换的设备
59
-  getDevice_list:'/v2/pad/order/device_list',
59
+  getDevice_list: '/v2/pad/order/device_list',
60 60
   //更改设备
61
-  device_change:'/v2/pad/order/device_change',
61
+  device_change: '/v2/pad/order/device_change',
62 62
 
63 63
   /**
64 64
    *  by ListKer
@@ -131,35 +131,59 @@ export default {
131 131
   getCardOrders: '/v2/pad/user/card',
132 132
 
133 133
   //获取用户次卡列表
134
-  getCardList:'/v2/pad/user/card_list',
135
-  
134
+  getCardList: '/v2/pad/user/card_list',
135
+
136 136
   // 获取客户管理详情
137
-  getUserDetail:'/v2/pad/detail/user_detail',
137
+  getUserDetail: '/v2/pad/detail/user_detail',
138 138
 
139 139
   // 客户管理编辑用户标签
140
-  editSign:'/v2/pad/detail/sign',
140
+  editSign: '/v2/pad/detail/sign',
141 141
 
142 142
   // 余额变更记录
143
-  getBalanceRecord:'/v2/pad/detail/balance',
143
+  getBalanceRecord: '/v2/pad/detail/balance',
144 144
 
145 145
   // 获取付费用户列表
146
-  getUserPayList:'/v2/pad/user/pay_list',
146
+  getUserPayList: '/v2/pad/user/pay_list',
147 147
 
148 148
   // 查询预约用户
149
-  searchOrderUser:'/v2/pad/reserved/user',
149
+  searchOrderUser: '/v2/pad/reserved/user',
150 150
 
151 151
   // 创建预约
152
-  createUserOrder:'/v2/pad/reserved/created',
152
+  createUserOrder: '/v2/pad/reserved/created',
153 153
 
154 154
   // 预约人数统计
155
-  OrderSum:'/v2/pad/reserved/count',
155
+  OrderSum: '/v2/pad/reserved/count',
156 156
 
157 157
   // 预约人数统计
158
-  delOrder:'/v2/pad/reserved/del',
158
+  delOrder: '/v2/pad/reserved/del',
159 159
 
160 160
   //用户预约详情
161
-  userOrderDetail:'/v2/pad/reserved/info',
161
+  userOrderDetail: '/v2/pad/reserved/info',
162 162
 
163 163
   // 修改次卡时间
164
-  amendCardTime:'/v2/pad/card/delay'
164
+  amendCardTime: '/v2/pad/card/delay',
165
+
166
+  // 店员查看排班
167
+  getScheduling: '/v2/pad/classes/scheduling',
168
+
169
+  // 设置排班
170
+  selectScheduling: '/v2/pad/classes/add',
171
+
172
+  // 店铺员工列表
173
+  getStaffList: '/v2/pad/classes/salesclerk',
174
+
175
+  // 所有人排班列表
176
+  getWorkList: '/v2/pad/classes/work_list',
177
+
178
+  // 店长分配订单
179
+  orderAllocation: '/v2/pad/classes/assigning',
180
+
181
+  //次卡订单列表
182
+  getCardOrderList: '/v2/pad/list/card',
183
+
184
+  //充值订单列表
185
+  getRechargeOrderList: '/v2/pad/list/recharge',
186
+
187
+  //美妆产品订单列表
188
+  getGoodsOrderList: '/v2/pad/list/goods',
165 189
 }

+ 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
   /**