From 64fa9925ff0d76e9d36b894d5bff97481adb0043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E8=80=98=E7=A8=B7?= <18026623439@163.com> Date: Sun, 20 Dec 2020 16:23:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A2=E5=8D=95=E6=A0=B8?= =?UTF-8?q?=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/orderAdmin/AdminOrder/index.vue | 63 +++++++++++++++++++++- pages/orderAdmin/AdminOrderList/index.vue | 65 +++++++++++++++++++++-- utils/index.js | 3 ++ 3 files changed, 125 insertions(+), 6 deletions(-) diff --git a/pages/orderAdmin/AdminOrder/index.vue b/pages/orderAdmin/AdminOrder/index.vue index bc1809c..52a4520 100644 --- a/pages/orderAdmin/AdminOrder/index.vue +++ b/pages/orderAdmin/AdminOrder/index.vue @@ -135,7 +135,9 @@ v-if="orderInfo.pay_type === 'offline' && orderInfo.paid === 0" @click="offlinePay" >确认付款 - 去发货 + 去发货 + 快速核销 + 立即核销 { + console.log(res) + uni.hideLoading(); + that.iShidden = false; + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 1000 + }); + //最后就是返回上一个页面。 + setTimeout(function() { + uni.navigateBack({ + delta: 1, // 返回上一级页面。 + success: function() { + console.log('成功!') + } + }) + }, 1000); + }) + .catch((err) => { + console.log(err) + uni.hideLoading(); + uni.showToast({ + title: err.data.msg, + icon: "none", + duration: 2000 + }); + }); + } + } + }); + + } else { + that.$yrouter.push({ + path: '/pages/orderAdmin/OrderCancellation/index' + }) + } } } }; + diff --git a/pages/orderAdmin/AdminOrderList/index.vue b/pages/orderAdmin/AdminOrderList/index.vue index ad161ba..3e2a3b6 100644 --- a/pages/orderAdmin/AdminOrderList/index.vue +++ b/pages/orderAdmin/AdminOrderList/index.vue @@ -31,7 +31,7 @@ ¥{{ val.productInfo.price }} x{{ val.cartNum }} - ¥{{ val.productInfo.otPrice }} + ¥{{ val.productInfo.otPrice }} @@ -54,7 +54,9 @@ 一键改价 立即退款 确认付款 - 去发货 + 去发货 + 快速核销 + 立即核销 @@ -75,6 +77,7 @@ setOfflinePay, setOrderRefund } from "@/api/admin"; + import {orderVerific} from "@/api/order"; import { required, num @@ -119,7 +122,7 @@ this.getIndex(); } }, - mounted: function() { + onShow: function() { let that = this; that.where.status = that.$yroute.query.types; that.current = ""; @@ -318,10 +321,64 @@ }); } ); - } + }, + storeCancellation(index,verifyCode) { + const that = this; + that.check = true; + if (index == 0) { + uni.showModal({ + title: "确定核销订单?", + content: "注意:请务必核对核销码的与客户正确性", + success(res) { + if (res.confirm) { + uni.showLoading({ + title: "查询中" + }); + orderVerific(verifyCode, 1) + .then(res => { + console.log(res) + uni.hideLoading(); + that.iShidden = false; + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 1000 + }); + //最后就是返回上一个页面。 + setTimeout(function() { + uni.navigateBack({ + delta: 1, // 返回上一级页面。 + success: function() { + console.log('成功!') + } + }) + }, 1000); + }) + .catch((err) => { + console.log(err) + uni.hideLoading(); + uni.showToast({ + title: err.data.msg, + icon: "none", + duration: 2000 + }); + }); + } + } + }); + + } else { + that.$yrouter.push({ + path: '/pages/orderAdmin/OrderCancellation/index' + }) + } + } } }; diff --git a/utils/index.js b/utils/index.js index 692a9c4..4eefecf 100644 --- a/utils/index.js +++ b/utils/index.js @@ -215,6 +215,9 @@ export const login = () => { console.log(redirect) if (redirect) { redirect = redirect.split('/pages')[1] + if(!redirect){ + redirect="/Loading/index"; + } reLaunch({ path: '/pages' + redirect, });