代码更新:
1. 增加电子标签库位监控界面 2. 修复二维码入库界面的bug
This commit is contained in:
parent
43eab72bc6
commit
3e58b8ff75
|
|
@ -16,7 +16,25 @@ const updateLocation = (params) => {
|
|||
})
|
||||
}
|
||||
|
||||
const getELocationsByPage = (params) => {
|
||||
return request({
|
||||
url: '/location/getELocationsByPage',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
const updateELocationInfo = (params) => {
|
||||
return request({
|
||||
url: '/location/updateELocationInfo',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
getLocations,
|
||||
updateLocation,
|
||||
getELocationsByPage,
|
||||
updateELocationInfo
|
||||
}
|
||||
|
|
@ -320,7 +320,7 @@ export default {
|
|||
})
|
||||
},
|
||||
showStockDealDialog() {
|
||||
errorBox('暂未开放')
|
||||
this.dialogVisible = true
|
||||
},
|
||||
exceptionHandle() {
|
||||
if (this.exceptionHandleFormEntity.vehicleId == '' || this.exceptionHandleFormEntity.goodsId == '') {
|
||||
|
|
@ -339,6 +339,7 @@ export default {
|
|||
ElMessage.success(response.message)
|
||||
this.exceptionHandleFormEntity.vehicleId = ''
|
||||
this.exceptionHandleFormEntity.goodsId = ''
|
||||
this.dialogVisible = false
|
||||
} else {
|
||||
errorBox(response.message)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,28 +3,37 @@
|
|||
<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="箱号"
|
||||
<el-input v-model="eLocationIdQuery" style="width: 158px; margin-right: 10px;" placeholder="库位号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="standQuery" style="width: 256px; margin-right: 10px;" placeholder="工站"
|
||||
<el-input v-model="workStationQuery" style="width: 158px; margin-right: 10px;" placeholder="工站"
|
||||
:suffix-icon="Search" />
|
||||
<el-select-v2 v-model="pickStatusQuery" style="width: 158px; margin-right: 10px;"
|
||||
placeholder="请选择亮灯状态" :options="pickStatusOptions" @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="eLocationList" 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.eLocationId" v-model="eLocationId"> </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="eLocationId" label="库位号" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workStation" label="工作站台" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="sequenceId" label="顺序号" min-width="120px" />
|
||||
<el-table-column prop="areaId" label="区域号" min-width="120px" />
|
||||
<el-table-column prop="eLocationStatus" label="状态" :formatter="eLocationStatusFormat" min-width="120px"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="taskId" label="任务号" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicleNo" label="料箱号" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="needNum" label="需求数量" min-width="120px" />
|
||||
<el-table-column prop="confirmNum" label="确认数量" min-width="120px" />
|
||||
<el-table-column prop="taskType" label="任务类型" :formatter="taskTypeFormat" min-width="120px" />
|
||||
<el-table-column prop="pickStatus" label="拣选状态" :formatter="pickStatusFormat" show-overflow-tooltip
|
||||
min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
|
|
@ -37,33 +46,34 @@
|
|||
: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="eLocationFormRef" :model="eLocationFormEntity" :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="eLocationId">
|
||||
<el-input v-model="eLocationFormEntity.eLocationId" 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="workStation">
|
||||
<el-input v-model="eLocationFormEntity.workStation" disabled />
|
||||
</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="eLocationStatus">
|
||||
<el-select-v2 v-model="eLocationFormEntity.eLocationStatus" placeholder="请选择库位状态"
|
||||
:options="eLocationStatusOptions"></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="pickStatus">
|
||||
<el-select-v2 v-model="eLocationFormEntity.pickStatus" placeholder="请选择拣选状态"
|
||||
:options="pickStatusOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -72,7 +82,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(eLocationFormEntity)">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
|
|
@ -84,48 +94,54 @@
|
|||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
|
||||
import { getELocationsByPage, updateELocationInfo } from '@/api/location.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'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: 'pickTaskMonitor',
|
||||
name: 'eLocationTable',
|
||||
data() {
|
||||
return {
|
||||
pickTaskList: [],
|
||||
eLocationList: [],
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
vehicleIdQuery: '',
|
||||
standQuery: '',
|
||||
eLocationIdQuery: '',
|
||||
workStationQuery: '',
|
||||
pickStatusQuery: -99,
|
||||
loading: true,
|
||||
dialogVisible: false,
|
||||
pickTaskId: '',
|
||||
pickTaskFormEntity: reactive({}),
|
||||
pickTaskFormRef: ref(),
|
||||
eLocationId: '',
|
||||
eLocationFormEntity: reactive({}),
|
||||
eLocationFormRef: ref(),
|
||||
labelPosition: 'top',
|
||||
rules: reactive({}),
|
||||
taskStatusOptions: [
|
||||
pickStatusOptions: [
|
||||
{
|
||||
value: -1,
|
||||
label: '暂存'
|
||||
value: -99,
|
||||
label: '全部'
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: '待下发'
|
||||
label: '未亮灯'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已下发'
|
||||
label: '已亮灯'
|
||||
}
|
||||
],
|
||||
eLocationStatusOptions: [
|
||||
{
|
||||
value: 0,
|
||||
label: '可用'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已到达'
|
||||
value: 1,
|
||||
label: '不可用'
|
||||
}
|
||||
],
|
||||
}
|
||||
|
|
@ -139,70 +155,82 @@ export default {
|
|||
const request = {
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
vehicleId: this.vehicleIdQuery.trim(),
|
||||
standId: this.standQuery.trim(),
|
||||
eLocationId: this.eLocationIdQuery.trim(),
|
||||
workStation: this.workStationQuery.trim(),
|
||||
pickStatus: this.pickStatusQuery == -99 ? null : this.pickStatusQuery,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getPickTasksByPage(request).then(res => {
|
||||
getELocationsByPage(request).then(res => {
|
||||
const tableResponse = res.data
|
||||
if (tableResponse.code == 0) {
|
||||
this.pickTaskList = tableResponse.returnData.lists
|
||||
this.eLocationList = tableResponse.returnData.lists
|
||||
this.total = tableResponse.returnData.total
|
||||
} else {
|
||||
errorBox(tableResponse.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('查询拣选任务错误' + err.message)
|
||||
ElMessage.error('查询灯光库位信息错误' + err.message)
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
dateFormat: (row, column, cellValue, index) => {
|
||||
return dateFormatter(cellValue)
|
||||
},
|
||||
timeFormat: (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
},
|
||||
pickStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case -1:
|
||||
return '暂存'
|
||||
case 0:
|
||||
return '待下发'
|
||||
return '未亮灯'
|
||||
case 1:
|
||||
return '已下发'
|
||||
case 2:
|
||||
return '已到达'
|
||||
return '已亮灯'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
eLocationStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case 0:
|
||||
return '可用'
|
||||
case 1:
|
||||
return '不可用'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
taskTypeFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case 1:
|
||||
return '备料拣选'
|
||||
case 2:
|
||||
return '整理大盒子'
|
||||
default:
|
||||
return ''
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.vehicleIdQuery = ''
|
||||
this.standQuery = ''
|
||||
this.eLocationIdQuery = ''
|
||||
this.workStationQuery = ''
|
||||
this.pickStatusQuery = -99
|
||||
this.search()
|
||||
},
|
||||
editCurrentRow(row) {
|
||||
this.pickTaskId = row.pickTaskId
|
||||
this.pickTaskFormEntity = {
|
||||
pickTaskId: row.pickTaskId,
|
||||
vehicleId: row.vehicleId,
|
||||
standId: row.standId,
|
||||
pickStatus: row.pickStatus,
|
||||
lastUpdateTime: row.lastUpdateTime
|
||||
this.eLocationId = row.eLocationId
|
||||
this.eLocationFormEntity = {
|
||||
eLocationId: row.eLocationId,
|
||||
workStation: row.workStation,
|
||||
eLocationStatus: row.eLocationStatus,
|
||||
pickStatus: row.pickStatus
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
submitInfo(formData) {
|
||||
const params = {
|
||||
pickTaskId: formData.pickTaskId,
|
||||
pickStatus: formData.pickStatus,
|
||||
eLocationId: formData.eLocationId,
|
||||
eLocationStatus: formData.eLocationStatus,
|
||||
pickStatus: formData.pickStatus == -99 ? null : formData.pickStatus,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
updatePickTaskInfo(params).then(res => {
|
||||
updateELocationInfo(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.dialogVisible = false
|
||||
ElMessage({
|
||||
message: '更新拣选任务成功。',
|
||||
message: '更新灯光信息成功。',
|
||||
type: 'success',
|
||||
})
|
||||
this.search()
|
||||
|
|
@ -210,11 +238,11 @@ export default {
|
|||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('更新拣选任务失败。')
|
||||
ElMessage.error('更新灯光信息失败。')
|
||||
})
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
this.pickTaskId = row.pickTaskId
|
||||
this.eLocationId = row.eLocationId
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ export default {
|
|||
resetForms() {
|
||||
this.workFormEntity = reactive({
|
||||
vehicleId: '',
|
||||
qrcode: '',
|
||||
goodsId: '',
|
||||
goodsNum: null
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user