Przeglądaj źródła

Merge branch 'lihai' into zhp

haopeng 2 lat temu
rodzic
commit
9e798fb079

+ 59 - 33
src/pages/confirmOrder/details/index.vue

@@ -7,7 +7,8 @@
7 7
         <div class="user-span">
8 8
           <div class="info">
9 9
             <div class="name"><span>{{userInfo.nickname}}</span></div>
10
-            <div class="sex"><img :src="gender" alt=""></div>
10
+            <div class="sex"><img :src="gender"
11
+                   alt=""></div>
11 12
             <div class="age"><span>{{userInfo.skin_age}}</span><span>肤龄</span></div>
12 13
           </div>
13 14
           <div class="skin-type">肤质:<span>{{userInfo.skin_type}}</span></div>
@@ -40,13 +41,8 @@
40 41
         <div class="lable-title">
41 42
           问题标签
42 43
         </div>
43
-        <div class="lable-list">
44
-          <div v-for="(item,index) in problem"
45
-               :key="index"
46
-               :style='{background:item.bgcolor,borderColor:item.bdcolor}'
47
-               class='lable-info'>
48
-            {{item.text}}
49
-          </div>
44
+        <div class="problem-lable">
45
+          <div class="lable-text problem-text">{{problem}}</div>
50 46
         </div>
51 47
       </div>
52 48
       <div class="lable">
@@ -244,7 +240,8 @@
244 240
             </div>
245 241
           </li>
246 242
         </ul>
247
-        <div class="coupon-confirm" @click="isCoupun=false">确认</div>
243
+        <div class="coupon-confirm"
244
+             @click="isCoupun=false">确认</div>
248 245
       </div>
249 246
     </mine-pupop>
250 247
     <!-- 选择项目 -->
@@ -452,9 +449,9 @@ export default {
452 449
       userInfo: {
453 450
       },
454 451
       // 问题标签
455
-      problem: [{ text: '干性(干燥)' }, { text: '干性(干燥、脱皮、缺水)' }, { text: '干性(干燥、脱皮、缺水)' }],
452
+      problem: '',
456 453
       //面部标签
457
-      lableList: [{ text: '干性(干燥)' }, { text: '干性(干燥、脱皮、缺水)' }, { text: '干性(干燥、脱皮、缺水)' }],
454
+      lableList: [],
458 455
       //执行方案
459 456
       programmeList: [],
460 457
       order_data: {},//门店
@@ -538,11 +535,11 @@ export default {
538 535
     };
539 536
   },
540 537
   computed: {
541
-    gender() {
538
+    gender () {
542 539
       // 性别,1男,2女,0保密
543 540
       return this.userInfo.sex == 1 ?
544
-      'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/male.png' :
545
-      'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/female.png'
541
+        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/male.png' :
542
+        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/female.png'
546 543
     }
547 544
   },
548 545
   watch: {},
@@ -555,7 +552,15 @@ export default {
555 552
       api.getOrderInfo({ id: this.id }).then(res => {
556 553
         this.userInfo = res.data.user
557 554
         this.problem = res.data.skin_name
558
-        this.lableList = res.data.face_names
555
+        let _problem = []
556
+        res.data.face_names.forEach(item => {
557
+          let info = {}
558
+          info['text'] = item
559
+          _problem.push(info)
560
+          console.log(_problem, '_problem');
561
+        })
562
+        this.lableList = _problem
563
+        this.randomColor();
559 564
         this.remarks = res.data.remark
560 565
         this.programmeList = res.data.scheme_list
561 566
         this.order_data = res.data.order_data
@@ -1107,11 +1112,6 @@ export default {
1107 1112
         { background: 'rgba(254, 244, 237, 1)', border: 'rgba(250, 125, 34, 1)' },
1108 1113
         { background: 'rgba(249, 245, 255, 1)', border: 'rgba(136, 50, 255, 1)' },
1109 1114
         { background: 'rgba(255, 252, 245, 1)', border: 'rgba(204, 116, 42, 1)' },]
1110
-      this.problem.forEach(res => {
1111
-        let color = Math.floor((Math.random() * arr.length))
1112
-        this.$set(res, 'bgcolor', arr[color].background)
1113
-        this.$set(res, 'bdcolor', arr[color].border)
1114
-      })
1115 1115
       this.lableList.forEach(res => {
1116 1116
         let color = Math.floor((Math.random() * arr.length))
1117 1117
         this.$set(res, 'bgcolor', arr[color].background)
@@ -1133,7 +1133,6 @@ export default {
1133 1133
   },
1134 1134
 
1135 1135
   mounted () {
1136
-    this.randomColor()
1137 1136
   },
1138 1137
   destroyed () {
1139 1138
     if (this.payStatusInterval) { //如果定时器在运行则关闭
@@ -1181,7 +1180,7 @@ export default {
1181 1180
         .info {
1182 1181
           display: flex;
1183 1182
           justify-content: space-between;
1184
-          
1183
+
1185 1184
           .name {
1186 1185
             font-size: 22px;
1187 1186
           }
@@ -1202,7 +1201,8 @@ export default {
1202 1201
             }
1203 1202
           }
1204 1203
         }
1205
-        div:nth-child(2), div:nth-child(3) {
1204
+        div:nth-child(2),
1205
+        div:nth-child(3) {
1206 1206
           margin-bottom: 8px;
1207 1207
         }
1208 1208
       }
@@ -1239,25 +1239,53 @@ export default {
1239 1239
       overflow: scroll;
1240 1240
       background: #ffffff;
1241 1241
       .lable-title {
1242
-        font-size: 20px;
1242
+        font-size: 14px;
1243 1243
         font-family: PingFangSC-Medium, PingFang SC;
1244 1244
         font-weight: 500;
1245 1245
         color: #333333;
1246 1246
         line-height: 20px;
1247
-        margin-bottom: 14px;
1247
+      }
1248
+      .problem-lable {
1249
+        flex: 1;
1250
+        overflow-y: hidden;
1251
+        width: 100%;
1252
+        font-size: 12px;
1253
+        font-family: PingFang-SC-Regular, PingFang-SC;
1254
+        font-weight: 400;
1255
+        color: #333333;
1256
+        line-height: 17px;
1257
+        display: flex;
1258
+        flex-flow: column wrap;
1259
+        list-style-type: none;
1260
+        overflow-x: scroll;
1261
+        align-items: baseline;
1262
+
1263
+        .lable-text {
1264
+          margin-top: 10px;
1265
+          margin-bottom: 10px;
1266
+          height: 24px;
1267
+          line-height: 24px;
1268
+          border: 1px solid #42d351;
1269
+          padding: 0 12px;
1270
+          border-radius: 2px;
1271
+        }
1272
+        .problem-text {
1273
+          background: rgba(244, 247, 255, 1);
1274
+          border: 1px solid rgba(85, 124, 255, 1);
1275
+        }
1248 1276
       }
1249 1277
       .lable-list {
1250 1278
         width: 100%;
1251 1279
         min-height: 105rpx;
1252 1280
         .lable-info {
1253 1281
           display: inline-block;
1254
-          padding: 0 12px;
1255
-          margin-left: 10px;
1282
+          padding-bottom: 12px;
1256 1283
           height: 24px;
1257 1284
           line-height: 24px;
1258 1285
           border-radius: 2px;
1259 1286
           border: 1px solid #d6d6d6;
1260
-          margin-bottom: 10px;
1287
+          margin-top: 10px;
1288
+          margin-right: 10px;
1261 1289
         }
1262 1290
         .add-lable {
1263 1291
           display: inline-block;
@@ -1287,12 +1315,10 @@ export default {
1287 1315
       color: #333333;
1288 1316
       line-height: 20px;
1289 1317
       margin-top: 20px;
1290
-      .ps-title {
1291
-        font-size: 20px;
1292
-      }
1293 1318
       .ps-text {
1294 1319
         margin-top: 10px;
1295
-        font-size: 17px;
1320
+        font-size: 12px;
1321
+        font-family: PingFang-SC-Regular, PingFang-SC;
1296 1322
         font-weight: 400;
1297 1323
         color: #666666;
1298 1324
         line-height: 17px;
@@ -1738,7 +1764,7 @@ export default {
1738 1764
       height: 28px;
1739 1765
       margin: 18px auto 0 auto;
1740 1766
       color: white;
1741
-      background-color: #FA7D22;
1767
+      background-color: #fa7d22;
1742 1768
       border-radius: 14px;
1743 1769
       display: flex;
1744 1770
       align-items: center;

+ 317 - 85
src/pages/customerMan/details/index.vue

@@ -2,44 +2,23 @@
2 2
   <div class="mine">
3 3
     <div class="left">
4 4
       <div class="user-info">
5
-        <div class="user-img">
6
-          <img :src="userInfo.avatar_url"
7
-               alt />
8
-        </div>
5
+        <div class="user-img"><img :src="userInfo.avatar_url"
6
+               alt=""></div>
9 7
         <div class="user-span">
10
-          <div class="name">
11
-            昵称:
12
-            <span>{{userInfo.nickname}}</span>
13
-          </div>
14
-          <div class="sex">
15
-            性别:
16
-            <span>{{userInfo.sex==1?'男':'女'}}</span>
17
-          </div>
18
-          <div class="age">
19
-            肤龄:
20
-            <span>{{userInfo.age||'--'}}</span>
21
-          </div>
22
-          <div class="skin-type">
23
-            肤质:
24
-            <span>{{userInfo.skin}}</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>
25 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>
26 17
         </div>
27 18
       </div>
28 19
 
29 20
       <div class="personage-data">
30 21
         <div class="myDataList">
31
-          肌肤得分:
32
-          <span class="bigSixe">{{userInfo.scorec}}分</span>
33
-        </div>
34
-        <div class="myDataList">
35
-          皮肤状态:
36
-          <span>{{userInfo.skin_status}}</span>
37
-        </div>
38
-        <div class="myDataList">
39
-          上传检测时间:
40
-          <span>{{userInfo.check_time}}</span>
41
-        </div>
42
-        <div class="myDataList">
43 22
           出生日期:
44 23
           <span>{{userInfo.birthday}}</span>
45 24
         </div>
@@ -75,6 +54,10 @@
75 54
           积分:
76 55
           <span>{{userInfo.coin}}</span>
77 56
         </div>
57
+        <div class="myDataList">
58
+          备注:
59
+          <span>{{remarks | ellipsis(20)}}</span>
60
+        </div>
78 61
       </div>
79 62
     </div>
80 63
     <div class="right">
@@ -82,15 +65,21 @@
82 65
         <div class="right-top-data">
83 66
           <div class="lable">
84 67
             <div class="lable-title">面诊标签</div>
85
-            <div class="lable-list">
86
-              <div v-for="(item,index) in lableList"
87
-                   :key="index"
88
-                   class="lable-info">{{item.text}}</div>
68
+            <div class="problem">
69
+              <div class="problem-title">问题标签</div>
70
+              <div class="problem-lable">
71
+                <div class="lable-text problem-text">{{problem}}</div>
72
+              </div>
73
+            </div>
74
+            <div class="problem">
75
+              <div class="problem-title">面部标签</div>
76
+              <div class="problem-lable">
77
+                <div class="lable-text"
78
+                     v-for="item,index in lableList"
79
+                     :key="index"
80
+                     :style="{background:item.bgcolor,borderColor:item.bdcolor}">{{item.text}}</div>
81
+              </div>
89 82
             </div>
90
-          </div>
91
-          <div class="ps">
92
-            <div class="ps-title">备注</div>
93
-            <div class="ps-text">{{remarks | ellipsis(20)}}</div>
94 83
           </div>
95 84
         </div>
96 85
         <div class="right-top-list">
@@ -120,40 +109,43 @@
120 109
           <div class="tab">
121 110
             <div class="tab-title">执行方案</div>
122 111
           </div>
123
-          <div class="programme-list">
124
-            <div :class="['programme-info',item.onSelect?'programme-active':'']"
125
-                 v-for="(item,index) in programmeList"
126
-                 :key="index"
127
-                 @click="onOperation(index)">
128
-              <div class="programme-left">
129
-                <div class="programme-img">
130
-                  <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
131
-                       alt />
132
-                </div>
133
-                <div class="programme-tips">
134
-                  <div class="tips-title">{{'【清洁补水】华熙智慧…'|ellipsis(9)}}</div>
135
-                  <div class="tips-title">{{'美白、祛痘、抗皱'|ellipsis(9)}}</div>
136
-                  <div class="tips-title">
137
-                    仪器:
138
-                    <span>{{'无创水光'|ellipsis(9)}}</span>
139
-                  </div>
140
-                </div>
112
+          <div class="programmeList"
113
+               v-if="programmeList.length>0">
114
+            <div class="programmeWeek">
115
+              <div class="programmeItem"
116
+                   v-for="item,index in programmeList"
117
+                   :key="index">
118
+                <div :class="selectWeek==index?'weekItemSelect':'weekItem'"
119
+                     @click="weekSelect(index)">{{item.name}}</div>
120
+                <div class="weekLine"
121
+                     v-if="index==3?false:true"></div>
141 122
               </div>
142
-              <div class="programme-right">
143
-                <div class="frequency">
144
-                  执行频率:
145
-                  <span>一周一次</span>
123
+            </div>
124
+            <div class="doTime">{{programmeList[selectWeek].time}}</div>
125
+            <div class="weekDetails"
126
+                 v-if="programmeList.length>0">
127
+              <div class="contentItem"
128
+                   v-for="item,index1 in programmeList[selectWeek].list"
129
+                   :key="index1">
130
+                <div class="itemTitle">
131
+                  <div>{{item.name}}</div>
132
+                  <div>{{item.classify_name}}</div>
133
+                  <!-- <div>{{item.time}}</div> -->
146 134
                 </div>
147
-                <div class="duration">
148
-                  持续时长:
149
-                  <span>28天</span>
135
+                <div class="itemContent"
136
+                     v-for="items,index2 in item.list"
137
+                     :key="index2">
138
+                  <img class="itemContent-img"
139
+                       :src="items.cover_url" />
140
+                  <div class="itemContent-right">
141
+                    <div class="right-content">
142
+                      <div class="right-name">{{items.name |ellipsis(14)}}</div>
143
+                      <div class="right-price">{{items.price |doubleNum(2)}}</div>
144
+                    </div>
145
+                    <div class="right-project">{{items.product_name}}</div>
146
+                  </div>
150 147
                 </div>
151 148
               </div>
152
-              <div class="operation"
153
-                   v-if="item.onSelect">
154
-                <div class="edit">编辑</div>
155
-                <div class="delete">删除</div>
156
-              </div>
157 149
             </div>
158 150
           </div>
159 151
         </div>
@@ -176,8 +168,10 @@ export default {
176 168
         age: "23",
177 169
         skinType: "中性皮肤"
178 170
       },
171
+      problem: "",
179 172
       //面部标签
180
-      lableList: [],
173
+      lableList: [
174
+      ],
181 175
       //执行方案
182 176
       programmeList: [],
183 177
 
@@ -186,7 +180,7 @@ export default {
186 180
       projectList: [],
187 181
 
188 182
       order_total: {},
189
-
183
+      selectWeek: 0,
190 184
       timesInfo: "",
191 185
       projectInfo: "",
192 186
       weekInfo: "",
@@ -195,7 +189,14 @@ export default {
195 189
       isPupop: false
196 190
     };
197 191
   },
198
-  computed: {},
192
+  computed: {
193
+    gender () {
194
+      // 性别,1男,2女,0保密
195
+      return this.userInfo.sex == 1 ?
196
+        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/male.png' :
197
+        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/female.png'
198
+    }
199
+  },
199 200
   watch: {},
200 201
 
201 202
   methods: {
@@ -203,14 +204,56 @@ export default {
203 204
       api.getPadUserInfo({ id: this.id }).then(res => {
204 205
         this.userInfo = res.data.user;
205 206
         this.remarks = res.data.remark;
206
-        this.lableList = res.data.tags;
207
+        this.problem = res.data.skin_name;
208
+        let _problem = []
209
+        res.data.face_names.forEach(item => {
210
+          let info = {}
211
+          info['text'] = item
212
+          _problem.push(info)
213
+          console.log(_problem, '_problem');
214
+        })
215
+        this.lableList = _problem
216
+        this.remarks = res.data.remark
217
+        this.randomColor();
207 218
         this.order_total = res.data.order_total;
208 219
         this.programmeList = res.data.scheme_list;
209 220
         // this.programmeList = res.data.order_data.project_list;
210 221
         // this.coupon_list = res.data.order_data.coupon_list;
211 222
       });
212 223
     },
213
-
224
+    randomColor (type) {
225
+      let arr = [
226
+        {
227
+          background: "rgba(244, 247, 255, 1)",
228
+          border: "rgba(85, 124, 255, 1)"
229
+        },
230
+        {
231
+          background: "rgba(245, 252, 245, 1)",
232
+          border: "rgba(66, 211, 81, 1)"
233
+        },
234
+        {
235
+          background: "rgba(254, 244, 237, 1)",
236
+          border: "rgba(250, 125, 34, 1)"
237
+        },
238
+        {
239
+          background: "rgba(249, 245, 255, 1)",
240
+          border: "rgba(136, 50, 255, 1)"
241
+        },
242
+        {
243
+          background: "rgba(255, 252, 245, 1)",
244
+          border: "rgba(204, 116, 42, 1)"
245
+        }
246
+      ];
247
+      this.lableList.forEach(res => {
248
+        let color = Math.floor(Math.random() * arr.length);
249
+        this.$set(res, "bgcolor", arr[color].background);
250
+        this.$set(res, "bdcolor", arr[color].border);
251
+      });
252
+    },
253
+    weekSelect (index) {
254
+      console.log("xxxx");
255
+      this.selectWeek = index;
256
+    },
214 257
     onOperation (index) {
215 258
       if (this.programmeList[index].onSelect) {
216 259
         this.$set(
@@ -270,27 +313,47 @@ export default {
270 313
       display: flex;
271 314
       align-items: center;
272 315
       .user-img {
273
-        width: 98px;
316
+        width: 96px;
274 317
         img {
275 318
           width: 100%;
276 319
           display: block;
320
+          border-radius: 6px;
277 321
         }
278 322
       }
279 323
       .user-span {
280 324
         margin-left: 12px;
281
-        .sex {
282
-          margin-top: 8px;
283
-        }
284
-        .age {
285
-          margin-top: 8px;
286
-        }
287
-        .skin-type {
288
-          margin-top: 8px;
289
-        }
290 325
 
291 326
         span {
292 327
           color: #333333;
293 328
         }
329
+        .info {
330
+          display: flex;
331
+          justify-content: space-between;
332
+
333
+          .name {
334
+            font-size: 16px;
335
+          }
336
+          .sex {
337
+            img {
338
+              width: 24px;
339
+              height: 24px;
340
+            }
341
+          }
342
+          .age {
343
+            margin-left: 13px;
344
+            span:nth-child(1) {
345
+              font-size: 22px;
346
+            }
347
+            span:nth-child(2) {
348
+              margin-left: 4px;
349
+              color: #999999;
350
+            }
351
+          }
352
+        }
353
+        div:nth-child(2),
354
+        div:nth-child(3) {
355
+          margin-bottom: 8px;
356
+        }
294 357
       }
295 358
     }
296 359
     .personage-data {
@@ -368,6 +431,44 @@ export default {
368 431
             line-height: 20px;
369 432
             margin-bottom: 14px;
370 433
           }
434
+          .problem {
435
+            display: flex;
436
+            .problem-title {
437
+              font-size: 13px;
438
+              font-family: PingFangSC-Regular, PingFang SC;
439
+              font-weight: 400;
440
+              color: #333333;
441
+              line-height: 18px;
442
+            }
443
+            .problem-lable {
444
+              flex: 1;
445
+              overflow-y: hidden;
446
+              width: 100%;
447
+              height: 68px;
448
+              font-size: 12px;
449
+              font-family: PingFang-SC-Regular, PingFang-SC;
450
+              font-weight: 400;
451
+              color: #333333;
452
+              line-height: 17px;
453
+              display: flex;
454
+              flex-flow: column wrap;
455
+              list-style-type: none;
456
+              overflow-x: scroll;
457
+              align-items: baseline;
458
+
459
+              .lable-text {
460
+                margin-left: 10px;
461
+                margin-bottom: 10px;
462
+                border: 1px solid #42d351;
463
+                padding: 0 12px;
464
+                border-radius: 2px;
465
+              }
466
+              .problem-text {
467
+                background: rgba(244, 247, 255, 1);
468
+                border: 1px solid rgba(85, 124, 255, 1);
469
+              }
470
+            }
471
+          }
371 472
           .lable-list {
372 473
             width: 100%;
373 474
             min-height: 105rpx;
@@ -420,16 +521,147 @@ export default {
420 521
     }
421 522
     .right-bottom {
422 523
       margin-top: 18px;
524
+      width: 575px;
525
+      height: 286px;
423 526
       background: #ffffff;
424 527
       box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
425 528
       border-radius: 8px;
426
-      padding: 16px 61px 12px 12px;
529
+      padding: 16px 12px 12px 12px;
427 530
       .programme {
428 531
         //   margin-top: 20px;
429 532
         width: 100%;
430 533
         background: #ffffff;
431 534
         border-radius: 8px;
535
+        .programmeList {
536
+          width: 550px;
537
+          .programmeWeek {
538
+            display: flex;
539
+            align-items: center;
540
+          }
541
+
542
+          .programmeItem {
543
+            margin-top: 20px;
544
+            flex: 1;
545
+            display: flex;
546
+          }
547
+          .weekItem {
548
+            text-align: center;
549
+            font-size: 13px;
550
+            font-family: PingFangSC-Regular, PingFang SC;
551
+            font-weight: 400;
552
+            color: #999999;
553
+            flex: 1;
554
+          }
555
+
556
+          .weekItemSelect {
557
+            text-align: center;
558
+            font-size: 13px;
559
+            font-family: PingFangSC-Regular, PingFang SC;
560
+            font-weight: 400;
561
+            color: #fa7d22;
562
+            flex: 1;
563
+          }
432 564
 
565
+          .weekLine {
566
+            width: 1px;
567
+            height: 12px;
568
+            background: #f0f0f0;
569
+          }
570
+          .doTime {
571
+            // margin-left: 20px;
572
+            line-height: 30px;
573
+            font-size: 12px;
574
+            font-weight: 500;
575
+            color: #333333;
576
+          }
577
+          .weekDetails {
578
+            height: 180px;
579
+            border-radius: 6px;
580
+            border: 1px solid #f5f5f5;
581
+            display: flex;
582
+            align-items: center;
583
+            overflow: scroll;
584
+          }
585
+
586
+          .contentItem {
587
+            margin-left: 10px;
588
+            width: 317px;
589
+            min-height: 211px;
590
+            border-right: 1px solid #f5f5f5;
591
+            // overflow-y: scroll;
592
+          }
593
+
594
+          .line-hor {
595
+            margin-top: 30px;
596
+            margin-left: 10px;
597
+            width: 1px;
598
+            height: 261px;
599
+            background: #f0f0f0;
600
+          }
601
+
602
+          .itemTitle {
603
+            display: flex;
604
+            padding-right: 10px;
605
+            justify-content: space-between;
606
+            width: 100%;
607
+            line-height: 20px;
608
+            font-size: 12px;
609
+            font-weight: 400;
610
+            color: #333333;
611
+          }
612
+
613
+          .itemContent {
614
+            width: 317px;
615
+            margin-top: 10px;
616
+            display: flex;
617
+            align-items: center;
618
+            height: 49px;
619
+          }
620
+
621
+          .itemContent-img {
622
+            width: 49px;
623
+            height: 49px;
624
+            background: #d8d8d8;
625
+            border-radius: 2px;
626
+          }
627
+
628
+          .itemContent-right {
629
+            margin-left: 10px;
630
+            display: flex;
631
+            flex-direction: column;
632
+            height: 49px;
633
+            flex: 1;
634
+          }
635
+
636
+          .right-content {
637
+            flex: 1;
638
+            display: flex;
639
+          }
640
+
641
+          .right-name {
642
+            font-size: 12px;
643
+            font-family: PingFangSC-Medium, PingFang SC;
644
+            font-weight: 500;
645
+            color: #333333;
646
+            flex: 1;
647
+          }
648
+
649
+          .right-price {
650
+            margin-right: 10px;
651
+            margin-left: 20px;
652
+            font-size: 12px;
653
+            font-family: OPPOSans-B, OPPOSans;
654
+            font-weight: normal;
655
+            color: #ff3007;
656
+          }
657
+
658
+          .right-project {
659
+            font-size: 12px;
660
+            font-family: PingFangSC-Regular, PingFang SC;
661
+            font-weight: 400;
662
+            color: #ffc630;
663
+          }
664
+        }
433 665
         .tab {
434 666
           display: flex;
435 667
           align-items: center;

+ 146 - 197
src/pages/historicalOrder/details/index.vue

@@ -2,90 +2,44 @@
2 2
   <div class="mine">
3 3
     <div class="left">
4 4
       <div class="user-info">
5
-        <div class="user-img">
6
-          <img :src="userInfo.avatar_url" alt />
7
-        </div>
5
+        <div class="user-img"><img :src="userInfo.avatar_url"
6
+               alt=""></div>
8 7
         <div class="user-span">
9
-          <div class="name">
10
-            昵称:
11
-            <span>{{userInfo.nickname}}</span>
12
-          </div>
13
-          <div class="sex">
14
-            性别:
15
-            <span>{{userInfo.sex==1?'男':'女'}}</span>
16
-          </div>
17
-          <div class="age">
18
-            肤龄:
19
-            <span>{{userInfo.age}}</span>
20
-          </div>
21
-          <div class="skin-type">
22
-            肤质:
23
-            <span>{{userInfo.skin}}</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>
24 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>
25 17
         </div>
26 18
       </div>
27
-      <div class="user-record">
28
-        <div class="fraction">
29
-          <div class="title">肌肤得分</div>
30
-          <div class="num">{{userInfo.score}}分</div>
31
-        </div>
32
-        <div class="status">
33
-          <div class="title">皮肤状态</div>
34
-          <div class="tips">{{userInfo.skin_status}}</div>
35
-        </div>
36
-        <div class="times">
37
-          <div class="title">上传检测时间</div>
38
-          <div class="ts">{{userInfo.check_time}}</div>
19
+      <div class="ps">
20
+        <div class="ps-title">
21
+          备注
39 22
         </div>
23
+        <div class="ps-text">{{remarks || '无' | ellipsis(20)}}</div>
40 24
       </div>
41 25
       <div class="lable">
42
-        <div class="lable-title">面诊标签</div>
43
-        <div class="lable-list">
44
-          <div v-for="(item,index) in lableList" :key="index" class="lable-info">{{item.text}}</div>
26
+        <div class="lable-title">
27
+          问题标签
28
+        </div>
29
+        <div class="problem-lable">
30
+          <div class="lable-text problem-text">{{problem}}</div>
45 31
         </div>
46 32
       </div>
47
-      <div class="ps">
48
-        <div class="ps-title">备注</div>
49
-        <div class="ps-text">{{remarks | ellipsis(20)}}</div>
50
-      </div>
51
-      <div class="programme">
52
-        <div class="tab">
53
-          <div class="tab-title">执行方案</div>
33
+      <div class="lable">
34
+        <div class="lable-title">
35
+          面部标签
54 36
         </div>
55
-        <div class="programme-list">
56
-          <div
57
-            :class="['programme-info',item.onSelect?'programme-active':'']"
58
-            v-for="(item,index) in scheme_list"
59
-            :key="index"
60
-            @click="onOperation(index)"
61
-          >
62
-            <div class="programme-left">
63
-              <div class="programme-img">
64
-                <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png" alt />
65
-              </div>
66
-              <div class="programme-tips">
67
-                <div class="tips-title">{{'【清洁补水】华熙智慧…'|ellipsis(9)}}</div>
68
-                <div class="tips-title">{{'美白、祛痘、抗皱'|ellipsis(9)}}</div>
69
-                <div class="tips-title">
70
-                  仪器:
71
-                  <span>{{'无创水光'|ellipsis(9)}}</span>
72
-                </div>
73
-              </div>
74
-            </div>
75
-            <div class="programme-right">
76
-              <div class="frequency">
77
-                执行频率:
78
-                <span>{{item.frequency}}</span>
79
-              </div>
80
-              <div class="duration">
81
-                持续时长:
82
-                <span>{{item.duration}}</span>
83
-              </div>
84
-            </div>
85
-            <div class="operation" v-if="item.onSelect">
86
-              <div class="edit">编辑</div>
87
-              <div class="delete">删除</div>
88
-            </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}}
89 43
           </div>
90 44
         </div>
91 45
       </div>
@@ -111,7 +65,9 @@
111 65
           <span>{{order_data.project_num}}个</span>项目
112 66
         </div>
113 67
         <div class="project-list">
114
-          <div class="project-info" v-for="(item,index) in programmeList" :key="index">
68
+          <div class="project-info"
69
+               v-for="(item,index) in programmeList"
70
+               :key="index">
115 71
             <div class="project-image">
116 72
               <img :src="item.cover_url" />
117 73
             </div>
@@ -138,17 +94,17 @@
138 94
           <div class="coupon">
139 95
             <div class="coupon-tips">
140 96
               <div class="coupon-icon">
141
-                <img
142
-                  src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/couponIcon.png"
143
-                  alt
144
-                />
97
+                <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/couponIcon.png"
98
+                     alt />
145 99
               </div>
146 100
               <div class="coupon-title">优惠卷</div>
147 101
               <div class="coupon-tip">已选推荐优惠</div>
148 102
             </div>
149 103
             <div class="on-icon">></div>
150 104
           </div>
151
-          <div class="coupon-ps" v-for="(item,index) in coupon_list" :key="index">
105
+          <div class="coupon-ps"
106
+               v-for="(item,index) in coupon_list"
107
+               :key="index">
152 108
             <div>{{item.coupon_name}}</div>
153 109
             <div class="cou-price">-¥{{item.price}}</div>
154 110
           </div>
@@ -168,136 +124,57 @@
168 124
 <script>
169 125
 import api from "../../../server/home";
170 126
 export default {
171
-  data() {
127
+  data () {
172 128
     return {
173 129
       userInfo: {
174 130
       },
175
-      lableList:{},
176
-      programmeList:{},
177
-      scheme_list:{},
178
-      // //面部标签
179
-      // lableList: [
180
-      //   {
181
-      //     text: "对话框的",
182
-      //     disabled: false
183
-      //   },
184
-      //   {
185
-      //     text: "对话框的",
186
-      //     disabled: true
187
-      //   },
188
-      //   {
189
-      //     text: "对话框的",
190
-      //     disabled: false
191
-      //   },
192
-      //   {
193
-      //     text: "对话框的",
194
-      //     disabled: false
195
-      //   },
196
-      //   {
197
-      //     text: "对话框的",
198
-      //     disabled: false
199
-      //   },
200
-      //   {
201
-      //     text: "对话框的",
202
-      //     disabled: false
203
-      //   },
204
-      //   {
205
-      //     text: "对话框的",
206
-      //     disabled: false
207
-      //   },
208
-      //   {
209
-      //     text: "对话框的",
210
-      //     disabled: false
211
-      //   },
212
-      //   {
213
-      //     text: "对话框的",
214
-      //     disabled: false
215
-      //   },
216
-      //   {
217
-      //     text: "对话框的",
218
-      //     disabled: false
219
-      //   }
220
-      // ],
221
-      // //执行方案
222
-      // programmeList: [
223
-      //   {
224
-      //     image:
225
-      //       "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
226
-      //     title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
227
-      //     tips: "+润百颜精华",
228
-      //     zoom: "皮肤综合仪(30号房)",
229
-      //     ts: "30分钟",
230
-      //     price: "79.00"
231
-      //   },
232
-      //   {
233
-      //     image:
234
-      //       "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
235
-      //     title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
236
-      //     tips: "+润百颜精华",
237
-      //     zoom: "皮肤综合仪(30号房)",
238
-      //     ts: "30分钟",
239
-      //     price: "79.00"
240
-      //   },
241
-      //   {
242
-      //     image:
243
-      //       "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
244
-      //     title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
245
-      //     tips: "+润百颜精华",
246
-      //     zoom: "皮肤综合仪(30号房)",
247
-      //     ts: "30分钟",
248
-      //     price: "79.00"
249
-      //   }
250
-      // ],
251
-      // //项目列表
252
-      // projectList: [
253
-      //   {
254
-      //     value: "选项1",
255
-      //     label: "黄金糕"
256
-      //   },
257
-      //   {
258
-      //     value: "选项2",
259
-      //     label: "双皮奶"
260
-      //   },
261
-      //   {
262
-      //     value: "选项3",
263
-      //     label: "蚵仔煎"
264
-      //   },
265
-      //   {
266
-      //     value: "选项4",
267
-      //     label: "龙须面"
268
-      //   },
269
-      //   {
270
-      //     value: "选项5",
271
-      //     label: "北京烤鸭"
272
-      //   }
273
-      // ],
131
+      lableList: [],
132
+      programmeList: {},
133
+      scheme_list: {},
274 134
       timesInfo: "",
275 135
       projectInfo: "",
276 136
       weekInfo: "",
277 137
       programmeIndex: "",
278 138
       remarks: "",
279
-      coupon_list:"",
280
-      order_data:"",
139
+      coupon_list: "",
140
+      order_data: "",
281 141
       isPupop: false,
282
-      id:""
142
+      id: "",
143
+      problem: '',
283 144
     };
284 145
   },
285
-  computed: {},
146
+  computed: {
147
+    gender () {
148
+      // 性别,1男,2女,0保密
149
+      return this.userInfo.sex == 1 ?
150
+        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/male.png' :
151
+        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/female.png'
152
+    }
153
+  },
286 154
   watch: {},
287 155
 
288 156
   methods: {
289
-    getOrderInfo() {
157
+    getOrderInfo () {
290 158
       api.getOrderInfo({ id: this.id }).then(res => {
291 159
         this.userInfo = res.data.user;
292 160
         this.order_data = res.data.order_data;
293
-        this.lableList = res.data.tags;
161
+        this.problem = res.data.skin_name
162
+        let _problem = []
163
+        res.data.face_names.forEach(item => {
164
+          let info = {}
165
+          info['text'] = item
166
+          _problem.push(info)
167
+          console.log(_problem, '_problem');
168
+        })
169
+        this.lableList = _problem
170
+        this.randomColor();
294 171
         this.programmeList = res.data.order_data.project_list;
295 172
         this.coupon_list = res.data.order_data.coupon_list;
296 173
         this.remarks = res.data.remark;
297 174
       });
298 175
     },
299 176
 
300
-    onOperation(index) {
177
+    onOperation (index) {
301 178
       if (this.programmeList[index].onSelect) {
302 179
         this.$set(
303 180
           this.programmeList[index],
@@ -308,17 +185,31 @@ export default {
308 185
         this.$set(this.programmeList[index], "onSelect", true);
309 186
       }
310 187
     },
311
-    onSubmit() {},
312
-    submitFrequency() {}
188
+    randomColor (type) {
189
+      let arr = [
190
+        { background: 'rgba(244, 247, 255, 1)', border: 'rgba(85, 124, 255, 1)' },
191
+        { background: 'rgba(245, 252, 245, 1)', border: 'rgba(66, 211, 81, 1)' },
192
+        { background: 'rgba(254, 244, 237, 1)', border: 'rgba(250, 125, 34, 1)' },
193
+        { background: 'rgba(249, 245, 255, 1)', border: 'rgba(136, 50, 255, 1)' },
194
+        { background: 'rgba(255, 252, 245, 1)', border: 'rgba(204, 116, 42, 1)' },]
195
+      this.lableList.forEach(res => {
196
+        let color = Math.floor((Math.random() * arr.length))
197
+        this.$set(res, 'bgcolor', arr[color].background)
198
+        this.$set(res, 'bdcolor', arr[color].border)
199
+      })
200
+
201
+    },
202
+    onSubmit () { },
203
+    submitFrequency () { }
313 204
   },
314 205
 
315
-  created() {
206
+  created () {
316 207
     let id = this.$route.query.id;
317 208
     this.id = id;
318 209
     this.getOrderInfo();
319 210
   },
320 211
 
321
-  mounted() {}
212
+  mounted () { }
322 213
 };
323 214
 </script>
324 215
 
@@ -347,6 +238,7 @@ export default {
347 238
         img {
348 239
           width: 100%;
349 240
           display: block;
241
+          border-radius: 6px;
350 242
         }
351 243
       }
352 244
       .user-span {
@@ -355,6 +247,34 @@ export default {
355 247
         span {
356 248
           color: #333333;
357 249
         }
250
+        .info {
251
+          display: flex;
252
+          justify-content: space-between;
253
+
254
+          .name {
255
+            font-size: 22px;
256
+          }
257
+          .sex {
258
+            img {
259
+              width: 24px;
260
+              height: 24px;
261
+            }
262
+          }
263
+          .age {
264
+            margin-left: 13px;
265
+            span:nth-child(1) {
266
+              font-size: 22px;
267
+            }
268
+            span:nth-child(2) {
269
+              margin-left: 4px;
270
+              color: #999999;
271
+            }
272
+          }
273
+        }
274
+        div:nth-child(2),
275
+        div:nth-child(3) {
276
+          margin-bottom: 8px;
277
+        }
358 278
       }
359 279
     }
360 280
     .user-record {
@@ -394,20 +314,47 @@ export default {
394 314
         font-weight: 500;
395 315
         color: #333333;
396 316
         line-height: 20px;
397
-        margin-bottom: 14px;
317
+      }
318
+      .problem-lable {
319
+        flex: 1;
320
+        overflow-y: hidden;
321
+        width: 100%;
322
+        font-size: 12px;
323
+        font-family: PingFang-SC-Regular, PingFang-SC;
324
+        font-weight: 400;
325
+        color: #333333;
326
+        line-height: 17px;
327
+        display: flex;
328
+        flex-flow: column wrap;
329
+        list-style-type: none;
330
+        overflow-x: scroll;
331
+        align-items: baseline;
332
+
333
+        .lable-text {
334
+          margin-top: 10px;
335
+          margin-bottom: 10px;
336
+          height: 24px;
337
+          line-height: 24px;
338
+          border: 1px solid #42d351;
339
+          padding: 0 12px;
340
+          border-radius: 2px;
341
+        }
342
+        .problem-text {
343
+          background: rgba(244, 247, 255, 1);
344
+          border: 1px solid rgba(85, 124, 255, 1);
345
+        }
398 346
       }
399 347
       .lable-list {
400 348
         width: 100%;
401 349
         min-height: 105rpx;
402 350
         .lable-info {
351
+          padding: 3px 12px;
403 352
           display: inline-block;
404
-          padding: 0 12px;
405
-          margin-left: 10px;
406
-          height: 24px;
407
-          line-height: 24px;
353
+          line-height: 17px;
408 354
           border-radius: 2px;
409 355
           border: 1px solid #d6d6d6;
410
-          margin-bottom: 10px;
356
+          margin-top: 10px;
357
+          margin-right: 10px;
411 358
         }
412 359
         .add-lable {
413 360
           display: inline-block;
@@ -436,9 +383,11 @@ export default {
436 383
       font-weight: 500;
437 384
       color: #333333;
438 385
       line-height: 20px;
386
+      margin-top: 20px;
439 387
       .ps-text {
440 388
         margin-top: 10px;
441 389
         font-size: 12px;
390
+        font-family: PingFang-SC-Regular, PingFang-SC;
442 391
         font-weight: 400;
443 392
         color: #666666;
444 393
         line-height: 17px;

Plik diff jest za duży
+ 769 - 279
src/pages/testSkin/details/index.vue


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

@@ -100,7 +100,7 @@ export default {
100 100
     },
101 101
     handleCurrentChange (e) {
102 102
       this.currentPage1 = e
103
-      this.getSkinList
103
+      this.getSkinList()
104 104
     }
105 105
   },
106 106
 

Plik diff jest za duży
+ 1336 - 0
src/pages/testSkin/updates/index.vue


+ 8 - 0
src/router/map/home.js

@@ -6,6 +6,7 @@ import Home from '@/pages/home/index.vue'
6 6
 import HomeDetailList from '@/pages/home/detailList'
7 7
 import TestSkin from '@/pages/testSkin/index'
8 8
 import TestSkinDetails from '@/pages/testSkin/details'
9
+import TestSkinUpdate from '@/pages/testSkin/updates'
9 10
 import CustomerMan from '@/pages/customerMan/index'
10 11
 import CustomerManDetails from '@/pages/customerMan/details'
11 12
 import HistoricalOrder from '@/pages/historicalOrder/index'
@@ -45,6 +46,13 @@ export default {
45 46
       component: TestSkinDetails
46 47
     },
47 48
     {
49
+      path: '/testSkin/updates',
50
+      meta: {
51
+        isback: true,
52
+      },
53
+      component: TestSkinUpdate
54
+    },
55
+    {
48 56
       path: '/customerMan',
49 57
       component: CustomerMan
50 58
     },

+ 22 - 2
src/server/home.js

@@ -72,6 +72,15 @@ export default class Home {
72 72
   static projectClassify (parms) {
73 73
     return $http.get(url.projectClassify, parms);
74 74
   }
75
+  static schemeDelete (parms) {
76
+    return $http.post(url.schemeDelete, parms);
77
+  }
78
+  static timesAdd (parms) {
79
+    return $http.post(url.timesAdd, parms);
80
+  }
81
+  static addUpdate (parms) {
82
+    return $http.post(url.addUpdate, parms);
83
+  }
75 84
 
76 85
   // 获取历史订单
77 86
   static getOrderList (parms) {
@@ -128,8 +137,19 @@ export default class Home {
128 137
     return $http.post(url.padOrderAdd, parms);
129 138
   }
130 139
 
131
-}
132
-
140
+  // 面部问题标签
141
+  static skinFace_tags (parms) {
142
+    return $http.get(url.skinFace_tags, parms);
143
+  }
133 144
 
145
+  // 皮肤问题标签
146
+  static skinSkin_tags (parms) {
147
+    return $http.get(url.skinSkin_tags, parms);
148
+  }
134 149
 
150
+  // 新增项目订单
151
+  static schemeSave (parms) {
152
+    return $http.post(url.schemeSave, parms);
153
+  }
135 154
 
155
+}

+ 15 - 0
src/server/urls.js

@@ -41,6 +41,12 @@ export default {
41 41
   getOrderDiscount: '/v2/pad/order/discount',
42 42
   //获取项目分类
43 43
   projectClassify: '/v2/pad/project/classify',
44
+  //删除项目和耗材
45
+  schemeDelete: '/v2/pad/scheme/delete',
46
+  //新增次数
47
+  timesAdd: '/v2/pad/scheme/times_add',
48
+  //新增项目
49
+  addUpdate: '/v2/pad/scheme/update',
44 50
 
45 51
   /**
46 52
    *  by ListKer
@@ -79,4 +85,13 @@ export default {
79 85
   // 获取优惠券订单
80 86
   padOrderAdd: '/v2/pad/order/add',
81 87
 
88
+  // 面部问题标签
89
+  skinFace_tags: '/v2/pad/skin/face_tags',
90
+
91
+  // 皮肤问题标签
92
+  skinSkin_tags: '/v2/pad/skin/skin_tags',
93
+
94
+  // 创建标签
95
+  schemeSave: '/v2/pad/scheme/save',
96
+
82 97
 }