From fcdf5958f6e1747d458ff8baeb7245dcdca6bc20 Mon Sep 17 00:00:00 2001 From: tk Date: Tue, 11 Jun 2024 19:50:49 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=09=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afix=20=E3=80=90=E4=B8=BB=09=E9=A2=98=E3=80=91=EF=BC=9A?= =?UTF-8?q?table.js=E5=86=99=E4=B8=8A=E4=BA=86=E5=8F=82=E6=95=B0=E7=9A=84?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E6=B3=A8=E9=87=8A=20=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E6=89=A7=E8=A1=8C=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E4=BB=BB=E5=8A=A1bug=20=E3=80=90=E6=8F=8F=09?= =?UTF-8?q?=E8=BF=B0=E3=80=91=EF=BC=9A=20=09[=E5=8E=9F=E5=9B=A0]=EF=BC=9A?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93status=E5=AD=97=E6=AE=B5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BB=A5=E5=89=8D=E6=98=AF=E6=95=B0=E5=AD=97=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E7=8A=B6=E6=80=81=20=E7=8E=B0=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E7=B1=BB=E5=9E=8B=20=09[=E8=BF=87=E7=A8=8B]?= =?UTF-8?q?=EF=BC=9A=20=09[=E5=BD=B1=E5=93=8D]=EF=BC=9A=20=E3=80=90?= =?UTF-8?q?=E7=BB=93=09=E6=9D=9F=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- src/components/ControllerTabs.vue | 15 +++++++-------- src/utils/api/table.js | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/components/ControllerTabs.vue b/src/components/ControllerTabs.vue index 3b38c23..bdbf957 100644 --- a/src/components/ControllerTabs.vue +++ b/src/components/ControllerTabs.vue @@ -398,7 +398,7 @@ export default { /* 插入日志 */ this.$store.dispatch('fetchLog', { content: `${this.plane.name} 开始执行 订单ID:${item.id}、叫餐号:${item.food_sn}号。` }) /* 执行写在这里 */ - if (item.bind_route === null) { // 判断站点是否已经绑定站点 中断操作 + if (item.bind_route === null) { // 判断站点是否已经绑定站点 未绑定 中断操作 this.$message.error('此站点,未绑定任务航点') return } @@ -420,7 +420,7 @@ export default { this.$message.error('操作失败,请重新尝试') } this.publishFun(`{"questAss":${routeData}}`)// 发送航点信息主题 - this.questAss(item.id, 'status', '30')// 订单改为发货状态 + this.questAss(item.id, 'status', 'shipped')// 订单改为发货状态 this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: this.plane.id })// 航线注册飞机 锁定送餐点 } }) @@ -464,7 +464,7 @@ export default { * @description: 取消任务 */ reQuest () { - if (!this.airLock) { // 只有飞机锁定状态 才向量下执行 "取消"操作 + if (!this.airLock) { // 只有飞机锁定状态 才向下执行 "取消"操作 return } this.$confirm('确认复位飞机状态,并清除航线的锁定?', '取消任务', { @@ -478,7 +478,8 @@ export default { this.$store.dispatch('fetchLog', { content: `订单ID:${item.id},送餐任务取消。` }) /* 执行写在这里 */ this.publishFun('{"resetState":1}')// 发送设置飞机状态主题 状态设为闲置 - this.questAss(item.id, 'status', '20')// 订单改回到发货状态之前 既“已付款状态” + this.questAss(item.id, 'status', 'pending')// 订单改回到发货状态之前 既“已付款状态” + console.log('hi') this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 解锁航线 } }) @@ -505,7 +506,7 @@ export default { this.$store.dispatch('fetchLog', { content: `订单ID:${item.id} 送餐任务已完成。` }) /* 执行写在这里 */ this.publishFun('{"resetState":1}')// 发送设置飞机状态主题 状态设为闲置 - this.questAss(item.id, 'status', '40')// 订单改为已完成状态 + this.questAss(item.id, 'status', 'completed')// 订单改为已完成状态 this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 解锁航线 } }) @@ -536,9 +537,7 @@ export default { } }, created () { - setTimeout(() => { - console.log(this.$store.state.orderList) - }, 3000) + console.log(this.questList) if (this.siteList && this.routeList) { this.airLock = this.siteList.some(item => item.runing === this.planesId) } diff --git a/src/utils/api/table.js b/src/utils/api/table.js index 41bad8a..6109f1e 100644 --- a/src/utils/api/table.js +++ b/src/utils/api/table.js @@ -22,6 +22,20 @@ export async function apiCrosFrequency (params) { * @description: 向改变订单承接任务api 提交数据 () * @param {*} id 订单id * @param {*} state "status"修改status字段 "back"修改back字段 + * @param {*} val 修改字段的值 status包括 + * canceled:交易取消 + * unpaid:未付款 + * pending:处理中(已付款) + * processing:备货中 + * shipped:已发货 + * completed:已完成 + * closed:交易关闭 + * back包括 + * normal:未申请 + * requested:申请退款 + * refunded:已经退款 + * rejected:拒绝退款 + * actively:商家主动取消订单并退款 */ export function questAss (id, state, val) { const data = new URLSearchParams()// post对象参数 转成 字符串连接