2 Commits 0bb1c40d69 ... 24e630154d

Autor SHA1 Mensaje Fecha
  listKer 24e630154d feat: 测肤记录ui hace 2 años
  黎海 d990d338d2 feat: 更改邀请流程 hace 2 años

+ 4 - 4
src/common/http.js

@@ -23,8 +23,8 @@ axios.defaults.timeout = 10000;
23 23
 
24 24
 // post请求头
25 25
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
26
-axios.defaults.headers.post['token'] = localStorage.getItem('token') || store.state.comVal.token;
27
-axios.defaults.headers.get['token'] = localStorage.getItem('token') || store.state.comVal.token;
26
+axios.defaults.headers.post['token'] = localStorage.getItem('token');
27
+axios.defaults.headers.get['token'] = localStorage.getItem('token');
28 28
 
29 29
 // 请求拦截器
30 30
 axios.interceptors.request.use(
@@ -104,7 +104,7 @@ let reqUrl = ''
104 104
  */
105 105
 function get (url, params) {
106 106
   if (!axios.defaults.headers.get['token']) {
107
-    axios.defaults.headers.get['token'] = localStorage.getItem('token') || store.state.comVal.token;
107
+    axios.defaults.headers.get['token'] = localStorage.getItem('token');
108 108
 
109 109
   }
110 110
   reqUrl = basePath + url
@@ -133,7 +133,7 @@ function get (url, params) {
133 133
  */
134 134
 function post (url, params) {
135 135
   if (!axios.defaults.headers.post['token']) {
136
-    axios.defaults.headers.post['token'] = localStorage.getItem('token') || store.state.comVal.token;
136
+    axios.defaults.headers.post['token'] = localStorage.getItem('token');
137 137
   }
138 138
   reqUrl = basePath + url
139 139
   return new Promise((resolve, reject) => {

+ 6 - 6
src/components/common/layout/leftMenu.vue

@@ -50,12 +50,12 @@ export default {
50 50
           icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/home.png'
51 51
 
52 52
         },
53
-        // {
54
-        //   name: "测肤记录",
55
-        //   path: "/testSkin",
56
-        //   unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png',
57
-        //   icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png',
58
-        // },
53
+        {
54
+          name: "测肤记录",
55
+          path: "/testSkin",
56
+          unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png',
57
+          icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png',
58
+        },
59 59
         {
60 60
           name: "发券中心",
61 61
           path: "/coupon",

+ 176 - 162
src/pages/confirmOrder/addOrder/index.vue

@@ -3,7 +3,8 @@
3 3
     <div class="left">
4 4
       <div class="user-info">
5 5
         <div class="user-img">
6
-          <img :src="userInfo.image" alt />
6
+          <img :src="userInfo.image"
7
+               alt />
7 8
         </div>
8 9
         <div class="user-span">
9 10
           <div class="name">
@@ -25,7 +26,8 @@
25 26
         </div>
26 27
       </div>
27 28
       <div class="user-record">
28
-        <div class="fraction" @click="isPore=true">
29
+        <div class="fraction"
30
+             @click="isPore=true">
29 31
           <div class="title">肌肤得分</div>
30 32
           <div class="num">{{userInfo.score}}分</div>
31 33
         </div>
@@ -41,7 +43,9 @@
41 43
       <div class="lable">
42 44
         <div class="lable-title">面诊标签</div>
43 45
         <div class="lable-list">
44
-          <div v-for="(item,index) in lableList" :key="index" class="lable-info">{{item}}</div>
46
+          <div v-for="(item,index) in lableList"
47
+               :key="index"
48
+               class="lable-info">{{item}}</div>
45 49
         </div>
46 50
       </div>
47 51
       <div class="ps">
@@ -53,15 +57,14 @@
53 57
           <div class="tab-title">执行方案</div>
54 58
         </div>
55 59
         <div class="programme-list">
56
-          <div
57
-            :class="['programme-info',item.onSelect?'programme-active':'']"
58
-            v-for="(item,index) in programmeList"
59
-            :key="index"
60
-            @click="onOperation(index)"
61
-          >
60
+          <div :class="['programme-info',item.onSelect?'programme-active':'']"
61
+               v-for="(item,index) in programmeList"
62
+               :key="index"
63
+               @click="onOperation(index)">
62 64
             <div class="programme-left">
63 65
               <div class="programme-img">
64
-                <img :src="item.cover_url" alt />
66
+                <img :src="item.cover_url"
67
+                     alt />
65 68
               </div>
66 69
               <div class="programme-tips">
67 70
                 <div class="tips-title">{{item.name|ellipsis(9)}}</div>
@@ -82,7 +85,8 @@
82 85
                 <span>{{item.duration}}</span>
83 86
               </div>
84 87
             </div>
85
-            <div class="operation" v-if="item.onSelect">
88
+            <div class="operation"
89
+                 v-if="item.onSelect">
86 90
               <div class="edit">编辑</div>
87 91
               <div class="delete">删除</div>
88 92
             </div>
@@ -111,10 +115,14 @@
111 115
112 116
             <span>{{order_data.project_list?order_data.project_list.length:0}}个</span>项目
113 117
           </div>
114
-          <div v-if="order_data.type!='one'" class="add-project" @click="addProject">添加</div>
118
+          <div v-if="order_data.type!='one'"
119
+               class="add-project"
120
+               @click="addProject">添加</div>
115 121
         </div>
116 122
         <div class="project-list">
117
-          <div class="project-info" v-for="(item,index) in order_data.project_list" :key="index">
123
+          <div class="project-info"
124
+               v-for="(item,index) in order_data.project_list"
125
+               :key="index">
118 126
             <div class="project-image">
119 127
               <img :src="item.cover_url" />
120 128
             </div>
@@ -129,28 +137,23 @@
129 137
               <div class="project-tips">{{item.product_names}}</div>
130 138
               <div class="project-zoom">
131 139
                 <div>
132
-                  <span
133
-                    v-if="item.device_name"
134
-                  >{{item.device_name}}({{item.room}}){{item.use_time}}分钟</span>
140
+                  <span v-if="item.device_name">{{item.device_name}}({{item.room}}){{item.use_time}}分钟</span>
135 141
                 </div>
136 142
                 <div v-if="order_data.type!='one'">
137
-                  <img
138
-                    @click="eidt(item)"
139
-                    src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/eidt.png"
140
-                  />
141
-                  <img
142
-                    @click="deleteProject(item)"
143
-                    class="delete"
144
-                    src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/delete.png"
145
-                    alt
146
-                  />
143
+                  <img @click="eidt(item)"
144
+                       src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/eidt.png" />
145
+                  <img @click="deleteProject(item)"
146
+                       class="delete"
147
+                       src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/delete.png"
148
+                       alt />
147 149
                 </div>
148 150
               </div>
149 151
             </div>
150 152
           </div>
151 153
         </div>
152 154
       </div>
153
-      <div class="cost">
155
+      <div class="cost"
156
+           v-if="!isChange || order_data.project_list.length>0">
154 157
         <div class="over-price">
155 158
           合计:
156 159
           <span class="price-num">
@@ -160,30 +163,32 @@
160 163
           </span>
161 164
         </div>
162 165
       </div>
163
-      <div class="payment" @click="determine">确定订单</div>
166
+      <div class="payment"
167
+           @click="determine">确定订单</div>
164 168
     </div>
165 169
     <!-- 选择优惠券 -->
166 170
     <mine-pupop :show="isCoupun">
167 171
       <div class="coupon-block">
168
-        <div class="delete-pupop" @click="isCoupun=false">
169
-          <img
170
-            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
171
-            alt
172
-          />
172
+        <div class="delete-pupop"
173
+             @click="isCoupun=false">
174
+          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
175
+               alt />
173 176
         </div>
174 177
         <div class="coupon-pupop-title">选择优惠券</div>
175 178
         <ul class="coupon-lists">
176
-          <li class="coupon-info" v-for="item,index in couponList" :key="index">
179
+          <li class="coupon-info"
180
+              v-for="item,index in couponList"
181
+              :key="index">
177 182
             <!-- 1: '抵扣券',
178 183
       2: '满减券',
179 184
       3: '全额减免券',
180 185
             4: '项目卡券'-->
181
-            <div
182
-              class="coupon-tips-text"
183
-            >{{item.type==1?'抵扣券':item.type==2?'满减券':item.type==3?'全额减免券':'项目卡券'}}</div>
186
+            <div class="coupon-tips-text">{{item.type==1?'抵扣券':item.type==2?'满减券':item.type==3?'全额减免券':'项目卡券'}}</div>
184 187
             <div class="top">
185
-              <div v-if="item.type==3" class="discount-over">全免</div>
186
-              <div v-else class="discount">
188
+              <div v-if="item.type==3"
189
+                   class="discount-over">全免</div>
190
+              <div v-else
191
+                   class="discount">
187 192
                 <div class="price-num">
188 193
                   <span class="size">¥</span>
189 194
                   {{item.price}}
@@ -194,18 +199,21 @@
194 199
                 <div class="tips-title">{{item.coupon_name}}</div>
195 200
                 <div class="tips-ts">有效期至{{item.ex_time}}</div>
196 201
               </div>
197
-              <div class="choice-icon" @click="selectPupop(item,index)">
202
+              <div class="choice-icon"
203
+                   @click="selectPupop(item,index)">
198 204
                 <img :src="item.isSelect?select:unSelect" />
199 205
               </div>
200 206
             </div>
201 207
             <div class="bottom">
202
-              <div class="coupon-notes" @click="isOver=!isOver">
208
+              <div class="coupon-notes"
209
+                   @click="isOver=!isOver">
203 210
                 <div class="notes-text min-size">
204 211
                   <span v-if="!isOver">{{item.coupon_desc |ellipsis(20)}}</span>
205 212
                   <span v-else>{{item.coupon_desc}}</span>
206 213
                 </div>
207 214
                 <div class="notes-icon">
208
-                  <img :src="isOver?open:unOpen" alt />
215
+                  <img :src="isOver?open:unOpen"
216
+                       alt />
209 217
                 </div>
210 218
               </div>
211 219
             </div>
@@ -216,136 +224,130 @@
216 224
     <!-- 选择项目 -->
217 225
     <mine-pupop :show="isProject">
218 226
       <div class="project-block">
219
-        <div class="delete-pupop" @click="isProject=false">
220
-          <img
221
-            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
222
-            alt
223
-          />
227
+        <div class="delete-pupop"
228
+             @click="isProject=false">
229
+          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
230
+               alt />
224 231
         </div>
225 232
         <div class="project-pupop-title">选择项目</div>
226 233
         <div class="project-select">
227
-          <el-select
228
-            v-model="projectInfo"
229
-            placeholder="请选择项目"
230
-            style="width: 295px;"
231
-            @change="getProducts"
232
-            size="mini"
233
-          >
234
-            <el-option
235
-              v-for="item in projectList"
236
-              :key="item.id"
237
-              :label="item.name"
238
-              :value="item.id"
239
-            ></el-option>
234
+          <el-select v-model="classifyInfo"
235
+                     placeholder="请选择分类"
236
+                     style="width: 295px;"
237
+                     @change="getClassify"
238
+                     size="mini">
239
+            <el-option v-for="item in classifyList"
240
+                       :key="item.id"
241
+                       :label="item.name"
242
+                       :value="item.id">
243
+            </el-option>
244
+          </el-select>
245
+        </div>
246
+        <div class="project-select">
247
+          <el-select v-model="projectInfo"
248
+                     placeholder="请选择项目"
249
+                     style="width: 295px;"
250
+                     :disabled="classifyInfo.length==0?true:false"
251
+                     @change="getProducts"
252
+                     size="mini">
253
+            <el-option v-for="item in projectList"
254
+                       :key="item.id"
255
+                       :label="item.name"
256
+                       :value="item.id"></el-option>
240 257
           </el-select>
241 258
         </div>
242 259
         <div class="products-select">
243
-          <el-select
244
-            v-model="productsInfo"
245
-            placeholder="请选择升级产品包"
246
-            style="width: 295px;"
247
-            :disabled="projectInfo.length==0?true:false"
248
-            size="mini"
249
-          >
250
-            <el-option
251
-              v-for="item in productsList"
252
-              :key="item.id"
253
-              :label="item.name"
254
-              :value="item.id"
255
-            ></el-option>
260
+          <el-select v-model="productsInfo"
261
+                     placeholder="请选择升级产品包"
262
+                     style="width: 295px;"
263
+                     :disabled="projectInfo.length==0?true:false"
264
+                     size="mini">
265
+            <el-option v-for="item in productsList"
266
+                       :key="item.id"
267
+                       :label="item.name"
268
+                       :value="item.id"></el-option>
256 269
           </el-select>
257 270
         </div>
258
-        <div class="products-button" @click="orderUpdate">确定</div>
271
+        <div class="products-button"
272
+             @click="orderUpdate">确定</div>
259 273
       </div>
260 274
     </mine-pupop>
261 275
     <!-- 选择时间 -->
262 276
     <mine-pupop :show="isTs">
263 277
       <div class="ts-block">
264
-        <div class="delete-pupop" @click="isTs=false">
265
-          <img
266
-            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
267
-            alt
268
-          />
278
+        <div class="delete-pupop"
279
+             @click="isTs=false">
280
+          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
281
+               alt />
269 282
         </div>
270 283
         <div class="ts-pupop-title">选择时间</div>
271 284
         <div class="ts-content">
272 285
           <ul class="ts-table">
273
-            <li
274
-              v-for="item,index in tsTableList"
275
-              :key="index"
276
-              @click="changetsTable(index)"
277
-              :class="tsTableIndex==index?'ts-table-active':''"
278
-            >
286
+            <li v-for="item,index in tsTableList"
287
+                :key="index"
288
+                @click="changetsTable(index)"
289
+                :class="tsTableIndex==index?'ts-table-active':''">
279 290
               <div>{{item.text}}</div>
280 291
               <div>{{item.ts}}</div>
281 292
             </li>
282 293
           </ul>
283 294
           <div v-if="tsBodyList.day">
284 295
             <div class="time-slot">
285
-              <div
286
-                class="day"
287
-                @click="changeActive(1)"
288
-                :style="active==1?'color: #333333;font-weight: 600;':''"
289
-              >{{ tsBodyList.day.name}}</div>
290
-              <div
291
-                class="night"
292
-                @click="changeActive(0)"
293
-                :style="active==0?'color: #333333;font-weight: 600;':''"
294
-              >{{tsBodyList.night.name}}</div>
296
+              <div class="day"
297
+                   @click="changeActive(1)"
298
+                   :style="active==1?'color: #333333;font-weight: 600;':''">{{ tsBodyList.day.name}}</div>
299
+              <div class="night"
300
+                   @click="changeActive(0)"
301
+                   :style="active==0?'color: #333333;font-weight: 600;':''">{{tsBodyList.night.name}}</div>
295 302
             </div>
296
-            <ul class="ts-boty" v-if="active==1">
297
-              <li v-for="item,index in tsBodyList.day.list" :key="index">
298
-                <div
299
-                  :style="item.status==0?'color: #D3D3D3;':''"
300
-                  @click="selectTime(item)"
301
-                  :class="timeIndexText==item.order_time?'time-active':''"
302
-                >{{item.order_time}}</div>
303
+            <ul class="ts-boty"
304
+                v-if="active==1">
305
+              <li v-for="item,index in tsBodyList.day.list"
306
+                  :key="index">
307
+                <div :style="item.status==0?'color: #D3D3D3;':''"
308
+                     @click="selectTime(item)"
309
+                     :class="timeIndexText==item.order_time?'time-active':''">{{item.order_time}}</div>
303 310
               </li>
304 311
             </ul>
305
-            <ul class="ts-boty" v-else>
306
-              <li v-for="item,index in tsBodyList.night.list" :key="index">
307
-                <div
308
-                  :style="item.status==0?'color: #D3D3D3;':''"
309
-                  @click="selectTime(item)"
310
-                  :class="timeIndexText==item.order_time?'time-active':''"
311
-                >{{item.order_time}}</div>
312
+            <ul class="ts-boty"
313
+                v-else>
314
+              <li v-for="item,index in tsBodyList.night.list"
315
+                  :key="index">
316
+                <div :style="item.status==0?'color: #D3D3D3;':''"
317
+                     @click="selectTime(item)"
318
+                     :class="timeIndexText==item.order_time?'time-active':''">{{item.order_time}}</div>
312 319
               </li>
313 320
             </ul>
314 321
           </div>
315 322
         </div>
316
-        <el-button
317
-          class="ts-button"
318
-          :style="this.timeIndexText.length == 0?'background: rgb(211, 211, 211);':''"
319
-          @click="comfigTs"
320
-        >确认</el-button>
323
+        <el-button class="ts-button"
324
+                   :style="this.timeIndexText.length == 0?'background: rgb(211, 211, 211);':''"
325
+                   @click="comfigTs">确认</el-button>
321 326
       </div>
322 327
     </mine-pupop>
323 328
     <!-- 皮肤状态 -->
324 329
     <mine-pupop :show="isPore">
325 330
       <div class="pore-block">
326
-        <div class="delete-pupop" @click="isPore=false">
327
-          <img
328
-            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
329
-            alt
330
-          />
331
+        <div class="delete-pupop"
332
+             @click="isPore=false">
333
+          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
334
+               alt />
331 335
         </div>
332 336
         <div class="pore-content">
333 337
           <ul>
334
-            <li class="pore-info" v-for="item,index in poreList" :key="index">
338
+            <li class="pore-info"
339
+                v-for="item,index in poreList"
340
+                :key="index">
335 341
               <div class="pore-top">
336 342
                 <div class="pore-title">
337 343
                   <div>{{item.name}}</div>
338
-                  <div
339
-                    class="pore-medium"
340
-                    v-if="item.main_item"
341
-                  >{{item.main_item.name}}{{item.main_item.num}}</div>
344
+                  <div class="pore-medium"
345
+                       v-if="item.main_item">{{item.main_item.name}}{{item.main_item.num}}</div>
342 346
                 </div>
343 347
                 <div class="pore-over">
344
-                  <div
345
-                    class="min-size"
346
-                    v-for="value,index in item.items"
347
-                    :key="index"
348
-                  >{{value.name}}{{value.num}}个</div>
348
+                  <div class="min-size"
349
+                       v-for="value,index in item.items"
350
+                       :key="index">{{value.name}}{{value.num}}个</div>
349 351
                 </div>
350 352
               </div>
351 353
               <div class="pore-bottom min-size">{{item.suggest | ellipsis(85)}}</div>
@@ -364,7 +366,7 @@ import api from "../../../server/home";
364 366
 
365 367
 export default {
366 368
   components: { minePupop },
367
-  data() {
369
+  data () {
368 370
     return {
369 371
       open:
370 372
         "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/openNotes.png",
@@ -384,6 +386,8 @@ export default {
384 386
       }, //门店
385 387
       //项目列表
386 388
       projectList: [],
389
+      //项目分类列表
390
+      classifyList: [],
387 391
       //升级包列表
388 392
       productsList: [],
389 393
       //时间列表(头部)
@@ -409,6 +413,7 @@ export default {
409 413
       timeIndexText: "", //当前选择的时间
410 414
       weekInfo: "",
411 415
       programmeIndex: "",
416
+      classifyInfo: '',
412 417
       remarks: "",
413 418
       isCoupun: false, //是否展示优惠券弹窗
414 419
       isOver: false, //优惠券注释
@@ -441,16 +446,26 @@ export default {
441 446
   watch: {},
442 447
 
443 448
   methods: {
444
-    toHome() {
449
+    toHome () {
445 450
       this.$router.replace("/home");
446 451
     },
447
-
448
-    getProjectList() {
449
-      api.getProjectList().then(res => {
452
+    getProjectClassify () {
453
+      api.projectClassify().then(res => {
454
+        this.classifyList = res.data.list
455
+      })
456
+    },
457
+    getProjectList (e) {
458
+      api.getProjectList({ id: e }).then(res => {
450 459
         this.projectList = res.data.list;
451 460
       });
452 461
     },
453
-    getProducts(e) {
462
+    getClassify (e) {
463
+      this.projectInfo = ''
464
+      console.log(e);
465
+      this.getProjectList(e)
466
+    },
467
+
468
+    getProducts (e) {
454 469
       // this.productsInfo = ''
455 470
       api.getProducts({ id: e }).then(res => {
456 471
         this.productsList = res.data.list;
@@ -461,7 +476,7 @@ export default {
461 476
         });
462 477
       });
463 478
     },
464
-    eidt(item) {
479
+    eidt (item) {
465 480
       this.projectInfo = item.id;
466 481
       this.productsInfo =
467 482
         item.product_ids == "" ? "" : Number(item.product_ids);
@@ -469,7 +484,7 @@ export default {
469 484
       this.isEditProject = true;
470 485
       this.isProject = true;
471 486
     },
472
-    deleteProject(item) {
487
+    deleteProject (item) {
473 488
       this.order_data.project_list.forEach((res, index) => {
474 489
         if (item.id == res.id) {
475 490
           this.order_data.project_list.splice(index, 1);
@@ -480,14 +495,14 @@ export default {
480 495
         }
481 496
       });
482 497
     },
483
-    addProject() {
498
+    addProject () {
484 499
       this.projectInfo = "";
485 500
       this.productsInfo = "";
486 501
       this.isEditProject = false;
487 502
       this.isProject = true;
488 503
     },
489 504
     //新增
490
-    orderUpdate() {
505
+    orderUpdate () {
491 506
       // 编辑
492 507
       if (this.isEditProject) {
493 508
         if (this.productsInfo != "") {
@@ -568,7 +583,7 @@ export default {
568 583
       }
569 584
     },
570 585
     //获取最近七天的时间
571
-    getWeekDate() {
586
+    getWeekDate () {
572 587
       //获取系统当前时间
573 588
       let now = new Date();
574 589
       let nowTime = now.getTime();
@@ -592,7 +607,7 @@ export default {
592 607
       this.tsTableList = tsTableList;
593 608
     },
594 609
     //确定订单&支付
595
-    determine() {
610
+    determine () {
596 611
       if (this.order_data.project_list == 0) {
597 612
         this.$message.error(
598 613
           "项目选择不能为空!"
@@ -606,7 +621,7 @@ export default {
606 621
       this.isTs = true;
607 622
     },
608 623
     //确定时间选择
609
-    comfigTs() {
624
+    comfigTs () {
610 625
       let that = this;
611 626
       if (this.timeIndexText.length == 0) return;
612 627
       let order_data = [];
@@ -637,22 +652,22 @@ export default {
637 652
       });
638 653
     },
639 654
     //计算预约费用
640
-    calculationPrice() {
655
+    calculationPrice () {
641 656
       this.reservationPrice = 0;
642 657
       this.order_data.project_list.forEach(res => {
643 658
         this.reservationPrice += Number(res.price);
644 659
       });
645 660
     },
646 661
 
647
-    
648
-    changePayStatus() {
662
+
663
+    changePayStatus () {
649 664
       this.PayStatus = false;
650 665
       if (this.payStatusInterval) {
651 666
         //如果定时器在运行则关闭
652 667
         clearInterval(this.payStatusInterval);
653 668
       }
654 669
     },
655
-    payStatus() {
670
+    payStatus () {
656 671
       api.payStatus({ id: this.id }).then(res => {
657 672
         if (res.data.pay_status == 1) {
658 673
           clearInterval(this.payStatusInterval);
@@ -662,7 +677,7 @@ export default {
662 677
     },
663 678
 
664 679
     //数组包含关系
665
-    includes(arr1, arr2) {
680
+    includes (arr1, arr2) {
666 681
       return arr2.every(val => arr1.includes(val));
667 682
     },
668 683
     //选中优惠券
@@ -682,19 +697,19 @@ export default {
682 697
     // 3、优惠劵可以给多个项目抵扣,
683 698
     // 4、默认抵扣金额最高的
684 699
     // 5、优惠劵排序,到期时间倒叙
685
-    
686
-    changeActive(e) {
700
+
701
+    changeActive (e) {
687 702
       this.active = e;
688 703
     },
689
-    selectTime(item) {
704
+    selectTime (item) {
690 705
       if (item.status == 0) return;
691 706
       this.timeIndexText = item.order_time;
692 707
     },
693
-    changetsTable(index) {
708
+    changetsTable (index) {
694 709
       this.tsTableIndex = index;
695 710
       this.getOrderTime();
696 711
     },
697
-    getOrderTime() {
712
+    getOrderTime () {
698 713
       let ids = "",
699 714
         idsList = [];
700 715
       this.order_data.project_list.forEach(res => {
@@ -710,7 +725,7 @@ export default {
710 725
       });
711 726
     },
712 727
 
713
-    onOperation(index) {
728
+    onOperation (index) {
714 729
       if (this.programmeList[index].onSelect) {
715 730
         this.$set(
716 731
           this.programmeList[index],
@@ -722,14 +737,14 @@ export default {
722 737
       }
723 738
     },
724 739
     //获取订单折扣类型
725
-    getOrderDiscount() {
740
+    getOrderDiscount () {
726 741
       api.getOrderDiscount({ id: this.id }).then(res => {
727 742
         this.discount = res.data.discount;
728 743
         this.getOrderInfo();
729 744
       });
730 745
     },
731 746
 
732
-    getUserInfo() {
747
+    getUserInfo () {
733 748
       let that = this;
734 749
       api.getUserInfo().then(res => {
735 750
         if (res.code == 200) {
@@ -739,7 +754,7 @@ export default {
739 754
     }
740 755
   },
741 756
 
742
-  created() {
757
+  created () {
743 758
     this.getUserInfo();
744 759
     let data = this.$route.query.data;
745 760
 
@@ -747,7 +762,6 @@ export default {
747 762
     if (data) {
748 763
       this.data = JSON.parse(data);
749 764
     }
750
-
751 765
     this.userInfo = this.data.user;
752 766
     this.lableList = this.data.tags;
753 767
     this.remarks = this.data.remark;
@@ -755,13 +769,13 @@ export default {
755 769
     // this.order_data = this.data.order_data;
756 770
     this.reservationPrice = 0;
757 771
     this.poreList = this.data.detail_list;
758
-
759
-    this.getProjectList();
772
+    this.getProjectClassify()
773
+    // this.getProjectList();
760 774
     // this.getOrderDiscount()
761 775
   },
762 776
 
763
-  mounted() {},
764
-  destroyed() {
777
+  mounted () { },
778
+  destroyed () {
765 779
     if (this.payStatusInterval) {
766 780
       //如果定时器在运行则关闭
767 781
       clearInterval(this.payStatusInterval);
@@ -1037,7 +1051,7 @@ export default {
1037 1051
       }
1038 1052
       .project-list {
1039 1053
         padding-top: 10px;
1040
-        height: 250px;
1054
+        height: 220px;
1041 1055
         overflow: scroll;
1042 1056
         .project-info {
1043 1057
           margin-bottom: 10px;

+ 32 - 5
src/pages/confirmOrder/details/index.vue

@@ -193,7 +193,7 @@
193 193
       4: '项目卡券' -->
194 194
             <div class="coupon-tips-text">{{item.type==1?'抵扣券':item.type==2?'满减券':item.type==3?'全额减免券':'项目卡券'}}</div>
195 195
             <div class="top">
196
-              <div v-if="item.type==3"
196
+              <div v-if="item.type==3||item.type==4"
197 197
                    class="discount-over">全免</div>
198 198
               <div v-else
199 199
                    class="discount">
@@ -230,9 +230,23 @@
230 230
                alt=""></div>
231 231
         <div class="project-pupop-title">选择项目</div>
232 232
         <div class="project-select">
233
+          <el-select v-model="classifyInfo"
234
+                     placeholder="请选择分类"
235
+                     style="width: 295px;"
236
+                     @change="getClassify"
237
+                     size="mini">
238
+            <el-option v-for="item in classifyList"
239
+                       :key="item.id"
240
+                       :label="item.name"
241
+                       :value="item.id">
242
+            </el-option>
243
+          </el-select>
244
+        </div>
245
+        <div class="project-select">
233 246
           <el-select v-model="projectInfo"
234 247
                      placeholder="请选择项目"
235 248
                      style="width: 295px;"
249
+                     :disabled="classifyInfo.length==0?true:false"
236 250
                      @change="getProducts"
237 251
                      size="mini">
238 252
             <el-option v-for="item in projectList"
@@ -417,6 +431,8 @@ export default {
417 431
       //执行方案
418 432
       programmeList: [],
419 433
       order_data: {},//门店
434
+      //项目分类列表
435
+      classifyList: [],
420 436
       //项目列表
421 437
       projectList: [],
422 438
       //升级包列表
@@ -462,6 +478,7 @@ export default {
462 478
       reservationPrice: 0,//预约费用
463 479
       projectInfo: '',
464 480
       productsInfo: '',
481
+      classifyInfo: '',
465 482
       timeIndexText: "",//当前选择的时间
466 483
       weekInfo: '',
467 484
       programmeIndex: '',
@@ -527,13 +544,22 @@ export default {
527 544
         this.calculationPrice()
528 545
       })
529 546
     },
530
-    getProjectList () {
531
-      api.getProjectList().then(res => {
547
+    getProjectClassify () {
548
+      api.projectClassify().then(res => {
549
+        this.classifyList = res.data.list
550
+      })
551
+    },
552
+    getProjectList (e) {
553
+      api.getProjectList({ id: e }).then(res => {
532 554
         this.projectList = res.data.list
533 555
       })
534 556
     },
557
+    getClassify (e) {
558
+      this.projectInfo = ''
559
+      console.log(e);
560
+      this.getProjectList(e)
561
+    },
535 562
     getProducts (e) {
536
-      // this.productsInfo = ''
537 563
       api.getProducts({ id: e }).then(res => {
538 564
         this.productsList = res.data.list
539 565
         this.productsList.forEach(item => {
@@ -765,6 +791,7 @@ export default {
765 791
             let couponInfo = {}
766 792
             couponInfo['id'] = item.projectids
767 793
             couponInfo['coupon_id'] = item.id
794
+            coupon_data.push(couponInfo)
768 795
           }
769 796
         })
770 797
       }
@@ -1047,8 +1074,8 @@ export default {
1047 1074
     if (id) {
1048 1075
       this.id = id
1049 1076
     }
1077
+    this.getProjectClassify()
1050 1078
 
1051
-    this.getProjectList()
1052 1079
     this.getOrderDiscount()
1053 1080
 
1054 1081
   },

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

@@ -45,7 +45,7 @@ export default {
45 45
       //十分钟强制清除,防止页面崩溃
46 46
       this.checkCodeTimeout = setTimeout(() => {
47 47
         clearTimeout(this.checkCodeTimeout);
48
-      }, 360000);
48
+      }, 360000); 
49 49
     },
50 50
     getOrderByCode() {
51 51
       api.getOrderByCode({ ticket: this.ticket }).then(res => {

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

@@ -61,7 +61,7 @@
61 61
                          label="状态"
62 62
                          show-overflow-tooltip>
63 63
           <template slot-scope="scope">
64
-            <div :style="scope.row.status==0?'color: #FC3019':scope.row.status==5?'color: #A999EA':'color: #61D09D;'">{{ scope.row.status==0?'未支付':scope.row.status==5?'已取消':'待使用' }}</div>
64
+            <div :style="scope.row.status==0?'color: #FC3019':scope.row.status==5?'color: #A999EA':'color: #61D09D;'">{{ scope.row.status==0?'未支付':scope.row.status==5?'已取消':scope.row.status==1?'待使用':scope.row.status==2?'正在使用':scope.row.status==3?'已结算':'' }}</div>
65 65
           </template>
66 66
         </el-table-column>
67 67
       </el-table>

+ 2 - 2
src/pages/login/login.vue

@@ -31,6 +31,7 @@
31 31
 
32 32
 <script>
33 33
 import api from '../../server/home'
34
+import axios from 'axios';
34 35
 // import Cookies from "js-cookie"
35 36
 export default {
36 37
   components: {},
@@ -52,8 +53,8 @@ export default {
52 53
       }
53 54
       api.getToken(params).then(res => {
54 55
         if (res.code == 200) {
55
-          this.$store.state.comVal.token = res.data.token
56 56
           localStorage.setItem("token", res.data.token)
57
+          axios.defaults.headers.token = res.data.token
57 58
           this.$router.push({
58 59
             path: '/home'
59 60
           })
@@ -62,7 +63,6 @@ export default {
62 63
         }
63 64
       })
64 65
     }
65
-
66 66
   },
67 67
 
68 68
   created () {

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 735 - 172
src/pages/testSkin/details/index.vue


+ 3 - 0
src/server/home.js

@@ -69,6 +69,9 @@ export default class Home {
69 69
   static getOrderDiscount (parms) {
70 70
     return $http.get(url.getOrderDiscount, parms);
71 71
   }
72
+  static projectClassify (parms) {
73
+    return $http.get(url.projectClassify, parms);
74
+  }
72 75
 
73 76
   // 获取历史订单
74 77
   static getOrderList (parms) {

+ 2 - 0
src/server/urls.js

@@ -39,6 +39,8 @@ export default {
39 39
   payStatus: '/v2/pad/order/pay_status',
40 40
   //活动折扣
41 41
   getOrderDiscount: '/v2/pad/order/discount',
42
+  //获取项目分类
43
+  projectClassify: '/v2/pad/project/classify',
42 44
 
43 45
   /**
44 46
    *  by ListKer