<update>[important]新增堆垛机状态查询界面
This commit is contained in:
parent
1931900966
commit
f5c749972c
8
src/axios/stacker.js
Normal file
8
src/axios/stacker.js
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
import axios from '@/axios/base/base.axios';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
// 获取所有堆垛机数据
|
||||||
|
getStacker() {
|
||||||
|
return axios.get('/api/wcs/stacker/getStackerStatus')
|
||||||
|
},
|
||||||
|
}
|
||||||
24
src/enum/base/on.off.enum.js
Normal file
24
src/enum/base/on.off.enum.js
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
// 开启和关闭枚举
|
||||||
|
export const onOrOffEnum = {
|
||||||
|
on: {
|
||||||
|
value: 0,
|
||||||
|
label: '关闭',
|
||||||
|
type: 'warning'
|
||||||
|
},
|
||||||
|
off: {
|
||||||
|
value: 1,
|
||||||
|
label: '开启',
|
||||||
|
type: 'success'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function formatterOnOrOffEnum(value) {
|
||||||
|
switch (parseInt(value)){
|
||||||
|
case onOrOffEnum.on.value:
|
||||||
|
return {label: onOrOffEnum.on.label, type: onOrOffEnum.on.type};
|
||||||
|
case onOrOffEnum.off.value:
|
||||||
|
return {label: onOrOffEnum.off.label, type: onOrOffEnum.off.type};
|
||||||
|
default:
|
||||||
|
return {label: `未知类型:${value}`, type: 'danger'};
|
||||||
|
}
|
||||||
|
}
|
||||||
46
src/enum/location/locationStatusEnum.js
Normal file
46
src/enum/location/locationStatusEnum.js
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
|
||||||
|
// 库位状态
|
||||||
|
export const locationStatusEnum = {
|
||||||
|
creat: {
|
||||||
|
value: 0,
|
||||||
|
label: '空闲',
|
||||||
|
type: 'success'
|
||||||
|
},
|
||||||
|
queue: {
|
||||||
|
value: 1,
|
||||||
|
label: '锁定',
|
||||||
|
type: 'warning'
|
||||||
|
},
|
||||||
|
running: {
|
||||||
|
value: 2,
|
||||||
|
label: '占用',
|
||||||
|
type: 'primary'
|
||||||
|
},
|
||||||
|
finish: {
|
||||||
|
value: 9,
|
||||||
|
label: '禁用',
|
||||||
|
type: 'danger'
|
||||||
|
},
|
||||||
|
error: {
|
||||||
|
value: 999,
|
||||||
|
label: '特殊点位',
|
||||||
|
type: 'info'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function formatterLocationStatusEnum(value) {
|
||||||
|
switch (parseInt(value)){
|
||||||
|
case locationStatusEnum.creat.value:
|
||||||
|
return {label: locationStatusEnum.creat.label, type: locationStatusEnum.creat.type};
|
||||||
|
case locationStatusEnum.queue.value:
|
||||||
|
return {label: locationStatusEnum.queue.label, type: locationStatusEnum.queue.type};
|
||||||
|
case locationStatusEnum.running.value:
|
||||||
|
return {label: locationStatusEnum.running.label, type: locationStatusEnum.running.type};
|
||||||
|
case locationStatusEnum.finish.value:
|
||||||
|
return {label: locationStatusEnum.finish.label, type: locationStatusEnum.finish.type};
|
||||||
|
case locationStatusEnum.error.value:
|
||||||
|
return {label: locationStatusEnum.error.label, type: locationStatusEnum.error.type};
|
||||||
|
default:
|
||||||
|
return {label: `未知类型:${value}`, type: 'danger'};
|
||||||
|
}
|
||||||
|
}
|
||||||
46
src/enum/location/locationTypeEnum.js
Normal file
46
src/enum/location/locationTypeEnum.js
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
|
||||||
|
// 库位类型
|
||||||
|
export const locationTypeEnum = {
|
||||||
|
creat: {
|
||||||
|
value: 0,
|
||||||
|
label: '库位',
|
||||||
|
type: 'info'
|
||||||
|
},
|
||||||
|
queue: {
|
||||||
|
value: 1,
|
||||||
|
label: '入库站台',
|
||||||
|
type: 'success'
|
||||||
|
},
|
||||||
|
running: {
|
||||||
|
value: 2,
|
||||||
|
label: '出库站台',
|
||||||
|
type: 'warning'
|
||||||
|
},
|
||||||
|
finish: {
|
||||||
|
value: 12,
|
||||||
|
label: '出入库站台',
|
||||||
|
type: 'danger'
|
||||||
|
},
|
||||||
|
error: {
|
||||||
|
value: 9,
|
||||||
|
label: '移库暂存点',
|
||||||
|
type: 'primary'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function formatterLocationTypeEnum(value) {
|
||||||
|
switch (parseInt(value)){
|
||||||
|
case locationTypeEnum.creat.value:
|
||||||
|
return {label: locationTypeEnum.creat.label, type: locationTypeEnum.creat.type};
|
||||||
|
case locationTypeEnum.queue.value:
|
||||||
|
return {label: locationTypeEnum.queue.label, type: locationTypeEnum.queue.type};
|
||||||
|
case locationTypeEnum.running.value:
|
||||||
|
return {label: locationTypeEnum.running.label, type: locationTypeEnum.running.type};
|
||||||
|
case locationTypeEnum.finish.value:
|
||||||
|
return {label: locationTypeEnum.finish.label, type: locationTypeEnum.finish.type};
|
||||||
|
case locationTypeEnum.error.value:
|
||||||
|
return {label: locationTypeEnum.error.label, type: locationTypeEnum.error.type};
|
||||||
|
default:
|
||||||
|
return {label: `未知类型:${value}`, type: 'danger'};
|
||||||
|
}
|
||||||
|
}
|
||||||
52
src/enum/stacker/stackerControlModelEnum.js
Normal file
52
src/enum/stacker/stackerControlModelEnum.js
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
|
||||||
|
// 堆垛机控制方式
|
||||||
|
export const stackerControlModel = {
|
||||||
|
offline: {
|
||||||
|
value: 0,
|
||||||
|
label: '离线',
|
||||||
|
type: 'warning'
|
||||||
|
},
|
||||||
|
selfLearning: {
|
||||||
|
value: 1,
|
||||||
|
label: '自学习',
|
||||||
|
type: 'primary'
|
||||||
|
},
|
||||||
|
debug: {
|
||||||
|
value: 2,
|
||||||
|
label: '调试',
|
||||||
|
type: 'primary'
|
||||||
|
},
|
||||||
|
manual: {
|
||||||
|
value: 3,
|
||||||
|
label: '手动',
|
||||||
|
type: 'primary'
|
||||||
|
},
|
||||||
|
standAlone: {
|
||||||
|
value: 4,
|
||||||
|
label: '单机',
|
||||||
|
type: 'primary'
|
||||||
|
},
|
||||||
|
online: {
|
||||||
|
value: 5,
|
||||||
|
label: '联机',
|
||||||
|
type: 'success'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export function formatterStackerControlModel(value) {
|
||||||
|
switch (parseInt(value)){
|
||||||
|
case stackerControlModel.offline.value:
|
||||||
|
return {label: stackerControlModel.offline.label, type: stackerControlModel.offline.type};
|
||||||
|
case stackerControlModel.selfLearning.value:
|
||||||
|
return {label: stackerControlModel.selfLearning.label, type: stackerControlModel.selfLearning.type};
|
||||||
|
case stackerControlModel.debug.value:
|
||||||
|
return {label: stackerControlModel.debug.label, type: stackerControlModel.debug.type};
|
||||||
|
case stackerControlModel.manual.value:
|
||||||
|
return {label: stackerControlModel.manual.label, type: stackerControlModel.manual.type};
|
||||||
|
case stackerControlModel.standAlone.value:
|
||||||
|
return {label: stackerControlModel.standAlone.label, type: stackerControlModel.standAlone.type};
|
||||||
|
case stackerControlModel.online.value:
|
||||||
|
return {label: stackerControlModel.online.label, type: stackerControlModel.online.type};
|
||||||
|
default:
|
||||||
|
return {label: `未知类型:${value}`, type: 'danger'};
|
||||||
|
}
|
||||||
|
}
|
||||||
101
src/enum/stacker/stackerStatusEnum.js
Normal file
101
src/enum/stacker/stackerStatusEnum.js
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
|
||||||
|
// 堆垛机状态 ---- 设备
|
||||||
|
export const stackerControlModel = {
|
||||||
|
offline: {
|
||||||
|
value: 0,
|
||||||
|
label: '离线',
|
||||||
|
type: 'warning'
|
||||||
|
},
|
||||||
|
free: {
|
||||||
|
value: 1,
|
||||||
|
label: '空闲',
|
||||||
|
type: 'success'
|
||||||
|
},
|
||||||
|
acceptTask: {
|
||||||
|
value: 2,
|
||||||
|
label: '任务接收',
|
||||||
|
type: 'Info'
|
||||||
|
},
|
||||||
|
getMove: {
|
||||||
|
value: 3,
|
||||||
|
label: '取货移动',
|
||||||
|
type: 'Info'
|
||||||
|
},
|
||||||
|
getting: {
|
||||||
|
value: 4,
|
||||||
|
label: '取货中',
|
||||||
|
type: 'Info'
|
||||||
|
},
|
||||||
|
getComplete: {
|
||||||
|
value: 5,
|
||||||
|
label: '取货完成',
|
||||||
|
type: 'Info'
|
||||||
|
},
|
||||||
|
setMove: {
|
||||||
|
value: 6,
|
||||||
|
label: '卸货移动',
|
||||||
|
type: 'Info'
|
||||||
|
},
|
||||||
|
setting: {
|
||||||
|
value: 7,
|
||||||
|
label: '卸货中',
|
||||||
|
type: 'Info'
|
||||||
|
},
|
||||||
|
setComplete: {
|
||||||
|
value: 8,
|
||||||
|
label: '卸货完成',
|
||||||
|
type: 'Info'
|
||||||
|
},
|
||||||
|
taskComplete: {
|
||||||
|
value: 9,
|
||||||
|
label: '任务完成',
|
||||||
|
type: 'Info'
|
||||||
|
},
|
||||||
|
deleteTask: {
|
||||||
|
value: 10,
|
||||||
|
label: '删除任务',
|
||||||
|
type: 'Info'
|
||||||
|
},
|
||||||
|
checking: {
|
||||||
|
value: 11,
|
||||||
|
label: '盘点中',
|
||||||
|
type: 'Info'
|
||||||
|
},
|
||||||
|
applyTask: {
|
||||||
|
value: 12,
|
||||||
|
label: '二次预约申请',
|
||||||
|
type: 'primary'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export function formatterStackerStatus(value) {
|
||||||
|
switch (parseInt(value)){
|
||||||
|
case stackerControlModel.offline.value:
|
||||||
|
return {label: stackerControlModel.offline.label, type: stackerControlModel.offline.type};
|
||||||
|
case stackerControlModel.free.value:
|
||||||
|
return {label: stackerControlModel.free.label, type: stackerControlModel.free.type};
|
||||||
|
case stackerControlModel.acceptTask.value:
|
||||||
|
return {label: stackerControlModel.acceptTask.label, type: stackerControlModel.acceptTask.type};
|
||||||
|
case stackerControlModel.getMove.value:
|
||||||
|
return {label: stackerControlModel.getMove.label, type: stackerControlModel.getMove.type};
|
||||||
|
case stackerControlModel.getting.value:
|
||||||
|
return {label: stackerControlModel.getting.label, type: stackerControlModel.getting.type};
|
||||||
|
case stackerControlModel.getComplete.value:
|
||||||
|
return {label: stackerControlModel.getComplete.label, type: stackerControlModel.getComplete.type};
|
||||||
|
case stackerControlModel.setMove.value:
|
||||||
|
return {label: stackerControlModel.setMove.label, type: stackerControlModel.setMove.type};
|
||||||
|
case stackerControlModel.setting.value:
|
||||||
|
return {label: stackerControlModel.setting.label, type: stackerControlModel.setting.type};
|
||||||
|
case stackerControlModel.setComplete.value:
|
||||||
|
return {label: stackerControlModel.setComplete.label, type: stackerControlModel.setComplete.type};
|
||||||
|
case stackerControlModel.taskComplete.value:
|
||||||
|
return {label: stackerControlModel.taskComplete.label, type: stackerControlModel.taskComplete.type};
|
||||||
|
case stackerControlModel.deleteTask.value:
|
||||||
|
return {label: stackerControlModel.deleteTask.label, type: stackerControlModel.deleteTask.type};
|
||||||
|
case stackerControlModel.checking.value:
|
||||||
|
return {label: stackerControlModel.checking.label, type: stackerControlModel.checking.type};
|
||||||
|
case stackerControlModel.applyTask.value:
|
||||||
|
return {label: stackerControlModel.applyTask.label, type: stackerControlModel.applyTask.type};
|
||||||
|
default:
|
||||||
|
return {label: `未知类型:${value}`, type: 'danger'};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,27 +5,27 @@ export const wmsTaskStatusEnum = {
|
||||||
creat: {
|
creat: {
|
||||||
value: 0,
|
value: 0,
|
||||||
label: '新创建',
|
label: '新创建',
|
||||||
color: 'Info'
|
color: 'info'
|
||||||
},
|
},
|
||||||
queue: {
|
queue: {
|
||||||
value: 1,
|
value: 1,
|
||||||
label: '排队中',
|
label: '排队中',
|
||||||
color: 'Info'
|
color: 'warning'
|
||||||
},
|
},
|
||||||
running: {
|
running: {
|
||||||
value: 2,
|
value: 2,
|
||||||
label: '执行中',
|
label: '执行中',
|
||||||
color: 'Primary'
|
color: 'primary'
|
||||||
},
|
},
|
||||||
finish: {
|
finish: {
|
||||||
value: 3,
|
value: 3,
|
||||||
label: '执行完成',
|
label: '执行完成',
|
||||||
color: 'Success'
|
color: 'success'
|
||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
value: 9,
|
value: 9,
|
||||||
label: '执行异常',
|
label: '执行异常',
|
||||||
color: 'Warning'
|
color: 'danger'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,27 +5,27 @@ export const wmsTaskTypeEnum = {
|
||||||
inTask:{
|
inTask:{
|
||||||
value:1,
|
value:1,
|
||||||
label:'入库任务',
|
label:'入库任务',
|
||||||
color: 'Success'
|
color: 'success'
|
||||||
},
|
},
|
||||||
outTask:{
|
outTask:{
|
||||||
value:2,
|
value:2,
|
||||||
label:'出库任务',
|
label:'出库任务',
|
||||||
color: 'Warning'
|
color: 'warning'
|
||||||
},
|
},
|
||||||
pickTask:{
|
pickTask:{
|
||||||
value:4,
|
value:4,
|
||||||
label:'拣货任务',
|
label:'拣货任务',
|
||||||
color: 'Info'
|
color: 'info'
|
||||||
},
|
},
|
||||||
checkTask:{
|
checkTask:{
|
||||||
value:10,
|
value:10,
|
||||||
label:'盘点任务',
|
label:'盘点任务',
|
||||||
color: 'Danger'
|
color: 'danger'
|
||||||
},
|
},
|
||||||
moveTask:{
|
moveTask:{
|
||||||
value:9,
|
value:9,
|
||||||
label:'移库任务',
|
label:'移库任务',
|
||||||
color: 'Primary'
|
color: 'primary'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,15 +11,21 @@
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="modelValue" border stripe max-height="calc(100vh - 450px)">
|
<el-table :data="modelValue" border stripe max-height="calc(100vh - 500px)">
|
||||||
<el-table-column fixed prop="wcsLocation" label="WCS点位" width="150px" align="center"/>
|
<el-table-column fixed prop="wcsLocation" label="WCS点位" width="150px" align="center"/>
|
||||||
<el-table-column prop="wmsLocation" label="映射WMS点位" width="150px" align="center"/>
|
<el-table-column prop="wmsLocation" label="映射WMS点位" width="150px" align="center"/>
|
||||||
<el-table-column prop="vehicleNo" label="载具编号" width="150px" show-overflow-tooltip align="center"/>
|
<el-table-column prop="vehicleNo" label="当前载具" width="150px" show-overflow-tooltip align="center"/>
|
||||||
<el-table-column prop="tunnelNo" label="巷道号" width="100px" align="center"/>
|
<el-table-column prop="tunnelNo" label="巷道号" width="100px" align="center"/>
|
||||||
<el-table-column prop="equipmentId" label="设备号" width="100px" align="center"/>
|
<el-table-column prop="equipmentId" label="设备号" width="100px" align="center"/>
|
||||||
<el-table-column label="库位状态" width="100px" align="center">
|
<el-table-column label="点位类型" width="100px" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag class="ml-2" :type=formatterLocationStatus(scope.row.locationStatus).type>{{formatterLocationStatus(scope.row.locationStatus).msg }}
|
<el-tag class="ml-2" :type=formatterLocationTypeEnum(scope.row.locationType).type>{{formatterLocationTypeEnum(scope.row.locationType).label }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="点位状态" width="100px" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag class="ml-2" :type=formatterLocationStatusEnum(scope.row.locationStatus).type>{{formatterLocationStatusEnum(scope.row.locationStatus).label }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -27,7 +33,8 @@
|
||||||
<el-table-column prop="line" label="列" width="80px" align="center"/>
|
<el-table-column prop="line" label="列" width="80px" align="center"/>
|
||||||
<el-table-column prop="layer" label="层" width="80px" align="center"/>
|
<el-table-column prop="layer" label="层" width="80px" align="center"/>
|
||||||
<el-table-column prop="depth" label="深" width="80px" align="center"/>
|
<el-table-column prop="depth" label="深" width="80px" align="center"/>
|
||||||
<el-table-column prop="locationType" label="点位类型" width="150px" align="center"/>
|
<el-table-column prop="vehicleType" label="兼容的载具类型" width="250px" align="center"/>
|
||||||
|
<el-table-column prop="interveneLocation" label="干涉的点位" width="150px"/>
|
||||||
<el-table-column prop="explain" label="点位释义" width="150px" align="center"/>
|
<el-table-column prop="explain" label="点位释义" width="150px" align="center"/>
|
||||||
<el-table-column prop="remark" label="备注信息" min-width="100px"/>
|
<el-table-column prop="remark" label="备注信息" min-width="100px"/>
|
||||||
<el-table-column fixed="right" label="操作" align="center" width="80">
|
<el-table-column fixed="right" label="操作" align="center" width="80">
|
||||||
|
|
@ -66,6 +73,8 @@
|
||||||
// import 《组件名称》 from '《组件路径》 ';
|
// import 《组件名称》 from '《组件路径》 ';
|
||||||
import formatterLocation from "@/plugins/formatter/formatter.location";
|
import formatterLocation from "@/plugins/formatter/formatter.location";
|
||||||
import CheckDetail from "@/view/component/locationData/CheckDetail.vue";
|
import CheckDetail from "@/view/component/locationData/CheckDetail.vue";
|
||||||
|
import {formatterLocationTypeEnum} from "@/enum/location/locationTypeEnum";
|
||||||
|
import {formatterLocationStatusEnum} from "@/enum/location/locationStatusEnum";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// import 引入的组件需要注入到对象中才能使用
|
// import 引入的组件需要注入到对象中才能使用
|
||||||
|
|
@ -90,6 +99,8 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
// 方法集合
|
// 方法集合
|
||||||
methods: {
|
methods: {
|
||||||
|
formatterLocationStatusEnum,
|
||||||
|
formatterLocationTypeEnum,
|
||||||
searchData() {
|
searchData() {
|
||||||
this.$emit('pageChange', this.searchParams)
|
this.$emit('pageChange', this.searchParams)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,14 @@
|
||||||
<el-input placeholder="输入 料箱号/点位号 查询..." v-model="searchParams.searchStr" clearable></el-input>
|
<el-input placeholder="输入 料箱号/点位号 查询..." v-model="searchParams.searchStr" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="点位类型:">
|
<el-form-item label="点位类型:">
|
||||||
<el-checkbox-group v-model="searchParams.locationStatus">
|
<el-select v-model="searchParams.locationType" multiple placeholder="请选择需要查询的点位类型">
|
||||||
<el-checkbox label="空闲" checked />
|
<el-option v-for="item in locationTypeEnum" :key="item.value" :label="item.label" :value="item.value "/>
|
||||||
<el-checkbox label="锁定" checked />
|
</el-select>
|
||||||
<el-checkbox label="占用" checked />
|
</el-form-item>
|
||||||
<el-checkbox label="禁用" checked />
|
<el-form-item label="点位状态:">
|
||||||
<el-checkbox label="特殊点位" checked />
|
<el-select v-model="searchParams.locationStatus" multiple placeholder="请选择需要查询的点位状态">
|
||||||
</el-checkbox-group>
|
<el-option v-for="item in locationStatusEnum" :key="item.value" :label="item.label" :value="item.value "/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -26,6 +27,8 @@
|
||||||
// import 《组件名称》 from '《组件路径》 ';
|
// import 《组件名称》 from '《组件路径》 ';
|
||||||
import locationApi from '@/axios/location'
|
import locationApi from '@/axios/location'
|
||||||
import {ElLoading, ElMessage, ElMessageBox} from "element-plus";
|
import {ElLoading, ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {locationStatusEnum} from "@/enum/location/locationStatusEnum";
|
||||||
|
import {locationTypeEnum} from "@/enum/location/locationTypeEnum";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// import 引入的组件需要注入到对象中才能使用
|
// import 引入的组件需要注入到对象中才能使用
|
||||||
|
|
@ -37,7 +40,14 @@ export default {
|
||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
// 计算属性 类似于 data 概念
|
// 计算属性 类似于 data 概念
|
||||||
computed: {},
|
computed: {
|
||||||
|
locationTypeEnum() {
|
||||||
|
return locationTypeEnum
|
||||||
|
},
|
||||||
|
locationStatusEnum() {
|
||||||
|
return locationStatusEnum
|
||||||
|
}
|
||||||
|
},
|
||||||
// 监控 data 中的数据变化
|
// 监控 data 中的数据变化
|
||||||
watch: {},
|
watch: {},
|
||||||
// 方法集合
|
// 方法集合
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
:model="wmsTask"
|
:model="wmsTask"
|
||||||
require-asterisk-position="right"
|
require-asterisk-position="right"
|
||||||
style="width: 600px"
|
inline
|
||||||
>
|
>
|
||||||
<div style="font-size: 0.8rem; margin-bottom: 1rem; color: coral">
|
<div style="font-size: 0.8rem; margin-bottom: 1rem; color: coral">
|
||||||
请输入准确位置,否则可能不能正常运行任务(不建议使用此处操作,请前往WMS操作)
|
请输入准确位置,否则可能不能正常运行任务(不建议使用此处操作,请前往WMS操作)
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<el-option label="拣选盘点任务" value="4"/>
|
<el-option label="拣选盘点任务" value="4"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="起点:" required>
|
<el-form-item label="起点:" :required ="wmsTask.taskType === '2' || wmsTask.taskType === '9' || wmsTask.taskType === '4' ">
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
v-model="wmsTask.origin"
|
v-model="wmsTask.origin"
|
||||||
:fetch-suggestions="locationFilter"
|
:fetch-suggestions="locationFilter"
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
placeholder="请输入中间点"
|
placeholder="请输入中间点"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终点:" required>
|
<el-form-item label="终点:" :required ="wmsTask.taskType === '1' || wmsTask.taskType === '9'">
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
v-model="wmsTask.destination"
|
v-model="wmsTask.destination"
|
||||||
:fetch-suggestions="locationFilter"
|
:fetch-suggestions="locationFilter"
|
||||||
|
|
@ -139,17 +139,29 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 添加Wms任务
|
// 添加Wms任务
|
||||||
addWmsTask() {
|
addWmsTask() {
|
||||||
if (this.wmsTask.taskType === ''
|
if (this.wmsTask.taskType === '' || this.wmsTask.vehicleNo === '') {
|
||||||
|| this.wmsTask.origin === ''
|
|
||||||
|| this.wmsTask.destination === ''
|
|
||||||
|| this.wmsTask.vehicleNo === '') {
|
|
||||||
// 服务报错
|
|
||||||
ElMessageBox.alert(`您有必填的项未填`, '警告', {
|
ElMessageBox.alert(`您有必填的项未填`, '警告', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
confirmButtonText: '确定'
|
confirmButtonText: '确定'
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if((this.wmsTask.taskType === '2' || this.wmsTask.taskType === '9' || this.wmsTask.taskType === '4' )&& this.wmsTask.origin === '')
|
||||||
|
{
|
||||||
|
ElMessageBox.alert(`出库/拣选/移库必须要有终点`, '警告', {
|
||||||
|
type: 'warning',
|
||||||
|
confirmButtonText: '确定'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if((this.wmsTask.taskType === '1' || this.wmsTask.taskType === '9' )&& this.wmsTask.destination === '')
|
||||||
|
{
|
||||||
|
ElMessageBox.alert(`入库/移库必须要有起点`, '警告', {
|
||||||
|
type: 'warning',
|
||||||
|
confirmButtonText: '确定'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
wmsTaskApi.addWmsTask(this.wmsTask).then((response) => {
|
wmsTaskApi.addWmsTask(this.wmsTask).then((response) => {
|
||||||
const responseData = response.data
|
const responseData = response.data
|
||||||
if (responseData.code === 0) {
|
if (responseData.code === 0) {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="taskStatus" label="任务状态" width="95px" align="center">
|
<el-table-column prop="taskStatus" label="任务状态" width="95px" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag class="ml-2" :type=formatterWmsTaskStatusEnum(scope.row.taskStatus).color effect="light">
|
<el-tag class="ml-2" :type=formatterWmsTaskStatusEnum(scope.row.taskStatus).color>
|
||||||
{{formatterWmsTaskStatusEnum(scope.row.taskStatus).label }}</el-tag>
|
{{formatterWmsTaskStatusEnum(scope.row.taskStatus).label }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,10 @@ export default {
|
||||||
searchParams: {
|
searchParams: {
|
||||||
// 查询关键字
|
// 查询关键字
|
||||||
searchStr: '',
|
searchStr: '',
|
||||||
|
// 点位状态
|
||||||
|
locationStatus: [0,1,2,9,999],
|
||||||
// 点位类型
|
// 点位类型
|
||||||
locationStatus: [],
|
locationType: [0,1,2,9,12],
|
||||||
// 分页控件信息
|
// 分页控件信息
|
||||||
page: {
|
page: {
|
||||||
// 每页显示的行数
|
// 每页显示的行数
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,63 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<el-row>
|
||||||
|
<el-button type="primary" style="margin-left: 0.5rem" @click="loadData">加载状态数据</el-button>
|
||||||
|
</el-row>
|
||||||
|
<el-row style="width: calc(100vw - 270px)">
|
||||||
|
<h5>堆垛机状态查询表格</h5>
|
||||||
|
<el-table :data="stackerInfo" border stripe style="width: 100%;" max-height="calc(100vh - 350px)">
|
||||||
|
<el-table-column fixed prop="stackerId" label="堆垛机编号" width="100px" align="center" show-overflow-tooltip/>
|
||||||
|
<el-table-column fixed prop="stackerName" label="堆垛机名称" width="250px" align="center" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="stackerStatus" label="堆垛机状态(系统)" align="center" width="180px">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag class="ml-2" :type=formatterOnOrOffEnum(scope.row.stackerStatus).type>
|
||||||
|
{{formatterOnOrOffEnum(scope.row.stackerStatus).label}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="forkStatus" label="货叉状态(系统)" align="center" width="150px"/>
|
||||||
|
<el-table-column prop="msg" label="查询结果" align="center" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="plcId" label="PlcId" width="150px" align="center" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="controlModel" label="控制方式" width="250px" align="center" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag class="ml-2" :type=formatterStackerControlModel(scope.row.controlModel).type>
|
||||||
|
{{formatterStackerControlModel(scope.row.controlModel).label}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="stackerStatusEquip" label="堆垛机状态(设备)" align="center" width="160px">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag class="ml-2" :type=formatterStackerStatus(scope.row.stackerStatusEquip).type>
|
||||||
|
{{formatterStackerStatus(scope.row.stackerStatusEquip).label}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="queue" label="排" align="center" width="60px"/>
|
||||||
|
<el-table-column prop="line" label="列" align="center" width="60px"/>
|
||||||
|
<el-table-column prop="layer" label="层" align="center" width="60px"/>
|
||||||
|
<el-table-column prop="depth" label="深" align="center" width="60px"/>
|
||||||
|
<el-table-column prop="code" label="料箱码" align="center" width="150px"/>
|
||||||
|
<el-table-column prop="errCode" label="报警编号" align="center" width="130px" show-overflow-tooltip/>
|
||||||
|
<el-table-column fixed="right" label="操作" align="center" width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button-group class="ml-4">
|
||||||
|
<el-tooltip content="查询" placement="top" effect="light">
|
||||||
|
<el-button type="primary" size="small" @click="search(scope.row)">
|
||||||
|
<el-icon><Search/></el-icon>
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</el-button-group>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import 《组件名称》 from '《组件路径》 ';
|
// import 《组件名称》 from '《组件路径》 ';
|
||||||
|
import stacker from "@/axios/stacker";
|
||||||
|
import {ElLoading, ElMessage} from "element-plus";
|
||||||
|
import {formatterOnOrOffEnum} from "@/enum/base/on.off.enum";
|
||||||
|
import {formatterStackerControlModel} from "@/enum/stacker/stackerControlModelEnum";
|
||||||
|
import {formatterStackerStatus} from "../../../enum/stacker/stackerStatusEnum";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// import 引入的组件需要注入到对象中才能使用
|
// import 引入的组件需要注入到对象中才能使用
|
||||||
|
|
@ -14,14 +66,56 @@ export default {
|
||||||
emits: [],
|
emits: [],
|
||||||
data() {
|
data() {
|
||||||
// 这里存放数据
|
// 这里存放数据
|
||||||
return {}
|
return {
|
||||||
|
stackerInfo:[]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 计算属性 类似于 data 概念
|
// 计算属性 类似于 data 概念
|
||||||
computed: {},
|
computed: {
|
||||||
|
},
|
||||||
// 监控 data 中的数据变化
|
// 监控 data 中的数据变化
|
||||||
watch: {},
|
watch: {},
|
||||||
// 方法集合
|
// 方法集合
|
||||||
methods: {},
|
methods: {
|
||||||
|
formatterStackerStatus,
|
||||||
|
formatterStackerControlModel,
|
||||||
|
formatterOnOrOffEnum,
|
||||||
|
// 加载堆垛机数据
|
||||||
|
loadData(){
|
||||||
|
const loading = ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '加载中...',
|
||||||
|
})
|
||||||
|
this.stackerInfo = []
|
||||||
|
stacker.getStacker().then(res=>{
|
||||||
|
const responseData = res.data
|
||||||
|
if(responseData.code === 0){
|
||||||
|
ElMessage({
|
||||||
|
message: '查询成功',
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
this.stackerInfo = Object.freeze(responseData["returnData"])
|
||||||
|
}else{
|
||||||
|
ElMessage({
|
||||||
|
message: '服务器返回失败:' + responseData.msg,
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
loading.close()
|
||||||
|
}).catch(ex=>{
|
||||||
|
ElMessage({
|
||||||
|
message: '请求服务器失败:' + ex,
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
// 查询堆垛机状态
|
||||||
|
search(row){
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
// 组合式 API
|
// 组合式 API
|
||||||
setup() {
|
setup() {
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,9 @@ export default {
|
||||||
// 查询关键字
|
// 查询关键字
|
||||||
searchStr: '',
|
searchStr: '',
|
||||||
// 任务类型
|
// 任务类型
|
||||||
taskType: [],
|
taskType: [1,2,4,10,9],
|
||||||
// 任务状态
|
// 任务状态
|
||||||
taskStatus: [],
|
taskStatus: [0,1,2,3,9],
|
||||||
// 起止时间
|
// 起止时间
|
||||||
timeRange: [],
|
timeRange: [],
|
||||||
// 分页控件信息
|
// 分页控件信息
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
<div style="margin-top: 10px; font-size: 0.8rem; color: coral">
|
<div style="margin-top: 10px; font-size: 0.8rem; color: coral">
|
||||||
您的电脑需要先安装对应的驱动程序<br>
|
您的电脑需要先安装对应的驱动程序<br>
|
||||||
请先点击预览再打印,请勿一次性打印太多数目<br>
|
请先点击预览再打印,请勿一次性打印太多数目<br>
|
||||||
仅限条码纸大小为 80*60,请在打印界面将边距设置为无
|
仅限条码纸大小为 <span style="font-size: 1.5rem">80*60</span>mm,请在打印界面将边距设置为无
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar height="calc(100vh - 200px)" style="width: 100mm; margin-left: 50px">
|
<el-scrollbar height="calc(100vh - 200px)" style="width: 100mm; margin-left: 50px">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user