取消任务
This commit is contained in:
parent
f94e7bb75b
commit
77ac95e45f
@ -30,6 +30,11 @@ export const updateTask = (data) => {
|
|||||||
return request.post({ url: '/system/robot/task-detail/manuallyCompleted?id=' + data.id })
|
return request.post({ url: '/system/robot/task-detail/manuallyCompleted?id=' + data.id })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新机器人任务主表
|
||||||
|
export const closeTask = (data) => {
|
||||||
|
return request.put({ url: '/system/robot/task/close', data })
|
||||||
|
}
|
||||||
|
|
||||||
//更新优先级
|
//更新优先级
|
||||||
export const updateRobotTask = (data) => {
|
export const updateRobotTask = (data) => {
|
||||||
return request.put({ url: '/system/robot/task/update', data })
|
return request.put({ url: '/system/robot/task/update', data })
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 580 B |
Binary file not shown.
Before Width: | Height: | Size: 522 B |
@ -6,7 +6,7 @@
|
|||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
ref="queryFormRef"
|
ref="queryFormRef"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="120px"
|
label-width="80px"
|
||||||
>
|
>
|
||||||
<el-form-item label="ID号" prop="warnCode">
|
<el-form-item label="ID号" prop="warnCode">
|
||||||
<el-input
|
<el-input
|
||||||
@ -176,6 +176,12 @@ const getList = async () => {
|
|||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.pageNo = 1
|
queryParams.pageNo = 1
|
||||||
|
if (queryParams.warnCode) {
|
||||||
|
queryParams.warnCode = queryParams.warnCode.replace(/\s/g, '')
|
||||||
|
}
|
||||||
|
if (queryParams.robotNo) {
|
||||||
|
queryParams.robotNo = queryParams.robotNo.replace(/\s/g, '')
|
||||||
|
}
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,6 +79,7 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
row-class-name="table-row-class"
|
row-class-name="table-row-class"
|
||||||
:header-cell-style="{ backgroundColor: '#EBF1FF', padding: '13px 0' }"
|
:header-cell-style="{ backgroundColor: '#EBF1FF', padding: '13px 0' }"
|
||||||
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<el-table-column label="序号" type="index" align="center" width="60" />
|
<el-table-column label="序号" type="index" align="center" width="60" />
|
||||||
<el-table-column label="库位号" align="center" prop="locationNo" />
|
<el-table-column label="库位号" align="center" prop="locationNo" />
|
||||||
@ -148,7 +149,8 @@ const queryParams = reactive({
|
|||||||
taskStage: null,
|
taskStage: null,
|
||||||
laneName: null,
|
laneName: null,
|
||||||
areaName: null,
|
areaName: null,
|
||||||
skuInfo: null
|
skuInfo: null,
|
||||||
|
locationNo: null
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
|
||||||
@ -176,6 +178,20 @@ const submitSuccess = () => {
|
|||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.pageNo = 1
|
queryParams.pageNo = 1
|
||||||
|
|
||||||
|
if (queryParams.locationNo) {
|
||||||
|
queryParams.locationNo = queryParams.locationNo.replace(/\s/g, '')
|
||||||
|
}
|
||||||
|
if (queryParams.laneName) {
|
||||||
|
queryParams.laneName = queryParams.laneName.replace(/\s/g, '')
|
||||||
|
}
|
||||||
|
if (queryParams.areaName) {
|
||||||
|
queryParams.areaName = queryParams.areaName.replace(/\s/g, '')
|
||||||
|
}
|
||||||
|
if (queryParams.skuInfo) {
|
||||||
|
queryParams.skuInfo = queryParams.skuInfo.replace(/\s/g, '')
|
||||||
|
}
|
||||||
|
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,6 +422,9 @@ const handleQuery = () => {
|
|||||||
getCarLogList()
|
getCarLogList()
|
||||||
} else if (activeName.value == 3) {
|
} else if (activeName.value == 3) {
|
||||||
taskLogParams.pageNo = 1
|
taskLogParams.pageNo = 1
|
||||||
|
if (taskLogParams.taskNo) {
|
||||||
|
taskLogParams.taskNo = taskLogParams.taskNo.replace(/\s/g, '')
|
||||||
|
}
|
||||||
getTaskLogList()
|
getTaskLogList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog v-model="dialogVisible" title="库位信息" width="545" class="task-dialog">
|
<Dialog v-model="dialogVisible" title="库位信息" width="660" class="task-dialog">
|
||||||
<div class="store-dialog">
|
<div class="store-dialog">
|
||||||
<div class="store-dialog-left">
|
<div class="store-dialog-left">
|
||||||
<div
|
<div
|
||||||
@ -13,16 +13,9 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
{{ item.locationNo || '--' }}
|
{{ item.locationNo || '--' }}
|
||||||
<img
|
|
||||||
src="@/assets/imgs/jinyong-2.png"
|
|
||||||
alt=""
|
|
||||||
class="store-dialog-left-item-img-jinyong"
|
|
||||||
v-if="item.locationEnable === 0"
|
|
||||||
/>
|
|
||||||
<img src="@/assets/imgs/suoding.png" alt="" class="store-dialog-left-item-img-suoding" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1">
|
<div>
|
||||||
<el-form :model="formData" label-width="auto" ref="formRef" :rules="formRules">
|
<el-form :model="formData" label-width="auto" ref="formRef" :rules="formRules">
|
||||||
<el-form-item label="库位编号">
|
<el-form-item label="库位编号">
|
||||||
<el-input v-model="formData.locationNo" :disabled="true" />
|
<el-input v-model="formData.locationNo" :disabled="true" />
|
||||||
@ -75,12 +68,11 @@ const formRef = ref() // 表单 Ref
|
|||||||
const storeData = ref([])
|
const storeData = ref([])
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (data) => {
|
const open = async (data) => {
|
||||||
|
console.log(data)
|
||||||
resetForm()
|
resetForm()
|
||||||
if (data && data.length) {
|
if (data && data.length) {
|
||||||
storeData.value = data.reverse()
|
storeData.value = data.reverse()
|
||||||
console.log(storeData.value)
|
|
||||||
selectIndex.value = 0
|
selectIndex.value = 0
|
||||||
console.log(data)
|
|
||||||
formData.value = JSON.parse(JSON.stringify(data[0]))
|
formData.value = JSON.parse(JSON.stringify(data[0]))
|
||||||
}
|
}
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
@ -127,17 +119,7 @@ const resetForm = () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.task-dialog {
|
|
||||||
.el-dialog__header {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__footer {
|
|
||||||
border-top: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.task-tips {
|
.task-tips {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -198,43 +180,30 @@ const resetForm = () => {
|
|||||||
.store-dialog-left {
|
.store-dialog-left {
|
||||||
margin-right: 24px;
|
margin-right: 24px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
.store-dialog-left-item {
|
||||||
.store-dialog-left-item {
|
width: 132px;
|
||||||
width: 132px;
|
height: 50px;
|
||||||
height: 50px;
|
text-align: center;
|
||||||
text-align: center;
|
margin-top: 1px;
|
||||||
margin-top: 1px;
|
font-family:
|
||||||
font-family:
|
PingFangSC,
|
||||||
PingFangSC,
|
PingFang SC;
|
||||||
PingFang SC;
|
font-weight: 500;
|
||||||
font-weight: 500;
|
font-size: 18px;
|
||||||
font-size: 18px;
|
color: #0d162a;
|
||||||
color: #0d162a;
|
vertical-align: middle;
|
||||||
vertical-align: middle;
|
cursor: pointer;
|
||||||
cursor: pointer;
|
border: 1px solid rgba(0, 0, 0, 0);
|
||||||
border: 1px solid rgba(0, 0, 0, 0);
|
position: relative;
|
||||||
position: relative;
|
}
|
||||||
}
|
|
||||||
.ellipsis {
|
.ellipsis {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
.store-dialog-left-item-img-jinyong {
|
|
||||||
position: absolute;
|
|
||||||
left: -3px;
|
|
||||||
top: -4px;
|
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
}
|
|
||||||
.store-dialog-left-item-img-suoding {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -130,11 +130,11 @@ const handleChangeMap = async (e) => {
|
|||||||
indexPageRef.value.getMapData(item)
|
indexPageRef.value.getMapData(item)
|
||||||
console.log(item)
|
console.log(item)
|
||||||
router.replace({
|
router.replace({
|
||||||
name: 'MapPageRealTimeMap',
|
name: 'MapPageRealTimeMap',
|
||||||
query: {
|
query: {
|
||||||
mapId: item.id
|
mapId: item.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//新建任务
|
//新建任务
|
||||||
const createTaskDialogRef = ref()
|
const createTaskDialogRef = ref()
|
||||||
@ -142,13 +142,16 @@ const createTask = async () => {
|
|||||||
ElMessageBox.confirm('是否发起拼接任务?', '提示', {
|
ElMessageBox.confirm('是否发起拼接任务?', '提示', {
|
||||||
confirmButtonText: '是',
|
confirmButtonText: '是',
|
||||||
cancelButtonText: '否',
|
cancelButtonText: '否',
|
||||||
type: 'warning'
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
push({ name: 'taskManagementCreateTask' })
|
push({ name: 'taskManagementCreateTask' })
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch((action) => {
|
||||||
createTaskDialogRef.value.open()
|
if (action === 'cancel') {
|
||||||
|
createTaskDialogRef.value.open()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ const getRowspan = (key, rowIndex, list) => {
|
|||||||
const cancelTask = async (mainItem, item) => {
|
const cancelTask = async (mainItem, item) => {
|
||||||
try {
|
try {
|
||||||
await message.delConfirm('请确认是否取消所有任务?')
|
await message.delConfirm('请确认是否取消所有任务?')
|
||||||
await MapTaskAPi.updateTask({
|
await MapTaskAPi.closeTask({
|
||||||
id: mainItem.id,
|
id: mainItem.id,
|
||||||
priority: mainItem.priority,
|
priority: mainItem.priority,
|
||||||
montageTask: mainItem.montageTask,
|
montageTask: mainItem.montageTask,
|
||||||
@ -319,6 +319,9 @@ const priorityNumChange = async (mainItem, item) => {
|
|||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.pageNo = 1
|
queryParams.pageNo = 1
|
||||||
|
if (queryParams.taskNo) {
|
||||||
|
queryParams.taskNo = queryParams.taskNo.replace(/\s/g, '')
|
||||||
|
}
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user