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