|
|
@ -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) => {
|
|
|
|
if (res.data.succ) {
|
|
|
|
TaskManageTruckGetInfoByTaskId({ taskPkId: item })
|
|
|
|
this.$message.success('派车成功')
|
|
|
|
.then(res => {
|
|
|
|
} else {
|
|
|
|
if (res.data.succ) {
|
|
|
|
this.$message.error(`派车失败,${res.data.msg}`)
|
|
|
|
ApiArr.push(res.data.ext.pK_ID)
|
|
|
|
}
|
|
|
|
if (index + 1 == pkIdArr.length) {
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
// let ApiArr = []
|
|
|
|
|
|
|
|
// 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) {
|
|
|
|
|
|
|
|
// 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) => {
|
|
|
|
if (res.data.succ) {
|
|
|
|
TaskManageTruckGetInfoByTaskId({ taskPkId: item })
|
|
|
|
this.$message.success('取消派车成功')
|
|
|
|
.then(res => {
|
|
|
|
} else {
|
|
|
|
if (res.data.succ) {
|
|
|
|
this.$message.error(`取消派车失败,${res.data.msg}`)
|
|
|
|
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
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
// 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) {
|
|
|
|
|
|
|
|
// 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)
|
|
|
|