强制取消

master
fanfan 1 month ago
parent 0787a26fcd
commit 49bca99ee5
  1. 11
      src/api/order/index.js
  2. 28
      src/views/order/Detail.vue

@ -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({

@ -73,6 +73,12 @@
>发货</a-button
>
</div>
<div class="action-item" v-if="$auth('/order/list/all.deliver')">
<a-button
@click="handleForcecancel"
>强制取消</a-button
>
</div>
<div class="action-item" v-if="$auth('/order/list/all.extract')">
<a-button
v-if="
@ -285,7 +291,11 @@
</a-tooltip>
</div>
</div>
<div class="action-item" style="width: 33.33%" v-if="record.delivery_status==DeliveryStatusEnum.DELIVERED.value &&item.delivery_method==10">
<div
class="action-item"
style="width: 33.33%"
v-if="record.delivery_status == DeliveryStatusEnum.DELIVERED.value && item.delivery_method == 10"
>
<a-button type="primary" @click="onClickEditDelivery(item)">修改物流信息</a-button>
</div>
</div>
@ -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

Loading…
Cancel
Save