Pārlūkot izejas kodu

修改订单状态

yuhao 2 gadi atpakaļ
vecāks
revīzija
e30c941e37

+ 1 - 1
src/App.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div id="app">
3 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 5
     </keep-alive>
6 6
     <router-view v-if="!$route.meta.keepAlive"></router-view>
7 7
   </div>

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

@@ -43,10 +43,21 @@
43 43
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
44 44
                 <template slot-scope="scope">
45 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 62
                   </div>
52 63
                 </template>
@@ -184,20 +195,20 @@ status: 5 -->
184 195
               ></el-table-column>
185 196
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
186 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 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 213
                   </div>
203 214
                 </template>
@@ -260,7 +271,7 @@ type: "全额券" -->
260 271
               ></el-table-column>
261 272
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
262 273
                 <template slot-scope="scope">
263
-                  <div :class="'color' + scope.row.status">
274
+                  <div :class="'colorA' + scope.row.status">
264 275
                     {{ couponStatus[scope.row.status] }}
265 276
                   </div>
266 277
                 </template>
@@ -418,7 +429,6 @@ export default {
418 429
           status: 1,
419 430
         },
420 431
       ],
421
-      statusStr: ["未支付", "待使用", "正在使用", "已结算", "已取消"],
422 432
       couponStatus: ["待使用", "已使用", "已过期"],
423 433
       goodStatus: ["未支付", "已支付", "已取货"],
424 434
       activeName: "first",
@@ -670,27 +680,35 @@ export default {
670 680
   }
671 681
 }
672 682
 .color0 {
673
-  color: #fc3019;
683
+  color: #3ef3ed;
674 684
 }
675 685
 .color1 {
676
-  color: #3ef3ed;
686
+  color: #61d09d;
677 687
 }
678 688
 .color2 {
679 689
   color: #00eeee;
680 690
 }
681 691
 .color3 {
682
-  color: #61d09d;
692
+  color: #a999ea;
683 693
 }
684
-.color4 {
694
+.color-2 {
685 695
   color: #3115cc;
686 696
 }
687
-.color5 {
697
+.color-1 {
688 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 712
 .priceColor {
695 713
   color: #ff3007;
696 714
 }

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

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

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

@@ -43,9 +43,24 @@
43 43
                   :key="i"><img :src="value.cover_url"
44 44
                      alt=""></li>
45 45
             </ul>
46
+            <!-- 状态,0已预约,未支付,1已支付,待使用,2正在使用,3已结算,-1已取消,-2退款审核中,-3已退款 -->
46 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 64
             </div>
50 65
           </div>
51 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 378
 </style>

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

@@ -43,10 +43,21 @@
43 43
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
44 44
                 <template slot-scope="scope">
45 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 62
                   </div>
52 63
                 </template>
@@ -178,13 +189,20 @@ status: 5 -->
178 189
               ></el-table-column>
179 190
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
180 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 206
                   </div>
189 207
                 </template>
190 208
               </el-table-column>
@@ -242,11 +260,11 @@ type: "全额券" -->
242 260
                 prop="create_time"
243 261
                 label="创建时间"
244 262
                 width="180"
245
-                show-overflow-tooltip
263
+                show-overflow-tooltipA
246 264
               ></el-table-column>
247 265
               <el-table-column prop="status" label="状态" show-overflow-tooltip>
248 266
                 <template slot-scope="scope">
249
-                  <div :class="'color' + scope.row.status">
267
+                  <div :class="'colorA' + scope.row.status">
250 268
                     {{ couponStatus[scope.row.status] }}
251 269
                   </div>
252 270
                 </template>
@@ -299,7 +317,8 @@ type: "全额券" -->
299 317
               >
300 318
                 <template slot-scope="scope">
301 319
                   <div>
302
-                    {{ scope.row.is_add == 1 ? "+" : "-" }}{{ scope.row.amount }}
320
+                    {{ scope.row.is_add == 1 ? "+" : "-"
321
+                    }}{{ scope.row.amount }}
303 322
                   </div>
304 323
                 </template>
305 324
               </el-table-column>
@@ -453,7 +472,6 @@ export default {
453 472
           status: 1,
454 473
         },
455 474
       ],
456
-      statusStr: ["未支付", "待使用", "正在使用", "已结算", "已取消"],
457 475
       couponStatus: ["待使用", "已使用", "已过期"],
458 476
       goodStatus: ["未支付", "已支付", "已取货"],
459 477
       activeName: "first",
@@ -658,7 +676,7 @@ export default {
658 676
       this.getBalanceRecord();
659 677
     }
660 678
   },
661
-  activated(){
679
+  activated() {
662 680
     let id = this.$route.query.id;
663 681
     let activeName = this.$route.query.activeName;
664 682
     this.activeName = activeName;
@@ -696,27 +714,35 @@ export default {
696 714
   }
697 715
 }
698 716
 .color0 {
699
-  color: #fc3019;
717
+  color: #3ef3ed;
700 718
 }
701 719
 .color1 {
702
-  color: #3ef3ed;
720
+  color: #61d09d;
703 721
 }
704 722
 .color2 {
705 723
   color: #00eeee;
706 724
 }
707 725
 .color3 {
708
-  color: #61d09d;
726
+  color: #a999ea;
709 727
 }
710
-.color4 {
728
+.color-2 {
711 729
   color: #3115cc;
712 730
 }
713
-.color5 {
731
+.color-1 {
714 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 746
 .priceColor {
721 747
   color: #ff3007;
722 748
 }

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

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