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