Browse Source

增加待提货

cr 4 years ago
parent
commit
8b13abbfda
2 changed files with 70 additions and 16 deletions
  1. 3 0
      releaselog.md
  2. 67 16
      src/pages/index/index.vue

+ 3 - 0
releaselog.md

@@ -1,4 +1,7 @@
1 1
 
2
+# 0.1.5 (20.10.15 14:20)
3
+### 增加待提货
4
+
2 5
 # 0.1.4 (20.10.15 14:20)
3 6
 ### 修改不能拨打电话
4 7
 

+ 67 - 16
src/pages/index/index.vue

@@ -49,7 +49,15 @@
49 49
                                         <div class="des">
50 50
                                             <span>订单号:</span>
51 51
                                             {{ order.orderInfo.tradeNo }}
52
-                                            <span class="copy" @click="copy(order.orderInfo.tradeNo)">复制</span>
52
+                                            <span
53
+                                                class="copy"
54
+                                                @click="
55
+                                                    copy(
56
+                                                        order.orderInfo.tradeNo
57
+                                                    )
58
+                                                "
59
+                                                >复制</span
60
+                                            >
53 61
                                         </div>
54 62
                                     </div>
55 63
                                     <div class="tags">
@@ -93,18 +101,25 @@
93 101
                                                 ""
94 102
                                             }}
95 103
                                         </p>
96
-                                        <div
97
-                                            class="order__title on order__title2"
104
+                                        <block
105
+                                            v-if="
106
+                                                order.orderInfo
107
+                                                    .deliveryMethod === 2
108
+                                            "
98 109
                                         >
99
-                                            {{ order.toAddress.address }}
100
-                                        </div>
101
-                                        <p class="order__des on">
102
-                                            {{
103
-                                                order.toAddress.province +
104
-                                                order.toAddress.city +
105
-                                                order.toAddress.county
106
-                                            }}
107
-                                        </p>
110
+                                            <div
111
+                                                class="order__title on order__title2"
112
+                                            >
113
+                                                {{ order.toAddress.address }}
114
+                                            </div>
115
+                                            <p class="order__des on">
116
+                                                {{
117
+                                                    order.toAddress.province +
118
+                                                    order.toAddress.city +
119
+                                                    order.toAddress.county
120
+                                                }}
121
+                                            </p>
122
+                                        </block>
108 123
                                     </div>
109 124
                                 </div>
110 125
                                 <!-- <div class="yuji" v-if="tab!==4">预计{{order | yujiTime}}送达</div> -->
@@ -199,13 +214,20 @@
199 214
                                     <div
200 215
                                         class="btn active"
201 216
                                         v-if="tab === 2"
217
+                                        @click="completeOrder(order, oindex)"
218
+                                    >
219
+                                        已提货
220
+                                    </div>
221
+                                    <div
222
+                                        class="btn active"
223
+                                        v-if="tab === 3"
202 224
                                         @click="deliveryOrder(order, oindex)"
203 225
                                     >
204 226
                                         配送中
205 227
                                     </div>
206 228
                                     <div
207 229
                                         class="btn active"
208
-                                        v-if="tab === 3"
230
+                                        v-if="tab === 4"
209 231
                                         @click="completeOrder(order, oindex)"
210 232
                                     >
211 233
                                         完成订单
@@ -259,6 +281,13 @@ export default {
259 281
                     page: 1,
260 282
                     list: [],
261 283
                 },
284
+                {
285
+                    title: "待提货",
286
+                    status: "26",
287
+                    num: 0,
288
+                    page: 1,
289
+                    list: [],
290
+                },
262 291
                 {
263 292
                     title: "待配送",
264 293
                     status: "23",
@@ -274,7 +303,7 @@ export default {
274 303
                     list: [],
275 304
                 },
276 305
                 {
277
-                    title: "已送达",
306
+                    title: "已完成",
278 307
                     status: "9",
279 308
                     num: 0,
280 309
                     page: 1,
@@ -327,7 +356,7 @@ export default {
327 356
         //     return;
328 357
         // }
329 358
         await self.fn.init();
330
-        
359
+
331 360
         self.fn.shareMenu({});
332 361
         this.getList();
333 362
     },
@@ -460,6 +489,28 @@ export default {
460 489
                     }
461 490
                 });
462 491
         },
492
+        // 提货
493
+        completeOrder(val, index) {
494
+            this.api
495
+                .get(
496
+                    "/Order/CompleteOrder ",
497
+                    {
498
+                        id: val.orderInfo.id,
499
+                    },
500
+                    {
501
+                        repeat: true,
502
+                    }
503
+                )
504
+                .then((res) => {
505
+                    if (res.success) {
506
+                        this.fn.showToast("提货成功");
507
+                        this.orderList.splice(index, 1);
508
+                        this.orderList = [...this.orderList];
509
+                    } else {
510
+                        this.fn.showToast("提货失败:" + res.message);
511
+                    }
512
+                });
513
+        },
463 514
         // 配送中
464 515
         deliveryOrder(val, index) {
465 516
             this.api
@@ -664,7 +715,7 @@ page {
664 715
     }
665 716
     &__top2 {
666 717
         margin-top: px(20);
667
-        .copy{
718
+        .copy {
668 719
             display: inline-block;
669 720
             font-size: px(32);
670 721
             line-height: px(44);