diff --git a/src/views/order/Detail.vue b/src/views/order/Detail.vue index 2f210d2..635218f 100644 --- a/src/views/order/Detail.vue +++ b/src/views/order/Detail.vue @@ -583,20 +583,24 @@ export default { return ColorEnum[orderStatus] }, handleForcecancel() { - const { orderId } = this + let that = this this.isLoading = true - Api.forceCancel({ orderId }) - .then((result) => { - if (result.status == 200) { - this.$message.success('强制取消成功', 1.5) + const modal = this.$confirm({ + title: '您确定要取消该订单吗', + onOk() { + return Api.forceCancel({ orderId: that.orderId }) + .then((result) => { + if (result.status == 200) { + that.$message.success(result.message, 1.5) // 初始化数据 - this.getDetail() - } else { - this.$message.fail('强制取消失败', 1.5) - } - - }) - .finally(() => (this.isLoading = false)) + that.getDetail() + } else { + that.$message.fail(result.message, 1.5) + } + }) + .finally(() => (that.isLoading = false)) + }, + }) }, // 订单发货 handleDelivery() {