2 Commits 0bb1c40d69 ... 24e630154d

Author SHA1 Message Date
  listKer 24e630154d feat: 测肤记录ui 2 years ago
  黎海 d990d338d2 feat: 更改邀请流程 2 years ago

+ 4 - 4
src/common/http.js

@@ -23,8 +23,8 @@ axios.defaults.timeout = 10000;
23
 
23
 
24
 // post请求头
24
 // post请求头
25
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
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
 axios.interceptors.request.use(
30
 axios.interceptors.request.use(
@@ -104,7 +104,7 @@ let reqUrl = ''
104
  */
104
  */
105
 function get (url, params) {
105
 function get (url, params) {
106
   if (!axios.defaults.headers.get['token']) {
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
   reqUrl = basePath + url
110
   reqUrl = basePath + url
@@ -133,7 +133,7 @@ function get (url, params) {
133
  */
133
  */
134
 function post (url, params) {
134
 function post (url, params) {
135
   if (!axios.defaults.headers.post['token']) {
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
   reqUrl = basePath + url
138
   reqUrl = basePath + url
139
   return new Promise((resolve, reject) => {
139
   return new Promise((resolve, reject) => {

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

@@ -50,12 +50,12 @@ export default {
50
           icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/home.png'
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
           name: "发券中心",
60
           name: "发券中心",
61
           path: "/coupon",
61
           path: "/coupon",

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

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

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

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

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

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

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

@@ -61,7 +61,7 @@
61
                          label="状态"
61
                          label="状态"
62
                          show-overflow-tooltip>
62
                          show-overflow-tooltip>
63
           <template slot-scope="scope">
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
           </template>
65
           </template>
66
         </el-table-column>
66
         </el-table-column>
67
       </el-table>
67
       </el-table>

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

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

File diff suppressed because it is too large
+ 735 - 172
src/pages/testSkin/details/index.vue


+ 3 - 0
src/server/home.js

@@ -69,6 +69,9 @@ export default class Home {
69
   static getOrderDiscount (parms) {
69
   static getOrderDiscount (parms) {
70
     return $http.get(url.getOrderDiscount, parms);
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
   static getOrderList (parms) {
77
   static getOrderList (parms) {

+ 2 - 0
src/server/urls.js

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