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