forked from BaoKaiWms/202501-Wms-Kate-Wuxi
1. 优化菜单与标签
2. 增加任务监控界面显示 3. 增加库存更新记录的显示与导出
This commit is contained in:
parent
5d36d4c48e
commit
279ed25548
|
|
@ -1,14 +1,5 @@
|
||||||
import request from "@/http/request";
|
import request from "@/http/request";
|
||||||
|
// 上传物料基础信息
|
||||||
export const uploadExcelStock = (data) => {
|
|
||||||
return request({
|
|
||||||
url: '/excel/uploadStocks',
|
|
||||||
method: 'post',
|
|
||||||
data: data,
|
|
||||||
timeout: 600000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export const uploadExcelBaseGoods = (data) => {
|
export const uploadExcelBaseGoods = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/importBaseGoods',
|
url: '/excel/importBaseGoods',
|
||||||
|
|
@ -17,7 +8,7 @@ export const uploadExcelBaseGoods = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 上传看板
|
||||||
export const uploadExcelKanban = (data) => {
|
export const uploadExcelKanban = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/importKanban',
|
url: '/excel/importKanban',
|
||||||
|
|
@ -26,7 +17,7 @@ export const uploadExcelKanban = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 上传dbs
|
||||||
export const uploadExcelDbs = (data) => {
|
export const uploadExcelDbs = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/importDbs',
|
url: '/excel/importDbs',
|
||||||
|
|
@ -35,7 +26,7 @@ export const uploadExcelDbs = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 上传非服务件配料单
|
||||||
export const uploadExcelProduct = (data) => {
|
export const uploadExcelProduct = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/importProduct',
|
url: '/excel/importProduct',
|
||||||
|
|
@ -44,7 +35,7 @@ export const uploadExcelProduct = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 上传服务件配料单
|
||||||
export const uploadExcelSingleProduct = (data) => {
|
export const uploadExcelSingleProduct = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/importServiceProduct',
|
url: '/excel/importServiceProduct',
|
||||||
|
|
@ -53,7 +44,7 @@ export const uploadExcelSingleProduct = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 上传配对关系
|
||||||
export const uploadExcelProductExtend = (data) => {
|
export const uploadExcelProductExtend = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/importProductExtend',
|
url: '/excel/importProductExtend',
|
||||||
|
|
@ -62,7 +53,7 @@ export const uploadExcelProductExtend = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 导出dbs
|
||||||
export const exportDbsWithExcel = (data) => {
|
export const exportDbsWithExcel = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/exportDbsWithExcel',
|
url: '/excel/exportDbsWithExcel',
|
||||||
|
|
@ -72,7 +63,7 @@ export const exportDbsWithExcel = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 导出配料单
|
||||||
export const exportKittingBomWithExcel = (data) => {
|
export const exportKittingBomWithExcel = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/exportKittingBomWithExcel',
|
url: '/excel/exportKittingBomWithExcel',
|
||||||
|
|
@ -82,7 +73,7 @@ export const exportKittingBomWithExcel = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 导出配对关系
|
||||||
export const exportKittingBomRelationWithExcel = (data) => {
|
export const exportKittingBomRelationWithExcel = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/exportKittingBomRelationWithExcel',
|
url: '/excel/exportKittingBomRelationWithExcel',
|
||||||
|
|
@ -92,7 +83,7 @@ export const exportKittingBomRelationWithExcel = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 导出库存
|
||||||
export const exportStockExcel = (data) => {
|
export const exportStockExcel = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/exportStockExcel',
|
url: '/excel/exportStockExcel',
|
||||||
|
|
@ -102,7 +93,17 @@ export const exportStockExcel = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 导出库存更新记录
|
||||||
|
export const exportStockUpdateExcel = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/excel/exportStockUpdateExcel',
|
||||||
|
method: 'post',
|
||||||
|
responseType: 'blob',
|
||||||
|
data: data,
|
||||||
|
timeout: 600000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 导出工作详情
|
||||||
export const exportWorkSummaryExcel = (data) => {
|
export const exportWorkSummaryExcel = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/exportWorkSummaryExcel',
|
url: '/excel/exportWorkSummaryExcel',
|
||||||
|
|
@ -112,7 +113,7 @@ export const exportWorkSummaryExcel = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 导出看板需求
|
||||||
export const exportKanbanExcel = (data) => {
|
export const exportKanbanExcel = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/excel/exportKanbanExcel',
|
url: '/excel/exportKanbanExcel',
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import request from "@/http/request";
|
import request from "@/http/request";
|
||||||
|
|
||||||
const queryStocksByPage = (params) => {
|
export const queryStocksByPage = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/stock/queryStocksByPage',
|
url: '/stock/queryStocksByPage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
@ -8,42 +8,10 @@ const queryStocksByPage = (params) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const updateStockInfo = (params) => {
|
export const queryStockUpdateByPage = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/stock/updateStockInfo',
|
url: '/stock/queryStockUpdateByPage',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getStockNumByGoodsId = (params) => {
|
|
||||||
return request({
|
|
||||||
url: '/stock/getStockNumByGoodsId',
|
|
||||||
method: 'post',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const getStockUpdateRecord = (params) => {
|
|
||||||
return request({
|
|
||||||
url: '/stock/getStockUpdateRecord',
|
|
||||||
method: 'post',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleExceptionStock = (params) => {
|
|
||||||
return request({
|
|
||||||
url: '/stock/handleExceptionStock',
|
|
||||||
method: 'post',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
|
||||||
queryStocksByPage,
|
|
||||||
updateStockInfo,
|
|
||||||
getStockNumByGoodsId,
|
|
||||||
getStockUpdateRecord,
|
|
||||||
handleExceptionStock
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
import request from "@/http/request";
|
|
||||||
|
|
||||||
const getPickTasksByPage = (params) => {
|
|
||||||
return request({
|
|
||||||
url: '/taskMonitor/getPickTasksByPage',
|
|
||||||
method: 'post',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const updatePickTaskInfo = (params) => {
|
|
||||||
return request({
|
|
||||||
url: '/taskMonitor/updatePickTaskInfo',
|
|
||||||
method: 'post',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
|
||||||
getPickTasksByPage,
|
|
||||||
updatePickTaskInfo
|
|
||||||
}
|
|
||||||
1
dev_wms_client/src/api/taskOperation.js
Normal file
1
dev_wms_client/src/api/taskOperation.js
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
import request from "@/http/request";
|
||||||
10
dev_wms_client/src/api/taskQuery.js
Normal file
10
dev_wms_client/src/api/taskQuery.js
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import request from "@/http/request";
|
||||||
|
|
||||||
|
// 分页查询任务列表
|
||||||
|
export const queryTasksByPage = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/taskQuery/queryTasksByPage',
|
||||||
|
method: 'post',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -1,66 +1,89 @@
|
||||||
// AppTag组件
|
|
||||||
<template>
|
<template>
|
||||||
|
<el-scrollbar ref="scrollbar" :wrap-style="{ 'align-content': 'center' }" always>
|
||||||
<div class="app-tag">
|
<div class="app-tag">
|
||||||
<el-tag closable size="default" v-for="(tag, index) in tags" :key="tag.labelName" :disable-transitions="true"
|
<el-tag closable size="default" v-for="(tag, index) in tags" :key="tag.labelName"
|
||||||
:effect="$route.path === tag.path ? 'dark' : 'plain'" @close="handleClose(tag, index)"
|
:disable-transitions="true" :effect="$route.path === tag.path ? 'dark' : 'plain'"
|
||||||
@click="handleClick(tag)">
|
@close="handleClose(tag, index)" @click="handleClick(tag, index)">
|
||||||
{{ tag.labelName }}
|
<el-tooltip effect="light" :content="tag.labelName" placement="top">
|
||||||
|
{{ tag.labelName.length > 4 ? tag.labelName.substring(0, 4) + '..' : tag.labelName }}
|
||||||
|
</el-tooltip>
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
|
</el-scrollbar>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script setup>
|
||||||
import { mapState, mapMutations } from 'vuex';
|
import store from '@/store'
|
||||||
export default {
|
import { nextTick, ref, watch } from 'vue'
|
||||||
name: 'app-tag',
|
import { onMounted } from 'vue';
|
||||||
data() {
|
import { useRouter } from 'vue-router';
|
||||||
return {
|
const router = useRouter()
|
||||||
tags: []
|
let tags = ref([])
|
||||||
|
const scrollbar = ref()
|
||||||
|
// 生命周期
|
||||||
|
onMounted(() => {
|
||||||
|
tags.value = store.getters.getStateTagsList
|
||||||
|
nextTick(() => {
|
||||||
|
autoScroll(router.currentRoute.value.path)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 根据路由变化更新标签
|
||||||
|
watch(() => router.currentRoute.value.path, (newVal, oldVal) => {
|
||||||
|
if (newVal != oldVal) {
|
||||||
|
// 找到path对应的tag
|
||||||
|
autoScroll(router.currentRoute.value.path)
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
created() {
|
// 关闭标签
|
||||||
//stateTagsList是state.js中的存放tags数组的key,stateTagsList的值默认为空数组
|
const closeTag = (tag) => {
|
||||||
this.tags = this.stateTagsList;
|
store.commit('mutationCloseTag', tag)
|
||||||
},
|
}
|
||||||
|
// 处理关闭
|
||||||
computed: {
|
const handleClose = (tag, index) => {
|
||||||
...mapState(['stateTagsList'])
|
if (tags.value.length === 1) { // 如果只有一个标签则不能关闭
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
...mapMutations({
|
|
||||||
close: 'mutationCloseTag'
|
|
||||||
}),
|
|
||||||
handleClose(tag, index) {
|
|
||||||
if (this.tags.length === 1) { // 如果只有一个标签则不能关闭
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.close(tag) // 删除当前tag
|
closeTag(tag) // 删除当前tag
|
||||||
if (this.$router.path === tag.path) { // 如果关闭的标签不是当前路由的话,不做路由跳转
|
if (router.path === tag.path) { // 如果关闭的标签不是当前路由的话,不做路由跳转
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if (index === (this.tags.length - 1)) { // 关闭最后一个标签,则路由跳转至最后一个
|
if (index === (tags.value.length - 1)) { // 关闭最后一个标签,则路由跳转至最后一个
|
||||||
this.$router.push(this.tags[index].path)
|
router.push(this.tags[index].path)
|
||||||
} else { // 路由跳转至下一个标签页
|
} else { // 路由跳转至下一个标签页
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
this.$router.push(this.tags[0].path)
|
router.push(tags.value[0].path)
|
||||||
} else {
|
} else {
|
||||||
this.$router.push(this.tags[index - 1].path)
|
router.push(tags.value[index - 1].path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
// 点击tags具体标签
|
// 点击tags具体标签
|
||||||
handleClick(tag) {
|
const handleClick = (tag, index) => {
|
||||||
this.$router.push(tag.path)
|
router.push(tag.path)
|
||||||
}
|
autoScroll(router.currentRoute.value.path)
|
||||||
}
|
}
|
||||||
|
// 设置滚动
|
||||||
|
const autoScroll = (path) => {
|
||||||
|
// 找到path对应的tag
|
||||||
|
tags.value.forEach((item, index) => {
|
||||||
|
if (item.path === path) {
|
||||||
|
scrollbar.value.setScrollLeft(index * 80)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.app-tag {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
.app-tag .el-tag {
|
.app-tag .el-tag {
|
||||||
|
display: flex;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
min-width: 80px;
|
||||||
|
max-width: 80px;
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="menu-title">主菜单</div>
|
<div class="menu-title">主菜单</div>
|
||||||
<!-- 侧边栏菜单区域 -->
|
<!-- 侧边栏菜单区域 -->
|
||||||
<el-menu active-text-color="#409Eff" background-color="#fff" text-color="#000" :router="true" unique-opened>
|
<el-menu :default-active="route.path" active-text-color="#409Eff" background-color="#fff" text-color="#000" :router="true" unique-opened>
|
||||||
<!-- 一级菜单 -->
|
<!-- 一级菜单 -->
|
||||||
<el-sub-menu :index="item.id" v-for="item in menuList" :key="item.id">
|
<el-sub-menu :index="item.id" v-for="item in menuList" :key="item.id">
|
||||||
<!-- 一级菜单模板区域 -->
|
<!-- 一级菜单模板区域 -->
|
||||||
|
|
@ -24,31 +24,13 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
// import { mapState, mapMutations } from 'vuex';
|
import { useRoute } from 'vue-router'
|
||||||
</script>
|
import { ref } from 'vue'
|
||||||
|
const menuList = store.getters.getMenuList
|
||||||
<script>
|
const route = useRoute()
|
||||||
export default {
|
// 点击菜单
|
||||||
name: 'side-menu',
|
const clickMenu = (item) => {
|
||||||
data() {
|
store.commit('mutationSelectTags', item)
|
||||||
return {
|
|
||||||
menuList: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getMenuList()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getMenuList() {
|
|
||||||
// this.menuList = this.$store.state.menuList
|
|
||||||
this.menuList = store.getters.getMenuList
|
|
||||||
},
|
|
||||||
// 点击菜单
|
|
||||||
clickMenu(value) {
|
|
||||||
//通过vuex将数据存储在store中
|
|
||||||
store.commit('mutationSelectTags', value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// 库存状态
|
// 库存状态枚举
|
||||||
export const stockStatusOptions = [
|
export const stockStatusOptions = [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
|
|
@ -25,7 +25,7 @@ export const stockStatusOptions = [
|
||||||
label: '库存锁定'
|
label: '库存锁定'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// 物料状态
|
// 物料状态枚举
|
||||||
export const goodsStatusOptions = [
|
export const goodsStatusOptions = [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
|
|
@ -48,7 +48,7 @@ export const goodsStatusOptions = [
|
||||||
label: '长时间未使用'
|
label: '长时间未使用'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// 看板状态
|
// 看板状态枚举
|
||||||
export const kanbanStatusOptions = [
|
export const kanbanStatusOptions = [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
|
|
@ -59,7 +59,7 @@ export const kanbanStatusOptions = [
|
||||||
label: '满'
|
label: '满'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// dbs状态
|
// dbs状态枚举
|
||||||
export const dbsStatusOptions = [
|
export const dbsStatusOptions = [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
|
|
@ -74,7 +74,7 @@ export const dbsStatusOptions = [
|
||||||
label: '已完成'
|
label: '已完成'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// 配料单类型
|
// 配料单枚举
|
||||||
export const kittingBomTypeOptions = [
|
export const kittingBomTypeOptions = [
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
|
|
@ -85,7 +85,7 @@ export const kittingBomTypeOptions = [
|
||||||
label: '服务件'
|
label: '服务件'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// 工作总结类型
|
// 工作总结枚举
|
||||||
export const summaryTypeOptions = [
|
export const summaryTypeOptions = [
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
|
|
@ -96,7 +96,7 @@ export const summaryTypeOptions = [
|
||||||
label: '已关闭'
|
label: '已关闭'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// 工作状态类型
|
// 工作状态枚举
|
||||||
export const workStatusOptions = [
|
export const workStatusOptions = [
|
||||||
{
|
{
|
||||||
value: -1,
|
value: -1,
|
||||||
|
|
@ -115,7 +115,7 @@ export const workStatusOptions = [
|
||||||
label: '已完成'
|
label: '已完成'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// 缺料状态类型
|
// 缺料状态枚举
|
||||||
export const lackStatusOptions = [
|
export const lackStatusOptions = [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
|
|
@ -126,3 +126,88 @@ export const lackStatusOptions = [
|
||||||
label: '缺料'
|
label: '缺料'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
// 任务类型枚举
|
||||||
|
export const taskTypeOptions = [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '入库'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '出库'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: '盘点'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
// Wms任务状态枚举
|
||||||
|
export const wmsTaskStatusOptions = [
|
||||||
|
{
|
||||||
|
value: -1,
|
||||||
|
label: '暂存'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '初始化'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '已解析'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '已下发'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: '正在执行'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 4,
|
||||||
|
label: '执行完成'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 98,
|
||||||
|
label: '已取消'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 99,
|
||||||
|
label: '执行异常'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
// 拣选任务状态枚举
|
||||||
|
export const pickingTaskStatusOptions = [
|
||||||
|
{
|
||||||
|
value: -2,
|
||||||
|
label: '入库用'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: -1,
|
||||||
|
label: '暂存中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '待下发'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '已下发'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '执行中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: '已到达'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 4,
|
||||||
|
label: '已离开'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 5,
|
||||||
|
label: '已取消'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
@ -8,10 +8,10 @@
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="料号">
|
<el-form-item label="料号">
|
||||||
<el-input v-model="kanbanQuery.goodsId" placeholder="料号" />
|
<el-input v-model="kanbanQuery.goodsId" placeholder="料号" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="看板Id">
|
<el-form-item label="看板Id">
|
||||||
<el-input v-model="kanbanQuery.kanbanId" placeholder="看板Id" />
|
<el-input v-model="kanbanQuery.kanbanId" placeholder="看板Id" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="看板状态">
|
<el-form-item label="看板状态">
|
||||||
<el-select-v2 v-model="kanbanQuery.kanbanStatus" placeholder="看板状态"
|
<el-select-v2 v-model="kanbanQuery.kanbanStatus" placeholder="看板状态"
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="工单号">
|
<el-form-item label="工单号">
|
||||||
<el-input v-model="dbsQueryFormEntity.workOrder" clearable />
|
<el-input v-model="dbsQueryFormEntity.workOrder" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="零件号">
|
<el-form-item label="零件号">
|
||||||
<el-input v-model="dbsQueryFormEntity.productId" clearable />
|
<el-input v-model="dbsQueryFormEntity.productId" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<el-select-v2 v-model="dbsQueryFormEntity.dbsStatus" placeholder="工单状态"
|
<el-select-v2 v-model="dbsQueryFormEntity.dbsStatus" placeholder="工单状态"
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,6 @@ const confirmStart = () => {
|
||||||
ElMessage.success(response.message)
|
ElMessage.success(response.message)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
showBoxSummary()
|
showBoxSummary()
|
||||||
searchKittingGoods()
|
|
||||||
}, 2000)
|
}, 2000)
|
||||||
} else {
|
} else {
|
||||||
errorBox(response.message)
|
errorBox(response.message)
|
||||||
|
|
@ -433,6 +432,7 @@ const confirmStart = () => {
|
||||||
errorBox('请求错误。')
|
errorBox('请求错误。')
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
loading.close()
|
loading.close()
|
||||||
|
searchKittingGoods()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 显示料盒总览
|
// 显示料盒总览
|
||||||
|
|
|
||||||
|
|
@ -12,16 +12,16 @@
|
||||||
:options="kittingBomTypeOptions" @change="search()"></el-select-v2>
|
:options="kittingBomTypeOptions" @change="search()"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="机型">
|
<el-form-item label="机型">
|
||||||
<el-input v-model="kittingBomQueryFormEntity.model" clearable />
|
<el-input v-model="kittingBomQueryFormEntity.model" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="成品号">
|
<el-form-item label="成品号">
|
||||||
<el-input v-model="kittingBomQueryFormEntity.productId" clearable />
|
<el-input v-model="kittingBomQueryFormEntity.productId" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="原材料号">
|
<el-form-item label="原材料号">
|
||||||
<el-input v-model="kittingBomQueryFormEntity.goodsId" clearable />
|
<el-input v-model="kittingBomQueryFormEntity.goodsId" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="料盒号">
|
<el-form-item label="料盒号">
|
||||||
<el-input v-model="kittingBomQueryFormEntity.boxNo" clearable />
|
<el-input v-model="kittingBomQueryFormEntity.boxNo" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="align-content: center;">
|
<div style="align-content: center;">
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,13 @@
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="机型">
|
<el-form-item label="机型">
|
||||||
<el-input v-model="relationQueryFormEntity.model" clearable />
|
<el-input v-model="relationQueryFormEntity.model" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="总成号">
|
<el-form-item label="总成号">
|
||||||
<el-input v-model="relationQueryFormEntity.productId" clearable />
|
<el-input v-model="relationQueryFormEntity.productId" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单片号">
|
<el-form-item label="单片号">
|
||||||
<el-input v-model="relationQueryFormEntity.singleProductId" clearable />
|
<el-input v-model="relationQueryFormEntity.singleProductId" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="align-content: center;">
|
<div style="align-content: center;">
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskMonitor.js'
|
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskOperation.js'
|
||||||
import { errorBox } from '@/utils/myMessageBox.js'
|
import { errorBox } from '@/utils/myMessageBox.js'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="箱号">
|
<el-form-item label="箱号">
|
||||||
<el-input v-model="stockQuery.vehicleId" clearable />
|
<el-input v-model="stockQuery.vehicleId" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="料号">
|
<el-form-item label="料号">
|
||||||
<el-input v-model="stockQuery.goodsId" clearable />
|
<el-input v-model="stockQuery.goodsId" @keyup.enter="search()" clearable />
|
||||||
<!-- <el-autocomplete v-model="stockQuery.goodsId" :fetch-suggestions="filterGoodsId"
|
<!-- <el-autocomplete v-model="stockQuery.goodsId" :fetch-suggestions="filterGoodsId"
|
||||||
popper-class="my-autocomplete" placeholder="料号" @select="handleSelectGoodsId"
|
popper-class="my-autocomplete" placeholder="料号" @select="handleSelectGoodsId"
|
||||||
style="width: 196px;">
|
style="width: 196px;">
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
</el-autocomplete> -->
|
</el-autocomplete> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="库位">
|
<el-form-item label="库位">
|
||||||
<el-input v-model="stockQuery.locationId" clearable />
|
<el-input v-model="stockQuery.locationId" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="库存状态">
|
<el-form-item label="库存状态">
|
||||||
<el-select-v2 v-model="stockQuery.stockStatus" placeholder="库存状态"
|
<el-select-v2 v-model="stockQuery.stockStatus" placeholder="库存状态"
|
||||||
|
|
|
||||||
|
|
@ -7,25 +7,11 @@
|
||||||
label-width="158px" style="max-width: 100%" status-icon>
|
label-width="158px" style="max-width: 100%" status-icon>
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="数据类型">
|
<el-form-item label="料号">
|
||||||
<el-select-v2 v-model="searchQueryFormEntity.summaryType" placeholder="数据类型"
|
<el-input v-model="searchQueryFormEntity.goodsId" clearable />
|
||||||
:options="summaryTypeOptions" @change="search()"></el-select-v2>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工单号">
|
<el-form-item label="载具号">
|
||||||
<el-input v-model="searchQueryFormEntity.workOrder" clearable />
|
<el-input v-model="searchQueryFormEntity.vehicleId" clearable />
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="料盒号">
|
|
||||||
<el-input v-model="searchQueryFormEntity.boxNo" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="工作状态">
|
|
||||||
<el-select-v2 v-model="searchQueryFormEntity.workStatus" placeholder="工作状态"
|
|
||||||
:options="addAllOptionOfOptions(workStatusOptions)"
|
|
||||||
@change="search()"></el-select-v2>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="缺料状态">
|
|
||||||
<el-select-v2 v-model="searchQueryFormEntity.lackStatus" placeholder="缺料状态"
|
|
||||||
:options="addAllOptionOfOptions(lackStatusOptions)"
|
|
||||||
@change="search()"></el-select-v2>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="align-content: center;">
|
<div style="align-content: center;">
|
||||||
|
|
@ -48,53 +34,27 @@
|
||||||
@sort-change="handleSortChange">
|
@sort-change="handleSortChange">
|
||||||
<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.workIndex" v-model="workIndex"> </el-radio>
|
<el-radio :label="scope.row.updateId" v-model="updateId"> </el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="workIndex" label="数据编号" fixed="left" min-width="120px" sortable="custom"
|
<el-table-column prop="updateId" label="数据编号" fixed="left" min-width="120px" sortable="custom"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" sortable="custom"
|
<el-table-column prop="goodsId" label="料号" fixed="left" min-width="120px" sortable="custom"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="boxNo" label="料盒号" fixed="left" min-width="120px" sortable="custom"
|
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" sortable="custom"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="productId" label="成品号" min-width="120px" sortable="custom"
|
<el-table-column prop="firstInTime" label="初次入库时间" :formatter="timeFormat" min-width="120px"
|
||||||
show-overflow-tooltip />
|
|
||||||
<el-table-column prop="singleProductId" label="单片号" min-width="120px" sortable="custom"
|
|
||||||
show-overflow-tooltip />
|
|
||||||
<el-table-column prop="goodsId" label="料号" min-width="120px" sortable="custom"
|
|
||||||
show-overflow-tooltip />
|
|
||||||
<el-table-column prop="planStartDate" label="计划开工日期" min-width="120px" :formatter="dateFormat"
|
|
||||||
sortable="custom" show-overflow-tooltip />
|
sortable="custom" show-overflow-tooltip />
|
||||||
<el-table-column prop="needNum" label="需求数量" min-width="120px" sortable="custom"
|
<el-table-column prop="beforeNum" label="原数量" min-width="120px" sortable="custom"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="distributeNum" label="已分配数量" min-width="120px" sortable="custom"
|
<el-table-column prop="afterNum" label="新数量" min-width="120px" sortable="custom"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="finishNum" label="已完成数量" min-width="120px" sortable="custom"
|
<el-table-column prop="reason" label="原因" min-width="120px" sortable="custom"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="workStand" label="工作站台" min-width="120px" sortable="custom"
|
<el-table-column prop="updateTime" label="更新时间" :formatter="timeFormat" min-width="120px"
|
||||||
show-overflow-tooltip />
|
|
||||||
<el-table-column prop="workUser" label="操作用户" min-width="120px" sortable="custom"
|
|
||||||
show-overflow-tooltip />
|
|
||||||
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px"
|
|
||||||
sortable="custom" show-overflow-tooltip />
|
sortable="custom" show-overflow-tooltip />
|
||||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px"
|
<el-table-column prop="updateUser" label="更新用户" min-width="120px" sortable="custom"
|
||||||
sortable="custom" show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="isOut" label="库外料" :formatter="outGoodsFormat" min-width="120px"
|
|
||||||
sortable="custom" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="productType" label="成品类型" :formatter="productTypeFormat"
|
|
||||||
min-width="120px" sortable="custom" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="lackStatus" label="缺料状态" :formatter="lackStatusFormat" fixed="right"
|
|
||||||
min-width="120px" sortable="custom" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="workStatus" label="工作状态" :formatter="workStatusFormat" fixed="right"
|
|
||||||
min-width="120px" sortable="custom" show-overflow-tooltip />
|
|
||||||
<el-table-column fixed="right" label="操作" width="170px" v-if="searchQueryFormEntity.summaryType == 1">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<div style="display: inline-block; align-content: center;">
|
|
||||||
<el-button type="primary" @click="editCurrentRowFormEntity(scope.row)">编辑</el-button>
|
|
||||||
<el-button type="danger" @click="closeLackWork(scope.row)">关闭</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<br />
|
<br />
|
||||||
<el-pagination v-model:current-page="baseTableQuery.currentPage"
|
<el-pagination v-model:current-page="baseTableQuery.currentPage"
|
||||||
|
|
@ -103,91 +63,6 @@
|
||||||
@current-change="search" layout="total, sizes, prev, pager, next, jumper"
|
@current-change="search" layout="total, sizes, prev, pager, next, jumper"
|
||||||
:total="baseTableQuery.total" />
|
:total="baseTableQuery.total" />
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="rowEditFlag" title="工作信息" width="40%" draggable :show-close="false">
|
|
||||||
<el-form ref="rowEditFormRef" :model="rowFormEntity" :label-position="labelPosition"
|
|
||||||
label-width="100px" style="max-width: 100%" status-icon>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="工作编号">
|
|
||||||
<el-input v-model="rowFormEntity.workIndex" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工单号">
|
|
||||||
<el-input v-model="rowFormEntity.workOrder" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="总成号">
|
|
||||||
<el-input v-model="rowFormEntity.productId" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="成品号">
|
|
||||||
<el-input v-model="rowFormEntity.singleProductId" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="料盒号">
|
|
||||||
<el-input v-model="rowFormEntity.boxNo" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="料号">
|
|
||||||
<el-input v-model="rowFormEntity.goodsId" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="需求数量">
|
|
||||||
<el-input-number v-model.number="rowFormEntity.needNum" controls-position="right"
|
|
||||||
:min="0" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="已完成数量">
|
|
||||||
<el-input-number v-model.number="rowFormEntity.finishNum"
|
|
||||||
controls-position="right" :min="0" :max="rowFormEntity.needNum" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="已分配数量">
|
|
||||||
<el-input-number v-model.number="rowFormEntity.distributeNum"
|
|
||||||
controls-position="right" :min="0" :max="rowFormEntity.needNum" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="工作状态">
|
|
||||||
<el-select-v2 v-model="rowFormEntity.workStatus" placeholder="请选择工作状态"
|
|
||||||
:options="workStatusOptions"></el-select-v2>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="缺料状态">
|
|
||||||
<el-select-v2 v-model="rowFormEntity.lackStatus" placeholder="请选择缺料状态"
|
|
||||||
:options="lackStatusOptions"></el-select-v2>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<span class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="rowEditFlag = false">取消</el-button>
|
|
||||||
<el-button type="success" @click="submitUpdateRow(rowFormEntity)">
|
|
||||||
确定
|
|
||||||
</el-button>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
|
|
@ -196,16 +71,14 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
import { queryWorkSummaryByPage, updateKateWorks, closeCurrentWorks } from '@/api/kateWork.js'
|
import { queryStockUpdateByPage } from '@/api/stock.js'
|
||||||
import { dateFormatter, timeFormatter, yesOrNoFormatter } from '@/utils/formatter.js'
|
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||||
import { ref, reactive, onMounted, nextTick, onBeforeUnmount } from 'vue'
|
import { ref, reactive, onMounted, nextTick, onBeforeUnmount } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { genTableRequest } from '@/utils/generator.js'
|
import { genTableRequest } from '@/utils/generator.js'
|
||||||
import { labelPosition } from '@/constant/form.js'
|
import { labelPosition } from '@/constant/form.js'
|
||||||
import { summaryTypeOptions, workStatusOptions, lackStatusOptions } from '@/constant/options.js'
|
|
||||||
import { exportWorkSummaryExcel } from '@/api/excel.js'
|
|
||||||
import { addAllOptionOfOptions } from '@/utils/generator.js'
|
|
||||||
import { loading } from '@/utils/loading'
|
import { loading } from '@/utils/loading'
|
||||||
|
import { exportStockUpdateExcel } from '@/api/excel.js'
|
||||||
/**
|
/**
|
||||||
* 常量定义
|
* 常量定义
|
||||||
*/
|
*/
|
||||||
|
|
@ -221,22 +94,16 @@ let baseTableQuery = reactive({
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
sortBy: new Map([['productId', true]]),// 按照成品号顺序排序
|
sortBy: new Map([['updateTime', false]]),// 按照成品号顺序排序
|
||||||
standId: STAND_ID,
|
standId: STAND_ID,
|
||||||
userName: USER_NAME
|
userName: USER_NAME
|
||||||
})
|
})
|
||||||
let searchQueryFormEntity = reactive({
|
let searchQueryFormEntity = reactive({
|
||||||
summaryType: 1,
|
vehicleId: '',
|
||||||
workOrder: '',
|
goodsId: ''
|
||||||
boxNo: '',
|
|
||||||
lackStatus: -99,
|
|
||||||
workStatus: -99
|
|
||||||
})
|
})
|
||||||
let searchQueryFormRef = ref()
|
let searchQueryFormRef = ref()
|
||||||
let rowEditFlag = ref(false)
|
let updateId = ''
|
||||||
let workIndex = ''
|
|
||||||
let rowEditFormRef = ref()
|
|
||||||
let rowFormEntity = reactive({})
|
|
||||||
/**
|
/**
|
||||||
* 系统方法
|
* 系统方法
|
||||||
*/
|
*/
|
||||||
|
|
@ -262,12 +129,9 @@ const search = () => {
|
||||||
tableLoading.value = true
|
tableLoading.value = true
|
||||||
let request = genTableRequest(baseTableQuery)
|
let request = genTableRequest(baseTableQuery)
|
||||||
// 设定查询参数
|
// 设定查询参数
|
||||||
request.summaryType = searchQueryFormEntity.summaryType
|
request.goodsId = searchQueryFormEntity.goodsId.trim()
|
||||||
request.workOrder = searchQueryFormEntity.workOrder.trim()
|
request.vehicleId = searchQueryFormEntity.vehicleId.trim()
|
||||||
request.boxNo = searchQueryFormEntity.boxNo.trim()
|
queryStockUpdateByPage(request).then((res) => {
|
||||||
request.workStatus = searchQueryFormEntity.workStatus == -99 ? null : searchQueryFormEntity.workStatus
|
|
||||||
request.lackStatus = searchQueryFormEntity.lackStatus == -99 ? null : searchQueryFormEntity.lackStatus
|
|
||||||
queryWorkSummaryByPage(request).then((res) => {
|
|
||||||
const response = res.data
|
const response = res.data
|
||||||
if (response.code == 0) {
|
if (response.code == 0) {
|
||||||
const data = response.data
|
const data = response.data
|
||||||
|
|
@ -289,7 +153,8 @@ const search = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const clearQuery = () => {
|
const clearQuery = () => {
|
||||||
searchQueryFormEntity.workOrder = ''
|
searchQueryFormEntity.goodsId = ''
|
||||||
|
searchQueryFormEntity.vehicleId = ''
|
||||||
}
|
}
|
||||||
const handleSortChange = (data) => {
|
const handleSortChange = (data) => {
|
||||||
if (baseTableQuery.sortBy.has(data.prop)) {
|
if (baseTableQuery.sortBy.has(data.prop)) {
|
||||||
|
|
@ -299,67 +164,25 @@ const handleSortChange = (data) => {
|
||||||
search()
|
search()
|
||||||
}
|
}
|
||||||
const getCurrentRow = (row) => {
|
const getCurrentRow = (row) => {
|
||||||
workIndex = row.workIndex
|
updateId = row.updateId
|
||||||
}
|
|
||||||
const dateFormat = (row, column, cellValue, index) => {
|
|
||||||
return dateFormatter(cellValue)
|
|
||||||
}
|
}
|
||||||
const timeFormat = (row, column, cellValue, index) => {
|
const timeFormat = (row, column, cellValue, index) => {
|
||||||
return timeFormatter(cellValue)
|
return timeFormatter(cellValue)
|
||||||
}
|
}
|
||||||
const workStatusFormat = (row, column, cellValue, index) => {
|
|
||||||
switch (cellValue) {
|
|
||||||
case -1:
|
|
||||||
return '已暂停'
|
|
||||||
case 0:
|
|
||||||
return '未开始'
|
|
||||||
case 1:
|
|
||||||
return '已开始'
|
|
||||||
case 2:
|
|
||||||
return '已完成'
|
|
||||||
default:
|
|
||||||
return '异常'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const lackStatusFormat = (row, column, cellValue, index) => {
|
|
||||||
switch (cellValue) {
|
|
||||||
case 0:
|
|
||||||
return '不缺料'
|
|
||||||
case 1:
|
|
||||||
return '缺料'
|
|
||||||
default:
|
|
||||||
return '异常'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const productTypeFormat = (row, column, cellValue, index) => {
|
|
||||||
switch (cellValue) {
|
|
||||||
case 1:
|
|
||||||
return '非服务件'
|
|
||||||
case 2:
|
|
||||||
return '服务件'
|
|
||||||
default:
|
|
||||||
return '异常'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const outGoodsFormat = (row, column, cellValue, index) => {
|
|
||||||
return yesOrNoFormatter(cellValue)
|
|
||||||
}
|
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
const params = {
|
const params = {
|
||||||
summaryType: searchQueryFormEntity.summaryType,
|
goodsId: searchQueryFormEntity.goodsId.trim(),
|
||||||
workOrder: searchQueryFormEntity.workOrder,
|
vehicleId: searchQueryFormEntity.vehicleId.trim(),
|
||||||
workStatus: searchQueryFormEntity.workStatus == -99 ? null : searchQueryFormEntity.workStatus,
|
|
||||||
lackStatus: searchQueryFormEntity.lackStatus == -99 ? null : searchQueryFormEntity.lackStatus,
|
|
||||||
standId: STAND_ID,
|
standId: STAND_ID,
|
||||||
userName: USER_NAME
|
userName: USER_NAME
|
||||||
}
|
}
|
||||||
exportWorkSummaryExcel(params).then(res => {
|
exportStockUpdateExcel(params).then(res => {
|
||||||
const link = document.createElement('a');//创建a标签
|
const link = document.createElement('a');//创建a标签
|
||||||
try {
|
try {
|
||||||
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //如果后台返回的不是blob对象类型,先定义成blob对象格式,该type导出为xls格式,
|
||||||
let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
||||||
// let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名,如果后端有给返回文件名的话
|
// let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名,如果后端有给返回文件名的话
|
||||||
let _fileName = '工作详情' + dateFormatter(new Date) + '.xlsx'
|
let _fileName = '库存更新记录' + dateFormatter(new Date) + '.xlsx'
|
||||||
link.style.display = 'none'//隐藏
|
link.style.display = 'none'//隐藏
|
||||||
|
|
||||||
// 兼容不同浏览器的URL对象
|
// 兼容不同浏览器的URL对象
|
||||||
|
|
|
||||||
|
|
@ -1,379 +1,465 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="margin-bottom: 10px">
|
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
|
<el-container class="content">
|
||||||
|
<div class="work-area">
|
||||||
|
<fieldset class="search-area">
|
||||||
|
<el-form ref="searchQueryFormRef" :model="searchQueryFormEntity" :label-position="labelPosition"
|
||||||
|
label-width="158px" style="max-width: 100%" status-icon>
|
||||||
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="goodsIdQuery" style="width: 196px; margin-right: 10px;" placeholder="料号" />
|
<el-form-item label="任务类型">
|
||||||
<el-input v-model="vehicleIdQuery" style="width: 196px; margin-right: 10px;" placeholder="箱号" />
|
<el-select-v2 v-model="searchQueryFormEntity.taskType" placeholder="任务类型"
|
||||||
<el-select-v2 v-model="taskTypeQuery" style="width: 196px; margin-right: 10px;" placeholder="请选择任务类型"
|
:options="addAllOptionOfOptions(taskTypeOptions)"
|
||||||
:options="taskTypeOptions" @change="search()"></el-select-v2>
|
@change="search()"></el-select-v2>
|
||||||
<el-select-v2 v-model="taskStatusQuery" style="width: 196px; margin-right: 10px;" placeholder="请选择任务状态"
|
</el-form-item>
|
||||||
:options="taskStatusOptions" @change="search()"></el-select-v2>
|
<el-form-item label="任务状态">
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-select-v2 v-model="searchQueryFormEntity.taskStatus" placeholder="任务状态"
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
:options="addAllOptionOfOptions(wmsTaskStatusOptions)"
|
||||||
|
@change="search()"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="箱号">
|
||||||
|
<el-input v-model="searchQueryFormEntity.vehicleId" @keyup.enter="search()" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="料号">
|
||||||
|
<el-input v-model="searchQueryFormEntity.goodsId" @keyup.enter="search()" clearable />
|
||||||
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
<br />
|
<div style="align-content: center;">
|
||||||
<el-table :data="tasks" stripe border v-loading="loading" style="width: 100%" max-height="684px"
|
<el-row>
|
||||||
class="table-class" :header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }"
|
<el-button type="primary" class="btn-search" @click="search()">查询</el-button>
|
||||||
@row-click="getCurrentRow">
|
<el-button type="warning" class="btn-search" @click="clearQuery()">清除输入</el-button>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</fieldset>
|
||||||
|
<div class="table-area">
|
||||||
|
<el-table :data="tableData" stripe border v-loading="tableLoading" class="table-class"
|
||||||
|
:max-height="maxHeight" highlight-current-row @row-click="getCurrentRow"
|
||||||
|
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }"
|
||||||
|
@sort-change="handleSortChange">
|
||||||
<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.taskId" v-model="taskId"> </el-radio>
|
<el-radio :label="scope.row.taskId" v-model="taskId"> </el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="taskId" label="任务号" fixed="left" show-overflow-tooltip min-width="120px" />
|
<el-table-column prop="taskId" label="任务号" fixed="left" min-width="120px" sortable="custom"
|
||||||
<el-table-column prop="taskType" label="任务类型" fixed="left" :formatter="taskTypeFormat" min-width="120px" />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="vehicleId" label="箱号" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="taskType" label="任务类型" fixed="left" :formatter="taskTypeFormat" min-width="120px" sortable="custom"
|
||||||
<el-table-column prop="goodsRelated.goodsId" label="料号" min-width="120px" show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="goodsRelated.goodsName" label="料名" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="taskStatus" label="任务状态" :formatter="taskStatusFormat" fixed="right" min-width="120px" sortable="custom"
|
||||||
<el-table-column prop="taskGroup" label="任务组" min-width="120px" show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="origin" label="起点" min-width="120px" />
|
<el-table-column prop="taskPriority" label="优先级" min-width="120px" sortable="custom"
|
||||||
<el-table-column prop="destination" label="终点" min-width="120px" />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="goodsRelated.opNum" label="操作数量" min-width="120px" />
|
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" sortable="custom"
|
||||||
<el-table-column prop="goodsRelated.originNum" label="库存数量" min-width="120px" />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="taskPriority" label="任务优先级" min-width="120px" />
|
<el-table-column prop="goodsId" label="料号" min-width="120px" sortable="custom"
|
||||||
<el-table-column prop="preTask" label="前置任务" min-width="120px" show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="goodsDesc" label="物料描述"
|
||||||
<el-table-column prop="createTime" label="运行时长" :formatter="dueFormat" min-width="120px" show-overflow-tooltip />
|
min-width="120px" sortable="custom" show-overflow-tooltip />
|
||||||
<el-table-column prop="userName" label="操作人员姓名" min-width="120px" />
|
<el-table-column prop="opNum" label="操作数量" min-width="120px" sortable="custom"
|
||||||
<el-table-column prop="taskStatus" label="任务状态" fixed="right" :formatter="taskStatusFormat"
|
show-overflow-tooltip />
|
||||||
min-width="120px" />
|
<el-table-column prop="stockNum" label="库存数量" min-width="120px"
|
||||||
<el-table-column fixed="right" label="操作" width="120px">
|
sortable="custom" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="origin" label="起点" min-width="120px" sortable="custom"
|
||||||
|
show-overflow-tooltip />
|
||||||
|
<el-table-column prop="destination" label="终点" min-width="120px"
|
||||||
|
sortable="custom" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="wcsTaskId" label="wcs任务号" min-width="120px" sortable="custom"
|
||||||
|
show-overflow-tooltip />
|
||||||
|
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" sortable="custom"
|
||||||
|
show-overflow-tooltip />
|
||||||
|
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px" sortable="custom"
|
||||||
|
show-overflow-tooltip />
|
||||||
|
<el-table-column prop="opUser" label="操作用户" min-width="120px"
|
||||||
|
sortable="custom" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="remark" label="备注" min-width="120px"
|
||||||
|
sortable="custom" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="callStand" label="呼叫站台" min-width="120px"
|
||||||
|
sortable="custom" show-overflow-tooltip />
|
||||||
|
<el-table-column fixed="right" label="操作" width="170px"
|
||||||
|
v-if="searchQueryFormEntity.summaryType == 1">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button plain type="primary" @click="editCurrentRowTask(scope.row)">编辑</el-button>
|
<div style="display: inline-block; align-content: center;">
|
||||||
|
<el-button type="primary"
|
||||||
|
@click="editCurrentRowFormEntity(scope.row)">编辑</el-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<br />
|
<br />
|
||||||
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
<el-pagination v-model:current-page="baseTableQuery.currentPage"
|
||||||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
v-model:page-size="baseTableQuery.pageSize" :page-sizes="[10, 25, 50]" :small="false"
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
:disabled="false" :background="false" :default-page-size="10" @size-change="search"
|
||||||
@current-change="search" />
|
@current-change="search" layout="total, sizes, prev, pager, next, jumper"
|
||||||
<el-dialog v-model="dialogVisible" title="任务信息" width="40%" draggable :show-close="false">
|
:total="baseTableQuery.total" />
|
||||||
<el-form ref="taskFormRef" :model="taskFormEntity" :label-position="labelPosition" label-width="100px"
|
</div>
|
||||||
style="max-width: 100%" :rules="rules" status-icon>
|
<el-dialog v-model="rowEditFlag" title="工作信息" width="40%" draggable :show-close="false">
|
||||||
|
<el-form ref="rowEditFormRef" :model="rowFormEntity" :label-position="labelPosition"
|
||||||
|
label-width="100px" style="max-width: 100%" 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="任务号" prop="taskId">
|
<el-form-item label="工作编号">
|
||||||
<el-input v-model="taskFormEntity.taskId" disabled />
|
<el-input v-model="rowFormEntity.workIndex" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="任务优先级" prop="taskPriority">
|
<el-form-item label="工单号">
|
||||||
<el-input-number v-model.number="taskFormEntity.taskPriority" controls-position="right"
|
<el-input v-model="rowFormEntity.workOrder" disabled />
|
||||||
:min="1" :max="9" disabled />
|
|
||||||
</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="vehicleId">
|
<el-form-item label="总成号">
|
||||||
<el-input v-model="taskFormEntity.vehicleId" disabled />
|
<el-input v-model="rowFormEntity.productId" disabled />
|
||||||
</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="成品号">
|
||||||
<el-input v-model="taskFormEntity.goodsId" disabled />
|
<el-input v-model="rowFormEntity.singleProductId" disabled />
|
||||||
</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="origin">
|
<el-form-item label="料盒号">
|
||||||
<el-input v-model="taskFormEntity.origin" disabled />
|
<el-input v-model="rowFormEntity.boxNo" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="12" v-if="taskFormEntity.taskType == 1">
|
|
||||||
<el-form-item label="终点" prop="destination">
|
|
||||||
<el-select-v2 v-model="taskFormEntity.destination"
|
|
||||||
:options="availableLocationOptions"></el-select-v2>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12" v-if="taskFormEntity.taskType == 2">
|
|
||||||
<el-form-item label="终点" prop="destination">
|
|
||||||
<el-input v-model="taskFormEntity.destination" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="终点" prop="destination">
|
<el-form-item label="料号">
|
||||||
<el-input v-model="taskFormEntity.destination" disabled />
|
<el-input v-model="rowFormEntity.goodsId" disabled />
|
||||||
</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="taskType">
|
<el-form-item label="需求数量">
|
||||||
<el-select-v2 v-model="taskFormEntity.taskType" placeholder="请选择任务类型" disabled
|
<el-input-number v-model.number="rowFormEntity.needNum" controls-position="right"
|
||||||
:options="taskTypeOptions"></el-select-v2>
|
:min="0" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="任务状态" prop="taskStatus">
|
<el-form-item label="已完成数量">
|
||||||
<el-select-v2 v-model="taskFormEntity.taskStatus" placeholder="请选择任务状态"
|
<el-input-number v-model.number="rowFormEntity.finishNum" controls-position="right"
|
||||||
:options="taskStatusOptions"></el-select-v2>
|
:min="0" :max="rowFormEntity.needNum" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="已分配数量">
|
||||||
|
<el-input-number v-model.number="rowFormEntity.distributeNum"
|
||||||
|
controls-position="right" :min="0" :max="rowFormEntity.needNum" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="工作状态">
|
||||||
|
<el-select-v2 v-model="rowFormEntity.workStatus" placeholder="请选择工作状态"
|
||||||
|
:options="workStatusOptions"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="缺料状态">
|
||||||
|
<el-select-v2 v-model="rowFormEntity.lackStatus" placeholder="请选择缺料状态"
|
||||||
|
:options="lackStatusOptions"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button type="primary" @click="rowEditFlag = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submitTaskInfo(taskFormEntity)">
|
<el-button type="success" @click="submitUpdateRow(rowFormEntity)">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-config-provider>
|
|
||||||
</div>
|
</div>
|
||||||
|
</el-container>
|
||||||
|
</el-config-provider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getTasksByPage, updateTaskInfo } from '@/api/task.js'
|
|
||||||
import { dateFormatter, taskStatusFormatter, timeFormatter, dueFormatter } from '@/utils/formatter.js'
|
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
||||||
import { errorBox } from '@/utils/myMessageBox.js'
|
|
||||||
import { ElMessage } from 'element-plus'
|
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { ref, reactive } from 'vue'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
</script>
|
import { queryTasksByPage } from '@/api/taskQuery.js'
|
||||||
<script>
|
import { timeFormatter, wmsTaskTypeFormatter, wmsTaskStatusFormatter } from '@/utils/formatter.js'
|
||||||
export default {
|
import { ref, reactive, onMounted, nextTick, onBeforeUnmount } from 'vue'
|
||||||
name: 'taskMonitor',
|
import { ElMessage } from 'element-plus'
|
||||||
data() {
|
import { genTableRequest } from '@/utils/generator.js'
|
||||||
return {
|
import { labelPosition } from '@/constant/form.js'
|
||||||
tasks: [],
|
import { taskTypeOptions, wmsTaskStatusOptions } from '@/constant/options.js'
|
||||||
|
import { addAllOptionOfOptions } from '@/utils/generator.js'
|
||||||
|
import { loading } from '@/utils/loading'
|
||||||
|
/**
|
||||||
|
* 常量定义
|
||||||
|
*/
|
||||||
|
const STAND_ID = store.getters.getStandId
|
||||||
|
const USER_NAME = store.getters.getUserName
|
||||||
|
/**
|
||||||
|
* 变量定义
|
||||||
|
*/
|
||||||
|
let maxHeight = ref(window.innerHeight * 0.55)
|
||||||
|
let tableLoading = ref(false)
|
||||||
|
let tableData = ref([])
|
||||||
|
let baseTableQuery = reactive({
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
goodsIdQuery: '',
|
sortBy: new Map([['createTime', true]]),// 按照成品号顺序排序
|
||||||
vehicleIdQuery: '',
|
standId: STAND_ID,
|
||||||
taskTypeQuery: -99,
|
userName: USER_NAME
|
||||||
taskStatusQuery: -99,
|
})
|
||||||
loading: true,
|
let searchQueryFormEntity = reactive({
|
||||||
dialogVisible: false,
|
vehicleId: '',
|
||||||
taskFormEntity: reactive({}),
|
goodsId: '',
|
||||||
labelPosition: 'top',
|
taskType: -99,
|
||||||
taskFormRef: ref(),
|
taskStatus: -99
|
||||||
rules: reactive({}),
|
})
|
||||||
taskId: '',
|
let searchQueryFormRef = ref()
|
||||||
taskTypeOptions: [
|
let rowEditFlag = ref(false)
|
||||||
{
|
let taskId = ''
|
||||||
value: -99,
|
let rowEditFormRef = ref()
|
||||||
label: '所有类型'
|
let rowFormEntity = reactive({})
|
||||||
},
|
/**
|
||||||
{
|
* 系统方法
|
||||||
value: 1,
|
*/
|
||||||
label: '入库'
|
onMounted(() => {
|
||||||
},
|
nextTick(() => {
|
||||||
{
|
window.addEventListener('resize', resizeHeight)
|
||||||
value: 2,
|
search()
|
||||||
label: '出库'
|
})
|
||||||
},
|
})
|
||||||
{
|
onBeforeUnmount(() => {
|
||||||
value: 3,
|
nextTick(() => {
|
||||||
label: '盘点'
|
window.removeEventListener('resize', resizeHeight)
|
||||||
},
|
})
|
||||||
{
|
})
|
||||||
value: 9,
|
const resizeHeight = () => {
|
||||||
label: '移库'
|
maxHeight.value = window.innerHeight * 0.55
|
||||||
},
|
}
|
||||||
],
|
/**
|
||||||
taskStatusOptions: [
|
* 自定义方法
|
||||||
{
|
*/
|
||||||
value: -99,
|
// 查询
|
||||||
label: '所有状态'
|
const search = () => {
|
||||||
},
|
tableLoading.value = true
|
||||||
{
|
let request = genTableRequest(baseTableQuery)
|
||||||
value: -2,
|
// 设定查询参数
|
||||||
label: '重复入库'
|
request.vehicleId = searchQueryFormEntity.vehicleId.trim()
|
||||||
},
|
request.goodsId = searchQueryFormEntity.goodsId.trim()
|
||||||
{
|
request.taskType = searchQueryFormEntity.taskType == -99 ? null : searchQueryFormEntity.taskType
|
||||||
value: -1,
|
request.taskStatus = searchQueryFormEntity.taskStatus == -99 ? null : searchQueryFormEntity.taskStatus
|
||||||
label: '暂存'
|
queryTasksByPage(request).then((res) => {
|
||||||
},
|
const response = res.data
|
||||||
{
|
if (response.code == 0) {
|
||||||
value: 0,
|
const data = response.data
|
||||||
label: '新建待下发'
|
if (data != null) {
|
||||||
},
|
tableData.value = data.lists
|
||||||
{
|
baseTableQuery.total = data.total
|
||||||
value: 1,
|
} else {
|
||||||
label: '已下发'
|
tableData.value = []
|
||||||
},
|
baseTableQuery.total = 0
|
||||||
{
|
|
||||||
value: 2,
|
|
||||||
label: '开始执行'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 8,
|
|
||||||
label: '拣选中'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 9,
|
|
||||||
label: '盘点中'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 100,
|
|
||||||
label: '任务完成'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 998,
|
|
||||||
label: '任务取消'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 999,
|
|
||||||
label: '任务异常'
|
|
||||||
}
|
}
|
||||||
],
|
} else {
|
||||||
availableLocationOptions: []
|
ElMessage.error(response.message)
|
||||||
}
|
}
|
||||||
},
|
}).catch(err => {
|
||||||
mounted() {
|
console.log(err)
|
||||||
this.search()
|
ElMessage.error('查询数据异常。')
|
||||||
},
|
}).finally(() => {
|
||||||
methods: {
|
tableLoading.value = false
|
||||||
dateFormat: (row, column, cellValue, index) => {
|
})
|
||||||
return dateFormatter(cellValue)
|
}
|
||||||
},
|
const clearQuery = () => {
|
||||||
timeFormat: (row, column, cellValue, index) => {
|
searchQueryFormEntity.workOrder = ''
|
||||||
|
}
|
||||||
|
const handleSortChange = (data) => {
|
||||||
|
if (baseTableQuery.sortBy.has(data.prop)) {
|
||||||
|
baseTableQuery.sortBy.delete(data.prop)
|
||||||
|
}
|
||||||
|
baseTableQuery.sortBy.set(data.prop, data.order == 'ascending')
|
||||||
|
search()
|
||||||
|
}
|
||||||
|
const getCurrentRow = (row) => {
|
||||||
|
taskId = row.taskId
|
||||||
|
}
|
||||||
|
const timeFormat = (row, column, cellValue, index) => {
|
||||||
return timeFormatter(cellValue)
|
return timeFormatter(cellValue)
|
||||||
},
|
}
|
||||||
taskStatusFormat: (row, column, cellValue, index) => {
|
const taskTypeFormat = (row, column, cellValue, index) => {
|
||||||
return taskStatusFormatter(cellValue)
|
return wmsTaskTypeFormatter(cellValue)
|
||||||
},
|
}
|
||||||
taskTypeFormat: (row, column, cellValue, index) => {
|
const taskStatusFormat = (row, column, cellValue, index) => {
|
||||||
switch (cellValue) {
|
return wmsTaskStatusFormatter(cellValue)
|
||||||
case 1: return '入库'
|
}
|
||||||
case 2: return '出库'
|
// 编辑弹框
|
||||||
case 3: return '盘点'
|
const editCurrentRowFormEntity = (row) => {
|
||||||
case 9: return '移库'
|
// 设置form值
|
||||||
default: return '未知'
|
rowFormEntity.workIndex = row.workIndex
|
||||||
}
|
rowFormEntity.workOrder = row.workOrder
|
||||||
},
|
rowFormEntity.productId = row.productId
|
||||||
dueFormat: (row, column, cellValue, index) => {
|
rowFormEntity.singleProductId = row.singleProductId
|
||||||
return dueFormatter(cellValue)
|
rowFormEntity.boxNo = row.boxNo
|
||||||
},
|
rowFormEntity.goodsId = row.goodsId
|
||||||
search() {
|
rowFormEntity.needNum = row.needNum
|
||||||
this.loading = true
|
rowFormEntity.distributeNum = row.distributeNum
|
||||||
const tableRequest = {
|
rowFormEntity.finishNum = row.finishNum
|
||||||
pageNo: this.currentPage,
|
rowFormEntity.workStatus = row.workStatus
|
||||||
pageSize: this.pageSize,
|
rowFormEntity.lackStatus = row.lackStatus
|
||||||
taskType: this.taskTypeQuery == -99 ? null : this.taskTypeQuery,
|
// 弹出框
|
||||||
taskStatus: this.taskStatusQuery == -99 ? null : this.taskStatusQuery,
|
rowEditFlag.value = true
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
}
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
// 关闭当前缺料工作
|
||||||
userName: store.getters.getUserName
|
const closeLackWork = (row) => {
|
||||||
}
|
|
||||||
getTasksByPage(tableRequest).then(res => {
|
|
||||||
const tableResponse = res.data
|
|
||||||
if (tableResponse.code == 0) {
|
|
||||||
this.tasks = tableResponse.returnData.lists
|
|
||||||
this.total = tableResponse.returnData.total
|
|
||||||
console.log(this.tasks)
|
|
||||||
} else {
|
|
||||||
errorBox(tableResponse.message)
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
errorBox('查询任务错误')
|
|
||||||
})
|
|
||||||
this.loading = false
|
|
||||||
},
|
|
||||||
reset() {
|
|
||||||
this.goodsIdQuery = ''
|
|
||||||
this.vehicleIdQuery = ''
|
|
||||||
},
|
|
||||||
editCurrentRowTask(row) {
|
|
||||||
console.log(row)
|
|
||||||
// if (row.taskType == 1) {
|
|
||||||
// this.availableLocationOptions = []
|
|
||||||
// var currentOption = {
|
|
||||||
// value: row.destination,
|
|
||||||
// label: locationFormatter(row.destination)
|
|
||||||
// }
|
|
||||||
// this.availableLocationOptions.push(currentOption)
|
|
||||||
// // 生成可用库位列表
|
|
||||||
// const requestParam = {
|
|
||||||
// areaId: 1
|
|
||||||
// }
|
|
||||||
// getAvailableLocations(requestParam).then(res => {
|
|
||||||
// if (res.data.code == 0) {
|
|
||||||
// for (const location of res.data.returnData) {
|
|
||||||
// var newOption = {}
|
|
||||||
// newOption.value = location.locationId
|
|
||||||
// newOption.label = locationFormatter(location.locationId)
|
|
||||||
// this.availableLocationOptions.push(newOption)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }).catch(err => {
|
|
||||||
// errorBox('查找可用库位失败:' + err)
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
this.taskFormEntity = {
|
|
||||||
taskId: row.taskId,
|
|
||||||
taskPriority: row.taskPriority,
|
|
||||||
vehicleId: row.vehicleId,
|
|
||||||
goodsId: row.goodsRelated == null ? '' : row.goodsRelated.goodsId,
|
|
||||||
origin: row.origin,
|
|
||||||
destination: row.destination,
|
|
||||||
taskType: row.taskType,
|
|
||||||
taskStatus: row.taskStatus,
|
|
||||||
}
|
|
||||||
this.dialogVisible = true
|
|
||||||
},
|
|
||||||
submitTaskInfo() {
|
|
||||||
if (this.taskFormEntity.taskStatus == null || this.taskFormEntity.taskStatus == undefined) {
|
|
||||||
errorBox('请选择任务状态')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const request = {
|
const request = {
|
||||||
taskId: this.taskFormEntity.taskId,
|
workIndex: row.workIndex,
|
||||||
taskStatus: this.taskFormEntity.taskStatus,
|
standId: STAND_ID,
|
||||||
userName: store.getters.getUserName
|
userName: USER_NAME
|
||||||
}
|
}
|
||||||
updateTaskInfo(request).then(res => {
|
loading.open('关闭中...')
|
||||||
if (res.data.code == 0) {
|
closeCurrentWorks(request).then(res => {
|
||||||
this.dialogVisible = false
|
const response = res.data
|
||||||
ElMessage.success('修改任务成功')
|
if (response.code == 0) {
|
||||||
this.search()
|
ElMessage.success(response.message)
|
||||||
|
search()
|
||||||
} else {
|
} else {
|
||||||
errorBox(res.data.message)
|
ElMessage.error(response.message)
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
errorBox('修改任务失败')
|
ElMessage.error('请求异常。')
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
getCurrentRow(row) {
|
// 更新当前行数据
|
||||||
this.taskId = row.taskId
|
const submitUpdateRow = (rowFormEntity) => {
|
||||||
|
const request = {
|
||||||
|
workIndex: rowFormEntity.workIndex,
|
||||||
|
distributeNum: rowFormEntity.distributeNum,
|
||||||
|
finishNum: rowFormEntity.finishNum,
|
||||||
|
workStatus: rowFormEntity.workStatus,
|
||||||
|
lackStatus: rowFormEntity.lackStatus,
|
||||||
|
standId: STAND_ID,
|
||||||
|
userName: USER_NAME
|
||||||
}
|
}
|
||||||
},
|
loading.open('更新中...')
|
||||||
|
updateKateWorks(request).then(res => {
|
||||||
|
if (res.data.code == 0) {
|
||||||
|
ElMessage.success('更新数据成功。')
|
||||||
|
rowEditFlag.value = false
|
||||||
|
search()
|
||||||
|
} else {
|
||||||
|
ElMessage.error('更新数据失败。')
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
ElMessage.error('更新数据异常。')
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.work-area {
|
||||||
|
width: 100%;
|
||||||
|
/* padding: 5px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-area {
|
||||||
|
margin: auto;
|
||||||
|
min-height: fit-content;
|
||||||
|
max-height: 40%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
min-width: inherit;
|
||||||
|
border: solid 1px;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0px 15px 10px -15px #000;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-area {
|
||||||
|
margin: auto;
|
||||||
|
min-height: fit-content;
|
||||||
|
max-height: 60%;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
min-width: inherit;
|
||||||
|
border: solid 1px;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0px 15px 10px -15px #000;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
margin: 5px 5px 5px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item .el-input {
|
||||||
|
width: 196px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item .el-input-number {
|
||||||
|
width: 196px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item .el-select-v2 {
|
||||||
|
width: 196px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-class {
|
||||||
|
margin: 5px 5px 5px 5px;
|
||||||
|
width: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
.el-pagination {
|
.el-pagination {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-button {
|
.my-autocomplete li {
|
||||||
width: 72px;
|
width: 196px;
|
||||||
margin-left: 0px;
|
line-height: normal;
|
||||||
margin-right: 5px;
|
padding: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-class {
|
.my-autocomplete li .name {
|
||||||
width: 100%;
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-form-item .el-select-v2 {
|
.my-autocomplete li .addr {
|
||||||
width: 100% !important;
|
font-size: 12px;
|
||||||
|
color: #b4b4b4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-form-item .el-input-number {
|
.my-autocomplete li .highlighted .addr {
|
||||||
width: 100% !important;
|
color: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-row .el-form-item .el-button {
|
.my-autocomplete li .goods_id {
|
||||||
margin: auto;
|
color: brown;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-autocomplete li .goods_name {
|
||||||
|
color: cornflowerblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-search {
|
||||||
|
height: 30px;
|
||||||
|
width: 80px;
|
||||||
|
margin: auto 5px 5px auto;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,461 +0,0 @@
|
||||||
<template>
|
|
||||||
<div style="margin-bottom: 10px; height: 100%; padding-left: 1%; padding-right: 1%;">
|
|
||||||
<el-config-provider :locale="zhCn">
|
|
||||||
<div style="display: flex;justify-content: space-between;">
|
|
||||||
<el-row>
|
|
||||||
<el-input v-model="workOrderQuery" style="width: 158px; margin-right: 10px;" placeholder="工单号"
|
|
||||||
:suffix-icon="Search" />
|
|
||||||
<el-input v-model="workCenterQuery" style="width: 158px; margin-right: 10px;" placeholder="工位/小盒子"
|
|
||||||
:suffix-icon="Search" />
|
|
||||||
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号"
|
|
||||||
:suffix-icon="Search" />
|
|
||||||
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
|
|
||||||
:suffix-icon="Search" />
|
|
||||||
<el-select-v2 v-model="lightStatusQuery" style="width: 158px; margin-right: 10px;"
|
|
||||||
placeholder="请选择灯光状态" :options="lightStatusOptions" @change="search()"></el-select-v2>
|
|
||||||
<el-select-v2 v-model="workStatusQuery" style="width: 158px; margin-right: 10px;"
|
|
||||||
placeholder="请选择工作状态" :options="workStatusOptions" @change="search()"></el-select-v2>
|
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-button style="background-color: #00CED1; color: #000;"
|
|
||||||
@click="openUploadDialog()">导入</el-button>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<el-table :data="workFlowList" 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.workFlowId" v-model="workFlowId"> </el-radio>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="workFlowId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="orderId" label="订单号" min-width="120px" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="workStation" label="站台号" min-width="120px" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="workOrder" label="工单号" min-width="120px" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="workCenter" label="工位/小盒子" show-overflow-tooltip min-width="120px" />
|
|
||||||
<el-table-column prop="goodsId" label="料号" min-width="120px" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="needNum" label="需求数量" min-width="120px" />
|
|
||||||
<el-table-column prop="pickedNum" label="已拣数量" min-width="120px" />
|
|
||||||
<el-table-column prop="lightStatus" label="亮灯状态" :formatter="lightStatusFormat" min-width="120px" />
|
|
||||||
<el-table-column prop="workStatus" label="工作状态" :formatter="workStatusFormat" min-width="120px" />
|
|
||||||
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px"
|
|
||||||
show-overflow-tooltip />
|
|
||||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px"
|
|
||||||
show-overflow-tooltip />
|
|
||||||
<el-table-column prop="opUser" 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>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<br />
|
|
||||||
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
|
||||||
: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">
|
|
||||||
<div
|
|
||||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
|
||||||
<el-form ref="workFlowFormRef" :model="workFlowFormEntity" :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="workFlowId">
|
|
||||||
<el-input v-model="workFlowFormEntity.workFlowId" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="订单id" prop="orderId">
|
|
||||||
<el-input v-model="workFlowFormEntity.orderId" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="站台号" prop="workStation">
|
|
||||||
<el-input v-model="workFlowFormEntity.workStation" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工单" prop="workOrder">
|
|
||||||
<el-input v-model="workFlowFormEntity.workOrder" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="工位/小盒子" prop="workCenter">
|
|
||||||
<el-input v-model="workFlowFormEntity.workCenter" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="料号" prop="goodsId">
|
|
||||||
<el-input v-model="workFlowFormEntity.goodsId" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="需求数量" prop="needNum">
|
|
||||||
<el-input-number v-model.number="workFlowFormEntity.needNum"
|
|
||||||
controls-position="right" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="已拣数量" prop="pickedNum">
|
|
||||||
<el-input-number v-model.number="workFlowFormEntity.pickedNum"
|
|
||||||
controls-position="right" :min="0" :max="workFlowFormEntity.needNum"
|
|
||||||
clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="任务状态" prop="lightStatus">
|
|
||||||
<el-select-v2 v-model="workFlowFormEntity.lightStatus" placeholder="请选择亮灯状态"
|
|
||||||
:options="lightStatusOptions"></el-select-v2>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="任务状态" prop="workStatus">
|
|
||||||
<el-select-v2 v-model="workFlowFormEntity.workStatus" placeholder="请选择任务状态"
|
|
||||||
:options="workStatusOptions"></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="createTime">
|
|
||||||
<el-input v-model="workFlowFormEntity.createTime" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="完成时间" prop="finishTime">
|
|
||||||
<el-input v-model="workFlowFormEntity.finishTime" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="12" :offset="0">
|
|
||||||
<el-form-item label="操作用户" prop="opUser">
|
|
||||||
<el-input v-model="workFlowFormEntity.opUser" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<template #footer>
|
|
||||||
<span class="dialog-footer">
|
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="submitInfo(workFlowFormEntity)">
|
|
||||||
确定
|
|
||||||
</el-button>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
<el-dialog v-model="uploadDialogVisible" title="工作流" width="40%" draggable :show-close="true">
|
|
||||||
<fieldset class="title-area">
|
|
||||||
<legend>上次更新</legend>
|
|
||||||
<div style="padding: 5px;">
|
|
||||||
<div style="display: flex; margin-bottom: 10px;">
|
|
||||||
<div style="display: flex; width: 100%;">
|
|
||||||
<div style="width: 30%; align-content: center;">时间:</div>
|
|
||||||
<el-input v-model="uploadRecord.uploadTime" readonly />
|
|
||||||
</div>
|
|
||||||
<div style="display: flex; width: 100%; margin-left: 5px;">
|
|
||||||
<div style="width: 30%; align-content: center;">人员:</div>
|
|
||||||
<el-input v-model="uploadRecord.uploadUser" readonly />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="display: flex; width: 100%;">
|
|
||||||
<div style="width: 13%; align-content: center;">文件名:</div>
|
|
||||||
<el-input type="textarea" :rows="1" v-model="uploadRecord.fileName" :maxlength="-1"
|
|
||||||
:show-word-limit="false" :autosize="{ minRows: 1, maxRows: 4 }" readonly>
|
|
||||||
</el-input>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<fieldset class="title-area">
|
|
||||||
<legend>再次更新</legend>
|
|
||||||
<UploadExcelWorkFlow></UploadExcelWorkFlow>
|
|
||||||
</fieldset>
|
|
||||||
</el-dialog>
|
|
||||||
</el-config-provider>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import store from '@/store'
|
|
||||||
import { getWorkFlows, updateWorkFlows } from '@/api/kateWork.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 { queryUploadRecord } from '@/api/excel.js'
|
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'pickTaskMonitor',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
workFlowList: [],
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
total: 0,
|
|
||||||
workOrderQuery: '',
|
|
||||||
workCenterQuery: '',
|
|
||||||
goodsIdQuery: '',
|
|
||||||
standIdQuery: '',
|
|
||||||
lightStatusQuery: -99,
|
|
||||||
workStatusQuery: -99,
|
|
||||||
loading: true,
|
|
||||||
dialogVisible: false,
|
|
||||||
workFlowId: '',
|
|
||||||
workFlowFormEntity: reactive({}),
|
|
||||||
workFlowFormRef: ref(),
|
|
||||||
labelPosition: 'top',
|
|
||||||
rules: reactive({}),
|
|
||||||
lightStatusOptions: [
|
|
||||||
{
|
|
||||||
value: -99,
|
|
||||||
label: '全部'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 0,
|
|
||||||
label: '未亮灯'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 1,
|
|
||||||
label: '已亮灯'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 2,
|
|
||||||
label: '已拍灯'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
workStatusOptions: [
|
|
||||||
{
|
|
||||||
value: -99,
|
|
||||||
label: '全部'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 0,
|
|
||||||
label: '未开始'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 1,
|
|
||||||
label: '正在做'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 2,
|
|
||||||
label: '已完成'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
uploadDialogVisible: false,
|
|
||||||
uploadRecord: reactive({
|
|
||||||
fileName: '',
|
|
||||||
uploadTime: '',
|
|
||||||
uploadUser: ''
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.search()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
search() {
|
|
||||||
this.loading = true
|
|
||||||
const request = {
|
|
||||||
pageNo: this.currentPage,
|
|
||||||
pageSize: this.pageSize,
|
|
||||||
workStation: this.standIdQuery.trim(),
|
|
||||||
workOrder: this.workOrderQuery.trim(),
|
|
||||||
workCenter: this.workCenterQuery.trim(),
|
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
|
||||||
lightStatus: this.lightStatusQuery == -99 ? null : this.lightStatusQuery,
|
|
||||||
workStatus: this.workStatusQuery == -99 ? null : this.workStatusQuery,
|
|
||||||
userName: store.getters.getUserName
|
|
||||||
}
|
|
||||||
getWorkFlows(request).then(res => {
|
|
||||||
const tableResponse = res.data
|
|
||||||
if (tableResponse.code == 0) {
|
|
||||||
this.workFlowList = tableResponse.returnData.lists
|
|
||||||
this.total = tableResponse.returnData.total
|
|
||||||
} else {
|
|
||||||
errorBox(tableResponse.message)
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
errorBox('查询工作流错误')
|
|
||||||
})
|
|
||||||
this.loading = false
|
|
||||||
},
|
|
||||||
dateFormat: (row, column, cellValue, index) => {
|
|
||||||
return dateFormatter(cellValue)
|
|
||||||
},
|
|
||||||
timeFormat: (row, column, cellValue, index) => {
|
|
||||||
return timeFormatter(cellValue)
|
|
||||||
},
|
|
||||||
lightStatusFormat: (row, column, cellValue, index) => {
|
|
||||||
switch (cellValue) {
|
|
||||||
case 0:
|
|
||||||
return '未亮灯'
|
|
||||||
case 1:
|
|
||||||
return '已亮灯'
|
|
||||||
case 2:
|
|
||||||
return '已拍灯'
|
|
||||||
default:
|
|
||||||
return '未知'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
workStatusFormat: (row, column, cellValue, index) => {
|
|
||||||
switch (cellValue) {
|
|
||||||
case 0:
|
|
||||||
return '未开始'
|
|
||||||
case 1:
|
|
||||||
return '正在做'
|
|
||||||
case 2:
|
|
||||||
return '已完成'
|
|
||||||
default:
|
|
||||||
return '未知'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
reset() {
|
|
||||||
this.standIdQuery = ''
|
|
||||||
this.workOrderQuery = ''
|
|
||||||
this.workCenterQuery = ''
|
|
||||||
this.goodsIdQuery = ''
|
|
||||||
this.search()
|
|
||||||
},
|
|
||||||
editCurrentRow(row) {
|
|
||||||
this.workFlowId = row.workFlowId
|
|
||||||
this.workFlowFormEntity = {
|
|
||||||
workFlowId: row.workFlowId,
|
|
||||||
orderId: row.orderId,
|
|
||||||
workStation: row.workStation,
|
|
||||||
workOrder: row.workOrder,
|
|
||||||
workCenter: row.workCenter,
|
|
||||||
goodsId: row.goodsId,
|
|
||||||
pickedNum: row.pickedNum,
|
|
||||||
needNum: row.needNum,
|
|
||||||
lightStatus: row.lightStatus,
|
|
||||||
workStatus: row.workStatus,
|
|
||||||
createTime: row.createTime,
|
|
||||||
finishTime: row.finishTime,
|
|
||||||
opUser: row.opUser
|
|
||||||
}
|
|
||||||
this.dialogVisible = true
|
|
||||||
},
|
|
||||||
submitInfo(formData) {
|
|
||||||
const params = {
|
|
||||||
workFlowId: formData.workFlowId,
|
|
||||||
pickedNum: formData.pickedNum,
|
|
||||||
lightStatus: formData.lightStatus,
|
|
||||||
workStatus: formData.workStatus,
|
|
||||||
userName: store.getters.getUserName
|
|
||||||
}
|
|
||||||
updateWorkFlows(params).then(res => {
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
this.dialogVisible = false
|
|
||||||
ElMessage.success('更新工作流信息成功。')
|
|
||||||
this.search()
|
|
||||||
} else {
|
|
||||||
errorBox(res.data.message)
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
errorBox('更新工作流信息失败。')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getCurrentRow(row) {
|
|
||||||
this.workFlowId = row.workFlowId
|
|
||||||
},
|
|
||||||
openUploadDialog() {
|
|
||||||
// 请求上传记录
|
|
||||||
const param = {
|
|
||||||
userName: store.getters.getUserName,
|
|
||||||
fileDescription: 'WORKFLOW',
|
|
||||||
isAsc: false,
|
|
||||||
sortBy: 'upload_time'
|
|
||||||
}
|
|
||||||
queryUploadRecord(param).then(res => {
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
if (res.data.returnData.total > 0) {
|
|
||||||
this.uploadRecord = res.data.returnData.lists[0]
|
|
||||||
} else {
|
|
||||||
this.uploadRecord = reactive({
|
|
||||||
fileName: '',
|
|
||||||
uploadTime: '',
|
|
||||||
uploadUser: ''
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.uploadRecord = reactive({
|
|
||||||
fileName: '',
|
|
||||||
uploadTime: '',
|
|
||||||
uploadUser: ''
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
console.log(err)
|
|
||||||
errorBox('发生异常')
|
|
||||||
})
|
|
||||||
this.uploadDialogVisible = true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.el-pagination {
|
|
||||||
padding-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-button {
|
|
||||||
width: 72px;
|
|
||||||
margin-left: 0px;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-class {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item {
|
|
||||||
width: 10% inherit;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-select-v2 {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-input-number {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-row .el-form-item .el-button {
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-area {
|
|
||||||
display: flex;
|
|
||||||
/* min-height: 10%; */
|
|
||||||
max-height: max-content;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
min-width: inherit;
|
|
||||||
border: solid 1px;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0px 15px 10px -15px #000;
|
|
||||||
overflow: auto;
|
|
||||||
flex-direction: column;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -12,10 +12,10 @@
|
||||||
:options="summaryTypeOptions" @change="search()"></el-select-v2>
|
:options="summaryTypeOptions" @change="search()"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工单号">
|
<el-form-item label="工单号">
|
||||||
<el-input v-model="searchQueryFormEntity.workOrder" clearable />
|
<el-input v-model="searchQueryFormEntity.workOrder" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="料盒号">
|
<el-form-item label="料盒号">
|
||||||
<el-input v-model="searchQueryFormEntity.boxNo" clearable />
|
<el-input v-model="searchQueryFormEntity.boxNo" @keyup.enter="search()" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工作状态">
|
<el-form-item label="工作状态">
|
||||||
<el-select-v2 v-model="searchQueryFormEntity.workStatus" placeholder="工作状态"
|
<el-select-v2 v-model="searchQueryFormEntity.workStatus" placeholder="工作状态"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ const routes = [
|
||||||
path: '/home',
|
path: '/home',
|
||||||
name: 'home',
|
name: 'home',
|
||||||
component: HomeView,
|
component: HomeView,
|
||||||
redirect: '/stock',
|
// redirect: '/stock',
|
||||||
children: [
|
children: [
|
||||||
{ path: '/stock', component: () => import('@/layout/stock.vue')},// 库存
|
{ path: '/stock', component: () => import('@/layout/stock.vue')},// 库存
|
||||||
{ path: '/goodsIn', component: () => import('@/layout/goodsIn.vue') },// 入库
|
{ path: '/goodsIn', component: () => import('@/layout/goodsIn.vue') },// 入库
|
||||||
|
|
@ -25,7 +25,6 @@ const routes = [
|
||||||
{ path: '/inventory', component: () => import('@/layout/inventory.vue') },// 盘点
|
{ path: '/inventory', component: () => import('@/layout/inventory.vue') },// 盘点
|
||||||
{ path: '/inventoryRecord', component: () => import('@/layout/inventoryRecord.vue') },// 盘点记录
|
{ path: '/inventoryRecord', component: () => import('@/layout/inventoryRecord.vue') },// 盘点记录
|
||||||
{ path: '/wmsLog', component: () => import('@/layout/wmsLog.vue') },// 日志
|
{ path: '/wmsLog', component: () => import('@/layout/wmsLog.vue') },// 日志
|
||||||
{ path: '/workFlow', component: () => import('@/layout/workFlow.vue') },// 工作流
|
|
||||||
{ path: '/workSummary', component: () => import('@/layout/workSummary.vue') },// 工作总结
|
{ path: '/workSummary', component: () => import('@/layout/workSummary.vue') },// 工作总结
|
||||||
{ path: '/pickTask', component: () => import('@/layout/pickTaskMonitor.vue') },// 拣选任务
|
{ path: '/pickTask', component: () => import('@/layout/pickTaskMonitor.vue') },// 拣选任务
|
||||||
{ path: '/clcKanban', component: () => import('@/layout/clcKanban.vue') },// 需求看板
|
{ path: '/clcKanban', component: () => import('@/layout/clcKanban.vue') },// 需求看板
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,7 @@ import { createStore } from 'vuex'
|
||||||
|
|
||||||
export default createStore({
|
export default createStore({
|
||||||
state: {
|
state: {
|
||||||
stateTagsList: [{
|
stateTagsList: [],
|
||||||
id: '99',
|
|
||||||
labelName: '库存',
|
|
||||||
path: '/stock'
|
|
||||||
}],
|
|
||||||
user: {},
|
user: {},
|
||||||
menuList: [],
|
menuList: [],
|
||||||
token: '',
|
token: '',
|
||||||
|
|
@ -20,6 +16,9 @@ export default createStore({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
|
getStateTagsList(state) {
|
||||||
|
return state.stateTagsList
|
||||||
|
},
|
||||||
getUser(state) {
|
getUser(state) {
|
||||||
return state.user
|
return state.user
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { revertSeconds } from '@/utils/dateUtils'
|
import { revertSeconds } from '@/utils/dateUtils'
|
||||||
|
// 时间格式化
|
||||||
export const timeFormatter = (date) => {
|
export const timeFormatter = (date) => {
|
||||||
if (date === null || date === undefined) {
|
if (date === null || date === undefined) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
return moment(date).format('yyyy-MM-DD HH:mm:ss');
|
return moment(date).format('yyyy-MM-DD HH:mm:ss');
|
||||||
}
|
}
|
||||||
|
// 日期格式化
|
||||||
export const dateFormatter = (date) => {
|
export const dateFormatter = (date) => {
|
||||||
if (date === null || date === undefined) {
|
if (date === null || date === undefined) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
return moment(date).format('yyyy-MM-DD');
|
return moment(date).format('yyyy-MM-DD');
|
||||||
}
|
}
|
||||||
|
// 运行时长格式化
|
||||||
export const dueFormatter = (date) => {
|
export const dueFormatter = (date) => {
|
||||||
if (date === null || date === undefined) {
|
if (date === null || date === undefined) {
|
||||||
return ''
|
return ''
|
||||||
|
|
@ -22,33 +22,6 @@ export const dueFormatter = (date) => {
|
||||||
return revertSeconds(moment(new Date().getTime()).diff(moment(date), 'seconds'));
|
return revertSeconds(moment(new Date().getTime()).diff(moment(date), 'seconds'));
|
||||||
}
|
}
|
||||||
|
|
||||||
export const taskStatusFormatter = (value) => {
|
|
||||||
switch (value) {
|
|
||||||
case -2:
|
|
||||||
return '重复入库'
|
|
||||||
case -1:
|
|
||||||
return '暂存任务'
|
|
||||||
case 0:
|
|
||||||
return '任务新建,待下发'
|
|
||||||
case 1:
|
|
||||||
return '任务已下发'
|
|
||||||
case 2:
|
|
||||||
return '任务开始执行'
|
|
||||||
case 8:
|
|
||||||
return '拣选中'
|
|
||||||
case 9:
|
|
||||||
return '盘点中'
|
|
||||||
case 100:
|
|
||||||
return '任务完成'
|
|
||||||
case 998:
|
|
||||||
return '任务取消'
|
|
||||||
case 999:
|
|
||||||
return '任务异常'
|
|
||||||
default:
|
|
||||||
return '其他状态'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 库位格式化
|
// 库位格式化
|
||||||
export const locationFormatter = (locationId) => {
|
export const locationFormatter = (locationId) => {
|
||||||
if (locationId === null || locationId == undefined) {
|
if (locationId === null || locationId == undefined) {
|
||||||
|
|
@ -63,63 +36,7 @@ export const locationFormatter = (locationId) => {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 配置类型格式化
|
||||||
export const kateTaskStatusFormatter = (value) => {
|
|
||||||
switch (value) {
|
|
||||||
case 0:
|
|
||||||
return '待下发'
|
|
||||||
case 1:
|
|
||||||
return '已下发'
|
|
||||||
case 2:
|
|
||||||
return '执行中'
|
|
||||||
case 3:
|
|
||||||
return '正在拣货'
|
|
||||||
case 5:
|
|
||||||
return '任务完成'
|
|
||||||
default:
|
|
||||||
return '异常状态'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const pickingStatusFormatter = (value) => {
|
|
||||||
switch (value) {
|
|
||||||
case 0:
|
|
||||||
return '待拣货'
|
|
||||||
case 1:
|
|
||||||
return '正在拣货'
|
|
||||||
case 2:
|
|
||||||
return '拣货完成'
|
|
||||||
default:
|
|
||||||
return '未拣货'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const vehicleStatusFormatter = (value) => {
|
|
||||||
switch (value) {
|
|
||||||
case 1:
|
|
||||||
return '入库中'
|
|
||||||
case 2:
|
|
||||||
return '在库中'
|
|
||||||
case 3:
|
|
||||||
return '出库中'
|
|
||||||
case 4:
|
|
||||||
return '移库中'
|
|
||||||
default:
|
|
||||||
return '异常状态'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const locationStatusFormatter = (value) => {
|
|
||||||
switch (value) {
|
|
||||||
case 0:
|
|
||||||
return '空闲'
|
|
||||||
case 1:
|
|
||||||
return '占用'
|
|
||||||
default:
|
|
||||||
return '异常状态'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const configTypeFormatter = (value) => {
|
export const configTypeFormatter = (value) => {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case '1':
|
case '1':
|
||||||
|
|
@ -132,7 +49,7 @@ export const configTypeFormatter = (value) => {
|
||||||
return '任务类型异常'
|
return '任务类型异常'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 文件大小格式化
|
||||||
export const sizeFormatter = (value) => {
|
export const sizeFormatter = (value) => {
|
||||||
if (typeof value != 'number') {
|
if (typeof value != 'number') {
|
||||||
return 'error'
|
return 'error'
|
||||||
|
|
@ -166,7 +83,7 @@ export const sizeFormatter = (value) => {
|
||||||
return (value / oneYB).toFixed(2) + 'YB'
|
return (value / oneYB).toFixed(2) + 'YB'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// json格式化
|
||||||
export const jsonFormatter = (value) => {
|
export const jsonFormatter = (value) => {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
return ""
|
return ""
|
||||||
|
|
@ -181,15 +98,51 @@ export const jsonFormatter = (value) => {
|
||||||
return JSON.stringify(value, null, 4)
|
return JSON.stringify(value, null, 4)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 去除英文和数字之外的字符
|
||||||
export const replaceEnglishAndNumberIGAI = (value) => {
|
export const replaceEnglishAndNumberIGAI = (value) => {
|
||||||
return value.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, '')
|
return value.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, '')
|
||||||
}
|
}
|
||||||
|
// 是否格式化
|
||||||
export const yesOrNoFormatter = (value) => {
|
export const yesOrNoFormatter = (value) => {
|
||||||
return value == 1 ? '是' : '否'
|
return value == 1 ? '是' : '否'
|
||||||
}
|
}
|
||||||
|
// 反转是否格式化
|
||||||
export const converseYesOrNoFormatter = (value) => {
|
export const converseYesOrNoFormatter = (value) => {
|
||||||
return value == 0 ? '是' : '否'
|
return value == 0 ? '是' : '否'
|
||||||
}
|
}
|
||||||
|
// 任务类型格式化
|
||||||
|
export const wmsTaskTypeFormatter = (value) => {
|
||||||
|
switch (value) {
|
||||||
|
case 1:
|
||||||
|
return '入库'
|
||||||
|
case 2:
|
||||||
|
return '出库'
|
||||||
|
case 3:
|
||||||
|
return '盘点'
|
||||||
|
default:
|
||||||
|
return '未知类型'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// wms任务状态格式化
|
||||||
|
export const wmsTaskStatusFormatter = (value) => {
|
||||||
|
switch (value) {
|
||||||
|
case -1:
|
||||||
|
return '暂存'
|
||||||
|
case 0:
|
||||||
|
return '初始化'
|
||||||
|
case 1:
|
||||||
|
return '已解析'
|
||||||
|
case 2:
|
||||||
|
return '已下发'
|
||||||
|
case 3:
|
||||||
|
return '正在执行'
|
||||||
|
case 4:
|
||||||
|
return '执行完成'
|
||||||
|
case 98:
|
||||||
|
return '已取消'
|
||||||
|
case 99:
|
||||||
|
return '执行异常'
|
||||||
|
default:
|
||||||
|
return '未知状态'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -10,10 +10,10 @@ import lombok.Getter;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum WmsPickTaskStatusEnum {
|
public enum WmsPickTaskStatusEnum {
|
||||||
FOR_IN(-2, "入库用"),
|
FOR_IN(-2, "入库用"),
|
||||||
TEMP(-1, "暂存"),
|
TEMP(-1, "暂存中"),
|
||||||
WAIT(0, "待下发"),
|
WAIT(0, "待下发"),
|
||||||
SEND(1, "已下发"),
|
SEND(1, "已下发"),
|
||||||
RUN(2, "正在执行"),
|
RUN(2, "执行中"),
|
||||||
ARRIVE(3, "已到达"),
|
ARRIVE(3, "已到达"),
|
||||||
LEAVE(4, "已离开"),
|
LEAVE(4, "已离开"),
|
||||||
CANCEL(5, "已取消");
|
CANCEL(5, "已取消");
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,15 @@ public class ExcelController {
|
||||||
exportExcelEasyPoi.doExportStocks(stockQuery, response);
|
exportExcelEasyPoi.doExportStocks(stockQuery, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出库存更新记录
|
||||||
|
* @param stockUpdateQuery 请求
|
||||||
|
*/
|
||||||
|
@PostMapping("/exportStockUpdateExcel")
|
||||||
|
public void exportStockUpdateExcel(@RequestBody StockUpdateQuery stockUpdateQuery, HttpServletResponse response) throws IOException {
|
||||||
|
exportExcelEasyPoi.doExportStockUpdate(stockUpdateQuery, response);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出工作详情信息
|
* 导出工作详情信息
|
||||||
* @param workSummaryQuery 请求
|
* @param workSummaryQuery 请求
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
package com.wms_main.controller.wms;
|
package com.wms_main.controller.wms;
|
||||||
|
|
||||||
import com.wms_main.model.dto.query.StockQuery;
|
import com.wms_main.model.dto.query.StockQuery;
|
||||||
|
import com.wms_main.model.dto.query.StockUpdateQuery;
|
||||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||||
import com.wms_main.model.vo.wms.PageVo;
|
import com.wms_main.model.vo.wms.PageVo;
|
||||||
|
import com.wms_main.model.vo.wms.StockUpdateVo;
|
||||||
import com.wms_main.model.vo.wms.StockVo;
|
import com.wms_main.model.vo.wms.StockVo;
|
||||||
import com.wms_main.service.controller.IStockControllerService;
|
import com.wms_main.service.controller.IStockControllerService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
@ -32,4 +34,15 @@ public class StockController {
|
||||||
{
|
{
|
||||||
return stockControllerService.queryStocksByPage(stockQuery);
|
return stockControllerService.queryStocksByPage(stockQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询库存更新记录
|
||||||
|
* @param stockUpdateQuery 查询参数
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/queryStockUpdateByPage")
|
||||||
|
public WmsApiResponse<PageVo<StockUpdateVo>> queryStockUpdateByPage(@RequestBody StockUpdateQuery stockUpdateQuery)
|
||||||
|
{
|
||||||
|
return stockControllerService.queryStockUpdateByPage(stockUpdateQuery);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.wms_main.controller.wms;
|
||||||
|
|
||||||
|
import com.wms_main.model.dto.query.WmsTaskQuery;
|
||||||
|
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||||
|
import com.wms_main.model.vo.wms.PageVo;
|
||||||
|
import com.wms_main.model.vo.wms.TaskVo;
|
||||||
|
import com.wms_main.service.controller.ITaskQueryControllerService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务记录控制类
|
||||||
|
* 包括拣选任务
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@ResponseBody
|
||||||
|
@CrossOrigin
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/wms/taskQuery")
|
||||||
|
public class TaskQueryController {
|
||||||
|
private final ITaskQueryControllerService taskQueryControllerService;// 任务查询控制类 服务
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wms任务分页查询
|
||||||
|
* @param wmsTaskQuery 查询参数
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/queryTasksByPage")
|
||||||
|
public WmsApiResponse<PageVo<TaskVo>> queryTasksByPage(@RequestBody WmsTaskQuery wmsTaskQuery)
|
||||||
|
{
|
||||||
|
return taskQueryControllerService.queryTasksByPage(wmsTaskQuery);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
package com.wms_main.controller.wms;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务记录控制类
|
|
||||||
* 包括拣选任务
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@ResponseBody
|
|
||||||
@CrossOrigin
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
@RequestMapping("/wms/taskRecord")
|
|
||||||
public class TaskRecordController {
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.wms_main.excel.easypoi.excelTemplate;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存模版
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class StockUpdateExcelTemplate {
|
||||||
|
/**
|
||||||
|
* 库存更新记录id
|
||||||
|
*/
|
||||||
|
@Excel(name = "记录id")
|
||||||
|
private String updateId;
|
||||||
|
/**
|
||||||
|
* 载具号
|
||||||
|
*/
|
||||||
|
@Excel(name = "载具号")
|
||||||
|
private String vehicleId;
|
||||||
|
/**
|
||||||
|
* 料号
|
||||||
|
*/
|
||||||
|
@Excel(name = "料号")
|
||||||
|
private String goodsId;
|
||||||
|
/**
|
||||||
|
* 初次入库时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "初次入库时间", format = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime firstInTime;
|
||||||
|
/**
|
||||||
|
* 原数量
|
||||||
|
*/
|
||||||
|
@Excel(name = "原数量")
|
||||||
|
private Integer beforeNum;
|
||||||
|
/**
|
||||||
|
* 新数量
|
||||||
|
*/
|
||||||
|
@Excel(name = "新数量")
|
||||||
|
private Integer afterNum;
|
||||||
|
/**
|
||||||
|
* 更新原因
|
||||||
|
*/
|
||||||
|
@Excel(name = "更新原因")
|
||||||
|
private String reason;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "更新时间", format = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
/**
|
||||||
|
* 更新用户
|
||||||
|
*/
|
||||||
|
@Excel(name = "更新用户")
|
||||||
|
private String updateUser;
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.wms_main.excel.easypoi.service.base;
|
package com.wms_main.excel.easypoi.service.base;
|
||||||
|
|
||||||
import com.wms_main.model.dto.query.StockQuery;
|
import com.wms_main.model.dto.query.StockQuery;
|
||||||
|
import com.wms_main.model.dto.query.StockUpdateQuery;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
|
@ -15,4 +16,10 @@ public interface IBaseExportExcelEasyPoi {
|
||||||
* @param stockQuery 查询条件
|
* @param stockQuery 查询条件
|
||||||
*/
|
*/
|
||||||
void doExportStocks(@RequestBody StockQuery stockQuery, HttpServletResponse response) throws IOException;
|
void doExportStocks(@RequestBody StockQuery stockQuery, HttpServletResponse response) throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出库存更新记录
|
||||||
|
* @param stockUpdateQuery 查询条件
|
||||||
|
*/
|
||||||
|
void doExportStockUpdate(@RequestBody StockUpdateQuery stockUpdateQuery, HttpServletResponse response) throws IOException;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,14 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.wms_main.dao.ITAppStockService;
|
import com.wms_main.dao.ITAppStockService;
|
||||||
|
import com.wms_main.dao.ITAppStockUpdateService;
|
||||||
import com.wms_main.excel.easypoi.excelTemplate.StockExcelTemplate;
|
import com.wms_main.excel.easypoi.excelTemplate.StockExcelTemplate;
|
||||||
|
import com.wms_main.excel.easypoi.excelTemplate.StockUpdateExcelTemplate;
|
||||||
import com.wms_main.excel.easypoi.service.base.IBaseExportExcelEasyPoi;
|
import com.wms_main.excel.easypoi.service.base.IBaseExportExcelEasyPoi;
|
||||||
import com.wms_main.model.dto.query.StockQuery;
|
import com.wms_main.model.dto.query.StockQuery;
|
||||||
|
import com.wms_main.model.dto.query.StockUpdateQuery;
|
||||||
import com.wms_main.model.po.TAppStock;
|
import com.wms_main.model.po.TAppStock;
|
||||||
|
import com.wms_main.model.po.TAppStockUpdate;
|
||||||
import com.wms_main.repository.utils.StringUtils;
|
import com.wms_main.repository.utils.StringUtils;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
@ -28,6 +32,8 @@ import java.util.List;
|
||||||
public class BaseExportExcelEasyPoi implements IBaseExportExcelEasyPoi {
|
public class BaseExportExcelEasyPoi implements IBaseExportExcelEasyPoi {
|
||||||
@Autowired
|
@Autowired
|
||||||
protected ITAppStockService appStockService;// 库存服务
|
protected ITAppStockService appStockService;// 库存服务
|
||||||
|
@Autowired
|
||||||
|
protected ITAppStockUpdateService appStockUpdateService;// 库存更新服务
|
||||||
|
|
||||||
public BaseExportExcelEasyPoi() {
|
public BaseExportExcelEasyPoi() {
|
||||||
|
|
||||||
|
|
@ -42,7 +48,7 @@ public class BaseExportExcelEasyPoi implements IBaseExportExcelEasyPoi {
|
||||||
@Override
|
@Override
|
||||||
public void doExportStocks(StockQuery stockQuery, HttpServletResponse response) throws IOException {
|
public void doExportStocks(StockQuery stockQuery, HttpServletResponse response) throws IOException {
|
||||||
if (stockQuery == null) {
|
if (stockQuery == null) {
|
||||||
throw new IOException("参数不能为空");
|
throw new IOException("参数不能为NULL");
|
||||||
}
|
}
|
||||||
// 库存查询参数
|
// 库存查询参数
|
||||||
LambdaQueryWrapper<TAppStock> lambdaQueryWrapper = new LambdaQueryWrapper<TAppStock>()
|
LambdaQueryWrapper<TAppStock> lambdaQueryWrapper = new LambdaQueryWrapper<TAppStock>()
|
||||||
|
|
@ -88,6 +94,44 @@ public class BaseExportExcelEasyPoi implements IBaseExportExcelEasyPoi {
|
||||||
doWriteExcel("库存", response, resultList, StockExcelTemplate.class);
|
doWriteExcel("库存", response, resultList, StockExcelTemplate.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出库存更新记录
|
||||||
|
* @param stockUpdateQuery 查询条件
|
||||||
|
* @param response 响应
|
||||||
|
* @throws IOException 异常
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void doExportStockUpdate(StockUpdateQuery stockUpdateQuery, HttpServletResponse response) throws IOException {
|
||||||
|
if (stockUpdateQuery == null) {
|
||||||
|
throw new IOException("查询参数不能为NULL");
|
||||||
|
}
|
||||||
|
// 库存更新记录查询参数
|
||||||
|
LambdaQueryWrapper<TAppStockUpdate> lambdaQueryWrapper = new LambdaQueryWrapper<TAppStockUpdate>()
|
||||||
|
.like(StringUtils.isNotEmpty(stockUpdateQuery.getGoodsId()), TAppStockUpdate::getGoodsId, stockUpdateQuery.getGoodsId())
|
||||||
|
.like(StringUtils.isNotEmpty(stockUpdateQuery.getVehicleId()), TAppStockUpdate::getVehicleId, stockUpdateQuery.getVehicleId());
|
||||||
|
List<TAppStockUpdate> stockUpdateList = appStockUpdateService.list(lambdaQueryWrapper);
|
||||||
|
// excel模版列表
|
||||||
|
List<StockUpdateExcelTemplate> resultList = new ArrayList<>();
|
||||||
|
if (!stockUpdateList.isEmpty()) {
|
||||||
|
for (TAppStockUpdate poData : stockUpdateList) {
|
||||||
|
resultList.add(new StockUpdateExcelTemplate(
|
||||||
|
poData.getUpdateId(),
|
||||||
|
poData.getVehicleId(),
|
||||||
|
poData.getGoodsId(),
|
||||||
|
poData.getFirstInTime(),
|
||||||
|
poData.getBeforeNum(),
|
||||||
|
poData.getAfterNum(),
|
||||||
|
poData.getReason(),
|
||||||
|
poData.getUpdateTime(),
|
||||||
|
poData.getUpdateUser()
|
||||||
|
));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
resultList.add(new StockUpdateExcelTemplate());
|
||||||
|
}
|
||||||
|
doWriteExcel("库存更新记录", response, resultList, StockUpdateExcelTemplate.class);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 写入excel
|
* 写入excel
|
||||||
* @param fileDesc 文件描述
|
* @param fileDesc 文件描述
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,27 @@
|
||||||
package com.wms_main.model.dto.query;
|
package com.wms_main.model.dto.query;
|
||||||
|
|
||||||
public class StockUpdateQuery {
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存更新查询
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class StockUpdateQuery extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 料号
|
||||||
|
*/
|
||||||
|
@JsonProperty("goodsId")
|
||||||
|
private String goodsId;
|
||||||
|
/**
|
||||||
|
* 箱号
|
||||||
|
*/
|
||||||
|
@JsonProperty("vehicleId")
|
||||||
|
private String vehicleId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.wms_main.model.dto.query;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wms任务查询
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class WmsTaskQuery extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 任务id
|
||||||
|
*/
|
||||||
|
@JsonProperty("taskId")
|
||||||
|
private String taskId;
|
||||||
|
/**
|
||||||
|
* 载具号
|
||||||
|
*/
|
||||||
|
@JsonProperty("vehicleId")
|
||||||
|
private String vehicleId;
|
||||||
|
/**
|
||||||
|
* 料号
|
||||||
|
*/
|
||||||
|
@JsonProperty("goodsId")
|
||||||
|
private String goodsId;
|
||||||
|
/**
|
||||||
|
* 任务类型
|
||||||
|
*/
|
||||||
|
@JsonProperty("taskType")
|
||||||
|
private Integer taskType;
|
||||||
|
/**
|
||||||
|
* 任务状态
|
||||||
|
*/
|
||||||
|
@JsonProperty("taskStatus")
|
||||||
|
private Integer taskStatus;
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
package com.wms_main.model.vo.wms;
|
package com.wms_main.model.vo.wms;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.wms_main.model.po.TAppStockUpdate;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
@ -35,6 +36,8 @@ public class StockUpdateVo {
|
||||||
* 首次入库时间
|
* 首次入库时间
|
||||||
*/
|
*/
|
||||||
@JsonProperty("firstInTime")
|
@JsonProperty("firstInTime")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime firstInTime;
|
private LocalDateTime firstInTime;
|
||||||
/**
|
/**
|
||||||
* 原数量
|
* 原数量
|
||||||
|
|
@ -55,10 +58,34 @@ public class StockUpdateVo {
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
@JsonProperty("updateTime")
|
@JsonProperty("updateTime")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime updateTime;
|
private LocalDateTime updateTime;
|
||||||
/**
|
/**
|
||||||
* 更新用户
|
* 更新用户
|
||||||
*/
|
*/
|
||||||
@JsonProperty("updateUser")
|
@JsonProperty("updateUser")
|
||||||
private String updateUser;
|
private String updateUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Po转Vo
|
||||||
|
* @param po po
|
||||||
|
* @return vo
|
||||||
|
*/
|
||||||
|
public static StockUpdateVo of(TAppStockUpdate po) {
|
||||||
|
if (po == null) {
|
||||||
|
return new StockUpdateVo();
|
||||||
|
}
|
||||||
|
return new StockUpdateVo(
|
||||||
|
po.getUpdateId(),
|
||||||
|
po.getVehicleId(),
|
||||||
|
po.getGoodsId(),
|
||||||
|
po.getFirstInTime(),
|
||||||
|
po.getBeforeNum(),
|
||||||
|
po.getAfterNum(),
|
||||||
|
po.getReason(),
|
||||||
|
po.getUpdateTime(),
|
||||||
|
po.getUpdateUser()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.wms_main.model.vo.wms;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.wms_main.model.po.TAppTask;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
@ -105,4 +106,34 @@ public class TaskVo {
|
||||||
*/
|
*/
|
||||||
@JsonProperty("goodsDesc")
|
@JsonProperty("goodsDesc")
|
||||||
private String goodsDesc;
|
private String goodsDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将po转换为vo
|
||||||
|
* @param po po
|
||||||
|
* @return vo
|
||||||
|
*/
|
||||||
|
public static TaskVo of(TAppTask po) {
|
||||||
|
if (po == null) {
|
||||||
|
return new TaskVo();
|
||||||
|
}
|
||||||
|
return new TaskVo(
|
||||||
|
po.getTaskId(),
|
||||||
|
po.getTaskType(),
|
||||||
|
po.getTaskStatus(),
|
||||||
|
po.getTaskPriority(),
|
||||||
|
po.getVehicleId(),
|
||||||
|
po.getOrigin(),
|
||||||
|
po.getDestination(),
|
||||||
|
po.getWcsTaskId(),
|
||||||
|
po.getCreateTime(),
|
||||||
|
po.getFinishTime(),
|
||||||
|
po.getGoodsId(),
|
||||||
|
po.getOpNum(),
|
||||||
|
po.getStockNum(),
|
||||||
|
po.getOpUser(),
|
||||||
|
po.getRemark(),
|
||||||
|
po.getCallStand(),
|
||||||
|
po.getGoodsDesc()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
package com.wms_main.service.controller;
|
package com.wms_main.service.controller;
|
||||||
|
|
||||||
import com.wms_main.model.dto.query.StockQuery;
|
import com.wms_main.model.dto.query.StockQuery;
|
||||||
|
import com.wms_main.model.dto.query.StockUpdateQuery;
|
||||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||||
import com.wms_main.model.vo.wms.PageVo;
|
import com.wms_main.model.vo.wms.PageVo;
|
||||||
|
import com.wms_main.model.vo.wms.StockUpdateVo;
|
||||||
import com.wms_main.model.vo.wms.StockVo;
|
import com.wms_main.model.vo.wms.StockVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -15,4 +17,11 @@ public interface IStockControllerService {
|
||||||
* @return 查询结果---分页
|
* @return 查询结果---分页
|
||||||
*/
|
*/
|
||||||
WmsApiResponse<PageVo<StockVo>> queryStocksByPage(StockQuery stockQuery);
|
WmsApiResponse<PageVo<StockVo>> queryStocksByPage(StockQuery stockQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存更新记录---分页
|
||||||
|
* @param stockUpdateQuery 查询参数
|
||||||
|
* @return 查询结果---分页
|
||||||
|
*/
|
||||||
|
WmsApiResponse<PageVo<StockUpdateVo>> queryStockUpdateByPage(StockUpdateQuery stockUpdateQuery);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.wms_main.service.controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务操作控制类 服务接口
|
||||||
|
*/
|
||||||
|
public interface ITaskOperationControllerService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.wms_main.service.controller;
|
||||||
|
|
||||||
|
import com.wms_main.model.dto.query.WmsTaskQuery;
|
||||||
|
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||||
|
import com.wms_main.model.vo.wms.PageVo;
|
||||||
|
import com.wms_main.model.vo.wms.TaskVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务查询控制类 服务接口
|
||||||
|
*/
|
||||||
|
public interface ITaskQueryControllerService {
|
||||||
|
/**
|
||||||
|
* 查询任务信息---分页
|
||||||
|
* @param wmsTaskQuery 查询参数
|
||||||
|
* @return 查询结果---分页
|
||||||
|
*/
|
||||||
|
WmsApiResponse<PageVo<TaskVo>> queryTasksByPage(WmsTaskQuery wmsTaskQuery);
|
||||||
|
}
|
||||||
|
|
@ -647,6 +647,11 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
||||||
return WmsApiResponse.success("查询看板数据成功", pageVo);
|
return WmsApiResponse.success("查询看板数据成功", pageVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成需求看板
|
||||||
|
* @param genRequest 请求参数
|
||||||
|
* @return 生成结果
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public BaseWmsApiResponse genClcKanbanRequirement(GenKanbanRequirementRequest genRequest) {
|
public BaseWmsApiResponse genClcKanbanRequirement(GenKanbanRequirementRequest genRequest) {
|
||||||
|
|
@ -723,7 +728,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
||||||
// 获取筛选过的需要的物料的库存信息
|
// 获取筛选过的需要的物料的库存信息
|
||||||
List<TAppStock> stockList = appStockService.list(new LambdaQueryWrapper<TAppStock>()
|
List<TAppStock> stockList = appStockService.list(new LambdaQueryWrapper<TAppStock>()
|
||||||
.in(TAppStock::getGoodsId, filterGoodsMap.keySet())
|
.in(TAppStock::getGoodsId, filterGoodsMap.keySet())
|
||||||
.gt(TAppStock::getRealNum, 0));
|
.gt(TAppStock::getRemainNum, 0));
|
||||||
// 生成物料数量map
|
// 生成物料数量map
|
||||||
Map<String, Integer> stockByGoodsMap = new HashMap<>();
|
Map<String, Integer> stockByGoodsMap = new HashMap<>();
|
||||||
for (TAppStock stock : stockList) {
|
for (TAppStock stock : stockList) {
|
||||||
|
|
@ -740,17 +745,15 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
||||||
List<TAppKanban> updateKanbanList = new ArrayList<>();
|
List<TAppKanban> updateKanbanList = new ArrayList<>();
|
||||||
for (String goodsId : filterGoodsMap.keySet()) {
|
for (String goodsId : filterGoodsMap.keySet()) {
|
||||||
TAppGoods thisGoods = filterGoodsMap.get(goodsId);
|
TAppGoods thisGoods = filterGoodsMap.get(goodsId);
|
||||||
// 计算补货临界点
|
|
||||||
int canFeedingNum = (thisGoods.getMaxBoxNum() - 1) * thisGoods.getBoxQty();
|
|
||||||
// 需求数量
|
// 需求数量
|
||||||
int needNum = totalGoodsRequireMap.get(goodsId);
|
int needNum = totalGoodsRequireMap.get(goodsId);
|
||||||
// 库存数量
|
// 库存数量
|
||||||
int stockNum = stockByGoodsMap.getOrDefault(goodsId, 0);
|
int stockNum = stockByGoodsMap.getOrDefault(goodsId, 0);
|
||||||
if (needNum > 0 && needNum > stockNum && stockNum <= canFeedingNum) {
|
if (needNum > 0 && needNum > stockNum) {
|
||||||
// 剩余可补物料数量
|
// 剩余可补物料数量
|
||||||
int remainKanbanGoodsNum = (thisGoods.getMaxBoxNum() * thisGoods.getBoxQty()) - stockNum;
|
int remainKanbanGoodsNum = needNum - stockNum;
|
||||||
// 剩余可补看板个数
|
// 剩余可补看板个数
|
||||||
int remainKanbanQty = Math.floorDiv(remainKanbanGoodsNum, thisGoods.getBoxQty());
|
int remainKanbanQty = Math.ceilDiv(remainKanbanGoodsNum, thisGoods.getBoxQty());
|
||||||
// 可以补看板
|
// 可以补看板
|
||||||
List<TAppKanban> thisGoodsKanbanList = kanbanList.stream()
|
List<TAppKanban> thisGoodsKanbanList = kanbanList.stream()
|
||||||
.filter(kanban -> kanban.getGoodsId().equals(goodsId)).toList();
|
.filter(kanban -> kanban.getGoodsId().equals(goodsId)).toList();
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,14 @@ package com.wms_main.service.controller.serviceImpl;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.wms_main.dao.ITAppStockService;
|
import com.wms_main.dao.ITAppStockService;
|
||||||
|
import com.wms_main.dao.ITAppStockUpdateService;
|
||||||
import com.wms_main.model.dto.query.StockQuery;
|
import com.wms_main.model.dto.query.StockQuery;
|
||||||
|
import com.wms_main.model.dto.query.StockUpdateQuery;
|
||||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||||
import com.wms_main.model.po.TAppStock;
|
import com.wms_main.model.po.TAppStock;
|
||||||
|
import com.wms_main.model.po.TAppStockUpdate;
|
||||||
import com.wms_main.model.vo.wms.PageVo;
|
import com.wms_main.model.vo.wms.PageVo;
|
||||||
|
import com.wms_main.model.vo.wms.StockUpdateVo;
|
||||||
import com.wms_main.model.vo.wms.StockVo;
|
import com.wms_main.model.vo.wms.StockVo;
|
||||||
import com.wms_main.repository.utils.StringUtils;
|
import com.wms_main.repository.utils.StringUtils;
|
||||||
import com.wms_main.service.controller.IStockControllerService;
|
import com.wms_main.service.controller.IStockControllerService;
|
||||||
|
|
@ -20,6 +24,7 @@ import org.springframework.stereotype.Service;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class StockControllerServiceImpl implements IStockControllerService {
|
public class StockControllerServiceImpl implements IStockControllerService {
|
||||||
private final ITAppStockService appStockService;// 库存服务
|
private final ITAppStockService appStockService;// 库存服务
|
||||||
|
private final ITAppStockUpdateService appStockUpdateService;// 库存更新服务
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询库存---分页实现
|
* 查询库存---分页实现
|
||||||
|
|
@ -29,6 +34,9 @@ public class StockControllerServiceImpl implements IStockControllerService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public WmsApiResponse<PageVo<StockVo>> queryStocksByPage(StockQuery stockQuery) {
|
public WmsApiResponse<PageVo<StockVo>> queryStocksByPage(StockQuery stockQuery) {
|
||||||
|
if (stockQuery == null) {
|
||||||
|
return WmsApiResponse.error("查询参数不能为NULL", null);
|
||||||
|
}
|
||||||
Page<TAppStock> page = stockQuery.toMpPage();
|
Page<TAppStock> page = stockQuery.toMpPage();
|
||||||
LambdaQueryWrapper<TAppStock> lambdaQueryWrapper = new LambdaQueryWrapper<TAppStock>()
|
LambdaQueryWrapper<TAppStock> lambdaQueryWrapper = new LambdaQueryWrapper<TAppStock>()
|
||||||
.like(StringUtils.isNotEmpty(stockQuery.getVehicleId()), TAppStock::getVehicleId, stockQuery.getVehicleId())
|
.like(StringUtils.isNotEmpty(stockQuery.getVehicleId()), TAppStock::getVehicleId, stockQuery.getVehicleId())
|
||||||
|
|
@ -48,4 +56,24 @@ public class StockControllerServiceImpl implements IStockControllerService {
|
||||||
PageVo<StockVo> pageVo = PageVo.of(stockPage, StockVo::ofPo);
|
PageVo<StockVo> pageVo = PageVo.of(stockPage, StockVo::ofPo);
|
||||||
return WmsApiResponse.success("查询库存数据成功", pageVo);
|
return WmsApiResponse.success("查询库存数据成功", pageVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库存更新记录(分页)---实现
|
||||||
|
* @param stockUpdateQuery 查询参数
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmsApiResponse<PageVo<StockUpdateVo>> queryStockUpdateByPage(StockUpdateQuery stockUpdateQuery) {
|
||||||
|
if (stockUpdateQuery == null) {
|
||||||
|
return WmsApiResponse.error("查询参数不能为NULL", null);
|
||||||
|
}
|
||||||
|
Page<TAppStockUpdate> page = stockUpdateQuery.toMpPage();
|
||||||
|
LambdaQueryWrapper<TAppStockUpdate> lambdaQueryWrapper = new LambdaQueryWrapper<TAppStockUpdate>()
|
||||||
|
.like(StringUtils.isNotEmpty(stockUpdateQuery.getGoodsId()), TAppStockUpdate::getGoodsId, stockUpdateQuery.getGoodsId())
|
||||||
|
.like(StringUtils.isNotEmpty(stockUpdateQuery.getVehicleId()), TAppStockUpdate::getVehicleId, stockUpdateQuery.getVehicleId());
|
||||||
|
Page<TAppStockUpdate> stockUpdatePage = appStockUpdateService.page(page, lambdaQueryWrapper);
|
||||||
|
|
||||||
|
PageVo<StockUpdateVo> pageVo = PageVo.of(stockUpdatePage, StockUpdateVo::of);
|
||||||
|
return WmsApiResponse.success("查询库存更新记录成功", pageVo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.wms_main.service.controller.serviceImpl;
|
||||||
|
|
||||||
|
import com.wms_main.service.controller.ITaskOperationControllerService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务操作控制类 服务实现
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class TaskOperationControllerServiceImpl implements ITaskOperationControllerService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
package com.wms_main.service.controller.serviceImpl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.wms_main.dao.ITAppTaskService;
|
||||||
|
import com.wms_main.model.dto.query.WmsTaskQuery;
|
||||||
|
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||||
|
import com.wms_main.model.po.TAppTask;
|
||||||
|
import com.wms_main.model.vo.wms.PageVo;
|
||||||
|
import com.wms_main.model.vo.wms.TaskVo;
|
||||||
|
import com.wms_main.repository.utils.StringUtils;
|
||||||
|
import com.wms_main.service.controller.ITaskQueryControllerService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务查询控制类 服务实现
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class TaskQueryControllerServiceImpl implements ITaskQueryControllerService {
|
||||||
|
private final ITAppTaskService appTaskService;// 任务服务
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询wms任务监控---分页
|
||||||
|
* @param wmsTaskQuery 查询参数
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmsApiResponse<PageVo<TaskVo>> queryTasksByPage(WmsTaskQuery wmsTaskQuery) {
|
||||||
|
if (wmsTaskQuery == null) {
|
||||||
|
return WmsApiResponse.error("查询参数不能为NULL", null);
|
||||||
|
}
|
||||||
|
Page<TAppTask> page = wmsTaskQuery.toMpPage();
|
||||||
|
LambdaQueryWrapper<TAppTask> lambdaQueryWrapper = new LambdaQueryWrapper<TAppTask>()
|
||||||
|
.like(StringUtils.isNotEmpty(wmsTaskQuery.getTaskId()), TAppTask::getTaskId, wmsTaskQuery.getTaskId())
|
||||||
|
.like(StringUtils.isNotEmpty(wmsTaskQuery.getGoodsId()), TAppTask::getGoodsId, wmsTaskQuery.getGoodsId())
|
||||||
|
.like(StringUtils.isNotEmpty(wmsTaskQuery.getVehicleId()), TAppTask::getVehicleId, wmsTaskQuery.getVehicleId())
|
||||||
|
.eq(wmsTaskQuery.getTaskType() != null, TAppTask::getTaskType, wmsTaskQuery.getTaskType())
|
||||||
|
.eq(wmsTaskQuery.getTaskStatus() != null, TAppTask::getTaskStatus, wmsTaskQuery.getTaskStatus());
|
||||||
|
Page<TAppTask> tasksPage = appTaskService.page(page, lambdaQueryWrapper);
|
||||||
|
|
||||||
|
PageVo<TaskVo> pageVo = PageVo.of(tasksPage, TaskVo::of);
|
||||||
|
return WmsApiResponse.success("查询任务成功。", pageVo);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user