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