强制取消

main
fanfan 1 month ago
parent 9649fb287d
commit d2a4ea654c
  1. 10
      src/api/order/index.js
  2. 4
      src/views/goods/Index.vue
  3. 34
      src/views/order/Detail.vue

@ -4,6 +4,7 @@ import { axios } from '@/utils/request'
const api = { const api = {
list: '/order/list', list: '/order/list',
detail: '/order/detail', detail: '/order/detail',
forceCancel: '/order/forceCancel'
} }
/** /**
* 审单 * 审单
@ -43,7 +44,6 @@ export function list (params) {
params params
}) })
} }
// 订单详情 // 订单详情
export function detail (params) { export function detail (params) {
return axios({ return axios({
@ -52,6 +52,14 @@ export function detail (params) {
params params
}) })
} }
// 强制取消
export function forceCancel (params) {
return axios({
url: api.forceCancel,
method: 'get',
params
})
}
// 订单导出 // 订单导出
export function exports (params) { export function exports (params) {

@ -389,8 +389,8 @@
>编辑</router-link >编辑</router-link
> --> > -->
<a @click="handleEdit(item.goods_id)">编辑</a> <a @click="handleEdit(item.goods_id)">编辑</a>
<a @click="handleCopy(item)">复制文案</a> <!-- <a @click="handleCopy(item)">复制文案</a>
<a @click="handleImage(item)">生成图片</a> <a @click="handleImage(item)">生成图片</a> -->
<router-link <router-link
v-if=" v-if="
$module('goods-copy') && $module('goods-copy') &&

@ -73,6 +73,18 @@
>发货</a-button >发货</a-button
> >
</div> </div>
<div class="action-item" v-if="$auth('/order/list/all.deliver')">
<a-button
v-if="
record.pay_status == PayStatusEnum.SUCCESS.value &&
inArray(record.delivery_type, [DeliveryTypeEnum.EXPRESS.value, DeliveryTypeEnum.NOTHING.value]) &&
record.delivery_status != DeliveryStatusEnum.DELIVERED.value &&
!inArray(record.order_status, [OrderStatusEnum.CANCELLED.value, OrderStatusEnum.APPLY_CANCEL.value])
"
@click="handleForcecancel"
>强制取消</a-button
>
</div>
<div class="action-item" v-if="$auth('/order/list/all.extract')"> <div class="action-item" v-if="$auth('/order/list/all.extract')">
<a-button <a-button
v-if=" v-if="
@ -285,7 +297,11 @@
</a-tooltip> </a-tooltip>
</div> </div>
</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> <a-button type="primary" @click="onClickEditDelivery(item)">修改物流信息</a-button>
</div> </div>
</div> </div>
@ -566,7 +582,21 @@ export default {
} }
return ColorEnum[orderStatus] 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() { handleDelivery() {
const { record } = this const { record } = this

Loading…
Cancel
Save