feature/0423
wanghousheng 10 months ago
parent 034ce355b9
commit 885fc3b8af
  1. 12
      src/api/server/index.js
  2. 12
      src/api/server/recovery.js
  3. 23
      src/views/recovery/order/Index.vue
  4. 23
      src/views/server/Order.vue

@ -18,6 +18,7 @@ const api = {
dispatchOrders: '/server/dispatchOrders',
OrderStatus: '/server/OrderStatus',
OrderDeatil: '/server/orderDetail',
delOrder: '/server/delOrder',
listByIds: '/server/listByIds',
}
/**
@ -203,3 +204,14 @@ export function orderStatusList(data) {
data,
})
}
/**
* 删除
* @param {*} data
*/
export function delOrder(data) {
return axios({
url: api.delOrder,
method: 'post',
data,
})
}

@ -16,6 +16,7 @@ const api = {
cancelOrder: '/recovery/cancelOrder',
orderStatus: '/recovery/orderStatus',
orderDetail: '/recovery/orderDetail',
orderDel: '/recovery/orderDel',
completeOrder: '/recovery/completeOrder',
}
/**
@ -181,3 +182,14 @@ export function completeOrder(data) {
data,
})
}
/**
* 订单删除
* @param {*} data
*/
export function orderDel(data) {
return axios({
url: api.orderDel,
method: 'post',
data,
})
}

@ -51,6 +51,13 @@
<a v-if="item.order_status == 10" v-action:edit style="margin-right: 8px" @click="handleAcceptance(item)"
>验收</a
>
<a
v-if="item.order_status == 10 || item.order_status == 30"
v-action:edit
style="margin-right: 8px"
@click="handleDelete(item.order_id)"
>删除</a
>
</span>
</a-table>
<a-pagination
@ -241,6 +248,22 @@ export default {
},
})
},
//
handleDelete(order_id) {
const self = this
const modal = this.$confirm({
title: '您确定要删除该记录吗?',
content: '删除后不可恢复',
onOk() {
return Api.orderDel({ order_id })
.then((result) => {
self.$message.success(result.message, 1.5)
self.handleRefresh()
})
.finally(() => modal.destroy())
},
})
},
//
getOrderStatusList() {
this.isLoading = true

@ -58,6 +58,13 @@
<a v-if="item.order_status == 20" v-action:edit style="margin-right: 8px" @click="handleDispatch(item.order_id)"
>派单</a
>
<a
v-if="item.order_status == 10 || item.order_status == 50"
v-action:edit
style="margin-right: 8px"
@click="handleDelete(item.order_id)"
>删除</a
>
<a
v-if="item.order_status == 10 || item.order_status == 20"
style="margin-right: 8px"
@ -267,6 +274,22 @@ export default {
handleDispatch(order_id) {
this.$refs.dispatchRef.add(order_id)
},
//
handleDelete(order_id) {
const self = this
const modal = this.$confirm({
title: '您确定要删除该记录吗?',
content: '删除后不可恢复',
onOk() {
return Api.delOrder({ order_id })
.then((result) => {
self.$message.success(result.message, 1.5)
self.handleRefresh()
})
.finally(() => modal.destroy())
},
})
},
/**
* 刷新列表
* @param Boolean bool 强制刷新到第一页

Loading…
Cancel
Save