yuhao пре 2 година
родитељ
комит
ece64cc7cd
3 измењених фајлова са 25 додато и 12 уклоњено
  1. 17 11
      src/pages/customerMan/myOrder/index.vue
  2. 4 0
      src/server/home.js
  3. 4 1
      src/server/urls.js

+ 17 - 11
src/pages/customerMan/myOrder/index.vue

@@ -374,7 +374,9 @@ type: "全额券" -->
374 374
             </div>
375 375
           </div>
376 376
         </div>
377
-        <div v-if='cardInfo.card_type == 1' class="confirm" @click="confirm">确定</div>
377
+        <div v-if="cardInfo.card_type == 1" class="confirm" @click="confirm">
378
+          确定
379
+        </div>
378 380
       </div>
379 381
     </mine-pupop>
380 382
     <!-- 修改次卡时间 -->
@@ -510,17 +512,21 @@ export default {
510 512
   methods: {
511 513
     // 刷新页面数据
512 514
     refreshList() {
513
-      this.currentPage1 = 1;
514 515
       this.refresh = true;
515
-      if (this.activeName == "first") {
516
-        this.getUserProject();
517
-      } else if (this.activeName == "second") {
518
-        this.getCardList();
519
-      } else if (this.activeName == "third") {
520
-        this.getUserGoods();
521
-      } else if (this.activeName == "fourth") {
522
-        this.getUserCoupon();
523
-      }
516
+      api.syncErpOrder({}).then((res) => {
517
+        if (res.code == 200) {
518
+          this.currentPage1 = 1;
519
+          if (this.activeName == "first") {
520
+            this.getUserProject();
521
+          } else if (this.activeName == "second") {
522
+            this.getCardList();
523
+          } else if (this.activeName == "third") {
524
+            this.getUserGoods();
525
+          } else if (this.activeName == "fourth") {
526
+            this.getUserCoupon();
527
+          }
528
+        }
529
+      });
524 530
     },
525 531
     // 打开核销优惠券界面
526 532
     cancleCoupon(e) {

+ 4 - 0
src/server/home.js

@@ -305,4 +305,8 @@ export default class Home {
305 305
   static checkCoupon(params) {
306 306
     return $http.post(url.checkCoupon, params)
307 307
   }
308
+  // 同步erp订单
309
+  static syncErpOrder(params) {
310
+    return $http.post(url.syncErpOrder, params)
311
+  }
308 312
 }

+ 4 - 1
src/server/urls.js

@@ -197,5 +197,8 @@ export default {
197 197
   goodsTakeOut: '/v2/pad/order/take_out',
198 198
 
199 199
   // 优惠券取货
200
-  checkCoupon: '/v2/pad/coupon/check'
200
+  checkCoupon: '/v2/pad/coupon/check',
201
+
202
+  // 同步erp订单
203
+  syncErpOrder:'/v2/pad/order/sync_erp_order'
201 204
 }