代码更新:
1. 增加站台监控
This commit is contained in:
parent
f763fc7833
commit
fea5ae7036
|
|
@ -1,8 +1,8 @@
|
||||||
import request from "@/http/request";
|
import request from "@/http/request";
|
||||||
|
|
||||||
const getAllStands = (params) => {
|
const getStandsByPage = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/stand/getAllStands',
|
url: '/stand/getStandsByPage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
|
|
@ -17,6 +17,6 @@ const updateStandInfo = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getAllStands,
|
getStandsByPage,
|
||||||
updateStandInfo
|
updateStandInfo
|
||||||
}
|
}
|
||||||
|
|
@ -139,12 +139,12 @@
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="箱号" prop="vehicleId">
|
<el-form-item label="箱号" prop="vehicleId">
|
||||||
<el-input v-model="exceptionHandleFormEntity.vehicleId" disabled />
|
<el-input v-model="exceptionHandleFormEntity.vehicleId" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="料号" prop="goodsId">
|
<el-form-item label="料号" prop="goodsId">
|
||||||
<el-input v-model="exceptionHandleFormEntity.goodsId" disabled />
|
<el-input v-model="exceptionHandleFormEntity.goodsId" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
|
||||||
|
|
@ -3,29 +3,41 @@
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="vehicleIdQuery" style="width: 256px; margin-right: 10px;" placeholder="箱号"
|
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
|
||||||
:suffix-icon="Search" />
|
|
||||||
<el-input v-model="standQuery" style="width: 256px; margin-right: 10px;" placeholder="工站"
|
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
|
<el-select-v2 v-model="standTypeQuery" style="width: 158px; margin-right: 10px;"
|
||||||
|
placeholder="请选择站台类型" :options="standTypeOptions" @change="search()"></el-select-v2>
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<el-table :data="pickTaskList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
<el-table :data="standList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||||
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||||
:cell-style="{ 'text-align': 'center' }">
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
<el-table-column width="65px" fixed="left">
|
<el-table-column width="65px" fixed="left">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-radio :label="scope.row.pickTaskId" v-model="pickTaskId"> </el-radio>
|
<el-radio :label="scope.row.standId" v-model="standId"> </el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="pickTaskId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="standId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" />
|
<el-table-column prop="allowIn" label="允许入库" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="standId" label="站台号" fixed="left" min-width="120px" />
|
<el-table-column prop="allowOut" label="允许出库" min-width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="pickStatus" label="拣选状态" :formatter="pickStatusFormat" min-width="120px" />
|
<el-table-column prop="isLock" label="锁定" :formatter="isLockFormat" min-width="120px"
|
||||||
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" show-overflow-tooltip
|
show-overflow-tooltip />
|
||||||
|
<el-table-column prop="standStatus" label="状态" :formatter="standStatusFormat" show-overflow-tooltip
|
||||||
min-width="120px" />
|
min-width="120px" />
|
||||||
|
<el-table-column prop="equipmentId" label="设备号" min-width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="areaId" label="区域" min-width="120px" />
|
||||||
|
<el-table-column prop="standType" label="类型" :formatter="standTypeFormat" min-width="120px" />
|
||||||
|
<el-table-column prop="standIp" label="电脑ip地址" min-width="120px" />
|
||||||
|
<el-table-column prop="outerId" label="外部编号" min-width="120px" />
|
||||||
|
<el-table-column prop="lastUseTime" label="上次使用时间" :formatter="timeFormat" min-width="120px"
|
||||||
|
show-overflow-tooltip />
|
||||||
|
<el-table-column prop="pickGoods" label="拣选料号" show-overflow-tooltip min-width="120px" />
|
||||||
|
<el-table-column prop="pickVehicle" label="拣选箱号" show-overflow-tooltip min-width="120px" />
|
||||||
|
<el-table-column prop="pickTip" label="提示" show-overflow-tooltip min-width="120px" />
|
||||||
|
<el-table-column prop="pickVehicleCount" label="站台料箱数量" min-width="120px" />
|
||||||
<el-table-column fixed="right" label="操作" width="120px">
|
<el-table-column fixed="right" label="操作" width="120px">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||||
|
|
@ -37,33 +49,48 @@
|
||||||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||||
@current-change="search" />
|
@current-change="search" />
|
||||||
<el-dialog v-model="dialogVisible" title="拣选任务详细信息" width="40%" draggable :show-close="false">
|
<el-dialog v-model="dialogVisible" title="编辑站台信息" width="40%" draggable :show-close="false">
|
||||||
<div
|
<div
|
||||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||||
<el-form ref="pickTaskFormRef" :model="pickTaskFormEntity" :label-position="labelPosition"
|
<el-form ref="standFormRef" :model="standFormEntity" :label-position="labelPosition"
|
||||||
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="id" prop="pickTaskId">
|
<el-form-item label="站台号" prop="standId">
|
||||||
<el-input v-model="pickTaskFormEntity.pickTaskId" disabled />
|
<el-input v-model="standFormEntity.standId" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="工站" prop="vehicleId">
|
<el-form-item label="类型" prop="isLock">
|
||||||
<el-input v-model="pickTaskFormEntity.vehicleId" disabled />
|
<el-select-v2 v-model="standFormEntity.standType" placeholder="请选择类型"
|
||||||
|
:options="standTypeOptions" disabled></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="小盒子" prop="standId">
|
<el-form-item label="锁定" prop="isLock">
|
||||||
<el-input v-model="pickTaskFormEntity.standId" disabled />
|
<el-select-v2 v-model="standFormEntity.isLock" placeholder="请选择是否锁定"
|
||||||
|
:options="isLockOptions"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="任务状态" prop="pickStatus">
|
<el-form-item label="状态" prop="standStatus">
|
||||||
<el-select-v2 v-model="pickTaskFormEntity.pickStatus" placeholder="请选择任务状态"
|
<el-select-v2 v-model="standFormEntity.standStatus" placeholder="请选择站台状态"
|
||||||
:options="taskStatusOptions"></el-select-v2>
|
:options="standStatusOptions"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="上次使用时间" prop="lastUseTime">
|
||||||
|
<el-input v-model="standFormEntity.lastUseTime" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="站台料箱数量" prop="pickVehicleCount">
|
||||||
|
<el-input-number v-model.number="standFormEntity.pickVehicleCount"
|
||||||
|
controls-position="right" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -72,7 +99,7 @@
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submitInfo(pickTaskFormEntity)">
|
<el-button type="primary" @click="submitInfo(standFormEntity)">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -84,9 +111,9 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
|
import { getStandsByPage, updateStandInfo } from '@/api/stand.js'
|
||||||
import { ElMessage } from 'element-plus'
|
|
||||||
import { errorBox } from '@/utils/myMessageBox.js'
|
import { errorBox } from '@/utils/myMessageBox.js'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
|
|
@ -94,40 +121,60 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'pickTaskMonitor',
|
name: 'standSettings',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pickTaskList: [],
|
standList: [],
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
vehicleIdQuery: '',
|
standIdQuery: '',
|
||||||
standQuery: '',
|
standTypeQuery: -99,
|
||||||
loading: true,
|
loading: true,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
pickTaskId: '',
|
standId: '',
|
||||||
pickTaskFormEntity: reactive({}),
|
standFormEntity: reactive({}),
|
||||||
pickTaskFormRef: ref(),
|
standFormRef: ref(),
|
||||||
labelPosition: 'top',
|
labelPosition: 'top',
|
||||||
rules: reactive({}),
|
rules: reactive({}),
|
||||||
taskStatusOptions: [
|
standTypeOptions: [
|
||||||
{
|
{
|
||||||
value: -1,
|
value: -99,
|
||||||
label: '暂存'
|
label: '全部'
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 0,
|
|
||||||
label: '待下发'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: '已下发'
|
label: '入库站台'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 2,
|
value: 2,
|
||||||
label: '已到达'
|
label: '备料站台'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: '堆垛机'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
isLockOptions: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '未锁定'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '已锁定'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
standStatusOptions: [
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '可用'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '不可用'
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -139,20 +186,21 @@ export default {
|
||||||
const request = {
|
const request = {
|
||||||
pageNo: this.currentPage,
|
pageNo: this.currentPage,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
standId: this.standIdQuery.trim(),
|
||||||
standId: this.standQuery.trim(),
|
standType: this.standTypeQuery == -99 ? null : this.standTypeQuery,
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
getPickTasksByPage(request).then(res => {
|
getStandsByPage(request).then(res => {
|
||||||
const tableResponse = res.data
|
const tableResponse = res.data
|
||||||
if (tableResponse.code == 0) {
|
if (tableResponse.code == 0) {
|
||||||
this.pickTaskList = tableResponse.returnData.lists
|
this.standList = tableResponse.returnData.lists
|
||||||
this.total = tableResponse.returnData.total
|
this.total = tableResponse.returnData.total
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(tableResponse.message)
|
errorBox(tableResponse.message)
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
ElMessage.error('查询拣选任务错误' + err.message)
|
console.log(err)
|
||||||
|
errorBox('查询站台信息错误')
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
|
|
@ -162,59 +210,80 @@ export default {
|
||||||
timeFormat: (row, column, cellValue, index) => {
|
timeFormat: (row, column, cellValue, index) => {
|
||||||
return timeFormatter(cellValue)
|
return timeFormatter(cellValue)
|
||||||
},
|
},
|
||||||
pickStatusFormat: (row, column, cellValue, index) => {
|
standTypeFormat: (row, column, cellValue, index) => {
|
||||||
switch (cellValue) {
|
switch (cellValue) {
|
||||||
case -1:
|
|
||||||
return '暂存'
|
|
||||||
case 0:
|
|
||||||
return '待下发'
|
|
||||||
case 1:
|
case 1:
|
||||||
return '已下发'
|
return '入库站台'
|
||||||
case 2:
|
case 2:
|
||||||
return '已到达'
|
return '备料站台'
|
||||||
|
case 3:
|
||||||
|
return '堆垛机'
|
||||||
|
default:
|
||||||
|
return '未知'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isLockFormat: (row, column, cellValue, index) => {
|
||||||
|
switch (cellValue) {
|
||||||
|
case 0:
|
||||||
|
return '未锁定'
|
||||||
|
case 1:
|
||||||
|
return '已锁定'
|
||||||
|
default:
|
||||||
|
return '未知'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
standStatusFormat: (row, column, cellValue, index) => {
|
||||||
|
switch (cellValue) {
|
||||||
|
case 0:
|
||||||
|
return '可用'
|
||||||
|
case 1:
|
||||||
|
return '不可用'
|
||||||
default:
|
default:
|
||||||
return '未知'
|
return '未知'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.vehicleIdQuery = ''
|
this.standIdQuery = ''
|
||||||
this.standQuery = ''
|
this.standTypeQuery = -99
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
editCurrentRow(row) {
|
editCurrentRow(row) {
|
||||||
this.pickTaskId = row.pickTaskId
|
this.standId = row.standId
|
||||||
this.pickTaskFormEntity = {
|
this.standFormEntity = {
|
||||||
pickTaskId: row.pickTaskId,
|
|
||||||
vehicleId: row.vehicleId,
|
|
||||||
standId: row.standId,
|
standId: row.standId,
|
||||||
pickStatus: row.pickStatus,
|
standType: row.standType,
|
||||||
lastUpdateTime: row.lastUpdateTime
|
isLock: row.isLock,
|
||||||
|
standStatus: row.standStatus,
|
||||||
|
lastUseTime: row.lastUseTime,
|
||||||
|
pickVehicleCount: row.pickVehicleCount,
|
||||||
}
|
}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
submitInfo(formData) {
|
submitInfo(formData) {
|
||||||
const params = {
|
const params = {
|
||||||
pickTaskId: formData.pickTaskId,
|
standId: formData.standId,
|
||||||
pickStatus: formData.pickStatus,
|
standType: formData.standType,
|
||||||
|
isLock: formData.isLock,
|
||||||
|
standStatus: formData.standStatus,
|
||||||
|
lastUseTime: formData.lastUseTime,
|
||||||
|
pickVehicleCount: formData.pickVehicleCount,
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
updatePickTaskInfo(params).then(res => {
|
updateStandInfo(params).then(res => {
|
||||||
if (res.data.code == 0) {
|
if (res.data.code == 0) {
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
ElMessage({
|
ElMessage.success('更新站台信息成功。')
|
||||||
message: '更新拣选任务成功。',
|
|
||||||
type: 'success',
|
|
||||||
})
|
|
||||||
this.search()
|
this.search()
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.data.message)
|
errorBox(res.data.message)
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
ElMessage.error('更新拣选任务失败。')
|
console.log(err)
|
||||||
|
errorBox('更新站台信息失败。')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCurrentRow(row) {
|
getCurrentRow(row) {
|
||||||
this.pickTaskId = row.pickTaskId
|
this.standId = row.standId
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user