任务管理查询时间,取消任务,重新下发

master
Mr.sun 2 years ago
parent a5c41b8779
commit 96be887eec
  1. 16
      src/api/wcs/busFunctions/taskManagement.js
  2. 26
      src/views/taskManagement/index.vue

@ -8,4 +8,20 @@ export function queryTaskManagement(data) {
method: 'get',
params:data
})
}
// 查询任务管理列表
export function cancelTask(data) {
return request({
url: 'wms/datatask/cancelTask',
method: 'post',
data:data
})
}
// 查询任务管理列表
export function reissueTask(data) {
return request({
url: 'wms/datatask/reissueTask',
method: 'post',
data:data
})
}

@ -267,7 +267,7 @@
<script>
import { getBasePointGroup, updatePoint, addPoint } from '@/api/wcs/base/agvPoint.js'
import { getWcsDeviceList } from '@/api/wcs/base/wcsDevice.js'
import { queryTaskManagement, instantlyTask } from '@/api/wcs/busFunctions/taskManagement.js'
import { queryTaskManagement, reissueTask, cancelTask } from '@/api/wcs/busFunctions/taskManagement.js'
import moment from 'moment'
// import { getTableHeader } from '@/api/wms/tableHeader/table'
export default {
@ -588,13 +588,13 @@ export default {
/** 查询区域列表 */
getList() {
this.loading = true
// if (this.value1 !== null && this.value1 !== 'null' && this.value1 !== undefined) {
// this.queryParams.createTimeS = this.value1[0]
// this.queryParams.createTimeE = this.value1[1]
// } else {
// this.queryParams.createTimeS = null
// this.queryParams.createTimeE = null
// }
if (this.value1 !== null && this.value1 !== 'null' && this.value1 !== undefined) {
this.queryParams.createTimeS = this.value1[0]
this.queryParams.createTimeE = this.value1[1]
} else {
this.queryParams.createTimeS = null
this.queryParams.createTimeE = null
}
queryTaskManagement(this.queryParams).then((res) => {
this.cheshiList = res.rows
this.paging.total = res.total
@ -646,7 +646,12 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$modal.msgSuccess('取消成功')
cancelTask({ taskId: row.taskId }).then((res) => {
if (res.code === 200) {
this.$message.success('取消成功')
this.reset()
}
})
})
},
@ -659,11 +664,10 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
instantlyTask(row.taskId).then((res) => {
reissueTask({ taskId: row.taskId }).then((res) => {
// console.log(res)
if (res.code === 200) {
this.$message.success('立即下发成功')
console.log(res)
this.reset()
}
})

Loading…
Cancel
Save