【类 型】:fix

【主	题】:飞机操作模块 完成任务函数
【描	述】:
	[原因]:request函数 去掉订单的 逻辑bug(分割之后取下标订单id 少+1)
	[过程]:从executeOrder计算属性里面直接 拿订单信息
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
szdot 2024-07-13 22:35:44 +08:00
parent 3cd0beaed2
commit e7a8ebb499

View File

@ -678,33 +678,26 @@ export default {
type: 'warning'
}).then(() => {
/* 关联当前订单的站点 搜寻注册的飞机 并预设newRuning 用于注销runing字段航线 */
let newRuning // newRuning
let receiveSiteId
let orderId
const found = this.ShippedList.some((element) => {
const runing = (element.runing ?? '').split(',')
return runing.some((item, index, arr) => {
if (item === this.plane.id.toString()) {
arr[index] = '' // id
newRuning = runing.join(',')
orderId = element.id
receiveSiteId = element.receive_site_id
return true // id退
}
})
})
/* 确认 把订单从发货退回到已接单 站点runing字段飞机航线注销 重置飞机状态 */
if (found) {
this.$store.dispatch('fetchLockSite', { id: receiveSiteId, shop_id: this.plane.shop_id, runing: newRuning }).then(res => { //
if (res.data.status === 1) {
this.questAss(orderId, 'shipment_status', '已送达').then(res => { // 线
if (res.data.status === 1) {
this.publishFun('{"resetState":1}')//
}
})
}
})
//
const runingArray = this.executeOrder.runing.split(',')
//
for (let i = 0; i < runingArray.length; i++) {
if (runingArray[i] === this.executeOrder.by_plane_id) {
runingArray[i] = ''
}
}
//
const newRuning = runingArray.join(',')
/* 确认 把订单从发货退回到已接单 站点runing字段飞机航线注销 重置飞机状态 */
this.$store.dispatch('fetchLockSite', { id: this.executeOrder.receive_site_id, shop_id: this.plane.shop_id, runing: newRuning }).then(res => { //
if (res.data.status === 1) {
this.questAss(this.executeOrder.id, 'shipment_status', '已送达').then(res => { // 线
if (res.data.status === 1) {
this.publishFun('{"resetState":1}')//
}
})
}
})
}).catch(() => {
this.$message.info('取消操作!')
})