Browse Source

修改订单状态

yuhao 2 years ago
parent
commit
e30c941e37

+ 1 - 1
src/App.vue

@@ -1,7 +1,7 @@
1
 <template>
1
 <template>
2
   <div id="app">
2
   <div id="app">
3
     <keep-alive>
3
     <keep-alive>
4
-      <router-view v-if="$route.meta.keepAlive" :key="$route.fullpath"></router-view>
4
+      <router-view v-if="$route.meta.keepAlive"></router-view>
5
     </keep-alive>
5
     </keep-alive>
6
     <router-view v-if="!$route.meta.keepAlive"></router-view>
6
     <router-view v-if="!$route.meta.keepAlive"></router-view>
7
   </div>
7
   </div>

+ 41 - 23
src/pages/customerMan/myOrder/index.vue

@@ -43,10 +43,21 @@
43
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
43
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
44
                 <template slot-scope="scope">
44
                 <template slot-scope="scope">
45
                   <div :class="'color' + scope.row.status">
45
                   <div :class="'color' + scope.row.status">
46
+                    <!-- 状态:0已预约,未支付,1已支付,待使用,2正在使用,3已结算,-1已取消,-2退款审核中,-3已退款 -->
46
                     {{
47
                     {{
47
-                      scope.row.status != 5
48
-                        ? statusStr[scope.row.status]
49
-                        : statusStr[statusStr.length - 1]
48
+                      scope.row.status == 0
49
+                        ? "已预约"
50
+                        : scope.row.status == 1
51
+                        ? "待使用"
52
+                        : scope.row.status == 2
53
+                        ? "正在使用"
54
+                        : scope.row.status == 3
55
+                        ? "已结算"
56
+                        : scope.row.status == -1
57
+                        ? "已取消"
58
+                        : scope.row.status == -2
59
+                        ? "退款审核中"
60
+                        : "已退款"
50
                     }}
61
                     }}
51
                   </div>
62
                   </div>
52
                 </template>
63
                 </template>
@@ -184,20 +195,20 @@ status: 5 -->
184
               ></el-table-column>
195
               ></el-table-column>
185
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
196
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
186
                 <template slot-scope="scope">
197
                 <template slot-scope="scope">
187
-                  <div :class="'classShow' + scope.$index">
188
-                    <!-- {{
189
-                      scope.row.status == 1 || scope.row.status == 2
190
-                        ? goodStatus[scope.row.status]
191
-                        : goodStatus[goodStatus.length - 1]
192
-                    }} -->
198
+                  <div :class="'color' + scope.row.status">
199
+                    <!-- 状态,0未支付,1已支付,待取货,2已取货,-1已取消,-2退款审核中,-3已退款 -->
193
                     {{
200
                     {{
194
-                      scope.row.status == 2 || scope.row.status == 3
195
-                        ? "已取货"
196
-                        : scope.row.status == 0
201
+                      scope.row.status == 0
197
                         ? "未支付"
202
                         ? "未支付"
198
                         : scope.row.status == 1
203
                         : scope.row.status == 1
199
                         ? "待取货"
204
                         ? "待取货"
200
-                        : "已取消"
205
+                        : scope.row.status == 2
206
+                        ? "已取货"
207
+                        : scope.row.status == -1
208
+                        ? "已取消"
209
+                        : scope.row.status == -2
210
+                        ? "退款审核中"
211
+                        : "已退款"
201
                     }}
212
                     }}
202
                   </div>
213
                   </div>
203
                 </template>
214
                 </template>
@@ -260,7 +271,7 @@ type: "全额券" -->
260
               ></el-table-column>
271
               ></el-table-column>
261
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
272
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
262
                 <template slot-scope="scope">
273
                 <template slot-scope="scope">
263
-                  <div :class="'color' + scope.row.status">
274
+                  <div :class="'colorA' + scope.row.status">
264
                     {{ couponStatus[scope.row.status] }}
275
                     {{ couponStatus[scope.row.status] }}
265
                   </div>
276
                   </div>
266
                 </template>
277
                 </template>
@@ -418,7 +429,6 @@ export default {
418
           status: 1,
429
           status: 1,
419
         },
430
         },
420
       ],
431
       ],
421
-      statusStr: ["未支付", "待使用", "正在使用", "已结算", "已取消"],
422
       couponStatus: ["待使用", "已使用", "已过期"],
432
       couponStatus: ["待使用", "已使用", "已过期"],
423
       goodStatus: ["未支付", "已支付", "已取货"],
433
       goodStatus: ["未支付", "已支付", "已取货"],
424
       activeName: "first",
434
       activeName: "first",
@@ -670,27 +680,35 @@ export default {
670
   }
680
   }
671
 }
681
 }
672
 .color0 {
682
 .color0 {
673
-  color: #fc3019;
683
+  color: #3ef3ed;
674
 }
684
 }
675
 .color1 {
685
 .color1 {
676
-  color: #3ef3ed;
686
+  color: #61d09d;
677
 }
687
 }
678
 .color2 {
688
 .color2 {
679
   color: #00eeee;
689
   color: #00eeee;
680
 }
690
 }
681
 .color3 {
691
 .color3 {
682
-  color: #61d09d;
692
+  color: #a999ea;
683
 }
693
 }
684
-.color4 {
694
+.color-2 {
685
   color: #3115cc;
695
   color: #3115cc;
686
 }
696
 }
687
-.color5 {
697
+.color-1 {
688
   color: #fc3019;
698
   color: #fc3019;
689
 }
699
 }
690
-.color6 {
691
-  color: #a999ea;
700
+.color-3 {
701
+  color: #fc3019;
702
+}
703
+.colorA1{
704
+  color: #333;
705
+}
706
+.colorA2{
707
+  color: #fc3019;
708
+}
709
+.colorA0{
710
+  color: #61d09d;
692
 }
711
 }
693
-
694
 .priceColor {
712
 .priceColor {
695
   color: #ff3007;
713
   color: #ff3007;
696
 }
714
 }

+ 15 - 20
src/pages/historicalOrder/index.vue

@@ -68,27 +68,22 @@
68
         ></el-table-column>
68
         ></el-table-column>
69
         <el-table-column prop="date" label="状态" show-overflow-tooltip>
69
         <el-table-column prop="date" label="状态" show-overflow-tooltip>
70
           <template slot-scope="scope">
70
           <template slot-scope="scope">
71
-            <div
72
-              :style="
73
-                scope.row.status == 0
74
-                  ? 'color: #FC3019'
75
-                  : scope.row.status == 5
76
-                  ? 'color: #A999EA'
77
-                  : 'color: #61D09D;'
78
-              "
79
-            >
71
+            <div :class="'color' + scope.row.status">
72
+              <!-- 状态,0已预约,未支付,1已支付,待使用,2正在使用,3已结算,-1已取消,-2退款审核中,-3已退款 -->
80
               {{
73
               {{
81
                 scope.row.status == 0
74
                 scope.row.status == 0
82
-                  ? "未支付"
83
-                  : scope.row.status == 5
84
-                  ? "已取消"
75
+                  ? "已预约"
85
                   : scope.row.status == 1
76
                   : scope.row.status == 1
86
                   ? "待使用"
77
                   ? "待使用"
87
                   : scope.row.status == 2
78
                   : scope.row.status == 2
88
                   ? "正在使用"
79
                   ? "正在使用"
89
                   : scope.row.status == 3
80
                   : scope.row.status == 3
90
                   ? "已结算"
81
                   ? "已结算"
91
-                  : ""
82
+                  : scope.row.status == -1
83
+                  ? "已取消"
84
+                  : scope.row.status == -2
85
+                  ? "退款审核中"
86
+                  : "已退款"
92
               }}
87
               }}
93
             </div>
88
             </div>
94
           </template>
89
           </template>
@@ -360,25 +355,25 @@ export default {
360
     }
355
     }
361
   }
356
   }
362
   .color0 {
357
   .color0 {
363
-    color: #fc3019;
358
+    color: #3ef3ed;
364
   }
359
   }
365
   .color1 {
360
   .color1 {
366
-    color: #3ef3ed;
361
+    color: #61d09d;
367
   }
362
   }
368
   .color2 {
363
   .color2 {
369
     color: #00eeee;
364
     color: #00eeee;
370
   }
365
   }
371
   .color3 {
366
   .color3 {
372
-    color: #61d09d;
367
+    color: #a999ea;
373
   }
368
   }
374
-  .color4 {
369
+  .color-2 {
375
     color: #3115cc;
370
     color: #3115cc;
376
   }
371
   }
377
-  .color5 {
372
+  .color-1 {
378
     color: #fc3019;
373
     color: #fc3019;
379
   }
374
   }
380
-  .color6 {
381
-    color: #a999ea;
375
+  .color-3 {
376
+    color: #fc3019;
382
   }
377
   }
383
 }
378
 }
384
 </style>
379
 </style>

+ 38 - 2
src/pages/home/index.vue

@@ -43,9 +43,24 @@
43
                   :key="i"><img :src="value.cover_url"
43
                   :key="i"><img :src="value.cover_url"
44
                      alt=""></li>
44
                      alt=""></li>
45
             </ul>
45
             </ul>
46
+            <!-- 状态,0已预约,未支付,1已支付,待使用,2正在使用,3已结算,-1已取消,-2退款审核中,-3已退款 -->
46
             <div class="status"
47
             <div class="status"
47
-                 :style="item.status==0?'color: #FC3019':item.status==5?'color: #A999EA':'color: #61D09D;'">
48
-              {{ item.status==0?'未支付':item.status==5?'已取消':'待使用' }}
48
+                 :class="'color' + item.status">
49
+                            {{
50
+                item.status == 0
51
+                  ? "已预约"
52
+                  : item.status == 1
53
+                  ? "待使用"
54
+                  : item.status == 2
55
+                  ? "正在使用"
56
+                  : item.status == 3
57
+                  ? "已结算"
58
+                  : item.status == -1
59
+                  ? "已取消"
60
+                  : item.status == -2
61
+                  ? "退款审核中"
62
+                  : "已退款"
63
+              }}
49
             </div>
64
             </div>
50
           </div>
65
           </div>
51
         </van-list>
66
         </van-list>
@@ -339,4 +354,25 @@ export default {
339
     }
354
     }
340
   }
355
   }
341
 }
356
 }
357
+.color0 {
358
+  color: #3ef3ed !important;
359
+}
360
+.color1 {
361
+  color: #61d09d !important;
362
+}
363
+.color2 {
364
+  color: #00eeee !important;
365
+}
366
+.color3 {
367
+  color: #a999ea !important;
368
+}
369
+.color-2 {
370
+  color: #3115cc !important;
371
+}
372
+.color-1 {
373
+  color: #fc3019 !important;
374
+}
375
+.color-3 {
376
+  color: #fc3019 !important;
377
+}
342
 </style>
378
 </style>

+ 49 - 23
src/pages/payUser/myOrder/index.vue

@@ -43,10 +43,21 @@
43
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
43
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
44
                 <template slot-scope="scope">
44
                 <template slot-scope="scope">
45
                   <div :class="'color' + scope.row.status">
45
                   <div :class="'color' + scope.row.status">
46
+                    <!-- 状态:0已预约,未支付,1已支付,待使用,2正在使用,3已结算,-1已取消,-2退款审核中,-3已退款 -->
46
                     {{
47
                     {{
47
-                      scope.row.status != 5
48
-                        ? statusStr[scope.row.status]
49
-                        : statusStr[statusStr.length - 1]
48
+                      scope.row.status == 0
49
+                        ? "已预约"
50
+                        : scope.row.status == 1
51
+                        ? "待使用"
52
+                        : scope.row.status == 2
53
+                        ? "正在使用"
54
+                        : scope.row.status == 3
55
+                        ? "已结算"
56
+                        : scope.row.status == -1
57
+                        ? "已取消"
58
+                        : scope.row.status == -2
59
+                        ? "退款审核中"
60
+                        : "已退款"
50
                     }}
61
                     }}
51
                   </div>
62
                   </div>
52
                 </template>
63
                 </template>
@@ -178,13 +189,20 @@ status: 5 -->
178
               ></el-table-column>
189
               ></el-table-column>
179
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
190
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
180
                 <template slot-scope="scope">
191
                 <template slot-scope="scope">
181
-                  <div :class="'classShow' + scope.$index">
182
-                    <!-- {{
183
-                      scope.row.status == 1 || scope.row.status == 2
184
-                        ? goodStatus[scope.row.status]
185
-                        : goodStatus[goodStatus.length - 1]
186
-                    }} -->
187
-                    {{scope.row.status==2||scope.row.status==3?'已取货':scope.row.status==0?'未支付':scope.row.status==1?'待取货':'已取消'}}
192
+                  <div :class="'color' + scope.row.status">
193
+                    {{
194
+                      scope.row.status == 0
195
+                        ? "未支付"
196
+                        : scope.row.status == 1
197
+                        ? "待取货"
198
+                        : scope.row.status == 2
199
+                        ? "已取货"
200
+                        : scope.row.status == -1
201
+                        ? "已取消"
202
+                        : scope.row.status == -2
203
+                        ? "退款审核中"
204
+                        : "已退款"
205
+                    }}
188
                   </div>
206
                   </div>
189
                 </template>
207
                 </template>
190
               </el-table-column>
208
               </el-table-column>
@@ -242,11 +260,11 @@ type: "全额券" -->
242
                 prop="create_time"
260
                 prop="create_time"
243
                 label="创建时间"
261
                 label="创建时间"
244
                 width="180"
262
                 width="180"
245
-                show-overflow-tooltip
263
+                show-overflow-tooltipA
246
               ></el-table-column>
264
               ></el-table-column>
247
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
265
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
248
                 <template slot-scope="scope">
266
                 <template slot-scope="scope">
249
-                  <div :class="'color' + scope.row.status">
267
+                  <div :class="'colorA' + scope.row.status">
250
                     {{ couponStatus[scope.row.status] }}
268
                     {{ couponStatus[scope.row.status] }}
251
                   </div>
269
                   </div>
252
                 </template>
270
                 </template>
@@ -299,7 +317,8 @@ type: "全额券" -->
299
               >
317
               >
300
                 <template slot-scope="scope">
318
                 <template slot-scope="scope">
301
                   <div>
319
                   <div>
302
-                    {{ scope.row.is_add == 1 ? "+" : "-" }}{{ scope.row.amount }}
320
+                    {{ scope.row.is_add == 1 ? "+" : "-"
321
+                    }}{{ scope.row.amount }}
303
                   </div>
322
                   </div>
304
                 </template>
323
                 </template>
305
               </el-table-column>
324
               </el-table-column>
@@ -453,7 +472,6 @@ export default {
453
           status: 1,
472
           status: 1,
454
         },
473
         },
455
       ],
474
       ],
456
-      statusStr: ["未支付", "待使用", "正在使用", "已结算", "已取消"],
457
       couponStatus: ["待使用", "已使用", "已过期"],
475
       couponStatus: ["待使用", "已使用", "已过期"],
458
       goodStatus: ["未支付", "已支付", "已取货"],
476
       goodStatus: ["未支付", "已支付", "已取货"],
459
       activeName: "first",
477
       activeName: "first",
@@ -658,7 +676,7 @@ export default {
658
       this.getBalanceRecord();
676
       this.getBalanceRecord();
659
     }
677
     }
660
   },
678
   },
661
-  activated(){
679
+  activated() {
662
     let id = this.$route.query.id;
680
     let id = this.$route.query.id;
663
     let activeName = this.$route.query.activeName;
681
     let activeName = this.$route.query.activeName;
664
     this.activeName = activeName;
682
     this.activeName = activeName;
@@ -696,27 +714,35 @@ export default {
696
   }
714
   }
697
 }
715
 }
698
 .color0 {
716
 .color0 {
699
-  color: #fc3019;
717
+  color: #3ef3ed;
700
 }
718
 }
701
 .color1 {
719
 .color1 {
702
-  color: #3ef3ed;
720
+  color: #61d09d;
703
 }
721
 }
704
 .color2 {
722
 .color2 {
705
   color: #00eeee;
723
   color: #00eeee;
706
 }
724
 }
707
 .color3 {
725
 .color3 {
708
-  color: #61d09d;
726
+  color: #a999ea;
709
 }
727
 }
710
-.color4 {
728
+.color-2 {
711
   color: #3115cc;
729
   color: #3115cc;
712
 }
730
 }
713
-.color5 {
731
+.color-1 {
714
   color: #fc3019;
732
   color: #fc3019;
715
 }
733
 }
716
-.color6 {
717
-  color: #a999ea;
734
+.color-3 {
735
+  color: #fc3019;
736
+}
737
+.colorA1{
738
+  color: #333;
739
+}
740
+.colorA2{
741
+  color: #fc3019;
742
+}
743
+.colorA0{
744
+  color: #61d09d;
718
 }
745
 }
719
-
720
 .priceColor {
746
 .priceColor {
721
   color: #ff3007;
747
   color: #ff3007;
722
 }
748
 }

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

@@ -91,7 +91,6 @@ export default {
91
     path: '/payUser/Details',
91
     path: '/payUser/Details',
92
     meta: {
92
     meta: {
93
       isback: true,
93
       isback: true,
94
-      keepAlive: true
95
     },
94
     },
96
     component: payUserDetails,
95
     component: payUserDetails,
97
   },
96
   },
@@ -99,7 +98,6 @@ export default {
99
     path: '/payUser/Order',
98
     path: '/payUser/Order',
100
     meta: {
99
     meta: {
101
       isback: true,
100
       isback: true,
102
-      keepAlive: true
103
     },
101
     },
104
     component: payUserOrder,
102
     component: payUserOrder,
105
   },
103
   },