From d2a4ea654c3d82cbefbbea36c701af6beae486b8 Mon Sep 17 00:00:00 2001 From: fanfan Date: Sat, 19 Oct 2024 21:06:54 +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 | 10 +++++++++- src/views/goods/Index.vue | 4 ++-- src/views/order/Detail.vue | 34 ++++++++++++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/src/api/order/index.js b/src/api/order/index.js index d7411eb..ca2ad53 100644 --- a/src/api/order/index.js +++ b/src/api/order/index.js @@ -4,6 +4,7 @@ import { axios } from '@/utils/request' const api = { list: '/order/list', detail: '/order/detail', + forceCancel: '/order/forceCancel' } /** * 审单 @@ -43,7 +44,6 @@ export function list (params) { params }) } - // 订单详情 export function detail (params) { return axios({ @@ -52,6 +52,14 @@ export function detail (params) { params }) } +// 强制取消 +export function forceCancel (params) { + return axios({ + url: api.forceCancel, + method: 'get', + params + }) +} // 订单导出 export function exports (params) { diff --git a/src/views/goods/Index.vue b/src/views/goods/Index.vue index 2dcb138..2137231 100644 --- a/src/views/goods/Index.vue +++ b/src/views/goods/Index.vue @@ -389,8 +389,8 @@ >编辑 --> 编辑 - 复制文案 - 生成图片 + + 强制取消 +
+
修改物流信息
@@ -566,7 +582,21 @@ export default { } return ColorEnum[orderStatus] }, - + 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)) + }, // 订单发货 handleDelivery() { const { record } = this