From 49bca99ee5d3be8c2ca72514d9a78c6a9698fef9 Mon Sep 17 00:00:00 2001 From: fanfan Date: Sat, 19 Oct 2024 21:08:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=BA=E5=88=B6=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/order/index.js | 11 ++++++++++- src/views/order/Detail.vue | 28 ++++++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/api/order/index.js b/src/api/order/index.js index fabdcb9..f82d655 100644 --- a/src/api/order/index.js +++ b/src/api/order/index.js @@ -32,7 +32,8 @@ export function getStandardList (params) { // api接口列表 const api = { list: '/order/list', - detail: '/order/detail' + detail: '/order/detail', + forceCancel: '/order/forceCancel' } // 列表记录 @@ -44,6 +45,14 @@ export function list (params) { }) } +// 强制取消 +export function forceCancel (params) { + return axios({ + url: api.forceCancel, + method: 'get', + params + }) +} // 订单详情 export function detail (params) { return axios({ diff --git a/src/views/order/Detail.vue b/src/views/order/Detail.vue index a80ed87..fa2d1b9 100644 --- a/src/views/order/Detail.vue +++ b/src/views/order/Detail.vue @@ -73,6 +73,12 @@ >发货 +
+ 强制取消 +
+
修改物流信息
@@ -578,7 +588,21 @@ export default { const { record } = this this.$refs.DeliveryForm.show(record) }, - + handleForcecancel() { + const { orderId } = this + this.isLoading = true + Api.forceCancel({ orderId }) + .then((result) => { + if (result.status==200) { + this.$message.success('强制取消成功', 1.5) + }else{ + this.$message.fail ('强制取消失败', 1.5) + } + // 初始化数据 + // this.initData() + }) + .finally(() => (this.isLoading = false)) + }, // 自提核销 handleExtract() { const { record } = this