Преглед на файлове

首页改版扫码核销美妆订单&&订单分配美容师多选

yuhao преди 2 години
родител
ревизия
9ec347d86a

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

@@ -17,6 +17,7 @@
17 17
         </div>
18 18
         <div>
19 19
           <div class="left" v-if="menuIndex == 0 && $route.path === '/home'">
20
+          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/%E5%AE%9A%E4%BD%8D%402x%20%281%29.png" alt="">
20 21
             <div class="address">{{ userInfo.store_name }}</div>
21 22
           </div>
22 23
         </div>
@@ -294,7 +295,7 @@ import api from "@/server/home";
294 295
 export default {
295 296
   data() {
296 297
     return {
297
-      isback:false,
298
+      isback: false,
298 299
       isFold: false, //导航菜单面板是否折叠
299 300
       userId: 0,
300 301
       menuIndex: 0,
@@ -384,10 +385,14 @@ export default {
384 385
       await this.queryHasUnreadMessage();
385 386
     }, 20000);
386 387
   },
387
-  mounted () {
388
-      if(this.$route.path=='/payUser/details'||this.$route.path=='/testSkin/details'||this.$route.path=='/customerMan/details'){
389
-        this.isback=true
390
-      }
388
+  mounted() {
389
+    if (
390
+      this.$route.path == "/payUser/details" ||
391
+      this.$route.path == "/testSkin/details" ||
392
+      this.$route.path == "/customerMan/details"
393
+    ) {
394
+      this.isback = true;
395
+    }
391 396
   },
392 397
   beforeDestroy() {
393 398
     // 关闭WebSocket连接并清除定时器
@@ -774,6 +779,12 @@ export default {
774 779
       font-weight: 400;
775 780
       color: #333333;
776 781
       line-height: 21px;
782
+      display: flex;
783
+      align-items: center;
784
+    }
785
+    img {
786
+      width: 24px;
787
+      height: 24px;
777 788
     }
778 789
     .center {
779 790
       color: #000000;

+ 228 - 34
src/pages/cardOrder/index.vue

@@ -25,7 +25,7 @@
25 25
         style="width: 100%; border-radius: 8px"
26 26
         @row-click="handleSelectionChange"
27 27
       >
28
-        <el-table-column label="头像" width="120">
28
+        <el-table-column label="头像" width="60">
29 29
           <template slot-scope="scope">
30 30
             <div @click.stop="goUserDetail(scope.row)" class="head-img">
31 31
               <img :src="scope.row.avatar_url" alt />
@@ -87,36 +87,28 @@
87 87
           </template>
88 88
         </el-table-column>
89 89
         <el-table-column
90
-          width="80"
91
-          prop="realname"
90
+          width="100"
91
+          prop="cosmeticianName"
92 92
           label="美容师"
93 93
           show-overflow-tooltip
94 94
         ></el-table-column>
95 95
         <el-table-column
96 96
           class="amendTop"
97
-          width="140"
97
+          width="80"
98 98
           prop=""
99 99
           label="分配"
100 100
           show-overflow-tooltip
101 101
           v-if="level == 10"
102 102
         >
103 103
           <template slot-scope="scope">
104
-            <el-dropdown
105
-              @command="(command) => selectType(command, scope.$index)"
106
-              trigger="click"
104
+            <el-button
105
+              @click.stop="selectType(scope.row)"
106
+              type="primary"
107
+              class="amend"
108
+              size="mini"
107 109
             >
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>
110
+              分配
111
+            </el-button>
120 112
           </template>
121 113
         </el-table-column>
122 114
       </el-table>
@@ -132,14 +124,57 @@
132 124
         ></el-pagination>
133 125
       </div>
134 126
     </div>
127
+    <minePupop :show="selectPup">
128
+      <div class="selectBox">
129
+        <div class="image">
130
+          <img
131
+            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
132
+            alt
133
+            @click="closeSelect"
134
+          />
135
+        </div>
136
+        <div class="selectTitle">分配美容师</div>
137
+        <div class="selectFinish">
138
+          <div class="selecrFinishTop">分配给:</div>
139
+          <div class="selecrFinishBottom">
140
+            <div
141
+              class="item"
142
+              v-for="(item, index) in selectNameList"
143
+              :key="index"
144
+              @click="delectCosmetician(item)"
145
+            >
146
+              {{ item.realname }}
147
+              <img
148
+                src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
149
+                alt=""
150
+              />
151
+            </div>
152
+          </div>
153
+        </div>
154
+        <div class="selectList">
155
+          <div class="selecrListTop">可选择:</div>
156
+          <div class="selecrListBottom">
157
+            <div
158
+              class="item"
159
+              @click="selectCosmetician(item)"
160
+              v-for="(item, index) in nameList"
161
+              :key="index"
162
+            >
163
+              {{ item.realname }}
164
+            </div>
165
+          </div>
166
+        </div>
167
+        <div class="selectBox-btn" @click="confirmSelect">确认</div>
168
+      </div>
169
+    </minePupop>
135 170
   </div>
136 171
 </template>
137 172
 
138 173
 <script>
139 174
 import api from "../../server/home";
140
-
175
+import minePupop from "../../components/minePupop/index.vue";
141 176
 export default {
142
-  components: {},
177
+  components: { minePupop },
143 178
   data() {
144 179
     return {
145 180
       searchText: "",
@@ -180,7 +215,12 @@ export default {
180 215
       ],
181 216
       currentPage1: 1,
182 217
       multipleSelection: "",
183
-      nameList: "", //员工列表
218
+      nameListAll: [],
219
+      nameList: [], //员工列表
220
+      selectNameList: [], //已选员工列表
221
+      level: "", //店员等级
222
+      selectPup: false, //分配弹窗
223
+      order_id: "", //订单ID
184 224
     };
185 225
   },
186 226
   computed: {},
@@ -196,25 +236,63 @@ export default {
196 236
         },
197 237
       });
198 238
     },
199
-    // 分配美容师
200
-    selectType(type, index) {
201
-      // 给表单添加美容师
202
-      this.$set(this.tableData[index], ["realname"], type);
203
-      let user_id = "";
204
-      this.nameList.map((item) => {
205
-        if (item.realname == type) {
206
-          user_id = item.id;
239
+    // 关闭分配弹窗
240
+    closeSelect() {
241
+      this.selectPup = false;
242
+    },
243
+    // 选择美容师
244
+    selectCosmetician(e) {
245
+      this.selectNameList.push(e);
246
+      this.nameList.forEach((item, index) => {
247
+        if (item.id == e.id) {
248
+          console.log(index);
249
+          this.nameList.splice(index, 1);
250
+        }
251
+      });
252
+    },
253
+    // 删除美容师
254
+    delectCosmetician(e) {
255
+      this.nameList.push(e);
256
+      this.selectNameList.forEach((item, index) => {
257
+        if (item.id == e.id) {
258
+          this.selectNameList.splice(index, 1);
207 259
         }
208 260
       });
209
-      let order_id = this.tableData[index].id;
261
+    },
262
+    // 打开分配弹窗
263
+    selectType(e) {
264
+      this.selectPup = true;
265
+      this.order_id = e.id;
266
+      this.nameList = JSON.parse(JSON.stringify(this.nameListAll)); //重置数据
267
+      this.selectNameList = []; //重置数据
268
+      // 筛选出已分配的美容师
269
+      if (e.assign) {
270
+        e.assign.forEach((item, index) => {
271
+          this.nameList.forEach((item1, index1) => {
272
+            if (item.id == item1.id) {
273
+              this.selectNameList.push(item);
274
+              this.nameList.splice(index1, 1);
275
+            }
276
+          });
277
+        });
278
+      }
279
+    },
280
+    // 分配美容师
281
+    confirmSelect() {
282
+      let user_id = [];
283
+      this.selectNameList.forEach((item) => {
284
+        user_id.push(item.id);
285
+      });
210 286
       let params = {
211
-        user_id,
212
-        type: 2, //1项目 2次卡 3美妆产品 4充值
213
-        order_id,
287
+        user_id: user_id.toString(),
288
+        type: 1, //1项目 2次卡 3美妆产品 4充值
289
+        order_id: this.order_id,
214 290
       };
215 291
       // 店长分配
216 292
       api.orderAllocation(params).then((res) => {
217 293
         if (res.code == 200) {
294
+          this.selectPup = false;
295
+          this.getOrderList();
218 296
         }
219 297
       });
220 298
     },
@@ -239,6 +317,20 @@ export default {
239 317
           res.data.list.map((item) => {
240 318
             item.mobile =
241 319
               item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
320
+            // 整理已选的美容师
321
+            if (item.assign) {
322
+              let nameList = [];
323
+              let cosmeticianName = [];
324
+              item.assign.forEach((item1) => {
325
+                let list = {};
326
+                list.realname = item1.realname;
327
+                list.id = item1.suser_id;
328
+                nameList.push(list);
329
+                cosmeticianName.push(item1.realname);
330
+              });
331
+              item.assign = nameList;
332
+              item.cosmeticianName = cosmeticianName.toString();
333
+            }
242 334
           });
243 335
           this.tableData = res.data.list;
244 336
           this.total = res.data.total;
@@ -265,6 +357,7 @@ export default {
265 357
       api.getStaffList().then((res) => {
266 358
         if (res.code == 200) {
267 359
           this.nameList = res.data;
360
+          this.nameListAll = JSON.parse(JSON.stringify(res.data));
268 361
         }
269 362
       });
270 363
     },
@@ -349,6 +442,107 @@ export default {
349 442
       text-align: center;
350 443
     }
351 444
   }
445
+  // 分配弹窗
446
+  .selectBox {
447
+    width: 540px;
448
+    height: 400px;
449
+    background: #ffffff;
450
+    border-radius: 8px;
451
+    padding-left: 40px;
452
+    position: relative;
453
+    .image {
454
+      height: 30px;
455
+      width: 100%;
456
+      display: flex;
457
+      justify-content: flex-end;
458
+      margin-top: 5px;
459
+      margin-right: 5px;
460
+      img {
461
+        width: 30px;
462
+      }
463
+    }
464
+    .selectTitle {
465
+      font-size: 14px;
466
+      color: #333;
467
+      text-align: center;
468
+      margin-top: 5px;
469
+    }
470
+    .selectFinish {
471
+      margin-top: 20px;
472
+      .selecrFinishTop {
473
+        font-size: 14px;
474
+        color: #333;
475
+      }
476
+      .selecrFinishBottom {
477
+        height: auto;
478
+        width: 100%;
479
+        display: flex;
480
+        flex-wrap: wrap;
481
+        .item {
482
+          height: 40px;
483
+          padding: 0px 16px;
484
+          background: #f9f9f9;
485
+          border-radius: 3px;
486
+          margin-right: 10px;
487
+          text-align: center;
488
+          line-height: 40px;
489
+          flex-shrink: 0;
490
+          box-sizing: border-box;
491
+          margin-top: 20px;
492
+          position: relative;
493
+          img {
494
+            width: 14px;
495
+            height: 14px;
496
+            position: absolute;
497
+            top: 0;
498
+            right: 0;
499
+          }
500
+        }
501
+        .item:first-child {
502
+          margin-left: 0;
503
+        }
504
+      }
505
+    }
506
+    .selectList {
507
+      margin-top: 20px;
508
+      .selecrListTop {
509
+        font-size: 14px;
510
+        color: #333;
511
+      }
512
+      .selecrListBottom {
513
+        height: auto;
514
+        width: 100%;
515
+        display: flex;
516
+        flex-wrap: wrap;
517
+        .item {
518
+          height: 40px;
519
+          padding: 0px 16px;
520
+          background: #f9f9f9;
521
+          border-radius: 3px;
522
+          margin-right: 10px;
523
+          text-align: center;
524
+          line-height: 40px;
525
+          flex-shrink: 0;
526
+          box-sizing: border-box;
527
+          margin-top: 20px;
528
+        }
529
+      }
530
+    }
531
+    .selectBox-btn {
532
+      width: 176px;
533
+      height: 28px;
534
+      background: #fa7d22;
535
+      border-radius: 14px;
536
+      color: #fff;
537
+      line-height: 28px;
538
+      font-size: 14px;
539
+      text-align: center;
540
+      position: absolute;
541
+      bottom: 40px;
542
+      left: 50%;
543
+      transform: translateX(-50%);
544
+    }
545
+  }
352 546
   .color0 {
353 547
     color: #fc3019;
354 548
   }

+ 230 - 36
src/pages/historicalOrder/index.vue

@@ -34,7 +34,7 @@
34 34
         style="width: 100%; border-radius: 8px"
35 35
         @row-click="handleSelectionChange"
36 36
       >
37
-        <el-table-column label="头像" width="120">
37
+        <el-table-column label="头像" width="60">
38 38
           <template slot-scope="scope">
39 39
             <div @click.stop="goUserDetail(scope.row)" class="head-img">
40 40
               <img :src="scope.row.avatar_url" alt />
@@ -44,7 +44,7 @@
44 44
         <el-table-column
45 45
           prop="user_id"
46 46
           label="用户ID"
47
-          width="80"
47
+          width="70"
48 48
         ></el-table-column>
49 49
         <el-table-column
50 50
           prop="real_name"
@@ -89,36 +89,29 @@
89 89
           </template>
90 90
         </el-table-column>
91 91
         <el-table-column
92
-          width="80"
93
-          prop="realname"
92
+          width="100"
93
+          prop="cosmeticianName"
94 94
           label="美容师"
95 95
           show-overflow-tooltip
96
-        ></el-table-column>
96
+        >
97
+        </el-table-column>
97 98
         <el-table-column
98 99
           class="amendTop"
99
-          width="140"
100
+          width="80"
100 101
           prop=""
101 102
           label="分配"
102 103
           show-overflow-tooltip
103 104
           v-if="level == 10"
104 105
         >
105 106
           <template slot-scope="scope">
106
-            <el-dropdown
107
-              @command="(command) => selectType(command, scope.$index)"
108
-              trigger="click"
107
+            <el-button
108
+              @click.stop="selectType(scope.row)"
109
+              type="primary"
110
+              class="amend"
111
+              size="mini"
109 112
             >
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>
113
+              分配
114
+            </el-button>
122 115
           </template>
123 116
         </el-table-column>
124 117
       </el-table>
@@ -134,14 +127,57 @@
134 127
         ></el-pagination>
135 128
       </div>
136 129
     </div>
130
+    <minePupop :show="selectPup">
131
+      <div class="selectBox">
132
+        <div class="image">
133
+          <img
134
+            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
135
+            alt
136
+            @click="closeSelect"
137
+          />
138
+        </div>
139
+        <div class="selectTitle">分配美容师</div>
140
+        <div class="selectFinish">
141
+          <div class="selecrFinishTop">分配给:</div>
142
+          <div class="selecrFinishBottom">
143
+            <div
144
+              class="item"
145
+              v-for="(item, index) in selectNameList"
146
+              :key="index"
147
+              @click="delectCosmetician(item)"
148
+            >
149
+              {{ item.realname }}
150
+              <img
151
+                src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
152
+                alt=""
153
+              />
154
+            </div>
155
+          </div>
156
+        </div>
157
+        <div class="selectList">
158
+          <div class="selecrListTop">可选择:</div>
159
+          <div class="selecrListBottom">
160
+            <div
161
+              class="item"
162
+              @click="selectCosmetician(item)"
163
+              v-for="(item, index) in nameList"
164
+              :key="index"
165
+            >
166
+              {{ item.realname }}
167
+            </div>
168
+          </div>
169
+        </div>
170
+        <div class="selectBox-btn" @click="confirmSelect">确认</div>
171
+      </div>
172
+    </minePupop>
137 173
   </div>
138 174
 </template>
139 175
 
140 176
 <script>
141 177
 import api from "../../server/home";
142
-
178
+import minePupop from "../../components/minePupop/index.vue";
143 179
 export default {
144
-  components: {},
180
+  components: { minePupop },
145 181
   data() {
146 182
     return {
147 183
       searchText: "",
@@ -181,8 +217,12 @@ export default {
181 217
       ],
182 218
       currentPage1: 1,
183 219
       multipleSelection: "",
184
-      nameList: "", //员工列表
185
-      level: "",
220
+      nameListAll:[],
221
+      nameList: [], //员工列表
222
+      selectNameList: [], //已选员工列表
223
+      level: "", //店员等级
224
+      selectPup: false, //分配弹窗
225
+      order_id: "", //订单ID
186 226
     };
187 227
   },
188 228
   computed: {},
@@ -199,25 +239,63 @@ export default {
199 239
         },
200 240
       });
201 241
     },
202
-    // 分配美容师
203
-    selectType(type, index) {
204
-      // 给表单添加美容师
205
-      this.$set(this.tableData[index], ["realname"], type);
206
-      let user_id = "";
207
-      this.nameList.map((item) => {
208
-        if (item.realname == type) {
209
-          user_id = item.id;
242
+    // 关闭分配弹窗
243
+    closeSelect() {
244
+      this.selectPup = false;
245
+    },
246
+    // 选择美容师
247
+    selectCosmetician(e) {
248
+      this.selectNameList.push(e);
249
+      this.nameList.forEach((item, index) => {
250
+        if (item.id == e.id) {
251
+          console.log(index);
252
+          this.nameList.splice(index, 1);
253
+        }
254
+      });
255
+    },
256
+    // 删除美容师
257
+    delectCosmetician(e) {
258
+      this.nameList.push(e);
259
+      this.selectNameList.forEach((item, index) => {
260
+        if (item.id == e.id) {
261
+          this.selectNameList.splice(index, 1);
210 262
         }
211 263
       });
212
-      let order_id = this.tableData[index].id;
264
+    },
265
+    // 打开分配弹窗
266
+    selectType(e) {
267
+      this.selectPup = true;
268
+      this.order_id = e.id;
269
+      this.nameList = JSON.parse(JSON.stringify(this.nameListAll)) //重置数据
270
+      this.selectNameList = []; //重置数据
271
+      // 筛选出已分配的美容师
272
+      if (e.assign) {
273
+        e.assign.forEach((item, index) => {
274
+          this.nameList.forEach((item1, index1) => {
275
+            if (item.id == item1.id) {
276
+              this.selectNameList.push(item);
277
+              this.nameList.splice(index1, 1);
278
+            }
279
+          });
280
+        });
281
+      }
282
+    },
283
+    // 分配美容师
284
+    confirmSelect() {
285
+      let user_id = [];
286
+      this.selectNameList.forEach((item) => {
287
+        user_id.push(item.id);
288
+      });
213 289
       let params = {
214
-        user_id,
290
+        user_id: user_id.toString(),
215 291
         type: 1, //1项目 2次卡 3美妆产品 4充值
216
-        order_id,
292
+        order_id: this.order_id,
217 293
       };
218 294
       // 店长分配
219 295
       api.orderAllocation(params).then((res) => {
220 296
         if (res.code == 200) {
297
+          this.selectPup = false;
298
+          this.getOrderList();
221 299
         }
222 300
       });
223 301
     },
@@ -244,6 +322,20 @@ export default {
244 322
           res.data.list.map((item) => {
245 323
             item.mobile =
246 324
               item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
325
+            // 整理已选的美容师
326
+            if (item.assign) {
327
+              let nameList = [];
328
+              let cosmeticianName = [];
329
+              item.assign.forEach((item1) => {
330
+                let list = {};
331
+                list.realname = item1.realname;
332
+                list.id = item1.suser_id;
333
+                nameList.push(list);
334
+                cosmeticianName.push(item1.realname);
335
+              });
336
+              item.assign = nameList;
337
+              item.cosmeticianName = cosmeticianName.toString();
338
+            }
247 339
           });
248 340
           this.tableData = res.data.list;
249 341
           this.total = res.data.total;
@@ -270,6 +362,7 @@ export default {
270 362
       api.getStaffList().then((res) => {
271 363
         if (res.code == 200) {
272 364
           this.nameList = res.data;
365
+          this.nameListAll = JSON.parse(JSON.stringify(res.data))
273 366
         }
274 367
       });
275 368
     },
@@ -354,6 +447,107 @@ export default {
354 447
       text-align: center;
355 448
     }
356 449
   }
450
+  // 分配弹窗
451
+  .selectBox {
452
+    width: 540px;
453
+    height: 400px;
454
+    background: #ffffff;
455
+    border-radius: 8px;
456
+    padding-left: 40px;
457
+    position: relative;
458
+    .image {
459
+      height: 30px;
460
+      width: 100%;
461
+      display: flex;
462
+      justify-content: flex-end;
463
+      margin-top: 5px;
464
+      margin-right: 5px;
465
+      img {
466
+        width: 30px;
467
+      }
468
+    }
469
+    .selectTitle {
470
+      font-size: 14px;
471
+      color: #333;
472
+      text-align: center;
473
+      margin-top: 5px;
474
+    }
475
+    .selectFinish {
476
+      margin-top: 20px;
477
+      .selecrFinishTop {
478
+        font-size: 14px;
479
+        color: #333;
480
+      }
481
+      .selecrFinishBottom {
482
+        height: auto;
483
+        width: 100%;
484
+        display: flex;
485
+        flex-wrap: wrap;
486
+        .item {
487
+          height: 40px;
488
+          padding: 0px 16px;
489
+          background: #f9f9f9;
490
+          border-radius: 3px;
491
+          margin-right: 10px;
492
+          text-align: center;
493
+          line-height: 40px;
494
+          flex-shrink: 0;
495
+          box-sizing: border-box;
496
+          margin-top: 20px;
497
+          position: relative;
498
+          img {
499
+            width: 14px;
500
+            height: 14px;
501
+            position: absolute;
502
+            top: 0;
503
+            right: 0;
504
+          }
505
+        }
506
+        .item:first-child {
507
+          margin-left: 0;
508
+        }
509
+      }
510
+    }
511
+    .selectList {
512
+      margin-top: 20px;
513
+      .selecrListTop {
514
+        font-size: 14px;
515
+        color: #333;
516
+      }
517
+      .selecrListBottom {
518
+        height: auto;
519
+        width: 100%;
520
+        display: flex;
521
+        flex-wrap: wrap;
522
+        .item {
523
+          height: 40px;
524
+          padding: 0px 16px;
525
+          background: #f9f9f9;
526
+          border-radius: 3px;
527
+          margin-right: 10px;
528
+          text-align: center;
529
+          line-height: 40px;
530
+          flex-shrink: 0;
531
+          box-sizing: border-box;
532
+          margin-top: 20px;
533
+        }
534
+      }
535
+    }
536
+    .selectBox-btn {
537
+      width: 176px;
538
+      height: 28px;
539
+      background: #fa7d22;
540
+      border-radius: 14px;
541
+      color: #fff;
542
+      line-height: 28px;
543
+      font-size: 14px;
544
+      text-align: center;
545
+      position: absolute;
546
+      bottom: 40px;
547
+      left: 50%;
548
+      transform: translateX(-50%);
549
+    }
550
+  }
357 551
   .color0 {
358 552
     color: #3ef3ed;
359 553
   }

+ 673 - 137
src/pages/home/index.vue

@@ -1,53 +1,167 @@
1 1
 <template>
2 2
   <div class="home">
3
-    <div class="tab">
4
-      <div class="make-order"
5
-           v-for="item,index in tabList"
6
-           @click="changeTable(item.type)"
7
-           :key="index">
8
-        <div class="make-icon">
9
-          <img :src="item.image">
3
+    <!-- 扫描二维码 -->
4
+    <div class="closeQR" v-if="openQR">
5
+      <img
6
+        @click="closeQR"
7
+        src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/back.png"
8
+        alt=""
9
+      />
10
+    </div>
11
+    <div id="bcid"></div>
12
+    <!-- 扫描二维码确认 -->
13
+    <minePupop :show="isGoodsPanel">
14
+      <div class="cancelGoodsPanel">
15
+        <div class="image">
16
+          <img
17
+            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
18
+            alt
19
+            @click="closeAmend"
20
+          />
21
+        </div>
22
+        <div class="goodsTitle">美妆产品核销</div>
23
+        <div class="goodsPanelContent">
24
+          <div class="goodsDetail">
25
+            <div class="goodsDetail-left">商品名称</div>
26
+            <div class="goodsDetail-right">
27
+              <div
28
+                class="goodsDetail-item"
29
+                v-for="(item, index) in goodsList.goods"
30
+                :key="index"
31
+              >
32
+                <img class="img" :src="item.cover_url" alt="" />
33
+                <div class="goodsDetail-title">
34
+                  <div class="goodsTitle">
35
+                    {{ item.goods_name }}
36
+                  </div>
37
+                  <div class="goodsNum">X{{ item.num }}</div>
38
+                </div>
39
+              </div>
40
+            </div>
41
+          </div>
42
+          <div class="buyTime">
43
+            <div class="buyTime-title">购买时间</div>
44
+            <div class="time">{{ goodsList.pay_time }}</div>
45
+          </div>
46
+          <div class="claimGoods">
47
+            <div class="claimGoods-title">取货码</div>
48
+            <div class="claimGoods-number">{{ goodsList.coupon_code }}</div>
49
+          </div>
10 50
         </div>
11
-        <div class="make-tips">
12
-          <div class="make-num">{{ item.num }}</div>
13
-          <div class="make-name">{{ item.name }}</div>
51
+        <div class="goodsPanelBtn" @click="goodsTakeOut">确认</div>
52
+      </div>
53
+    </minePupop>
54
+    <div class="home-top">
55
+      <!-- 客户预约表 -->
56
+      <div class="reservationTable" @click="toDetailList">
57
+        <img
58
+          src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
59
+          alt=""
60
+        />
61
+        <div class="right">
62
+          <div class="top">
63
+            <div class="num">{{ totalSum }}</div>
64
+            <div class="date">({{ date }})</div>
65
+          </div>
66
+          <div class="name">客户预约表</div>
67
+        </div>
68
+      </div>
69
+      <div class="goodsCancel">
70
+        <img
71
+          src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/%E7%BE%8E%E5%A6%86%E4%BA%A7%E5%93%81%E6%A0%B8%E9%94%80%402x.png"
72
+          alt=""
73
+        />
74
+        <div class="right">
75
+          <div class="goodsName">美妆产品核销</div>
76
+          <div class="bottom">
77
+            <input
78
+              placeholder="请输入取货码"
79
+              style="text-indent: 20px"
80
+              type="text"
81
+              v-model="goodsCode"
82
+            />
83
+            <div @click="goodsPickUp" class="goodsCancel-btn">核销</div>
84
+            <img
85
+              src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/%E6%89%AB%E4%B8%80%E6%89%AB%402x.png"
86
+              alt=""
87
+              @click="cancelQR"
88
+            />
89
+          </div>
14 90
         </div>
15 91
       </div>
16 92
     </div>
17 93
     <div class="order-list">
18
-      <div class="title">预约订单列表</div>
19
-      <div class="detail-list"><span @click="toDetailList">客户预约表</span></div>
94
+      <div class="order-list-top">
95
+        <div class="tab">
96
+          <div
97
+            class="tabItem"
98
+            v-for="(item, index) in tabList"
99
+            @click="changeTable(item.type, index)"
100
+            :key="index"
101
+          >
102
+            <p :class="{ tabName: true, activeTab: index == tabIndex }">
103
+              {{ item.name }}
104
+            </p>
105
+          </div>
106
+        </div>
107
+        <div class="search">
108
+          <input
109
+            type="text"
110
+            style="text-indent: 36px"
111
+            placeholder="用户ID、用户手机号、用户昵称、用户真实姓名"
112
+            v-model="orderKeyWord"
113
+          />
114
+          <div @click="searchOrder" class="searchBtn">搜索</div>
115
+          <img
116
+            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/%E6%90%9C%E7%B4%A2%402x.png"
117
+            alt=""
118
+          />
119
+        </div>
120
+      </div>
20 121
       <div class="list-info">
21
-        <van-list v-model="loading"
22
-                  :finished="finished"
23
-                  finished-text="没有更多了"
24
-                  @load=" getToday ">
25
-          <div class="user-info"
26
-               v-for="(item,index) in orderList"
27
-               :key="index"
28
-               @click="toOrderDetails(item)"
29
-               :style="index==orderList.length-1?'border-bottom:0px':''">
122
+        <van-list
123
+          v-model="loading"
124
+          :finished="finished"
125
+          finished-text="没有更多了"
126
+          @load="getToday"
127
+        >
128
+          <div
129
+            class="user-info"
130
+            v-for="(item, index) in orderList"
131
+            :key="index"
132
+            @click="toOrderDetails(item)"
133
+            :style="index == orderList.length - 1 ? 'border-bottom:0px' : ''"
134
+          >
30 135
             <div @click.stop="goUserDetail(item)" class="head-img">
31
-              <div class="new"
32
-                   v-if="item.is_new==1">新</div><img :src="item.avatar_url"
33
-                   alt="">
136
+              <div class="new" v-if="item.is_new == 1">新</div>
137
+              <img :src="item.avatar_url" alt="" />
34 138
             </div>
35 139
             <div class="user-information">
36
-              <div class="name">客户昵称:<span>{{ item.nickname }}</span></div>
37
-              <div class="name">客户ID:<span>{{ item.user_id }}</span></div>
38
-              <div class="name">预约项目时间:<span>{{ item.order_time }}</span></div>
39
-              <div class="name">预约项目数量:<span>{{ item.project_num }}</span></div>
140
+              <div class="name">
141
+                客户昵称:<span>{{ item.nickname }}</span>
142
+              </div>
143
+              <div class="name">
144
+                客户ID:<span>{{ item.user_id }}</span>
145
+              </div>
146
+              <div class="name">
147
+                预约项目时间:<span>{{ item.order_time }}</span>
148
+              </div>
149
+              <div class="name">
150
+                预约项目数量:<span>{{ item.project_num }}</span>
151
+              </div>
40 152
             </div>
41 153
             <ul class="product-list">
42
-              <li class="product-image"
43
-                  v-for="value,i in item.project_list"
44
-                  :key="i"><img :src="value.cover_url"
45
-                     alt=""></li>
154
+              <li
155
+                class="product-image"
156
+                v-for="(value, i) in item.project_list"
157
+                :key="i"
158
+              >
159
+                <img :src="value.cover_url" alt="" />
160
+              </li>
46 161
             </ul>
47 162
             <!-- 状态,0已预约,未支付,1已支付,待使用,2正在使用,3已结算,-1已取消,-2退款审核中,-3已退款 -->
48
-            <div class="status"
49
-                 :class="'color' + item.status">
50
-                            {{
163
+            <div class="status" :class="'color' + item.status">
164
+              {{
51 165
                 item.status == 0
52 166
                   ? "已预约"
53 167
                   : item.status == 1
@@ -75,170 +189,501 @@
75 189
 </template>
76 190
 
77 191
 <script>
78
-import api from '@/server/home'
79
-import vanList from 'vant/lib/list';
80
-import 'vant/lib/list/style';
81
-
192
+import api from "@/server/home";
193
+import vanList from "vant/lib/list";
194
+import minePupop from "../../components/minePupop/index.vue";
195
+import "vant/lib/list/style";
82 196
 export default {
83
-  name: 'home',
84
-  data () {
197
+  data() {
85 198
     return {
86 199
       tabList: [
87 200
         {
88
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
89 201
           num: 0,
90
-          name: '预约订单',
202
+          name: "预约订单",
91 203
           type: 0,
92 204
         },
93 205
         {
94
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
95 206
           num: 0,
96
-          name: '未支付订单',
207
+          name: "未支付订单",
97 208
           type: 2,
98 209
         },
99 210
         {
100
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/cancelOrder.png',
101 211
           num: 0,
102
-          name: '取消订单',
103
-          type: 3
212
+          name: "取消订单",
213
+          type: 3,
104 214
         },
105 215
       ],
106
-      orderList: [
107
-      ],
216
+      tabIndex: 0,
217
+      orderList: [],
108 218
       loading: false,
109 219
       finished: false,
110 220
       page: 1,
111 221
       limit: 10,
112
-      type: 0
113
-
114
-    }
222
+      type: 0,
223
+      date: "", //日期
224
+      totalSum: 0, //今日订单总数量
225
+      scan: null,
226
+      openQR: false, //控制摄像头打开关闭
227
+      isGoodsPanel: false, //控制确认核销打开关闭
228
+      goodsCode: "", //美妆核销码
229
+      goodsList: "", //美妆核销信息
230
+      orderKeyWord:'',//订单搜索关键字
231
+    };
115 232
   },
116
-  components: { vanList },
117
-  mounted: function () {
118
-
233
+  components: {
234
+    vanList,
235
+    minePupop,
119 236
   },
237
+  mounted: function () {},
120 238
   created: function () {
121
-    this.getTotal()
239
+    this.getTotal();
122 240
     // this.getToday()
241
+    this.getDate();
242
+  },
243
+  destroyed() {
244
+    this.cancelScan();
245
+    this.closeQR();
123 246
   },
124 247
   methods: {
248
+    // 美妆产品核销
249
+    goodsPickUp() {
250
+      api.goodsPickUp({ code: this.goodsCode }).then((res) => {
251
+        this.goodsList = res.data;
252
+		this.isGoodsPanel = true;
253
+      });
254
+    },
255
+    // 美妆产品取货
256
+    goodsTakeOut() {
257
+      api.goodsTakeOut({ id: this.goodsList.id }).then((res) => {
258
+        if (res.code == 200) {
259
+          this.$message.success("取货成功");
260
+          this.isGoodsPanel=false
261
+          this.goodsCode = "";
262
+          this.goodsList = "";
263
+        }
264
+      });
265
+    },
266
+    // 关闭核销美妆产品面板
267
+    closeAmend() {
268
+      this.isGoodsPanel = false;
269
+    },
125 270
     // 跳入用户详情
126
-    goUserDetail(e){
271
+    goUserDetail(e) {
127 272
       console.log(e);
128 273
       this.$router.push({
129
-        path:"/customerMan/details",
130
-        query:{
131
-          id:e.user_id
274
+        path: "/customerMan/details",
275
+        query: {
276
+          id: e.user_id,
277
+        },
278
+      });
279
+    },
280
+    // 获取当天日期&&当天预约总数
281
+    getDate() {
282
+      let date = new Date();
283
+      this.date = date.getMonth() + 1 + "月" + date.getDate() + "日";
284
+      let day =
285
+        date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
286
+      api
287
+        .reservedRecords({
288
+          day,
289
+        })
290
+        .then((res) => {
291
+          let total = 0;
292
+          res.data.forEach((item) => {
293
+            total = item.list.length + total;
294
+          });
295
+          this.totalSum = total;
296
+        });
297
+    },
298
+    // 扫码核销订单
299
+    cancelQR() {
300
+      this.startRecognize();
301
+    },
302
+    // 关闭二维码
303
+    closeQR() {
304
+      if (!window.plus) return;
305
+      this.scan.close();
306
+      this.openQR = false;
307
+    },
308
+    // 关闭扫描
309
+    cancelScan() {
310
+      if (!window.plus) return;
311
+      this.scan.cancel();
312
+    },
313
+    // 开始扫描
314
+    startScan() {
315
+      if (!window.plus) return;
316
+      this.scan.start();
317
+    },
318
+    // 创建扫描控件
319
+    startRecognize() {
320
+      if (this.openQR) {
321
+        return;
322
+      }
323
+      this.openQR = true;
324
+      let that = this;
325
+      if (!window.plus) return;
326
+      that.scan = plus.barcode.create("bcid", [plus.barcode.QR], {
327
+        top: "40px",
328
+        left: "0px",
329
+        width: "100%",
330
+        height: "100%",
331
+        position: "static",
332
+      });
333
+      plus.webview.currentWebview().append(that.scan);
334
+      // 开始扫描
335
+      that.scan.start();
336
+      that.scan.onmarked = onmarked;
337
+      function onmarked(type, result, file) {
338
+        switch (type) {
339
+          case plus.barcode.QR:
340
+            type = "QR";
341
+            break;
342
+          case plus.barcode.EAN13:
343
+            type = "EAN13";
344
+            break;
345
+          case plus.barcode.EAN8:
346
+            type = "EAN8";
347
+            break;
348
+          default:
349
+            type = "其它" + type;
350
+            break;
132 351
         }
133
-      })
352
+        result = result.replace(/\n/g, "");
353
+        result = result.replace(/\s+/g, "");
354
+        that.goodsCode = result;
355
+        that.closeQR();
356
+        that.goodsPickUp();
357
+      }
134 358
     },
135
-    getTotal () {
136
-      api.getTotal().then(res => {
359
+    getTotal() {
360
+      api.getTotal().then((res) => {
137 361
         if (res.code == 200) {
138
-          this.tabList[0].num = res.data.order_num
139
-          this.tabList[1].num = res.data.wait_pay_num
140
-          this.tabList[2].num = res.data.cancel_num
362
+          this.tabList[0].num = res.data.order_num;
363
+          this.tabList[1].num = res.data.wait_pay_num;
364
+          this.tabList[2].num = res.data.cancel_num;
141 365
         }
142
-      })
366
+      });
143 367
     },
144
-    changeTable (type) {
145
-      this.type = type
146
-      this.orderList = []
147
-      this.loading = false
148
-      this.finished = false
149
-      this.page = 1
368
+    changeTable(type, index) {
369
+      this.tabIndex = index;
370
+      this.type = type;
371
+      this.orderList = [];
372
+      this.loading = false;
373
+      this.finished = false;
374
+      this.page = 1;
150 375
     },
151
-    getToday () {
376
+    //搜索订单
377
+    searchOrder(){
152 378
       setTimeout(() => {
153
-        api.getToday({ page: this.page, limit: this.limit, type: this.type }).then(res => {
154
-          if (res.code = 200) {
155
-            this.orderList = [...this.orderList, ...res.data.list]
156
-            this.page++
157
-            this.loading = false;
158
-            if (this.orderList.length >= res.data.total) {
159
-              this.finished = true;
379
+        api
380
+          .getToday({
381
+            page: 1,
382
+            limit: 20,
383
+            type: 0,
384
+            keywords:this.orderKeyWord
385
+          })
386
+          .then((res) => {
387
+            if ((res.code = 200)) {
388
+              this.orderList = res.data.list
160 389
             }
161
-          }
162
-        })
390
+          });
163 391
       }, 1000);
164
-
165 392
     },
166
-    toOrderDetails (e) {
393
+    getToday() {
394
+      setTimeout(() => {
395
+        api
396
+          .getToday({
397
+            page: this.page,
398
+            limit: this.limit,
399
+            type: this.type,
400
+          })
401
+          .then((res) => {
402
+            if ((res.code = 200)) {
403
+              this.orderList = [...this.orderList, ...res.data.list];
404
+              this.page++;
405
+              this.loading = false;
406
+              if (this.orderList.length >= res.data.total) {
407
+                this.finished = true;
408
+              }
409
+            }
410
+          });
411
+      }, 1000);
412
+    },
413
+    toOrderDetails(e) {
167 414
       if (e.status == 0) {
168 415
         this.$router.push({
169
-          path: '/confirmOrder/details',
416
+          path: "/confirmOrder/details",
170 417
           query: {
171
-            id: e.id
172
-          }
173
-        })
418
+            id: e.id,
419
+          },
420
+        });
174 421
       } else {
175 422
         this.$router.push({
176 423
           path: "/historicalOrder/details",
177 424
           query: {
178
-            id: e.id
179
-          }
425
+            id: e.id,
426
+          },
180 427
         });
181 428
       }
182 429
     },
183
-    initData () {
184
-
185
-    },
186
-    toDetailList () {
430
+    initData() {},
431
+    toDetailList() {
187 432
       this.$router.push({
188 433
         path: "/home/detailList",
189
-        query: {
190
-        }
434
+        query: {},
191 435
       });
192
-    }
436
+    },
193 437
   },
194 438
   computed: {},
195
-  watch: {}
196
-}
439
+  watch: {},
440
+};
197 441
 </script>
198 442
 <style lang='less' scoped>
199 443
 @import url(../../style/root.less);
200 444
 
201 445
 .home {
202 446
   text-align: center;
203
-
204
-  .tab {
447
+  // 扫描二维码
448
+  .closeQR {
449
+    width: 100%;
450
+    height: 40px;
451
+    background: #000;
452
+    position: absolute;
453
+    left: 0;
454
+    right: 0;
455
+    top: 0;
456
+    z-index: 99;
457
+    img {
458
+      width: 30px;
459
+      height: 30px;
460
+      float: left;
461
+      margin-left: 10px;
462
+    }
463
+  }
464
+  // 扫描二维码确认
465
+  .cancelGoodsPanel {
466
+    width: 540px;
467
+    height: 400px;
468
+    background: #ffffff;
469
+    border-radius: 8px;
470
+    .image {
471
+      height: 30px;
472
+      width: 100%;
473
+      display: flex;
474
+      justify-content: flex-end;
475
+      margin-top: 5px;
476
+      margin-right: 5px;
477
+      img {
478
+        width: 30px;
479
+      }
480
+    }
481
+    .goodsTitle {
482
+      font-size: 14px;
483
+      font-weight: 500;
484
+      color: #333333;
485
+    }
486
+    .goodsPanelContent {
487
+      height: 224px;
488
+      width: 480px;
489
+      margin-top: 20px;
490
+      margin-left: 30px;
491
+      .goodsDetail {
492
+        display: flex;
493
+        .goodsDetail-left {
494
+          font-size: 14px;
495
+          font-weight: 500;
496
+          color: #333333;
497
+          margin-right: 23px;
498
+        }
499
+        .goodsDetail-right {
500
+          height: 164px;
501
+          overflow-y: auto;
502
+          .goodsDetail-item {
503
+            display: flex;
504
+            margin-top: 10px;
505
+            .img {
506
+              width: 48px;
507
+              height: 48px;
508
+              border-radius: 4px;
509
+              margin-right: 10px;
510
+            }
511
+            .goodsDetail-title {
512
+              text-align: left;
513
+              width: 343px;
514
+              display: flex;
515
+              flex-direction: column;
516
+              justify-content: space-between;
517
+              .goodsTitle {
518
+                width: 343px;
519
+                font-size: 12px;
520
+                color: #333333;
521
+                overflow: hidden;
522
+                text-overflow: ellipsis;
523
+                white-space: nowrap;
524
+              }
525
+              .goodsNum {
526
+                font-size: 12px;
527
+                color: #333333;
528
+                margin-top: 14px;
529
+              }
530
+            }
531
+          }
532
+          .goodsDetail-item:first-child {
533
+            margin-top: 0;
534
+          }
535
+        }
536
+      }
537
+      .buyTime {
538
+        margin-top: 10px;
539
+        text-align: left;
540
+        display: flex;
541
+        .buyTime-title {
542
+          font-size: 14px;
543
+          font-weight: 500;
544
+          color: #333333;
545
+        }
546
+        .time {
547
+          font-size: 14px;
548
+          font-weight: 500;
549
+          color: #333333;
550
+          margin-left: 23px;
551
+        }
552
+      }
553
+      .claimGoods {
554
+        margin-top: 10px;
555
+        text-align: left;
556
+        display: flex;
557
+      }
558
+      .claimGoods-title {
559
+        font-size: 14px;
560
+        font-weight: 500;
561
+        color: #333333;
562
+      }
563
+      .claimGoods-number {
564
+        font-size: 14px;
565
+        font-weight: 500;
566
+        color: #333333;
567
+        margin-left: 37px;
568
+      }
569
+    }
570
+    .goodsPanelBtn {
571
+      width: 176px;
572
+      height: 28px;
573
+      background: #fa7d22;
574
+      border-radius: 14px;
575
+      text-align: center;
576
+      line-height: 28px;
577
+      color: #fff;
578
+      font-size: 14px;
579
+      margin: 0 auto;
580
+      margin-top: 24px;
581
+    }
582
+  }
583
+  .home-top {
205 584
     display: flex;
206 585
     justify-content: space-between;
207 586
     align-items: center;
208
-
209
-    .make-order {
210
-      width: 274px;
211
-      padding: 14px 30px;
587
+    .reservationTable {
588
+      width: 300px;
589
+      height: 96px;
212 590
       background: #ffffff;
213 591
       box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
214 592
       border-radius: 8px;
593
+      padding: 14px 30px;
215 594
       display: flex;
216
-      align-items: center;
217 595
 
218
-      .make-icon {
219
-        img {
220
-          width: 68px;
221
-        }
596
+      img {
597
+        width: 68px;
598
+        height: 68px;
222 599
       }
223 600
 
224
-      .make-tips {
601
+      .right {
225 602
         margin-left: 20px;
603
+        text-align: left !important;
226 604
 
227
-        .make-num {
228
-          font-size: 34px;
229
-          font-family: OPPOSans-B, OPPOSans;
230
-          font-weight: normal;
231
-          color: #333333;
232
-          line-height: 40px;
233
-          text-align: left;
605
+        .top {
606
+          display: flex;
607
+
608
+          .num {
609
+            font-size: 34px;
610
+            font-family: AppleSystemUIFont;
611
+            color: #333333;
612
+          }
613
+
614
+          .date {
615
+            font-size: 14px;
616
+            font-family: PingFangSC-Regular, PingFang SC;
617
+            font-weight: 400;
618
+            color: #333333;
619
+            margin-left: 10px;
620
+            display: flex;
621
+            align-items: flex-end;
622
+          }
234 623
         }
624
+      }
625
+
626
+      .name {
627
+        font-size: 14px;
628
+        font-family: PingFangSC-Regular, PingFang SC;
629
+        font-weight: 400;
630
+        color: #333333;
631
+        margin-top: 11px;
632
+      }
633
+    }
634
+
635
+    .goodsCancel {
636
+      width: 527px;
637
+      height: 96px;
638
+      background: #ffffff;
639
+      box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
640
+      border-radius: 8px;
641
+      padding: 14px 30px;
642
+      display: flex;
643
+
644
+      img {
645
+        width: 68px;
646
+        height: 68px;
647
+      }
235 648
 
236
-        .make-name {
649
+      .right {
650
+        margin-left: 30px;
651
+        text-align: left !important;
652
+
653
+        .goodsName {
237 654
           font-size: 14px;
238
-          font-family: PingFangSC-Regular, PingFang SC;
239
-          font-weight: 400;
240 655
           color: #333333;
241
-          line-height: 20px;
656
+        }
657
+
658
+        .bottom {
659
+          margin-top: 16px;
660
+          display: flex;
661
+          align-items: center;
662
+
663
+          input {
664
+            width: 217px;
665
+            height: 32px;
666
+            background: #ffffff;
667
+            border-radius: 2px;
668
+            border: 1px solid #d9d9d9;
669
+          }
670
+
671
+          .goodsCancel-btn {
672
+            width: 68px;
673
+            height: 32px;
674
+            background: #fa7d22;
675
+            border-radius: 2px;
676
+            margin-left: 30px;
677
+            color: #fff;
678
+            line-height: 32px;
679
+            text-align: center;
680
+          }
681
+
682
+          img {
683
+            width: 34px;
684
+            height: 34px;
685
+            margin-left: 20px;
686
+          }
242 687
         }
243 688
       }
244 689
     }
@@ -250,25 +695,104 @@ export default {
250 695
     background: #ffffff;
251 696
     box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
252 697
     border-radius: 8px;
253
-    padding: 14px 12px;
698
+    overflow: hidden;
254 699
 
255
-    .title {
256
-      font-size: 14px;
257
-      font-family: PingFangSC-Medium, PingFang SC;
258
-      font-weight: 500;
259
-      color: #333333;
260
-      line-height: 20px;
261
-      text-align: left;
262
-      padding-bottom: 5px;
263
-    }
264
-    .detail-list {
265
-      text-align: right;
266
-      color: #FA7D22;
700
+    // padding:0px 12px 14px 12px;
701
+    .order-list-top {
702
+      width: 100%;
703
+      height: 48px;
704
+      display: flex;
705
+
706
+      .tab {
707
+        width: 402px;
708
+        height: 48px;
709
+        background-color: #ffffff;
710
+        display: flex;
711
+        overflow: hidden;
712
+
713
+        .tabItem {
714
+          width: 134px;
715
+          height: 48px;
716
+          background: #ffffff;
717
+          text-align: center;
718
+          line-height: 48px;
719
+          font-size: 20px;
720
+          font-weight: 400;
721
+          color: #333333;
722
+          position: relative;
723
+          display: flex;
724
+          justify-content: center;
725
+        }
726
+
727
+        .tabName {
728
+          position: absolute;
729
+        }
730
+
731
+        .activeTab {
732
+          font-size: 22px;
733
+          font-family: PingFangSC-Semibold, PingFang SC;
734
+          font-weight: 700;
735
+          color: #333333;
736
+        }
737
+
738
+        .activeTab::before {
739
+          content: "";
740
+          position: absolute;
741
+          bottom: 12px;
742
+          left: 0px;
743
+          width: 100%;
744
+          height: 5px;
745
+          background: linear-gradient(
746
+            270deg,
747
+            #fa7d22 0%,
748
+            rgba(253, 180, 70, 0) 100%
749
+          );
750
+          border-radius: 3px;
751
+        }
752
+      }
753
+
754
+      .search {
755
+        flex: 1;
756
+        border-radius: 0px 0px 0px 30px;
757
+        background-color: #f7f8fa;
758
+        display: flex;
759
+        align-items: center;
760
+        position: relative;
761
+
762
+        input {
763
+          margin-left: 20px;
764
+          width: 338px;
765
+          height: 32px;
766
+          background: #ffffff;
767
+          border-radius: 2px;
768
+          border: 1px solid #d9d9d9;
769
+        }
770
+
771
+        .searchBtn {
772
+          width: 68px;
773
+          height: 32px;
774
+          background: #fa7d22;
775
+          border-radius: 2px;
776
+          line-height: 32px;
777
+          text-align: center;
778
+          color: #fff;
779
+          margin-left: 20px;
780
+        }
781
+
782
+        img {
783
+          position: absolute;
784
+          width: 16px;
785
+          height: 16px;
786
+          left: 30px;
787
+          top: 17px;
788
+        }
789
+      }
267 790
     }
268 791
 
269 792
     .list-info {
270 793
       height: 450px;
271 794
       overflow: auto;
795
+
272 796
       .user-info {
273 797
         padding: 14px 0;
274 798
         border-bottom: 1px solid #e6e6e6;
@@ -278,6 +802,8 @@ export default {
278 802
         .head-img {
279 803
           position: relative;
280 804
           width: 72px;
805
+          margin-left: 12px;
806
+
281 807
           .new {
282 808
             position: absolute;
283 809
             top: -2px;
@@ -329,6 +855,7 @@ export default {
329 855
             display: inline-block;
330 856
             margin-left: 16px;
331 857
             width: 72px;
858
+
332 859
             img {
333 860
               border-radius: 8px;
334 861
               width: 100%;
@@ -336,6 +863,7 @@ export default {
336 863
             }
337 864
           }
338 865
         }
866
+
339 867
         .status {
340 868
           margin-left: 56px;
341 869
           font-size: 16px;
@@ -346,6 +874,7 @@ export default {
346 874
         }
347 875
       }
348 876
     }
877
+
349 878
     .empty {
350 879
       height: 300px;
351 880
       line-height: 300px;
@@ -355,24 +884,31 @@ export default {
355 884
     }
356 885
   }
357 886
 }
887
+
358 888
 .color0 {
359 889
   color: #3ef3ed !important;
360 890
 }
891
+
361 892
 .color1 {
362 893
   color: #61d09d !important;
363 894
 }
895
+
364 896
 .color2 {
365 897
   color: #00eeee !important;
366 898
 }
899
+
367 900
 .color3 {
368 901
   color: #a999ea !important;
369 902
 }
903
+
370 904
 .color-2 {
371 905
   color: #3115cc !important;
372 906
 }
907
+
373 908
 .color-1 {
374 909
   color: #fc3019 !important;
375 910
 }
911
+
376 912
 .color-3 {
377 913
   color: #fc3019 !important;
378 914
 }

+ 0 - 5
src/pages/payUser/myOrder/index.vue

@@ -246,11 +246,6 @@ type: "全额券" -->
246 246
                 show-overflow-tooltip
247 247
               ></el-table-column>
248 248
               <el-table-column
249
-                prop="price"
250
-                label="总价格"
251
-                show-overflow-tooltip
252
-              ></el-table-column>
253
-              <el-table-column
254 249
                 prop="create_time"
255 250
                 label="到期时间"
256 251
                 width="180"

+ 230 - 37
src/pages/productOrder/index.vue

@@ -25,7 +25,7 @@
25 25
         style="width: 100%; border-radius: 8px"
26 26
         @row-click="handleSelectionChange"
27 27
       >
28
-        <el-table-column  label="头像" width="120">
28
+        <el-table-column label="头像" width="60">
29 29
           <template slot-scope="scope">
30 30
             <div @click.stop="goUserDetail(scope.row)" class="head-img">
31 31
               <img :src="scope.row.avatar_url" alt />
@@ -80,36 +80,28 @@
80 80
           </template>
81 81
         </el-table-column>
82 82
         <el-table-column
83
-          width="80"
84
-          prop="realname"
83
+          width="100"
84
+          prop="cosmeticianName"
85 85
           label="美容师"
86 86
           show-overflow-tooltip
87 87
         ></el-table-column>
88 88
         <el-table-column
89 89
           class="amendTop"
90
-          width="140"
90
+          width="80"
91 91
           prop=""
92 92
           label="分配"
93 93
           show-overflow-tooltip
94 94
           v-if="level == 10"
95 95
         >
96 96
           <template slot-scope="scope">
97
-            <el-dropdown
98
-              @command="(command) => selectType(command, scope.$index)"
99
-              trigger="click"
97
+            <el-button
98
+              @click.stop="selectType(scope.row)"
99
+              type="primary"
100
+              class="amend"
101
+              size="mini"
100 102
             >
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>
103
+              分配
104
+            </el-button>
113 105
           </template>
114 106
         </el-table-column>
115 107
       </el-table>
@@ -125,14 +117,57 @@
125 117
         ></el-pagination>
126 118
       </div>
127 119
     </div>
120
+    <minePupop :show="selectPup">
121
+      <div class="selectBox">
122
+        <div class="image">
123
+          <img
124
+            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
125
+            alt
126
+            @click="closeSelect"
127
+          />
128
+        </div>
129
+        <div class="selectTitle">分配美容师</div>
130
+        <div class="selectFinish">
131
+          <div class="selecrFinishTop">分配给:</div>
132
+          <div class="selecrFinishBottom">
133
+            <div
134
+              class="item"
135
+              v-for="(item, index) in selectNameList"
136
+              :key="index"
137
+              @click="delectCosmetician(item)"
138
+            >
139
+              {{ item.realname }}
140
+              <img
141
+                src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
142
+                alt=""
143
+              />
144
+            </div>
145
+          </div>
146
+        </div>
147
+        <div class="selectList">
148
+          <div class="selecrListTop">可选择:</div>
149
+          <div class="selecrListBottom">
150
+            <div
151
+              class="item"
152
+              @click="selectCosmetician(item)"
153
+              v-for="(item, index) in nameList"
154
+              :key="index"
155
+            >
156
+              {{ item.realname }}
157
+            </div>
158
+          </div>
159
+        </div>
160
+        <div class="selectBox-btn" @click="confirmSelect">确认</div>
161
+      </div>
162
+    </minePupop>
128 163
   </div>
129 164
 </template>
130 165
 
131 166
 <script>
132 167
 import api from "../../server/home";
133
-
168
+import minePupop from "../../components/minePupop/index.vue";
134 169
 export default {
135
-  components: {},
170
+  components: { minePupop },
136 171
   data() {
137 172
     return {
138 173
       level: "", //等级权限
@@ -173,14 +208,19 @@ export default {
173 208
       ],
174 209
       currentPage1: 1,
175 210
       multipleSelection: "",
176
-      nameList: "", //员工列表
211
+      nameListAll: [],
212
+      nameList: [], //员工列表
213
+      selectNameList: [], //已选员工列表
214
+      level: "", //店员等级
215
+      selectPup: false, //分配弹窗
216
+      order_id: "", //订单ID
177 217
     };
178 218
   },
179 219
   computed: {},
180 220
   watch: {},
181 221
 
182 222
   methods: {
183
-            // 跳入用户详情
223
+    // 跳入用户详情
184 224
     goUserDetail(e) {
185 225
       console.log(e);
186 226
       this.$router.push({
@@ -190,25 +230,63 @@ export default {
190 230
         },
191 231
       });
192 232
     },
193
-    // 分配美容师
194
-    selectType(type, index) {
195
-      // 给表单添加美容师
196
-      this.$set(this.tableData[index], ["realname"], type);
197
-      let user_id = "";
198
-      this.nameList.map((item) => {
199
-        if (item.realname == type) {
200
-          user_id = item.id;
233
+    // 关闭分配弹窗
234
+    closeSelect() {
235
+      this.selectPup = false;
236
+    },
237
+    // 选择美容师
238
+    selectCosmetician(e) {
239
+      this.selectNameList.push(e);
240
+      this.nameList.forEach((item, index) => {
241
+        if (item.id == e.id) {
242
+          console.log(index);
243
+          this.nameList.splice(index, 1);
244
+        }
245
+      });
246
+    },
247
+    // 删除美容师
248
+    delectCosmetician(e) {
249
+      this.nameList.push(e);
250
+      this.selectNameList.forEach((item, index) => {
251
+        if (item.id == e.id) {
252
+          this.selectNameList.splice(index, 1);
201 253
         }
202 254
       });
203
-      let order_id = this.tableData[index].id;
255
+    },
256
+    // 打开分配弹窗
257
+    selectType(e) {
258
+      this.selectPup = true;
259
+      this.order_id = e.id;
260
+      this.nameList = JSON.parse(JSON.stringify(this.nameListAll)); //重置数据
261
+      this.selectNameList = []; //重置数据
262
+      // 筛选出已分配的美容师
263
+      if (e.assign) {
264
+        e.assign.forEach((item, index) => {
265
+          this.nameList.forEach((item1, index1) => {
266
+            if (item.id == item1.id) {
267
+              this.selectNameList.push(item);
268
+              this.nameList.splice(index1, 1);
269
+            }
270
+          });
271
+        });
272
+      }
273
+    },
274
+    // 分配美容师
275
+    confirmSelect() {
276
+      let user_id = [];
277
+      this.selectNameList.forEach((item) => {
278
+        user_id.push(item.id);
279
+      });
204 280
       let params = {
205
-        user_id,
206
-        type: 3, //1项目 2次卡 3美妆产品 4充值
207
-        order_id,
281
+        user_id: user_id.toString(),
282
+        type: 1, //1项目 2次卡 3美妆产品 4充值
283
+        order_id: this.order_id,
208 284
       };
209 285
       // 店长分配
210 286
       api.orderAllocation(params).then((res) => {
211 287
         if (res.code == 200) {
288
+          this.selectPup = false;
289
+          this.getOrderList();
212 290
         }
213 291
       });
214 292
     },
@@ -233,6 +311,21 @@ export default {
233 311
           res.data.list.map((item) => {
234 312
             item.mobile =
235 313
               item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
314
+            // 整理已选的美容师
315
+            if (item.assign) {
316
+              let nameList = [];
317
+              let cosmeticianName = [];
318
+              item.assign.forEach((item1) => {
319
+                console.log(item1);
320
+                let list = {};
321
+                list.realname = item1.realname;
322
+                list.id = item1.suser_id;
323
+                nameList.push(list);
324
+                cosmeticianName.push(item1.realname);
325
+              });
326
+              item.assign = nameList;
327
+              item.cosmeticianName = cosmeticianName.toString();
328
+            }
236 329
           });
237 330
           this.tableData = res.data.list;
238 331
           this.total = res.data.total;
@@ -260,12 +353,11 @@ export default {
260 353
       api.getStaffList().then((res) => {
261 354
         if (res.code == 200) {
262 355
           this.nameList = res.data;
263
-          // console.log(res);
356
+          this.nameListAll = JSON.parse(JSON.stringify(res.data))
264 357
         }
265 358
       });
266 359
     },
267 360
   },
268
-
269 361
   created() {
270 362
     this.level = localStorage.getItem("level");
271 363
     this.getOrderList();
@@ -345,6 +437,107 @@ export default {
345 437
       text-align: center;
346 438
     }
347 439
   }
440
+  // 分配弹窗
441
+  .selectBox {
442
+    width: 540px;
443
+    height: 400px;
444
+    background: #ffffff;
445
+    border-radius: 8px;
446
+    padding-left: 40px;
447
+    position: relative;
448
+    .image {
449
+      height: 30px;
450
+      width: 100%;
451
+      display: flex;
452
+      justify-content: flex-end;
453
+      margin-top: 5px;
454
+      margin-right: 5px;
455
+      img {
456
+        width: 30px;
457
+      }
458
+    }
459
+    .selectTitle {
460
+      font-size: 14px;
461
+      color: #333;
462
+      text-align: center;
463
+      margin-top: 5px;
464
+    }
465
+    .selectFinish {
466
+      margin-top: 20px;
467
+      .selecrFinishTop {
468
+        font-size: 14px;
469
+        color: #333;
470
+      }
471
+      .selecrFinishBottom {
472
+        height: auto;
473
+        width: 100%;
474
+        display: flex;
475
+        flex-wrap: wrap;
476
+        .item {
477
+          height: 40px;
478
+          padding: 0px 16px;
479
+          background: #f9f9f9;
480
+          border-radius: 3px;
481
+          margin-right: 10px;
482
+          text-align: center;
483
+          line-height: 40px;
484
+          flex-shrink: 0;
485
+          box-sizing: border-box;
486
+          margin-top: 20px;
487
+          position: relative;
488
+          img {
489
+            width: 14px;
490
+            height: 14px;
491
+            position: absolute;
492
+            top: 0;
493
+            right: 0;
494
+          }
495
+        }
496
+        .item:first-child {
497
+          margin-left: 0;
498
+        }
499
+      }
500
+    }
501
+    .selectList {
502
+      margin-top: 20px;
503
+      .selecrListTop {
504
+        font-size: 14px;
505
+        color: #333;
506
+      }
507
+      .selecrListBottom {
508
+        height: auto;
509
+        width: 100%;
510
+        display: flex;
511
+        flex-wrap: wrap;
512
+        .item {
513
+          height: 40px;
514
+          padding: 0px 16px;
515
+          background: #f9f9f9;
516
+          border-radius: 3px;
517
+          margin-right: 10px;
518
+          text-align: center;
519
+          line-height: 40px;
520
+          flex-shrink: 0;
521
+          box-sizing: border-box;
522
+          margin-top: 20px;
523
+        }
524
+      }
525
+    }
526
+    .selectBox-btn {
527
+      width: 176px;
528
+      height: 28px;
529
+      background: #fa7d22;
530
+      border-radius: 14px;
531
+      color: #fff;
532
+      line-height: 28px;
533
+      font-size: 14px;
534
+      text-align: center;
535
+      position: absolute;
536
+      bottom: 40px;
537
+      left: 50%;
538
+      transform: translateX(-50%);
539
+    }
540
+  }
348 541
   .color0 {
349 542
     color: #fc3019;
350 543
   }

+ 230 - 68
src/pages/rechargeOrder/index.vue

@@ -24,7 +24,7 @@
24 24
         height="500"
25 25
         style="width: 100%; border-radius: 8px"
26 26
       >
27
-        <el-table-column label="头像" width="120">
27
+        <el-table-column label="头像" width="60">
28 28
           <template slot-scope="scope">
29 29
             <div @click.stop="goUserDetail(scope.row)" class="head-img">
30 30
               <img :src="scope.row.avatar_url" alt />
@@ -56,69 +56,30 @@
56 56
           label="充值金额"
57 57
           show-overflow-tooltip
58 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 59
         <el-table-column
92
-          width="80"
93
-          prop="realname"
60
+          width="100"
61
+          prop="cosmeticianName"
94 62
           label="美容师"
95 63
           show-overflow-tooltip
96
-        ></el-table-column>
64
+        >
65
+        </el-table-column>
97 66
         <el-table-column
98 67
           class="amendTop"
99
-          width="140"
68
+          width="80"
100 69
           prop=""
101 70
           label="分配"
102 71
           show-overflow-tooltip
103 72
           v-if="level == 10"
104 73
         >
105 74
           <template slot-scope="scope">
106
-            <el-dropdown
107
-              @command="(command) => selectType(command, scope.$index)"
108
-              trigger="click"
75
+            <el-button
76
+              @click.stop="selectType(scope.row)"
77
+              type="primary"
78
+              class="amend"
79
+              size="mini"
109 80
             >
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>
81
+              分配
82
+            </el-button>
122 83
           </template>
123 84
         </el-table-column>
124 85
       </el-table>
@@ -133,14 +94,57 @@
133 94
         ></el-pagination>
134 95
       </div>
135 96
     </div>
97
+        <minePupop :show="selectPup">
98
+      <div class="selectBox">
99
+        <div class="image">
100
+          <img
101
+            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
102
+            alt
103
+            @click="closeSelect"
104
+          />
105
+        </div>
106
+        <div class="selectTitle">分配美容师</div>
107
+        <div class="selectFinish">
108
+          <div class="selecrFinishTop">分配给:</div>
109
+          <div class="selecrFinishBottom">
110
+            <div
111
+              class="item"
112
+              v-for="(item, index) in selectNameList"
113
+              :key="index"
114
+              @click="delectCosmetician(item)"
115
+            >
116
+              {{ item.realname }}
117
+              <img
118
+                src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
119
+                alt=""
120
+              />
121
+            </div>
122
+          </div>
123
+        </div>
124
+        <div class="selectList">
125
+          <div class="selecrListTop">可选择:</div>
126
+          <div class="selecrListBottom">
127
+            <div
128
+              class="item"
129
+              @click="selectCosmetician(item)"
130
+              v-for="(item, index) in nameList"
131
+              :key="index"
132
+            >
133
+              {{ item.realname }}
134
+            </div>
135
+          </div>
136
+        </div>
137
+        <div class="selectBox-btn" @click="confirmSelect">确认</div>
138
+      </div>
139
+    </minePupop>
136 140
   </div>
137 141
 </template>
138 142
 
139 143
 <script>
140 144
 import api from "../../server/home";
141
-
145
+import minePupop from "../../components/minePupop/index.vue";
142 146
 export default {
143
-  components: {},
147
+  components: {minePupop},
144 148
   data() {
145 149
     return {
146 150
       searchText: "",
@@ -181,7 +185,12 @@ export default {
181 185
       ],
182 186
       currentPage1: 1,
183 187
       multipleSelection: "",
184
-      nameList: "", //员工列表
188
+            nameListAll:[],
189
+      nameList: [], //员工列表
190
+      selectNameList: [], //已选员工列表
191
+      level: "", //店员等级
192
+      selectPup: false, //分配弹窗
193
+      order_id: "", //订单ID
185 194
     };
186 195
   },
187 196
   computed: {},
@@ -198,25 +207,63 @@ export default {
198 207
         },
199 208
       });
200 209
     },
201
-    // 分配美容师
202
-    selectType(type, index) {
203
-      // 给表单添加美容师
204
-      this.$set(this.tableData[index], ["realname"], type);
205
-      let user_id = "";
206
-      this.nameList.map((item) => {
207
-        if (item.realname == type) {
208
-          user_id = item.id;
210
+        // 关闭分配弹窗
211
+    closeSelect() {
212
+      this.selectPup = false;
213
+    },
214
+    // 选择美容师
215
+    selectCosmetician(e) {
216
+      this.selectNameList.push(e);
217
+      this.nameList.forEach((item, index) => {
218
+        if (item.id == e.id) {
219
+          console.log(index);
220
+          this.nameList.splice(index, 1);
209 221
         }
210 222
       });
211
-      let order_id = this.tableData[index].id;
223
+    },
224
+    // 删除美容师
225
+    delectCosmetician(e) {
226
+      this.nameList.push(e);
227
+      this.selectNameList.forEach((item, index) => {
228
+        if (item.id == e.id) {
229
+          this.selectNameList.splice(index, 1);
230
+        }
231
+      });
232
+    },
233
+    // 打开分配弹窗
234
+    selectType(e) {
235
+      this.selectPup = true;
236
+      this.order_id = e.id;
237
+      this.nameList = JSON.parse(JSON.stringify(this.nameListAll)) //重置数据
238
+      this.selectNameList = []; //重置数据
239
+      // 筛选出已分配的美容师
240
+      if (e.assign) {
241
+        e.assign.forEach((item, index) => {
242
+          this.nameList.forEach((item1, index1) => {
243
+            if (item.id == item1.id) {
244
+              this.selectNameList.push(item);
245
+              this.nameList.splice(index1, 1);
246
+            }
247
+          });
248
+        });
249
+      }
250
+    },
251
+    // 分配美容师
252
+    confirmSelect() {
253
+      let user_id = [];
254
+      this.selectNameList.forEach((item) => {
255
+        user_id.push(item.id);
256
+      });
212 257
       let params = {
213
-        user_id,
214
-        type: 4, //1项目 2次卡 3美妆产品 4充值
215
-        order_id,
258
+        user_id: user_id.toString(),
259
+        type: 1, //1项目 2次卡 3美妆产品 4充值
260
+        order_id: this.order_id,
216 261
       };
217 262
       // 店长分配
218 263
       api.orderAllocation(params).then((res) => {
219 264
         if (res.code == 200) {
265
+          this.selectPup = false;
266
+          this.getOrderList();
220 267
         }
221 268
       });
222 269
     },
@@ -241,6 +288,20 @@ export default {
241 288
           res.data.list.map((item) => {
242 289
             item.mobile =
243 290
               item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
291
+            // 整理已选的美容师
292
+            if (item.assign) {
293
+              let nameList = [];
294
+              let cosmeticianName = [];
295
+              item.assign.forEach((item1) => {
296
+                let list = {};
297
+                list.realname = item1.realname;
298
+                list.id = item1.suser_id;
299
+                nameList.push(list);
300
+                cosmeticianName.push(item1.realname);
301
+              });
302
+              item.assign = nameList;
303
+              item.cosmeticianName = cosmeticianName.toString();
304
+            }
244 305
           });
245 306
           this.tableData = res.data.list;
246 307
           this.total = res.data.total;
@@ -257,7 +318,7 @@ export default {
257 318
       api.getStaffList().then((res) => {
258 319
         if (res.code == 200) {
259 320
           this.nameList = res.data;
260
-          console.log(res);
321
+          this.nameListAll = JSON.parse(JSON.stringify(res.data))
261 322
         }
262 323
       });
263 324
     },
@@ -342,6 +403,107 @@ export default {
342 403
       text-align: center;
343 404
     }
344 405
   }
406
+    // 分配弹窗
407
+  .selectBox {
408
+    width: 540px;
409
+    height: 400px;
410
+    background: #ffffff;
411
+    border-radius: 8px;
412
+    padding-left: 40px;
413
+    position: relative;
414
+    .image {
415
+      height: 30px;
416
+      width: 100%;
417
+      display: flex;
418
+      justify-content: flex-end;
419
+      margin-top: 5px;
420
+      margin-right: 5px;
421
+      img {
422
+        width: 30px;
423
+      }
424
+    }
425
+    .selectTitle {
426
+      font-size: 14px;
427
+      color: #333;
428
+      text-align: center;
429
+      margin-top: 5px;
430
+    }
431
+    .selectFinish {
432
+      margin-top: 20px;
433
+      .selecrFinishTop {
434
+        font-size: 14px;
435
+        color: #333;
436
+      }
437
+      .selecrFinishBottom {
438
+        height: auto;
439
+        width: 100%;
440
+        display: flex;
441
+        flex-wrap: wrap;
442
+        .item {
443
+          height: 40px;
444
+          padding: 0px 16px;
445
+          background: #f9f9f9;
446
+          border-radius: 3px;
447
+          margin-right: 10px;
448
+          text-align: center;
449
+          line-height: 40px;
450
+          flex-shrink: 0;
451
+          box-sizing: border-box;
452
+          margin-top: 20px;
453
+          position: relative;
454
+          img {
455
+            width: 14px;
456
+            height: 14px;
457
+            position: absolute;
458
+            top: 0;
459
+            right: 0;
460
+          }
461
+        }
462
+        .item:first-child {
463
+          margin-left: 0;
464
+        }
465
+      }
466
+    }
467
+    .selectList {
468
+      margin-top: 20px;
469
+      .selecrListTop {
470
+        font-size: 14px;
471
+        color: #333;
472
+      }
473
+      .selecrListBottom {
474
+        height: auto;
475
+        width: 100%;
476
+        display: flex;
477
+        flex-wrap: wrap;
478
+        .item {
479
+          height: 40px;
480
+          padding: 0px 16px;
481
+          background: #f9f9f9;
482
+          border-radius: 3px;
483
+          margin-right: 10px;
484
+          text-align: center;
485
+          line-height: 40px;
486
+          flex-shrink: 0;
487
+          box-sizing: border-box;
488
+          margin-top: 20px;
489
+        }
490
+      }
491
+    }
492
+    .selectBox-btn {
493
+      width: 176px;
494
+      height: 28px;
495
+      background: #fa7d22;
496
+      border-radius: 14px;
497
+      color: #fff;
498
+      line-height: 28px;
499
+      font-size: 14px;
500
+      text-align: center;
501
+      position: absolute;
502
+      bottom: 40px;
503
+      left: 50%;
504
+      transform: translateX(-50%);
505
+    }
506
+  }
345 507
   .color0 {
346 508
     color: #fc3019;
347 509
   }

+ 8 - 0
src/server/home.js

@@ -293,4 +293,12 @@ export default class Home {
293 293
   static getCosmetMessageList(params) {
294 294
     return $http.get(url.getCosmetMessageList, params)
295 295
   }
296
+  // 美妆产品核销
297
+  static goodsPickUp(params) {
298
+    return $http.post(url.goodsPickUp, params)
299
+  }
300
+  // 美妆产品取货
301
+  static goodsTakeOut(params) {
302
+    return $http.post(url.goodsTakeOut, params)
303
+  }
296 304
 }

+ 7 - 1
src/server/urls.js

@@ -188,5 +188,11 @@ export default {
188 188
   getGoodsOrderList: '/v2/pad/list/goods',
189 189
 
190 190
   // 后台发送美容师的消息
191
-  getCosmetMessageList:"/v2/pad/message/message_list",
191
+  getCosmetMessageList: "/v2/pad/message/message_list",
192
+
193
+  // 美妆产品核销
194
+  goodsPickUp: '/v2/pad/order/pick_up',
195
+
196
+  // 美妆产品取货
197
+  goodsTakeOut: '/v2/pad/order/take_out'
192 198
 }

+ 2 - 2
vue.config.js

@@ -4,8 +4,8 @@ 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/',
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 9
   // 正式
10 10
   // publicPath: process.env.env_config === 'prod' ? 'https://h5-cms-vue.ijolijoli.com/dist' :
11 11
   //   process.env.env_config === 'test' ? '/vapps/calory/' : '/dist/',