|
|
@ -483,8 +483,8 @@ import {
|
|
|
|
TaskManageTruckGetInfoByTaskId,
|
|
|
|
TaskManageTruckGetInfoByTaskId,
|
|
|
|
TaskManageTruckPrintTemplateWithHistoryList,
|
|
|
|
TaskManageTruckPrintTemplateWithHistoryList,
|
|
|
|
TaskManageTruckPrint,
|
|
|
|
TaskManageTruckPrint,
|
|
|
|
TaskManageTruckSendDispatchBatch,
|
|
|
|
TaskManageTruckSendDispatchBatchByTask,
|
|
|
|
TaskManageTruckCancelDispatchBatch
|
|
|
|
TaskManageTruckCancelDispatchBatchByTask
|
|
|
|
} from '@/api/modular/main/SendCar'
|
|
|
|
} from '@/api/modular/main/SendCar'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'TaskmanageList',
|
|
|
|
name: 'TaskmanageList',
|
|
|
@ -687,30 +687,37 @@ export default {
|
|
|
|
this.$message.error('请选择数据')
|
|
|
|
this.$message.error('请选择数据')
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let ApiArr = []
|
|
|
|
TaskManageTruckSendDispatchBatchByTask(pkIdArr).then(res => {
|
|
|
|
pkIdArr.forEach((item, index) => {
|
|
|
|
|
|
|
|
TaskManageTruckGetInfoByTaskId({ taskPkId: item })
|
|
|
|
|
|
|
|
.then(res => {
|
|
|
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
|
|
|
|
ApiArr.push(res.data.ext.pK_ID)
|
|
|
|
|
|
|
|
if (index + 1 == pkIdArr.length) {
|
|
|
|
|
|
|
|
TaskManageTruckSendDispatchBatch(ApiArr).then(res => {
|
|
|
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
if (res.data.succ) {
|
|
|
|
this.$message.success('派车成功')
|
|
|
|
this.$message.success('派车成功')
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error(`派车失败,${res.data.msg}`)
|
|
|
|
this.$message.error(`派车失败,${res.data.msg}`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
// let ApiArr = []
|
|
|
|
} else {
|
|
|
|
// pkIdArr.forEach((item, index) => {
|
|
|
|
this.$message.error(`${res.data.msg}`)
|
|
|
|
// TaskManageTruckGetInfoByTaskId({ taskPkId: item })
|
|
|
|
}
|
|
|
|
// .then(res => {
|
|
|
|
this.confirmLoading = false
|
|
|
|
// if (res.data.succ) {
|
|
|
|
})
|
|
|
|
// ApiArr.push(res.data.ext.pK_ID)
|
|
|
|
.catch(() => {
|
|
|
|
// if (index + 1 == pkIdArr.length) {
|
|
|
|
this.confirmLoading = false
|
|
|
|
// TaskManageTruckSendDispatchBatch(ApiArr).then(res => {
|
|
|
|
})
|
|
|
|
// if (res.data.succ) {
|
|
|
|
})
|
|
|
|
// this.$message.success('派车成功')
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// this.$message.error(`派车失败,${res.data.msg}`)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// this.$message.error(`${res.data.msg}`)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// this.confirmLoading = false
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// .catch(() => {
|
|
|
|
|
|
|
|
// this.confirmLoading = false
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// })
|
|
|
|
},
|
|
|
|
},
|
|
|
|
CancelSendCar() {
|
|
|
|
CancelSendCar() {
|
|
|
|
const select = this.$refs.xGrid.getCheckboxRecords()
|
|
|
|
const select = this.$refs.xGrid.getCheckboxRecords()
|
|
|
@ -721,30 +728,36 @@ export default {
|
|
|
|
this.$message.error('请选择数据')
|
|
|
|
this.$message.error('请选择数据')
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let ApiArr = []
|
|
|
|
TaskManageTruckCancelDispatchBatchByTask(pkIdArr).then(res => {
|
|
|
|
pkIdArr.forEach((item, index) => {
|
|
|
|
|
|
|
|
TaskManageTruckGetInfoByTaskId({ taskPkId: item })
|
|
|
|
|
|
|
|
.then(res => {
|
|
|
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
|
|
|
|
ApiArr.push(res.data.ext.pK_ID)
|
|
|
|
|
|
|
|
if (index + 1 == pkIdArr.length) {
|
|
|
|
|
|
|
|
TaskManageTruckCancelDispatchBatch(ApiArr).then(res => {
|
|
|
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
if (res.data.succ) {
|
|
|
|
this.$message.success('派车成功')
|
|
|
|
this.$message.success('取消派车成功')
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(`派车失败,${res.data.msg}`)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error(`${res.data.msg}`)
|
|
|
|
this.$message.error(`取消派车失败,${res.data.msg}`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.confirmLoading = false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
// pkIdArr.forEach((item, index) => {
|
|
|
|
.catch(() => {
|
|
|
|
// TaskManageTruckGetInfoByTaskId({ taskPkId: item })
|
|
|
|
this.confirmLoading = false
|
|
|
|
// .then(res => {
|
|
|
|
})
|
|
|
|
// if (res.data.succ) {
|
|
|
|
})
|
|
|
|
// ApiArr.push(res.data.ext.pK_ID)
|
|
|
|
|
|
|
|
// if (index + 1 == pkIdArr.length) {
|
|
|
|
|
|
|
|
// TaskManageTruckCancelDispatchBatch(ApiArr).then(res => {
|
|
|
|
|
|
|
|
// if (res.data.succ) {
|
|
|
|
|
|
|
|
// this.$message.success('派车成功')
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// this.$message.error(`派车失败,${res.data.msg}`)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// this.$message.error(`${res.data.msg}`)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// this.confirmLoading = false
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// .catch(() => {
|
|
|
|
|
|
|
|
// this.confirmLoading = false
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// })
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onSelect(selectedKeys, info) {
|
|
|
|
onSelect(selectedKeys, info) {
|
|
|
|
console.log('selected', selectedKeys, info)
|
|
|
|
console.log('selected', selectedKeys, info)
|
|
|
|