diff --git a/src/components/ControllerTabs.vue b/src/components/ControllerTabs.vue index e4e7925..1d608fe 100644 --- a/src/components/ControllerTabs.vue +++ b/src/components/ControllerTabs.vue @@ -4,15 +4,12 @@ @@ -59,7 +56,7 @@ - + @@ -99,7 +96,7 @@ - 取消任务 + 未送达 @@ -128,7 +125,7 @@
加锁
+ @click="dialogVisible = true; dialogTitle = '起飞高度(米)设置'; dialogItem = 'takeoffBox'; speakText('设置起飞高度')">
起飞
@@ -301,17 +298,17 @@ export default { return plane ? plane.planeState.state : null }, /** - * @description: 已付款 已承接 未发货 未发起退款 订单列表 + * @description: 已付款 未送达 未发起退款 订单列表 */ questList () { const plane = this.plane - return plane ? this.$store.state.orderList.filter((item) => item.shop_id === plane.shop_id && item.status === 'processing' && item.back === 'normal') : [] + return plane ? this.$store.state.paidOrderList.filter((item) => item.shop_id === plane.shop_id && item.refund_status !== '申请中') : [] }, /** * @description: 已发货 订单列表 */ overQuestList () { - return this.$store.state.orderList.filter((item) => item.status === 'shipped') + return this.$store.state.paidOrderList.filter((item) => item.status === 'shipped') }, /** * @description: 当前选中的订单 @@ -468,7 +465,7 @@ export default { this.$message.error('操作失败,请重新尝试') } this.publishFun(`{"questAss":${routeData}}`)// 发送航点信息主题 - this.questAss(this.currentOrder.id, 'status', 'shipped')// 订单改为发货状态 并更新订单列表 + this.questAss(this.currentOrder.id, 'shipment_status', '已发货')// 订单改为发货状态 并更新订单列表 this.$store.dispatch('fetchLockSite', { id: this.currentOrder.receive_site_id, runing: this.plane.id })// 航线注册飞机 锁定送餐点 this.speakText('提交任务,锁定航线。') } else { @@ -584,13 +581,13 @@ export default { type: 'warning' }).then(() => { // 确认执行 - this.overQuestList.map((item) => { + this.questList.map((item) => { if (item.runing === this.planesId) { // 找出当前飞机正在执行的任务 /* 插入日志 */ this.$store.dispatch('fetchLog', { content: `订单ID:${item.id} 送餐任务已完成。` }) /* 执行写在这里 */ this.publishFun('{"resetState":1}')// 发送设置飞机状态主题 状态设为闲置 - this.questAss(item.id, 'status', 'completed')// 订单改为已完成状态 + this.questAss(item.id, 'shipment_status', '已送达')// 订单改为已完成状态 this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 解锁航线 this.speakText('任务完成') } diff --git a/src/utils/api/table.js b/src/utils/api/table.js index 79e552e..e24024b 100644 --- a/src/utils/api/table.js +++ b/src/utils/api/table.js @@ -32,10 +32,10 @@ export function questAss (id, state, val) { api.post('questAss', data).then(res => { if (res.data.status === 1) { Message.success(res.data.msg) - store.dispatch('fetchOrderList')// 更新订单列表 + store.dispatch('fetchPaidOrderList')// 更新订单列表 } else { Message.error(res.data.msg) - store.dispatch('fetchOrderList')// 更新订单列表 + store.dispatch('fetchPaidOrderList')// 更新订单列表 } }) }