forked from BaoKaiWms/202501-Wms-Kate-Wuxi
Merge branch 'master' of http://112.4.208.194:3000/BaoKaiWms/202501-Wms-Kate-Wuxi
# Conflicts: # dev_wms_client/src/router/index.js
This commit is contained in:
commit
21bdf4cd31
77
dev_wms_client/package-lock.json
generated
77
dev_wms_client/package-lock.json
generated
|
|
@ -8,9 +8,10 @@
|
|||
"name": "wms",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"axios": "^1.3.3",
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "^2.4.0",
|
||||
"element-plus": "^2.9.8",
|
||||
"file-saver": "^2.0.5",
|
||||
"moment": "^2.29.4",
|
||||
"node-polyfill-webpack-plugin": "^2.0.1",
|
||||
|
|
@ -31,8 +32,8 @@
|
|||
"@vue/cli-plugin-router": "~5.0.0",
|
||||
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"sass": "^1.83.4",
|
||||
"sass-loader": "^16.0.4"
|
||||
"sass": "^1.87.0",
|
||||
"sass-loader": "^16.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@achrinza/node-ipc": {
|
||||
|
|
@ -1736,9 +1737,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@element-plus/icons-vue": {
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.10.tgz",
|
||||
"integrity": "sha512-ygEZ1mwPjcPo/OulhzLE7mtDrQBWI8vZzEWSNB2W/RNCRjoQGwbaK4N8lV4rid7Ts4qvySU3njMN7YCiSlSaTQ==",
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz",
|
||||
"integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==",
|
||||
"peerDependencies": {
|
||||
"vue": "^3.2.0"
|
||||
}
|
||||
|
|
@ -5131,9 +5132,9 @@
|
|||
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
|
||||
},
|
||||
"node_modules/dayjs": {
|
||||
"version": "1.11.7",
|
||||
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.7.tgz",
|
||||
"integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ=="
|
||||
"version": "1.11.13",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",
|
||||
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
|
|
@ -5555,19 +5556,19 @@
|
|||
"integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA=="
|
||||
},
|
||||
"node_modules/element-plus": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.4.0.tgz",
|
||||
"integrity": "sha512-yJEa8LXkGOOgkfkeqMMEdeX/Dc8EH9qPcRuX91dlhSXxgCKKbp9tH3QFTOG99ibZsrN/Em62nh7ddvbc7I1frw==",
|
||||
"version": "2.9.8",
|
||||
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.9.8.tgz",
|
||||
"integrity": "sha512-srViUaUdfblBKGMeuEPiXxxKlH5aUmKqEwmhb/At9Sj91DbU6od/jYN1955cTnzt3wTSA7GfnZF7UiRX9sdRHg==",
|
||||
"dependencies": {
|
||||
"@ctrl/tinycolor": "^3.4.1",
|
||||
"@element-plus/icons-vue": "^2.0.6",
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@floating-ui/dom": "^1.0.1",
|
||||
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
|
||||
"@types/lodash": "^4.14.182",
|
||||
"@types/lodash-es": "^4.17.6",
|
||||
"@vueuse/core": "^9.1.0",
|
||||
"async-validator": "^4.2.5",
|
||||
"dayjs": "^1.11.3",
|
||||
"dayjs": "^1.11.13",
|
||||
"escape-html": "^1.0.3",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
|
|
@ -10142,11 +10143,10 @@
|
|||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.83.4",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.83.4.tgz",
|
||||
"integrity": "sha512-B1bozCeNQiOgDcLd33e2Cs2U60wZwjUUXzh900ZyQF5qUasvMdDZYbQ566LJu7cqR+sAHlAfO6RMkaID5s6qpA==",
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.87.0.tgz",
|
||||
"integrity": "sha512-d0NoFH4v6SjEK7BoX810Jsrhj7IQSYHAHLi/iSpgqKc7LaIDshFRlSg5LOymf9FqQhxEHs2W5ZQXlvy0KD45Uw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chokidar": "^4.0.0",
|
||||
"immutable": "^5.0.2",
|
||||
|
|
@ -10163,11 +10163,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/sass-loader": {
|
||||
"version": "16.0.4",
|
||||
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-16.0.4.tgz",
|
||||
"integrity": "sha512-LavLbgbBGUt3wCiYzhuLLu65+fWXaXLmq7YxivLhEqmiupCFZ5sKUAipK3do6V80YSU0jvSxNhEdT13IXNr3rg==",
|
||||
"version": "16.0.5",
|
||||
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-16.0.5.tgz",
|
||||
"integrity": "sha512-oL+CMBXrj6BZ/zOq4os+UECPL+bWqt6OAC6DWS8Ln8GZRcMDjlJ4JC3FBDuHJdYaFWIdKNIBYmtZtK2MaMkNIw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"neo-async": "^2.6.2"
|
||||
},
|
||||
|
|
@ -13393,9 +13392,9 @@
|
|||
"integrity": "sha512-tlJpwF40DEQcfR/QF+wNMVyGMaO9FQp6Z1Wahj4Gk3CJQYHwA2xVG7iKDFdW6zuxZY9XWOpGcfNCTsX4McOsOg=="
|
||||
},
|
||||
"@element-plus/icons-vue": {
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.10.tgz",
|
||||
"integrity": "sha512-ygEZ1mwPjcPo/OulhzLE7mtDrQBWI8vZzEWSNB2W/RNCRjoQGwbaK4N8lV4rid7Ts4qvySU3njMN7YCiSlSaTQ==",
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz",
|
||||
"integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==",
|
||||
"requires": {}
|
||||
},
|
||||
"@eslint/eslintrc": {
|
||||
|
|
@ -16078,9 +16077,9 @@
|
|||
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
|
||||
},
|
||||
"dayjs": {
|
||||
"version": "1.11.7",
|
||||
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.7.tgz",
|
||||
"integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ=="
|
||||
"version": "1.11.13",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",
|
||||
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.4",
|
||||
|
|
@ -16415,19 +16414,19 @@
|
|||
"integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA=="
|
||||
},
|
||||
"element-plus": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.4.0.tgz",
|
||||
"integrity": "sha512-yJEa8LXkGOOgkfkeqMMEdeX/Dc8EH9qPcRuX91dlhSXxgCKKbp9tH3QFTOG99ibZsrN/Em62nh7ddvbc7I1frw==",
|
||||
"version": "2.9.8",
|
||||
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.9.8.tgz",
|
||||
"integrity": "sha512-srViUaUdfblBKGMeuEPiXxxKlH5aUmKqEwmhb/At9Sj91DbU6od/jYN1955cTnzt3wTSA7GfnZF7UiRX9sdRHg==",
|
||||
"requires": {
|
||||
"@ctrl/tinycolor": "^3.4.1",
|
||||
"@element-plus/icons-vue": "^2.0.6",
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@floating-ui/dom": "^1.0.1",
|
||||
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
|
||||
"@types/lodash": "^4.14.182",
|
||||
"@types/lodash-es": "^4.17.6",
|
||||
"@vueuse/core": "^9.1.0",
|
||||
"async-validator": "^4.2.5",
|
||||
"dayjs": "^1.11.3",
|
||||
"dayjs": "^1.11.13",
|
||||
"escape-html": "^1.0.3",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
|
|
@ -20029,9 +20028,9 @@
|
|||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"sass": {
|
||||
"version": "1.83.4",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.83.4.tgz",
|
||||
"integrity": "sha512-B1bozCeNQiOgDcLd33e2Cs2U60wZwjUUXzh900ZyQF5qUasvMdDZYbQ566LJu7cqR+sAHlAfO6RMkaID5s6qpA==",
|
||||
"version": "1.87.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.87.0.tgz",
|
||||
"integrity": "sha512-d0NoFH4v6SjEK7BoX810Jsrhj7IQSYHAHLi/iSpgqKc7LaIDshFRlSg5LOymf9FqQhxEHs2W5ZQXlvy0KD45Uw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@parcel/watcher": "^2.4.1",
|
||||
|
|
@ -20058,9 +20057,9 @@
|
|||
}
|
||||
},
|
||||
"sass-loader": {
|
||||
"version": "16.0.4",
|
||||
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-16.0.4.tgz",
|
||||
"integrity": "sha512-LavLbgbBGUt3wCiYzhuLLu65+fWXaXLmq7YxivLhEqmiupCFZ5sKUAipK3do6V80YSU0jvSxNhEdT13IXNr3rg==",
|
||||
"version": "16.0.5",
|
||||
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-16.0.5.tgz",
|
||||
"integrity": "sha512-oL+CMBXrj6BZ/zOq4os+UECPL+bWqt6OAC6DWS8Ln8GZRcMDjlJ4JC3FBDuHJdYaFWIdKNIBYmtZtK2MaMkNIw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"neo-async": "^2.6.2"
|
||||
|
|
|
|||
|
|
@ -8,9 +8,10 @@
|
|||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"axios": "^1.3.3",
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "^2.4.0",
|
||||
"element-plus": "^2.9.8",
|
||||
"file-saver": "^2.0.5",
|
||||
"moment": "^2.29.4",
|
||||
"node-polyfill-webpack-plugin": "^2.0.1",
|
||||
|
|
@ -31,8 +32,8 @@
|
|||
"@vue/cli-plugin-router": "~5.0.0",
|
||||
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"sass": "^1.83.4",
|
||||
"sass-loader": "^16.0.4"
|
||||
"sass": "^1.87.0",
|
||||
"sass-loader": "^16.0.5"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
|
|
|
|||
|
|
@ -99,6 +99,15 @@ export const queryKittingBomByPage = (params) => {
|
|||
timeout: 5000
|
||||
})
|
||||
}
|
||||
// 分页查询图纸列表
|
||||
export const queryImagesByPage = (params) => {
|
||||
return request({
|
||||
url: '/kate/queryImagesByPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
timeout: 5000
|
||||
})
|
||||
}
|
||||
// 分页查询对应关系
|
||||
export const queryRelationByPage = (params) => {
|
||||
return request({
|
||||
|
|
@ -162,3 +171,12 @@ export const requestPrintBoxTags = (params) => {
|
|||
timeout: 5000
|
||||
})
|
||||
}
|
||||
// 删除一条dbs计划
|
||||
export const deleteDbsPlan = (params) => {
|
||||
return request({
|
||||
url: '/kate/deleteDbsPlan',
|
||||
method: 'post',
|
||||
data: params,
|
||||
timeout: 5000
|
||||
})
|
||||
}
|
||||
|
|
@ -39,3 +39,27 @@ export const confirmCurrentTask = (params) => {
|
|||
data: params
|
||||
})
|
||||
}
|
||||
// 请求盘点
|
||||
export const requestInventory = (params) => {
|
||||
return request({
|
||||
url: '/task/requestInventory',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 获取盘点信息
|
||||
export const getInventoryConfirm = (params) => {
|
||||
return request({
|
||||
url: '/task/getInventoryConfirm',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 确认盘点信息
|
||||
export const confirmInventory = (params) => {
|
||||
return request({
|
||||
url: '/task/confirmInventory',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
|
@ -1 +1,19 @@
|
|||
import request from "@/http/request";
|
||||
|
||||
// 删除wms任务
|
||||
export const deleteWmsTask = (params) => {
|
||||
return request({
|
||||
url: '/taskOperation/deleteWmsTask',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 更新wms任务
|
||||
export const updateWmsTask = (params) => {
|
||||
return request({
|
||||
url: '/taskOperation/updateWmsTask',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
|
@ -24,3 +24,19 @@ export const queryOutTaskRecordByPage = (params) => {
|
|||
data: params
|
||||
})
|
||||
}
|
||||
// 分页查询拣选任务
|
||||
export const queryPickTasksByPage = (params) => {
|
||||
return request({
|
||||
url: '/taskQuery/queryPickTasksByPage',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 分页查询出库单
|
||||
export const queryOutsByPage = (params) => {
|
||||
return request({
|
||||
url: '/taskQuery/queryOutsByPage',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
|
@ -241,3 +241,26 @@ export const vehicleStatusOptions = [
|
|||
label: '锁定中'
|
||||
}
|
||||
]
|
||||
// 出库单类型枚举
|
||||
export const outTypeOptions = [
|
||||
{
|
||||
value: 1,
|
||||
label: '空箱出库'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '普通出库'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '完整出库'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '入库使用'
|
||||
},
|
||||
{
|
||||
value: 9,
|
||||
label: '紧急出库'
|
||||
}
|
||||
]
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { ref, reactive } from 'vue';
|
||||
import { uploadExcelProduct } from '@/api/excel.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { errorBox } from '@/utils/myMessageBox';
|
||||
import { sizeFormatter } from '@/utils/formatter.js'
|
||||
import { loading } from '@/utils/loading.js'
|
||||
import { getHashString } from '@/utils/hashUtils.js'
|
||||
import {ref, reactive} from 'vue';
|
||||
import {uploadExcelProduct} from '@/api/excel.js'
|
||||
import {errorBox, successBox} from '@/utils/myMessageBox';
|
||||
import {sizeFormatter} from '@/utils/formatter.js'
|
||||
import {loading} from '@/utils/loading.js'
|
||||
import {getHashString} from '@/utils/hashUtils.js'
|
||||
|
||||
var currentHash = ''
|
||||
const file = ref()
|
||||
const uploadForm = reactive({
|
||||
|
|
@ -63,10 +63,7 @@ const uploadProduct = () => {
|
|||
loading.close()
|
||||
currentHash = ''
|
||||
if (res.data.code == 0) {
|
||||
ElMessage({
|
||||
message: '上传成功',
|
||||
type: 'success',
|
||||
})
|
||||
successBox(res.data.message)
|
||||
clearFileInfos()
|
||||
} else {
|
||||
errorBox(res.data.message)
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { ref, reactive } from 'vue';
|
||||
import { uploadExcelSingleProduct } from '@/api/excel.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { errorBox } from '@/utils/myMessageBox';
|
||||
import { sizeFormatter } from '@/utils/formatter.js'
|
||||
import { loading } from '@/utils/loading.js'
|
||||
import { getHashString } from '@/utils/hashUtils.js'
|
||||
import {ref, reactive} from 'vue';
|
||||
import {uploadExcelSingleProduct} from '@/api/excel.js'
|
||||
import {errorBox, successBox} from '@/utils/myMessageBox';
|
||||
import {sizeFormatter} from '@/utils/formatter.js'
|
||||
import {loading} from '@/utils/loading.js'
|
||||
import {getHashString} from '@/utils/hashUtils.js'
|
||||
|
||||
var currentHash = ''
|
||||
const file = ref()
|
||||
const uploadForm = reactive({
|
||||
|
|
@ -63,10 +63,7 @@ const uploadSingleProduct = () => {
|
|||
loading.close()
|
||||
currentHash = ''
|
||||
if (res.data.code == 0) {
|
||||
ElMessage({
|
||||
message: '上传成功',
|
||||
type: 'success',
|
||||
})
|
||||
successBox(res.data.message)
|
||||
clearFileInfos()
|
||||
} else {
|
||||
errorBox(res.data.message)
|
||||
|
|
|
|||
350
dev_wms_client/src/layout/ImageTable.vue
Normal file
350
dev_wms_client/src/layout/ImageTable.vue
Normal file
|
|
@ -0,0 +1,350 @@
|
|||
<template>
|
||||
<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-form-item label="成品类型">
|
||||
<el-select-v2 style="width: 196px" v-model="searchQueryFormEntity.imageType" placeholder="成品类型"
|
||||
:options="addAllOptionOfOptions(kittingBomTypeOptions)"
|
||||
@change="search()" />
|
||||
</el-form-item>
|
||||
<el-form-item label="成品号">
|
||||
<el-input v-model="searchQueryFormEntity.productId" @keyup.enter="search()" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="料盒号">
|
||||
<el-input v-model="searchQueryFormEntity.boxNo" @keyup.enter="search()" clearable/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<div style="align-content: center;">
|
||||
<el-row>
|
||||
<el-button type="primary" class="btn-search" @click="search()">查询</el-button>
|
||||
<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="displayImageList" 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">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.imageId" v-model="imageId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="imageId" label="图纸id" fixed="left" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="imageType" label="成品类型" :formatter="imageTypeFormat" min-width="120px"
|
||||
sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="productId" label="成品号" min-width="120px" sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="boxNo" label="料盒号" min-width="120px" sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="imagePath" label="存放路径" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="imageName" label="图纸名称" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="requestPreview(scope.row)">预览</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<br/>
|
||||
<el-pagination v-model:current-page="baseTableQuery.currentPage"
|
||||
v-model:page-size="baseTableQuery.pageSize" :page-sizes="[10, 25, 50]" :small="false"
|
||||
:disabled="false" :background="false" :default-page-size="10" @size-change="search"
|
||||
@current-change="search" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="baseTableQuery.total"/>
|
||||
</div>
|
||||
<!-- 图片预览 -->
|
||||
<el-image-viewer v-if="showImagePreview" :zoom-rate="1.2" @close="closePreview" :url-list="imgPreviewList">
|
||||
<template #toolbar="{ actions, prev, next, reset, activeIndex, setActiveItem }">
|
||||
<el-icon @click="actions('zoomOut')"><ZoomOut /></el-icon>
|
||||
<el-icon
|
||||
@click="actions('zoomIn', { enableTransition: false, zoomRate: 1.2 })"
|
||||
>
|
||||
<ZoomIn />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
@click="
|
||||
actions('clockwise', { rotateDeg: 180, enableTransition: false })
|
||||
"
|
||||
>
|
||||
<RefreshRight />
|
||||
</el-icon>
|
||||
<el-icon @click="actions('anticlockwise')"><RefreshLeft /></el-icon>
|
||||
<el-icon @click="reset"><Refresh /></el-icon>
|
||||
<el-icon @click="download(activeIndex)"><Download /></el-icon>
|
||||
</template>
|
||||
</el-image-viewer>
|
||||
</div>
|
||||
</el-container>
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import {queryImagesByPage, requestImageDetail} from '@/api/kateWork.js'
|
||||
import {ref, reactive, onMounted, nextTick, onBeforeUnmount} from 'vue'
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {addAllOptionOfOptions, genTableRequest} from '@/utils/generator.js'
|
||||
import {labelPosition} from '@/constant/form.js'
|
||||
import {kittingBomTypeOptions} from '@/constant/options.js'
|
||||
import {loading} from "@/utils/loading";
|
||||
import {
|
||||
Download,
|
||||
Refresh,
|
||||
RefreshLeft,
|
||||
RefreshRight,
|
||||
ZoomIn,
|
||||
ZoomOut,
|
||||
} from '@element-plus/icons-vue'
|
||||
/**
|
||||
* 常量定义
|
||||
*/
|
||||
const STAND_ID = store.getters.getStandId
|
||||
const USER_NAME = store.getters.getUserName
|
||||
/**
|
||||
* 变量定义
|
||||
*/
|
||||
let maxHeight = ref(window.innerHeight * 0.55)
|
||||
let tableLoading = ref(false)
|
||||
let displayImageList = ref([])
|
||||
let baseTableQuery = reactive({
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
sortBy: new Map([['boxNo', true], ['productId', true]]),// 按照成品号顺序排序---多个条件排序时优先级高的放在后面
|
||||
standId: STAND_ID,
|
||||
userName: USER_NAME
|
||||
})
|
||||
let searchQueryFormEntity = reactive({
|
||||
imageType: -99,
|
||||
productId: '',
|
||||
boxNo: ''
|
||||
})
|
||||
let searchQueryFormRef = ref()
|
||||
let imageId = ''
|
||||
let showImagePreview = ref(false)
|
||||
let imgPreviewList = ref([])
|
||||
let selectedImageInfo = reactive({
|
||||
imageId: '',
|
||||
productId: '',
|
||||
boxNo: '',
|
||||
url: '',
|
||||
base64: '',
|
||||
name: ''
|
||||
})
|
||||
/**
|
||||
* 系统方法
|
||||
*/
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
window.addEventListener('resize', resizeHeight)
|
||||
search()
|
||||
})
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
nextTick(() => {
|
||||
window.removeEventListener('resize', resizeHeight)
|
||||
})
|
||||
})
|
||||
const resizeHeight = () => {
|
||||
maxHeight.value = window.innerHeight * 0.55
|
||||
}
|
||||
/**
|
||||
* 自定义方法
|
||||
*/
|
||||
// 查询
|
||||
const search = () => {
|
||||
tableLoading.value = true
|
||||
let request = genTableRequest(baseTableQuery)
|
||||
// 设定查询参数
|
||||
request.imageType = searchQueryFormEntity.imageType === -99 ? null : searchQueryFormEntity.imageType
|
||||
request.productId = searchQueryFormEntity.productId.trim()
|
||||
request.boxNo = searchQueryFormEntity.boxNo.trim()
|
||||
queryImagesByPage(request).then((res) => {
|
||||
const response = res.data
|
||||
if (response.code === 0) {
|
||||
const data = response.data
|
||||
if (data != null) {
|
||||
displayImageList.value = data.lists
|
||||
baseTableQuery.total = data.total
|
||||
} else {
|
||||
displayImageList.value = []
|
||||
baseTableQuery.total = 0
|
||||
}
|
||||
} else {
|
||||
ElMessage.error(response.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('查询数据异常。')
|
||||
}).finally(() => {
|
||||
tableLoading.value = false
|
||||
})
|
||||
}
|
||||
const clearQuery = () => {
|
||||
searchQueryFormEntity.productId = ''
|
||||
searchQueryFormEntity.boxNo = ''
|
||||
}
|
||||
const imageTypeFormat = (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case 1:
|
||||
return '非服务件'
|
||||
case 2:
|
||||
return '服务件'
|
||||
default:
|
||||
return '未知类型'
|
||||
}
|
||||
}
|
||||
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) => {
|
||||
imageId = row.imageId
|
||||
}
|
||||
// 请求预览
|
||||
const requestPreview = (row) => {
|
||||
const request = {
|
||||
imageId: row.imageId,
|
||||
standId: STAND_ID,
|
||||
userName: USER_NAME
|
||||
}
|
||||
loading.open('打开预览中...')
|
||||
requestImageDetail(request).then(res => {
|
||||
const response = res.data
|
||||
if (response.code === 0) {
|
||||
const results = response.data
|
||||
if (results === undefined || results.length !== 1) {
|
||||
ElMessage.error('无图纸或图纸歧义。')
|
||||
return
|
||||
}
|
||||
const image = results[0]
|
||||
openPreview(image)
|
||||
} else {
|
||||
ElMessage.error(response.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('查询异常')
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
}
|
||||
// 打开预览
|
||||
const openPreview = (image) => {
|
||||
selectedImageInfo.imageId = image.imageId
|
||||
selectedImageInfo.productId = image.productId
|
||||
selectedImageInfo.boxNo = image.boxNo
|
||||
selectedImageInfo.url = image.imageIp + image.imagePath + image.imageName
|
||||
selectedImageInfo.base64 = 'data:image/png;base64,' + image.imageDetail
|
||||
selectedImageInfo.name = image.imageName
|
||||
// 打开预览
|
||||
showImagePreview.value = true
|
||||
// 显示图片信息
|
||||
imgPreviewList.value = [selectedImageInfo.base64]
|
||||
}
|
||||
// 关闭预览
|
||||
const closePreview = () => {
|
||||
selectedImageInfo.imageId = ''
|
||||
selectedImageInfo.productId = ''
|
||||
selectedImageInfo.boxNo = ''
|
||||
selectedImageInfo.url = ''
|
||||
selectedImageInfo.base64 = ''
|
||||
selectedImageInfo.name = ''
|
||||
// 打开预览
|
||||
showImagePreview.value = false
|
||||
// 显示图片信息
|
||||
imgPreviewList.value = []
|
||||
}
|
||||
// 下载图片
|
||||
const download = (activeIndex) => {
|
||||
if (imgPreviewList.value.length === 0 || imgPreviewList.value.length < activeIndex - 1) {
|
||||
ElMessage.error('没有下载数据。')
|
||||
return
|
||||
}
|
||||
// 这里是获取到的图片base64编码,这里只是个例子哈,要自行编码图片替换这里才能测试看到效果
|
||||
const imgUrl = imgPreviewList.value[activeIndex]
|
||||
// 只支持新的浏览器
|
||||
const a = document.createElement('a')
|
||||
a.href = imgUrl
|
||||
a.setAttribute('download', selectedImageInfo.name)
|
||||
a.click()
|
||||
}
|
||||
</script>
|
||||
<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-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.btn-search {
|
||||
height: 30px;
|
||||
width: 80px;
|
||||
margin: auto 5px 5px auto;
|
||||
color: black;
|
||||
}
|
||||
</style>
|
||||
287
dev_wms_client/src/layout/OutsMonitor.vue
Normal file
287
dev_wms_client/src/layout/OutsMonitor.vue
Normal file
|
|
@ -0,0 +1,287 @@
|
|||
<template>
|
||||
<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-form-item label="任务类型">
|
||||
<el-select-v2 style="width: 196px" v-model="searchQueryFormEntity.outType" placeholder="任务类型"
|
||||
:options="addAllOptionOfOptions(outTypeOptions)"
|
||||
@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>
|
||||
<div style="align-content: center;">
|
||||
<el-row>
|
||||
<el-button type="primary" class="btn-search" @click="search()">查询</el-button>
|
||||
<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">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.taskId" v-model="taskId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taskId" label="任务号" fixed="left" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="outType" label="任务类型" fixed="left" :formatter="outsTypeFormat" min-width="120px"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" 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="needNum" label="需求数量"
|
||||
min-width="120px" sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="distributeNum" label="已分配数量" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="pickNum" 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="userName" label="用户" min-width="120px"
|
||||
sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="reason" label="原因" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="requestTime" label="请求时间" :formatter="timeFormat" min-width="120px"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip/>
|
||||
<!-- <el-table-column fixed="right" label="操作" width="170px">
|
||||
<template v-slot="scope">
|
||||
<div style="display: inline-block; align-content: center;">
|
||||
<el-button type="primary"
|
||||
@click="editCurrentRowFormEntity(scope.row)">编辑</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<br/>
|
||||
<el-pagination v-model:current-page="baseTableQuery.currentPage"
|
||||
v-model:page-size="baseTableQuery.pageSize" :page-sizes="[10, 25, 50]" :small="false"
|
||||
:disabled="false" :background="false" :default-page-size="10" @size-change="search"
|
||||
@current-change="search" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="baseTableQuery.total"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-container>
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import {queryOutsByPage} from '@/api/taskQuery.js'
|
||||
import {timeFormatter, outTaskTypeFormatter} from '@/utils/formatter.js'
|
||||
import {ref, reactive, onMounted, nextTick, onBeforeUnmount} from 'vue'
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {genTableRequest} from '@/utils/generator.js'
|
||||
import {labelPosition} from '@/constant/form.js'
|
||||
import {outTypeOptions} 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,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
sortBy: new Map([['requestTime', true]]),// 按照成品号顺序排序
|
||||
standId: STAND_ID,
|
||||
userName: USER_NAME
|
||||
})
|
||||
let searchQueryFormEntity = reactive({
|
||||
vehicleId: '',
|
||||
goodsId: '',
|
||||
outType: -99
|
||||
})
|
||||
let searchQueryFormRef = ref()
|
||||
let taskId = ''
|
||||
/**
|
||||
* 系统方法
|
||||
*/
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
window.addEventListener('resize', resizeHeight)
|
||||
search()
|
||||
})
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
nextTick(() => {
|
||||
window.removeEventListener('resize', resizeHeight)
|
||||
})
|
||||
})
|
||||
const resizeHeight = () => {
|
||||
maxHeight.value = window.innerHeight * 0.55
|
||||
}
|
||||
/**
|
||||
* 自定义方法
|
||||
*/
|
||||
// 查询
|
||||
const search = () => {
|
||||
tableLoading.value = true
|
||||
let request = genTableRequest(baseTableQuery)
|
||||
// 设定查询参数
|
||||
request.vehicleId = searchQueryFormEntity.vehicleId.trim()
|
||||
request.goodsId = searchQueryFormEntity.goodsId.trim()
|
||||
request.out = searchQueryFormEntity.outType === -99 ? null : searchQueryFormEntity.outType
|
||||
queryOutsByPage(request).then((res) => {
|
||||
const response = res.data
|
||||
if (response.code === 0) {
|
||||
const data = response.data
|
||||
if (data != null) {
|
||||
tableData.value = data.lists
|
||||
baseTableQuery.total = data.total
|
||||
} else {
|
||||
tableData.value = []
|
||||
baseTableQuery.total = 0
|
||||
}
|
||||
} else {
|
||||
ElMessage.error(response.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('查询数据异常。')
|
||||
}).finally(() => {
|
||||
tableLoading.value = false
|
||||
})
|
||||
}
|
||||
const clearQuery = () => {
|
||||
searchQueryFormEntity.vehicleId = ''
|
||||
searchQueryFormEntity.goodsId = ''
|
||||
}
|
||||
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)
|
||||
}
|
||||
const outsTypeFormat = (row, column, cellValue, index) => {
|
||||
return outTaskTypeFormatter(cellValue)
|
||||
}
|
||||
</script>
|
||||
<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;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.my-autocomplete li {
|
||||
width: 196px;
|
||||
line-height: normal;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.my-autocomplete li .name {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.my-autocomplete li .addr {
|
||||
font-size: 12px;
|
||||
color: #b4b4b4;
|
||||
}
|
||||
|
||||
.my-autocomplete li .highlighted .addr {
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.my-autocomplete li .goods_id {
|
||||
color: brown;
|
||||
}
|
||||
|
||||
.my-autocomplete li .goods_name {
|
||||
color: cornflowerblue;
|
||||
}
|
||||
|
||||
.btn-search {
|
||||
height: 30px;
|
||||
width: 80px;
|
||||
margin: auto 5px 5px auto;
|
||||
color: black;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
@keyup.enter="search()" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="看板状态">
|
||||
<el-select-v2 v-model="kanbanQuery.kanbanStatus" placeholder="看板状态"
|
||||
<el-select-v2 style="width: 196px" v-model="kanbanQuery.kanbanStatus" placeholder="看板状态"
|
||||
:options="addAllOptionOfOptions(kanbanStatusOptions)"
|
||||
@change="search()"></el-select-v2>
|
||||
</el-form-item>
|
||||
|
|
@ -309,10 +309,6 @@ const exportExcel = () => {
|
|||
width: 196px;
|
||||
}
|
||||
|
||||
.el-form-item .el-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
|
|
|
|||
|
|
@ -8,19 +8,19 @@
|
|||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="工单号">
|
||||
<el-input v-model="dbsQueryFormEntity.workOrder" @keyup.enter="search()" clearable />
|
||||
<el-input v-model="dbsQueryFormEntity.workOrder" @keyup.enter="search()" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件号">
|
||||
<el-input v-model="dbsQueryFormEntity.productId" @keyup.enter="search()" clearable />
|
||||
<el-input v-model="dbsQueryFormEntity.productId" @keyup.enter="search()" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select-v2 v-model="dbsQueryFormEntity.dbsStatus" placeholder="工单状态"
|
||||
<el-select-v2 style="width: 196px" v-model="dbsQueryFormEntity.dbsStatus" placeholder="工单状态"
|
||||
:options="addAllOptionOfOptions(dbsStatusOptions)"
|
||||
@change="search()"></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划开工日期">
|
||||
<el-date-picker v-model="dbsQueryFormEntity.planStartDate" type="date"
|
||||
placeholder="计划开工日期" :shortcuts="shortcuts" style="width: 196px;" clearable />
|
||||
placeholder="计划开工日期" :shortcuts="shortcuts" style="width: 196px;" clearable/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<div style="align-content: center;">
|
||||
|
|
@ -30,9 +30,11 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-button style="background-color: #00CED1;" class="btn-search"
|
||||
@click="openUploadDialog()">导入DBS</el-button>
|
||||
@click="openUploadDialog()">导入DBS
|
||||
</el-button>
|
||||
<el-button type="success" class="btn-search"
|
||||
@click="exportExcel()">导出excel</el-button>
|
||||
@click="exportExcel()">导出excel
|
||||
</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -49,53 +51,54 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="productIdOrigin" label="元零件号" fixed="left" min-width="120px"
|
||||
sortable="custom" show-overflow-tooltip />
|
||||
sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="productId" label="零件号" fixed="left" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="testPlanStartDate" label="Test计划开始时间" :formatter="dateFormat"
|
||||
fixed="left" min-width="160px" sortable="custom" show-overflow-tooltip />
|
||||
fixed="left" min-width="160px" sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="testPlanFinishDate" label="Test计划完成时间" :formatter="dateFormat"
|
||||
min-width="160px" sortable="custom" show-overflow-tooltip />
|
||||
min-width="160px" sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="pntPlanStartDate" label="PNT计划开始时间" :formatter="dateFormat"
|
||||
min-width="170px" sortable="custom" show-overflow-tooltip />
|
||||
min-width="170px" sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="pntPlanFinishDate" label="PNT计划完成时间" :formatter="dateFormat"
|
||||
min-width="170px" sortable="custom" show-overflow-tooltip />
|
||||
min-width="170px" sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="planProduction" label="计划产量" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="equipmentName" label="设备名称" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="workShift" label="班次" sortable="custom" min-width="120px"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="family" label="Family" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="testNo" label="Test No#" sortable="custom" min-width="120px"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="dbsStatus" label="状态" :formatter="dbsStatusFormat" fixed="right"
|
||||
min-width="120px" sortable="custom" show-overflow-tooltip />
|
||||
min-width="120px" sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="workStand" label="工作站台" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="realWorkDate" label="实际工作日期" sortable="custom" :formatter="dateFormat"
|
||||
min-width="140px" show-overflow-tooltip />
|
||||
min-width="140px" show-overflow-tooltip/>
|
||||
<el-table-column prop="finishTime" label="完成时间" min-width="120px" :formatter="timeFormat"
|
||||
sortable="custom" show-overflow-tooltip />
|
||||
sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="kittingRemark" label="K料备注" sortable="custom" min-width="120px"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="remark" label="备注" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<!-- <el-table-column fixed="right" label="操作" width="120px">
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRowStock(scope.row)">编辑</el-button>
|
||||
<!-- <el-button plain type="primary" @click="editCurrentRowStock(scope.row)">编辑</el-button>-->
|
||||
<el-button plain type="danger" @click="deleteCurrentRow(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<br />
|
||||
<br/>
|
||||
<el-pagination v-model:current-page="baseTableQuery.currentPage"
|
||||
v-model:page-size="baseTableQuery.pageSize" :page-sizes="[10, 25, 50]" :small="false"
|
||||
:disabled="false" :background="false" :default-page-size="10" @size-change="search"
|
||||
@current-change="search" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="baseTableQuery.total" />
|
||||
:total="baseTableQuery.total"/>
|
||||
</div>
|
||||
<!-- <el-dialog v-model="dialogVisible" title="库存信息" width="40%" draggable :show-close="false">
|
||||
<el-form ref="stockFormRef" :model="stockFormEntity" :label-position="labelPosition"
|
||||
|
|
@ -219,19 +222,23 @@
|
|||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { queryDbsByPage } from '@/api/kateWork.js'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import {queryDbsByPage, deleteDbsPlan} from '@/api/kateWork.js'
|
||||
import {dateFormatter, timeFormatter} from '@/utils/formatter.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { ref, reactive, onMounted, nextTick, onBeforeUnmount } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { genTableRequest, addAllOptionOfOptions } from '@/utils/generator.js'
|
||||
import { labelPosition, shortcuts } from '@/constant/form'
|
||||
import { dbsStatusOptions } from '@/constant/options'
|
||||
import {ref, reactive, onMounted, nextTick, onBeforeUnmount} from 'vue'
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import {genTableRequest, addAllOptionOfOptions} from '@/utils/generator.js'
|
||||
import {labelPosition, shortcuts} from '@/constant/form'
|
||||
import {dbsStatusOptions} from '@/constant/options'
|
||||
import UploadExcelDbs from '@/excel/UploadExcelDbs.vue'
|
||||
import { exportDbsWithExcel } from '@/api/excel'
|
||||
import {exportDbsWithExcel} from '@/api/excel'
|
||||
import {loading} from "@/utils/loading";
|
||||
|
||||
/**
|
||||
* 常量定义
|
||||
*/
|
||||
const USER_NAME = store.getters.getUserName
|
||||
const STAND_ID = store.getters.getStandId
|
||||
/**
|
||||
* 变量定义
|
||||
*/
|
||||
|
|
@ -243,8 +250,8 @@ let baseTableQuery = reactive({
|
|||
pageSize: 10,
|
||||
total: 0,
|
||||
sortBy: new Map([['workOrder', true]]),// 按照工单顺序排序
|
||||
standId: store.getters.getStandId,
|
||||
userName: store.getters.getUserName
|
||||
standId: STAND_ID,
|
||||
userName: USER_NAME
|
||||
})
|
||||
let dbsQueryFormEntity = reactive({
|
||||
workOrder: '',
|
||||
|
|
@ -332,9 +339,9 @@ const dateFormat = (row, column, cellValue, index) => {
|
|||
const timeFormat = (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
}
|
||||
const rowStyle = ({ row, rowIndex }) => {
|
||||
const rowStyle = ({row, rowIndex}) => {
|
||||
if (row.dbsStatus == 2) {
|
||||
return { "color": "green" }
|
||||
return {"color": "green"}
|
||||
}
|
||||
}
|
||||
const handleSortChange = (data) => {
|
||||
|
|
@ -380,48 +387,39 @@ const exportExcel = () => {
|
|||
ElMessage.error('导出失败')
|
||||
})
|
||||
}
|
||||
const editCurrentRowStock = (row) => {
|
||||
this.stockFormEntity = {
|
||||
stockId: row.stockId,
|
||||
locationId: row.locationId,
|
||||
vehicleId: row.vehicleId,
|
||||
stockStatus: row.stockStatus,
|
||||
createTime: row.createTime,
|
||||
lastUpdateTime: row.lastUpdateTime,
|
||||
lastUpdateUser: row.lastUpdateUser,
|
||||
isInventory: row.isInventory,
|
||||
inventoryTaskId: row.inventoryTaskId,
|
||||
noUseDays: row.noUseDays,
|
||||
goodsId: row.goodsId,
|
||||
goodsName: row.goodsName,
|
||||
goodsStatus: row.goodsStatus,
|
||||
remainNum: row.remainNum,
|
||||
totalNum: row.totalNum
|
||||
// 删除当前行dbs
|
||||
const deleteCurrentRow = (row) => {
|
||||
ElMessageBox.confirm(
|
||||
'当前操作涉及删除工单计划。\n是否确认',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
this.dialogVisible = true
|
||||
}
|
||||
const submitStockInfo = () => {
|
||||
).then(() => {
|
||||
const request = {
|
||||
stockId: this.stockFormEntity.stockId,
|
||||
locationId: this.stockFormEntity.locationId,
|
||||
vehicleId: this.stockFormEntity.vehicleId,
|
||||
stockStatus: this.stockFormEntity.stockStatus,
|
||||
goodsId: this.stockFormEntity.goodsId,
|
||||
goodsStatus: this.stockFormEntity.goodsStatus,
|
||||
remainNum: this.stockFormEntity.remainNum,
|
||||
userName: store.getters.getUserName
|
||||
dbsId: row.dbsId,
|
||||
userName: USER_NAME,
|
||||
standId: STAND_ID
|
||||
}
|
||||
updateStockInfo(request).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.dialogVisible = false
|
||||
ElMessage.success('更新库存成功')
|
||||
this.search()
|
||||
loading.open('删除中...')
|
||||
deleteDbsPlan(request).then(res => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
ElMessage.success(response.message)
|
||||
} else {
|
||||
errorBox(res.data.message)
|
||||
ElMessage.error(response.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
errorBox('更新库存失败')
|
||||
ElMessage.error('删除异常')
|
||||
}).finally(() => {
|
||||
search()
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage.info('操作取消')
|
||||
})
|
||||
}
|
||||
const openUploadDialog = () => {
|
||||
|
|
@ -473,10 +471,6 @@ const openUploadDialog = () => {
|
|||
width: 196px;
|
||||
}
|
||||
|
||||
.el-form-item .el-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
|
|
|
|||
|
|
@ -387,10 +387,6 @@ const submitUpdateRow = (rowFormEntity) => {
|
|||
width: 196px;
|
||||
}
|
||||
|
||||
.el-form-item .el-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
|
|
|
|||
|
|
@ -8,35 +8,38 @@
|
|||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="入库类型" prop="emptyTask">
|
||||
<el-select-v2 v-model="inTaskEntity.emptyTask" placeholder="请选择入库类型"
|
||||
<el-select-v2 style="width: 196px" v-model="inTaskEntity.emptyTask" placeholder="请选择入库类型"
|
||||
:options="inTypeOptions"
|
||||
:disabled="taskRequestEntity.vehicleId != ''"></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="箱号" prop="vehicleId">
|
||||
<el-input v-model="inTaskEntity.vehicleId" ref="vehicleId"
|
||||
:disabled="taskRequestEntity.vehicleId != ''" clearable
|
||||
@keyup.enter="handleEnter()" />
|
||||
@keyup.enter="handleEnter()"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="料号">
|
||||
<el-input v-model="inTaskEntity.goodsId" ref="goodsId"
|
||||
:disabled="inTaskEntity.emptyTask" clearable @keyup.enter="handleEnter()" />
|
||||
:disabled="inTaskEntity.emptyTask" clearable @keyup.enter="handleEnter()"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量">
|
||||
<el-input-number v-model.number="inTaskEntity.opNum" ref="opNum"
|
||||
:disabled="inTaskEntity.emptyTask" controls-position="right" :min="1" clearable
|
||||
@keyup.enter="handleEnter()" />
|
||||
@keyup.enter="handleEnter()"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button type="success"
|
||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||
@click="confirmBinding()">绑定物料</el-button>
|
||||
@click="confirmBinding()">绑定物料
|
||||
</el-button>
|
||||
<el-button type="warning"
|
||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||
@click="clearInput()">清除输入</el-button>
|
||||
@click="clearInput()">清除输入
|
||||
</el-button>
|
||||
<el-button type="primary"
|
||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||
@click="openOutForInDialog()">入库料扫码</el-button>
|
||||
@click="openOutForInDialog()">入库料扫码
|
||||
</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
|
|
@ -51,24 +54,26 @@
|
|||
:options="inTypeOptions" disabled></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="箱号">
|
||||
<el-input v-model="taskRequestEntity.vehicleId" disabled />
|
||||
<el-input v-model="taskRequestEntity.vehicleId" disabled/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button type="success" ref="sendTaskRef"
|
||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||
@click="confirmTasks()">下发任务</el-button>
|
||||
@click="confirmTasks()">下发任务
|
||||
</el-button>
|
||||
<el-button type="danger"
|
||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||
@click="cancelBinding()">取消绑定</el-button>
|
||||
@click="cancelBinding()">取消绑定
|
||||
</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-table :data="taskRequestEntity.goodsInfo" stripe border class="table-class" max-height="450px"
|
||||
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }"
|
||||
v-if="taskRequestEntity.goodsInfo.length != 0">
|
||||
<el-table-column prop="goodsId" label="零件号" fixed="left" />
|
||||
<el-table-column prop="opNum" label="数量" />
|
||||
<el-table-column prop="goodsId" label="零件号" fixed="left"/>
|
||||
<el-table-column prop="opNum" label="数量"/>
|
||||
<el-table-column fixed="right" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="warning" @click="removeThisRow(scope.row)">删除</el-button>
|
||||
|
|
@ -85,13 +90,14 @@
|
|||
<el-row>
|
||||
<el-form-item label="料号">
|
||||
<el-input v-model="outForInEntity.goodsId" ref="forInGoodsId" clearable
|
||||
@keyup.enter="addForInGoods()" />
|
||||
@keyup.enter="addForInGoods()"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button type="success"
|
||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||
@click="addForInGoods()">添加物料</el-button>
|
||||
@click="addForInGoods()">添加物料
|
||||
</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
|
|
@ -100,12 +106,13 @@
|
|||
<div style="display: flex; justify-content: space-between;">
|
||||
<el-button type="success"
|
||||
style="height: 50px; width: 100px; margin: auto 5px auto auto; font-size: large; color: black;"
|
||||
@click="confirmCallVehicles()">确认需求</el-button>
|
||||
@click="confirmCallVehicles()">确认需求
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table ref="outForInTableRef" :data="outForInRequestEntity.goodsIds" stripe border
|
||||
class="table-class" max-height="200px" :header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column prop="goodsId" label="料号" fixed="left" />
|
||||
<el-table-column prop="goodsId" label="料号" fixed="left"/>
|
||||
<el-table-column fixed="right" label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="warning" @click="popThisGoodsId(scope.row)">删除</el-button>
|
||||
|
|
@ -121,13 +128,14 @@
|
|||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { requireStockIn, requireVehiclesForIn } from '@/api/task.js'
|
||||
import { errorBox, successBox } from '@/utils/myMessageBox.js'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { nextTick, onMounted, reactive, ref } from 'vue'
|
||||
import { loading } from '@/utils/loading.js'
|
||||
import {requireStockIn, requireVehiclesForIn} from '@/api/task.js'
|
||||
import {errorBox, successBox} from '@/utils/myMessageBox.js'
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import {nextTick, onMounted, reactive, ref} from 'vue'
|
||||
import {loading} from '@/utils/loading.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { labelPosition } from '@/constant/form'
|
||||
import {labelPosition} from '@/constant/form'
|
||||
|
||||
const inTypeOptions = [
|
||||
{
|
||||
label: '空箱入库',
|
||||
|
|
@ -140,10 +148,10 @@ const inTypeOptions = [
|
|||
]
|
||||
const rules = reactive({
|
||||
emptyTask: [
|
||||
{ required: true, message: '请选择入库类型。' }
|
||||
{required: true, message: '请选择入库类型。'}
|
||||
],
|
||||
vehicleId: [
|
||||
{ required: true, message: '请输入箱号。' }
|
||||
{required: true, message: '请输入箱号。'}
|
||||
]
|
||||
})
|
||||
const vehicleId = ref()
|
||||
|
|
@ -173,7 +181,7 @@ let outForInEntity = reactive({
|
|||
})
|
||||
const outForInRules = reactive({
|
||||
goodsId: [
|
||||
{ required: true, message: '请输入料号。' }
|
||||
{required: true, message: '请输入料号。'}
|
||||
]
|
||||
})
|
||||
const forInGoodsId = ref()
|
||||
|
|
@ -196,8 +204,8 @@ const handleEnter = () => {
|
|||
// 改变输入焦点
|
||||
const changeFocus = () => {
|
||||
// 进行大写格式化
|
||||
inTaskEntity.vehicleId = inTaskEntity.vehicleId.toUpperCase()
|
||||
inTaskEntity.goodsId = inTaskEntity.goodsId.toUpperCase()
|
||||
inTaskEntity.vehicleId = inTaskEntity.vehicleId.toUpperCase().trim()
|
||||
inTaskEntity.goodsId = inTaskEntity.goodsId.toUpperCase().trim()
|
||||
if (inTaskEntity.vehicleId == '') {
|
||||
vehicleId.value.focus()
|
||||
return
|
||||
|
|
@ -274,8 +282,35 @@ const clearInput = () => {
|
|||
}
|
||||
// 绑定前确认
|
||||
const confirmBinding = () => {
|
||||
// 进行大写格式化
|
||||
inTaskEntity.vehicleId = inTaskEntity.vehicleId.toUpperCase().trim()
|
||||
inTaskEntity.goodsId = inTaskEntity.goodsId.toUpperCase().trim()
|
||||
// 判断是否是非空箱入库时,未输入料号和数量
|
||||
if (!inTaskEntity.emptyTask && inTaskEntity.goodsId == '') {
|
||||
if (!inTaskEntity.emptyTask && inTaskEntity.goodsId == '' && inTaskEntity.vehicleId != '') {
|
||||
if (inTaskEntity.vehicleId == '') {
|
||||
ElMessage.error("请输入箱号。")
|
||||
vehicleId.value.focus()
|
||||
return
|
||||
}
|
||||
// 进行格式判断
|
||||
if (inTaskEntity.vehicleId != '') {
|
||||
const vehicleArray = inTaskEntity.vehicleId.split('-')
|
||||
if (vehicleArray.length != 2) {
|
||||
errorBox('箱号格式不正确,正确格式为“ASRS-XXXX”。')
|
||||
vehicleId.value.focus()
|
||||
return
|
||||
} else {
|
||||
if (vehicleArray[0] != 'ASRS' || !numberCheck(vehicleArray[1]) || vehicleArray[1].length != 4) {
|
||||
errorBox('箱号格式不正确,正确格式为“ASRS-XXXX”。')
|
||||
vehicleId.value.focus()
|
||||
return
|
||||
} else if (parseInt(vehicleArray[1]) < 1 || parseInt(vehicleArray[1]) > 2200) {
|
||||
errorBox('箱号范围是0001~2200。')
|
||||
vehicleId.value.focus()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
ElMessageBox.confirm(
|
||||
'非空箱入库未输入料号。\n是否继续绑定',
|
||||
'警告',
|
||||
|
|
@ -309,7 +344,7 @@ const addBinding = () => {
|
|||
if (inTaskEntity.goodsId != '' && inTaskEntity.opNum != null && inTaskEntity.opNum > 0) {
|
||||
// 非空入库
|
||||
taskRequestEntity.goodsInfo.push({
|
||||
goodsId: inTaskEntity.goodsId,
|
||||
goodsId: inTaskEntity.goodsId.trim().toUpperCase(),
|
||||
opNum: inTaskEntity.opNum
|
||||
})
|
||||
inTaskEntity.goodsId = ''
|
||||
|
|
@ -318,7 +353,7 @@ const addBinding = () => {
|
|||
}
|
||||
// 添加任务
|
||||
taskRequestEntity.emptyTask = inTaskEntity.emptyTask
|
||||
taskRequestEntity.vehicleId = inTaskEntity.vehicleId
|
||||
taskRequestEntity.vehicleId = inTaskEntity.vehicleId.trim().toUpperCase()
|
||||
} else {
|
||||
if (!taskRequestEntity.emptyTask) {
|
||||
if (inTaskEntity.goodsId == '') {
|
||||
|
|
@ -333,7 +368,7 @@ const addBinding = () => {
|
|||
}
|
||||
// 非空入库
|
||||
taskRequestEntity.goodsInfo.push({
|
||||
goodsId: inTaskEntity.goodsId,
|
||||
goodsId: inTaskEntity.goodsId.trim().toUpperCase(),
|
||||
opNum: inTaskEntity.opNum
|
||||
})
|
||||
inTaskEntity.goodsId = ''
|
||||
|
|
@ -418,6 +453,7 @@ const openOutForInDialog = () => {
|
|||
}
|
||||
// 添加入库料
|
||||
const addForInGoods = () => {
|
||||
outForInEntity.goodsId = outForInEntity.goodsId.trim()
|
||||
if (outForInEntity.goodsId == '') {
|
||||
errorBox('请输入料号。')
|
||||
} else {
|
||||
|
|
@ -478,27 +514,25 @@ const confirmCallVehicles = () => {
|
|||
}
|
||||
|
||||
.main-area {
|
||||
margin: auto;
|
||||
min-height: fit-content;
|
||||
max-height: 90%;
|
||||
margin-bottom: 10px;
|
||||
margin: auto auto 10px;
|
||||
min-width: inherit;
|
||||
border: solid 1px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 15px 10px -15px #000;
|
||||
box-shadow: 0 15px 10px -15px #000;
|
||||
overflow: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.confirm-area {
|
||||
margin: auto;
|
||||
min-height: fit-content;
|
||||
max-height: 90%;
|
||||
margin-bottom: 10px;
|
||||
margin: auto auto 10px;
|
||||
min-width: inherit;
|
||||
border: solid 1px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 15px 10px -15px #000;
|
||||
box-shadow: 0 15px 10px -15px #000;
|
||||
overflow: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
|
@ -511,7 +545,7 @@ const confirmCallVehicles = () => {
|
|||
min-width: inherit;
|
||||
border: solid 1px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 15px 10px -15px #000;
|
||||
box-shadow: 0 15px 10px -15px #000;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,470 +0,0 @@
|
|||
<template>
|
||||
<el-config-provider :locale="zhCn">
|
||||
<el-container class="content">
|
||||
<fieldset class="input-area">
|
||||
<legend style="font-size: 25px;">入库界面</legend>
|
||||
<el-form ref="taskInRequestRef" :model="taskInRequestEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="max-width: 100%" :rules="rules" status-icon>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-form-item label="是否入空托" prop="isEmpty">
|
||||
<el-select-v2 v-model="taskInRequestEntity.isEmpty" placeholder="请选择入库类型"
|
||||
:options="stockTypeOptions"
|
||||
@change="autoCompleteEmptyInfo(taskInRequestEntity)"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-form-item label="箱号" prop="vehicleNo">
|
||||
<el-input v-model="taskInRequestEntity.vehicleNo" ref="vehicleNo" clearable
|
||||
v-on:keyup.tab="detectEndInputVehicleNo(taskInRequestEntity)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-form-item label="零件号" prop="goodsId">
|
||||
<el-input v-model="taskInRequestEntity.goodsId" ref="goodsId" clearable
|
||||
:disabled="disabledEmpty" @blur="queryAndAutoComplete(taskInRequestEntity)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-form-item label="零件名称" prop="goodsName">
|
||||
<el-input v-model="taskInRequestEntity.goodsName" clearable :disabled="disabledEmpty" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-form-item label="零件数量" prop="goodsNum">
|
||||
<el-input-number v-model.number="taskInRequestEntity.goodsNum" ref="goodsNum" clearable
|
||||
:disabled="disabledEmpty" controls-position="right" :min="1"
|
||||
@blur="detectEndInputNum(taskInRequestEntity)"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-form-item label="零件重量(千克)" prop="weight">
|
||||
<el-input v-model="taskInRequestEntity.weight" clearable :disabled="disabledEmpty" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1" v-show="disPlayDateFlag">
|
||||
<el-form-item label="有效期(年)" prop="shelfLife">
|
||||
<!-- // TODO 日期 -->
|
||||
<el-input v-model="taskInRequestEntity.shelfLife" clearable :disabled="disabledEmpty" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1" v-show="disPlayDateFlag">
|
||||
<el-form-item label="生产日期" prop="productionDate">
|
||||
<el-date-picker v-model="taskInRequestEntity.productionDate" ref="productionDate"
|
||||
:disabled="disabledEmpty" style="width: 100%;height: 75px;" type="date"
|
||||
placeholder="请选择生产日期" :editable="false" size="large" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item>
|
||||
<el-button type="primary" round
|
||||
@click="addTempTasks(taskInRequestRef, taskInRequestEntity)">绑定信息</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item>
|
||||
<el-button type="warning" round
|
||||
@click="callEmptyVehicles(taskInRequestEntity)">请求空箱</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</fieldset>
|
||||
<div ref="btnArea"></div>
|
||||
<fieldset class="display-area">
|
||||
<legend style="font-size: 25px;">
|
||||
入库暂存信息
|
||||
</legend>
|
||||
<el-table :data="tempTasks" stripe border class="table-class" max-height="684px"
|
||||
:header-cell-style="{ 'text-align': 'center', 'height': '100px' }"
|
||||
:cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column prop="vehicleNo" label="箱号" fixed="left" min-width="1rem" />
|
||||
<el-table-column prop="goodsId" label="零件号" fixed="left" min-width="1rem" />
|
||||
<el-table-column prop="goodsNum" label="数量" min-width="1rem" />
|
||||
<el-table-column prop="goodsName" label="零件名称" min-width="1rem" />
|
||||
<el-table-column prop="weight" label="重量" min-width="1rem" />
|
||||
<el-table-column fixed="right" label="操作" min-width="1rem">
|
||||
<template #default>
|
||||
<el-button style="width: 1rem;" plain type="primary"
|
||||
@click="deleteRowTask(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<br />
|
||||
<el-row :gutter="4">
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-button type="success" round
|
||||
@click="submitGoodsInTask(taskInRequestEntity)">下发任务</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</fieldset>
|
||||
</el-container>
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { sendGoodsInTask, callEmptyVehicle } from '@/api/task'
|
||||
import { queryPartInfoByPartNo } from '@/api/goods'
|
||||
import { reactive, ref } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { errorBox } from '@/utils/myMessageBox.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import UploadExcelPart from '@/excel/UploadExcelPart.vue'
|
||||
const taskInRequestRef = ref()
|
||||
const taskInRequestEntity = reactive({
|
||||
vehicleNo: '',// 载具号
|
||||
goodsId: '',// 零件号
|
||||
goodsName: '',// 零件名称
|
||||
goodsNum: 1,// 零件数量
|
||||
weight: 0,// 零件重量
|
||||
shelfLife: 0,// 有效期
|
||||
productionDate: '',// 生产日期
|
||||
isEmpty: '1',
|
||||
userName: store.getters.getUserName// 用户名
|
||||
})
|
||||
const rules = reactive({
|
||||
vehicleNo: [
|
||||
{ required: true, message: '请输入载具编号' }
|
||||
],
|
||||
goodsId: [
|
||||
{ required: true, message: '请输入物料编号' }
|
||||
],
|
||||
goodsNum: [
|
||||
{ required: true, message: '请输入数量' },
|
||||
{ type: 'number', message: '请输入数字' }
|
||||
]
|
||||
})
|
||||
const labelPosition = "top"
|
||||
const displayWidth = window.screen.width
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'goodsInPda',
|
||||
components: {
|
||||
UploadExcelPart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempTasks: [],
|
||||
tempVehicleNo: '',
|
||||
disPlayDateFlag: false,
|
||||
currentPartInfo: {},
|
||||
stockTypeOptions: [
|
||||
{
|
||||
value: '0',
|
||||
label: '空箱入库'
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
label: '带料入库'
|
||||
}
|
||||
],
|
||||
disabledEmpty: false,
|
||||
totalWeight: 0,
|
||||
isOverWeight: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.vehicleNo.focus()
|
||||
},
|
||||
methods: {
|
||||
// 查询
|
||||
queryAndAutoComplete(taskInRequestEntity) {
|
||||
this.loading = true
|
||||
const param = { material: taskInRequestEntity.goodsId }
|
||||
queryPartInfoByPartNo(param).then(res => {
|
||||
console.log(res)
|
||||
if (res.data.code == 0) {
|
||||
this.currentPartInfo = res.data.returnData
|
||||
taskInRequestEntity.goodsName = this.currentPartInfo.itemDesc
|
||||
this.calWeight(taskInRequestEntity)
|
||||
if (this.currentPartInfo.SLED > 0) {// 判断生产日期区域显示与否
|
||||
this.disPlayDateFlag = true
|
||||
taskInRequestEntity.shelfLife = this.currentPartInfo.SLED
|
||||
} else {
|
||||
this.disPlayDateFlag = false
|
||||
taskInRequestEntity.shelfLife = 0
|
||||
taskInRequestEntity.productionDate = ''
|
||||
}
|
||||
taskInRequestEntity.goodsNum = ''
|
||||
this.$refs.goodsNum.focus()
|
||||
} else {
|
||||
taskInRequestEntity.goodsName = ''
|
||||
taskInRequestEntity.goodsNum = ''
|
||||
taskInRequestEntity.weight = 0
|
||||
this.disPlayDateFlag = false
|
||||
taskInRequestEntity.shelfLife = 0
|
||||
taskInRequestEntity.productionDate = ''
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
taskInRequestEntity.goodsName = ''
|
||||
taskInRequestEntity.goodsNum = ''
|
||||
taskInRequestEntity.weight = 0
|
||||
this.disPlayDateFlag = false
|
||||
taskInRequestEntity.shelfLife = 0
|
||||
taskInRequestEntity.productionDate = ''
|
||||
ElMessage.error('查询物料信息错误' + err.message)
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
calWeight(taskInRequestEntity) {
|
||||
taskInRequestEntity.weight = this.currentPartInfo.partWeight * taskInRequestEntity.goodsNum
|
||||
this.totalWeight = this.totalWeight + taskInRequestEntity.weight
|
||||
if (this.totalWeight > 30) {
|
||||
this.isOverWeight = true
|
||||
ElMessage({
|
||||
message: '箱子重量超过30kg',
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
},
|
||||
autoCompleteEmptyInfo(taskInRequestEntity) {// 自动补全空托入库信息
|
||||
if (taskInRequestEntity.isEmpty == '0') {// 空托入库
|
||||
taskInRequestEntity.goodsId = '000000000'
|
||||
taskInRequestEntity.batchNo = '000000000'
|
||||
taskInRequestEntity.goodsNum = 1
|
||||
taskInRequestEntity.weight = 0
|
||||
taskInRequestEntity.shelfLife = 0
|
||||
taskInRequestEntity.productionDate = ''
|
||||
taskInRequestEntity.goodsName = '空箱'
|
||||
this.currentPartInfo = {}
|
||||
this.disabledEmpty = true
|
||||
this.disPlayDateFlag = false
|
||||
} else {
|
||||
taskInRequestEntity.goodsId = ''
|
||||
taskInRequestEntity.batchNo = ''
|
||||
taskInRequestEntity.goodsNum = 1
|
||||
this.disabledEmpty = false
|
||||
}
|
||||
this.$refs.vehicleNo.focus()
|
||||
|
||||
},
|
||||
addTempTasks(formEl, formData) {// 生成入库任务
|
||||
if (!formEl) return
|
||||
formEl.validate((valid) => {
|
||||
if (!valid) {
|
||||
ElMessage({
|
||||
message: '请输入必须的入库信息!',
|
||||
type: 'warning',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.tempVehicleNo !== '' && this.tempVehicleNo !== formData.vehicleNo) {
|
||||
ElMessage({
|
||||
message: '载具编号不一致,请确认后重新输入!',
|
||||
type: 'warning',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.tempVehicleNo != '' && formData.isEmpty == '0') {
|
||||
ElMessage({
|
||||
message: '此箱子已经绑定过,请下发。',
|
||||
type: 'warning',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.isOverWeight) {
|
||||
ElMessage({
|
||||
message: '已超重,不可继续绑定,请移除此物料,并下发任务',
|
||||
type: 'error',
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
this.tempVehicleNo = formData.vehicleNo
|
||||
formData.userName = store.getters.getUserName
|
||||
const sameIndex = this.tempTasks.findIndex(task => task.goodsId == formData.goodsId)
|
||||
if (sameIndex != -1) {// 绑定过相同物料
|
||||
var sameGoods = this.tempTasks[sameIndex]
|
||||
sameGoods.goodsNum = sameGoods.goodsNum + formData.goodsNum
|
||||
sameGoods.weight = sameGoods.weight + formData.weight
|
||||
} else {
|
||||
this.tempTasks.push(Object.assign({}, formData))
|
||||
}
|
||||
this.resetFields(formData)
|
||||
formData.vehicleNo = this.tempVehicleNo
|
||||
ElMessage({
|
||||
message: '绑定成功!',
|
||||
type: 'success',
|
||||
})
|
||||
})
|
||||
},
|
||||
submitGoodsInTask(taskInRequestEntity) {// 下发入库任务
|
||||
if (this.tempTasks.length == 0) {
|
||||
ElMessage.error("未绑定任何信息")
|
||||
}
|
||||
sendGoodsInTask(this.tempTasks).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.tempTasks = []
|
||||
this.tempVehicleNo = ''
|
||||
this.resetFields(taskInRequestEntity)
|
||||
this.totalWeight = 0
|
||||
this.isOverWeight = false
|
||||
ElMessage({
|
||||
message: '下发任务成功,剩余库位可用数量: ' + res.data.returnData,
|
||||
type: 'success'
|
||||
})
|
||||
this.$refs.vehicleNo.focus()
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('创建入库任务错误!' + err.message)
|
||||
})
|
||||
},
|
||||
resetFields(taskInRequestEntity) {
|
||||
taskInRequestEntity.vehicleNo = ''
|
||||
if (taskInRequestEntity.isEmpty != '0') {// 不是空托入库
|
||||
taskInRequestEntity.goodsId = ''
|
||||
taskInRequestEntity.goodsName = ''
|
||||
taskInRequestEntity.goodsNum = 1
|
||||
taskInRequestEntity.weight = 0
|
||||
taskInRequestEntity.shelfLife = 0
|
||||
taskInRequestEntity.productionDate = ''
|
||||
}
|
||||
this.disPlayDateFlag = false
|
||||
this.currentPartInfo = {}
|
||||
},
|
||||
callEmptyVehicles(taskInRequestEntity) {
|
||||
callEmptyVehicle(taskInRequestEntity).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
ElMessage({
|
||||
message: res.data.message,
|
||||
type: 'success'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('呼叫空箱错误' + err.message)
|
||||
})
|
||||
},
|
||||
deleteRowTask(row) {// 删除当前行的入库任务
|
||||
this.tempTasks.splice(this.tempTasks.indexOf(row), 1)
|
||||
if (this.tempTasks.length == 0) {
|
||||
this.tempVehicleNo = ''
|
||||
}
|
||||
},
|
||||
detectEndInputVehicleNo(taskInRequestEntity) {
|
||||
if (taskInRequestEntity.isEmpty == '0') {// 空托入库
|
||||
this.$refs.btnArea.scrollIntoView();
|
||||
// this.$refs.vehicleNo.blur()
|
||||
} else {
|
||||
this.$refs.goodsId.focus()
|
||||
}
|
||||
},
|
||||
detectEndInputNum(taskInRequestEntity) {
|
||||
this.calWeight(taskInRequestEntity)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: v-bind(displayWidth);
|
||||
}
|
||||
|
||||
.el-row {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
font-size: 25px;
|
||||
/* margin: 10px; */
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
:deep(.el-select-v2__placeholder) {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
:deep(.el-select-v2__wrapper) {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
:deep(.el-form-item .el-input) {
|
||||
height: 80px;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
:deep(.el-form-item .el-input-number) {
|
||||
height: 80px;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
:deep(.el-table .cell) {
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
.el-row .el-form-item {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-row .el-form-item .el-select {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.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 {
|
||||
width: 180px;
|
||||
height: 60px;
|
||||
margin: auto;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.input-area {
|
||||
margin: 10px;
|
||||
width: v-bind(displayWidth) - 20px;
|
||||
/* height: 730px; */
|
||||
border: solid 1px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 15px 10px -15px #000;
|
||||
}
|
||||
|
||||
.display-area {
|
||||
margin: 10px;
|
||||
width: v-bind(displayWidth) - 20px;
|
||||
/* height: auto; */
|
||||
border: solid 1px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 15px 10px -15px #000;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
width: 100%;
|
||||
font-size: 1rem;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
<div style="display: flex; justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="出库类型" prop="outType">
|
||||
<el-select-v2 v-model="outTaskEntity.outType" placeholder="请选择入库类型"
|
||||
<el-select-v2 style="width: 196px" v-model="outTaskEntity.outType" placeholder="请选择入库类型"
|
||||
:options="outTypeOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="料号" prop="goodsId">
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
controls-position="right" :min="1" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="原因" prop="reason" v-if="outTaskEntity.outType == 9">
|
||||
<el-select-v2 v-model="outTaskEntity.reason" placeholder="请选择紧急出库原因"
|
||||
<el-select-v2 style="width: 196px" v-model="outTaskEntity.reason" placeholder="请选择紧急出库原因"
|
||||
:options="resonOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ const findImage = () => {
|
|||
}
|
||||
getImageOfWork(request).then(res => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
if (response.code === 0) {
|
||||
const image = response.data
|
||||
openPreview(image)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,95 +0,0 @@
|
|||
<template>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-input v-model="productIdQuery" style="width: 196px; margin-right: 10px;" placeholder="成品号" />
|
||||
<el-input v-model="boxNoQuery" style="width: 196px; margin-right: 10px;" placeholder="料盒号" />
|
||||
<el-button type="primary" @click="init()">搜索</el-button>
|
||||
<!-- <el-button type="warning" @click="reset()">重置</el-button> -->
|
||||
</el-row>
|
||||
</div>
|
||||
<el-table :data="datalist" stripe border v-loading="loading" class="table-class" max-height="550px"
|
||||
highlight-current-row :header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }">
|
||||
<el-table-column prop="productId" label="成品号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="boxNo" label="料盒号" fixed="left" min-width="120px"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="openPreview(scope.row)">预览</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 图片预览 -->
|
||||
<el-image-viewer v-if="showImagePreview" :zoom-rate="1.2" @close="closePreview" :url-list="imgPreviewList" />
|
||||
</template>
|
||||
<script setup>
|
||||
import axios from 'axios'
|
||||
// import store from '@/store'
|
||||
import { errorBox } from '@/utils/myMessageBox.js'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: 'imageTable',
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
datalist: [],
|
||||
showImagePreview: false,
|
||||
imgPreviewList: [],
|
||||
currentBase64FileData: {
|
||||
url: '',
|
||||
base64: '',
|
||||
name: ''
|
||||
},
|
||||
request: axios.create({
|
||||
baseURL: 'https://s4wwjasrsp01.ap.cat.com/wmsServer/test',
|
||||
timeout: 10000
|
||||
}),
|
||||
productIdQuery: '',
|
||||
boxNoQuery: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.loading = true
|
||||
const request = {
|
||||
productId: this.productIdQuery,
|
||||
boxNo: this.boxNoQuery,
|
||||
// userName: store.getters.getUserName
|
||||
}
|
||||
this.request({
|
||||
url: '/testRequestImage',
|
||||
method: 'post',
|
||||
data: request
|
||||
}).then(res => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
this.datalist = response.data
|
||||
} else {
|
||||
errorBox(response.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
errorBox('查询错误')
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
openPreview(row) {
|
||||
this.currentBase64FileData.url = 'http://localhost:12315/image/' + row.imageName
|
||||
this.currentBase64FileData.base64 = 'data:image/png;base64,' + row.imageDetail
|
||||
this.currentBase64FileData.name = row.imageName
|
||||
this.showImagePreview = true
|
||||
// 下面数组里可以放一个url,如'https://raw.githubusercontent.com/JACK-ZHANG-coming/map-depot/master/2023image-20231120091054028.png',我这里放的是一个base64数据,也可以用来显示图片
|
||||
this.imgPreviewList = [this.currentBase64FileData.base64]
|
||||
// this.imgPreviewList = [this.currentBase64FileData.url]
|
||||
},
|
||||
closePreview() {
|
||||
this.imgPreviewList = []
|
||||
this.showImagePreview = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
|
@ -296,10 +296,6 @@ const exportExcel = () => {
|
|||
width: 196px;
|
||||
}
|
||||
|
||||
.el-form-item .el-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
|
|
|
|||
|
|
@ -2,80 +2,60 @@
|
|||
<el-config-provider :locale="zhCn">
|
||||
<el-container class="content">
|
||||
<div class="work-area">
|
||||
<fieldset class="title-area">
|
||||
<legend>
|
||||
工作台
|
||||
</legend>
|
||||
<div class="title-div">
|
||||
<span class="title-text">物料盘点</span>
|
||||
</div>
|
||||
<div class="station-div">
|
||||
<span class="station-text">工作站:</span>
|
||||
</div>
|
||||
<div class="station-no-div">
|
||||
<span class="station-no-text">{{ standId }}</span>
|
||||
<fieldset class="search-area">
|
||||
<el-form ref="inventoryRequestFormRef" :model="inventoryRequestFormEntity" :label-position="labelPosition"
|
||||
label-width="158px"
|
||||
style="max-width: 100%" :rules="requestRules" status-icon>
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="料号" prop="goodsId">
|
||||
<el-input v-model="inventoryRequestFormEntity.goodsId" ref="goodsId" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="箱号" prop="vehicleId">
|
||||
<el-input v-model="inventoryRequestFormEntity.vehicleId" ref="vehicleId" clearable/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button type="primary"
|
||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||
@click="sendInventoryRequest()">下发盘点
|
||||
</el-button>
|
||||
<el-button type="warning"
|
||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||
@click="clearInput()">清除输入
|
||||
</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
</fieldset>
|
||||
<fieldset class="main-area">
|
||||
<legend>
|
||||
物料盘点
|
||||
</legend>
|
||||
<el-form ref="workFormRef" :model="workFormEntity" :label-position="labelPosition"
|
||||
label-width="150px" style="max-width: 100%" :rules="rules" status-icon>
|
||||
<div style="display: flex;">
|
||||
<div style="display: block; margin: 5px;">
|
||||
<!-- <div
|
||||
style="display: inline-flex; justify-content: center; height: 60px; width: 655px; margin: 5px; padding: 5px;">
|
||||
<UploadExcelPart></UploadExcelPart>
|
||||
</div> -->
|
||||
<div style="height: 50px; margin-bottom: 20px"><UploadExcelInventoryList></UploadExcelInventoryList></div>
|
||||
<div
|
||||
style="display: inline-flex; justify-content: center; height: 40px; width: 655px; margin: 5px; padding: 5px; background-color: #00AAE8;">
|
||||
<span style="align-self: center; font-weight: bold;font-size: 25px;">
|
||||
{{ workFormEntity.tip }}
|
||||
</span>
|
||||
</div>
|
||||
<div style="display: flex;">
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<div class="display-title-div">
|
||||
<span class="display-title-text">料号</span>
|
||||
</div>
|
||||
<div class="display-form-div">
|
||||
<el-input v-model="workFormEntity.goodsId" size="default" ref="goodsId"
|
||||
v-on:keyup.enter="getCurrentWorkInfo()" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<div class="display-title-div">
|
||||
<span class="display-title-text">箱号</span>
|
||||
</div>
|
||||
<div class="display-form-div">
|
||||
<el-input v-model="workFormEntity.vehicleId" size="default" ref="vehicleId"
|
||||
v-on:keyup.enter="getCurrentWorkInfo()" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<div class="display-title-div">
|
||||
<span class="display-title-text">实物数量</span>
|
||||
</div>
|
||||
<div style="display: flex; margin-top: 20px;">
|
||||
<div class="display-form-div-left">
|
||||
<el-input-number v-model.number="workFormEntity.realNum" ref="realNum"
|
||||
controls-position="right" :min="0" />
|
||||
</div>
|
||||
<div class="display-form-div-right">
|
||||
<span class="display-form-text-right">PC</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 10px;">
|
||||
<div class="arrow" @click="confirmTask()">
|
||||
<span
|
||||
style="margin-left: 25px; align-self: center; font-weight: bold;font-size: 45px; writing-mode: vertical-lr;">完成确认</span>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="confirm-area">
|
||||
<el-form ref="confirmRef" :model="confirmEntity" :label-position="labelPosition" label-width="158px"
|
||||
style="max-width: 100%" :rules="confirmRules" status-icon>
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="盘点任务号" prop="inventoryId">
|
||||
<el-input v-model="confirmEntity.inventoryId" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料号" prop="goodsId">
|
||||
<el-input v-model="confirmEntity.goodsId" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="箱号" prop="vehicleId">
|
||||
<el-input v-model="confirmEntity.vehicleId" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="系统数量" prop="stockNum">
|
||||
<el-input v-model="confirmEntity.stockNum" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认数量" prop="confirmNum">
|
||||
<el-input-number v-model.number="confirmEntity.confirmNum"
|
||||
controls-position="right" :min="0" clearable/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button type="success"
|
||||
style="height: 50px; width: 100px; margin: auto 5px auto 5px; font-size: large; color: black;"
|
||||
@click="confirmOrRelease()">确认/放行
|
||||
</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
</fieldset>
|
||||
|
|
@ -86,148 +66,163 @@
|
|||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getWorkByStandAndGoods, confirmFinishWork, queryFinishByStandAndGoods } from '@/api/task'
|
||||
import { reactive, ref } from 'vue'
|
||||
import { errorBox } from '@/utils/myMessageBox.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import UploadExcelInventoryList from '@/excel/UploadExcelProduct.vue'
|
||||
import {nextTick, onBeforeUnmount, onMounted, reactive, ref, watch} from 'vue'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
</script>
|
||||
import {useRoute} from "vue-router";
|
||||
import {errorBox, warningBox} from "@/utils/myMessageBox";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {confirmInventory, getInventoryConfirm, requestInventory} from "@/api/task";
|
||||
import {labelPosition} from "@/constant/form";
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'inventory',
|
||||
data() {
|
||||
return {
|
||||
standId: store.getters.getStandId,
|
||||
timer: '',
|
||||
labelPosition: 'top',
|
||||
workFormRef: ref(),
|
||||
workFormEntity: reactive({
|
||||
const STAND_ID = store.getters.getStandId
|
||||
const USER_NAME = store.getters.getUserName
|
||||
let timer = ref()
|
||||
const route = useRoute()// 路由
|
||||
let inventoryRequestFormRef = ref()
|
||||
let inventoryRequestFormEntity = reactive({
|
||||
goodsId: '',
|
||||
planPickNum: 0,
|
||||
remainNumOrigin: null,
|
||||
remainNumReal: null,
|
||||
remark: '',
|
||||
finishedRows: 0,
|
||||
totalRows: 0,
|
||||
finishedCounts: 0,
|
||||
totalCounts: 0,
|
||||
tip: ''
|
||||
}),
|
||||
rules: reactive({
|
||||
goodsId: [
|
||||
{ required: true, message: '请输入料号' }
|
||||
]
|
||||
}),
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.goodsId.focus()
|
||||
this.timer = setInterval(() => {
|
||||
this.queryFinish()
|
||||
}, 2000)
|
||||
},
|
||||
beforeUnmount() {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
// 获取当前工作信息
|
||||
getCurrentWorkInfo() {
|
||||
const request = {
|
||||
standId: this.standId,
|
||||
goodsId: this.workFormEntity.goodsId
|
||||
}
|
||||
getWorkByStandAndGoods(request).then(res => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
this.workFormEntity.goodsId = response.returnData.goodsId
|
||||
this.workFormEntity.planPickNum = response.returnData.planPickNum
|
||||
this.workFormEntity.remainNumOrigin = response.returnData.remainNumOrigin
|
||||
this.workFormEntity.remainNumReal = response.returnData.remainNumReal
|
||||
this.workFormEntity.remark = response.returnData.remark
|
||||
this.workFormEntity.finishedRows = response.returnData.finishedRows
|
||||
this.workFormEntity.totalRows = response.returnData.totalRows
|
||||
this.workFormEntity.finishedCounts = response.returnData.finishedCounts
|
||||
this.workFormEntity.totalCounts = response.returnData.totalCounts
|
||||
this.workFormEntity.tip = response.returnData.tip
|
||||
vehicleId: ''
|
||||
})
|
||||
const requestRules = reactive({})
|
||||
let confirmRef = ref()
|
||||
let confirmEntity = reactive({
|
||||
inventoryId: '',
|
||||
vehicleId: '',
|
||||
goodsId: '',
|
||||
stockNum: null,
|
||||
confirmNum: null
|
||||
})
|
||||
const confirmRules = reactive({})
|
||||
let pauseGetPickFlag = ref(false)
|
||||
// 系统
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
timer.value = setInterval(() => {
|
||||
timerTask_1()
|
||||
}, 1000)
|
||||
})
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
clearInterval(timer.value)
|
||||
})
|
||||
// 监视路由
|
||||
watch(() => route.path, (newVal, oldVal) => {
|
||||
if (newVal === '/inventory') {
|
||||
timer.value = setInterval(() => {
|
||||
timerTask_1()
|
||||
}, 1000)
|
||||
} else {
|
||||
this.resetForms()
|
||||
errorBox(response.message)
|
||||
clearInterval(timer.value)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
this.resetForms()
|
||||
errorBox('查询工作信息错误')
|
||||
})
|
||||
},
|
||||
// 查询是否完成
|
||||
queryFinish() {
|
||||
if (this.workFormEntity.goodsId == '') {
|
||||
})
|
||||
// 定时器任务1
|
||||
const timerTask_1 = () => {
|
||||
// 查询盘点列表
|
||||
getInventory()
|
||||
}
|
||||
// 查询盘点信息
|
||||
const getInventory = () => {
|
||||
if (pauseGetPickFlag.value) {
|
||||
return
|
||||
}
|
||||
const request = {
|
||||
standId: this.standId,
|
||||
goodsId: this.workFormEntity.goodsId
|
||||
standId: STAND_ID,
|
||||
userName: USER_NAME
|
||||
}
|
||||
queryFinishByStandAndGoods(request).then(res => {
|
||||
// 获取当前拣选信息
|
||||
getInventoryConfirm(request).then(res => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
if (response.returnData != null) {
|
||||
this.workFormEntity.tip = response.returnData.tip
|
||||
}
|
||||
this.resetForms()
|
||||
ElMessage.success(response.message)
|
||||
const confirmVo = response.data
|
||||
// 设置form
|
||||
confirmEntity.inventoryId = confirmVo.inventoryId
|
||||
confirmEntity.goodsId = confirmVo.goodsId
|
||||
confirmEntity.vehicleId = confirmVo.vehicleId
|
||||
confirmEntity.stockNum = confirmVo.stockNum
|
||||
confirmEntity.confirmNum = confirmVo.confirmNum
|
||||
pauseGetPickFlag.value= true
|
||||
} else if (response.code == 400) {
|
||||
// 警告,弹框
|
||||
pauseGetPickFlag.value = true
|
||||
warningBox(response.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
pauseGetPickFlag.value = true
|
||||
errorBox('请求错误,请检查完原因后刷新界面。')
|
||||
})
|
||||
},
|
||||
// 重置参数
|
||||
resetForms() {
|
||||
this.workFormEntity = reactive({
|
||||
goodsId: '',
|
||||
planPickNum: 0,
|
||||
remainNumOrigin: null,
|
||||
remainNumReal: null,
|
||||
remark: '',
|
||||
finishedRows: 0,
|
||||
totalRows: 0,
|
||||
finishedCounts: 0,
|
||||
totalCounts: 0,
|
||||
tip: ''
|
||||
})
|
||||
this.$refs.goodsId.focus()
|
||||
},
|
||||
// 确认完成工作
|
||||
confirmTask() {
|
||||
if (this.standId == '' || this.workFormEntity.goodsId == '') {
|
||||
errorBox('站台号和料号不可缺少')
|
||||
}
|
||||
// 下发盘点任务
|
||||
const sendInventoryRequest = () => {
|
||||
inventoryRequestFormEntity.goodsId = inventoryRequestFormEntity.goodsId.trim().toUpperCase()
|
||||
inventoryRequestFormEntity.vehicleId = inventoryRequestFormEntity.vehicleId.trim().toUpperCase()
|
||||
if (inventoryRequestFormEntity.goodsId == '') {
|
||||
ElMessage.error("料号为必须项。")
|
||||
return
|
||||
}
|
||||
const confirmParams = {
|
||||
standId: this.standId,
|
||||
goodsId: this.workFormEntity.goodsId,
|
||||
remainNumOrigin: this.workFormEntity.remainNumOrigin,
|
||||
remainNumReal: this.workFormEntity.remainNumReal
|
||||
const request = {
|
||||
goodsId: inventoryRequestFormEntity.goodsId,
|
||||
vehicleId: inventoryRequestFormEntity.vehicleId,
|
||||
standId: STAND_ID,
|
||||
userName: USER_NAME
|
||||
}
|
||||
confirmFinishWork(confirmParams).then(res => {
|
||||
requestInventory(request).then(res => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
if (response.returnData != null) {
|
||||
this.workFormEntity.tip = response.returnData.tip
|
||||
}
|
||||
this.resetForms()
|
||||
ElMessage.success(response.message)
|
||||
pauseGetPickFlag.value = false
|
||||
} else {
|
||||
errorBox(response.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
errorBox('确认时发生异常')
|
||||
ElMessage.error("发生异常。")
|
||||
})
|
||||
}
|
||||
// 确认/放行
|
||||
const confirmOrRelease = () => {
|
||||
// 确认放行---与配料工作区分开来
|
||||
const request = {
|
||||
inventoryId: confirmEntity.inventoryId,
|
||||
goodsId: confirmEntity.goodsId,
|
||||
vehicleId: confirmEntity.vehicleId,
|
||||
confirmNum: confirmEntity.confirmNum,
|
||||
standId:STAND_ID,
|
||||
userName: USER_NAME
|
||||
}
|
||||
confirmInventory(request).then(res => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
// 设置form
|
||||
resetConfirmEntity()
|
||||
ElMessage.success(response.message)
|
||||
pauseGetPickFlag.value = false
|
||||
} else if (response.code == 400) {
|
||||
// 设置form
|
||||
resetConfirmEntity()
|
||||
warningBox(response.message)
|
||||
pauseGetPickFlag.value = false
|
||||
} else {
|
||||
// 错误,弹框
|
||||
errorBox(response.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
errorBox('请求错误,请检查完原因后刷新界面。')
|
||||
})
|
||||
}
|
||||
// 重置确认信息
|
||||
const resetConfirmEntity = () => {
|
||||
confirmEntity.inventoryId = ''
|
||||
confirmEntity.goodsId = ''
|
||||
confirmEntity.vehicleId = ''
|
||||
confirmEntity.stockNum = null
|
||||
confirmEntity.confirmNum = null
|
||||
}
|
||||
// 清空下发信息
|
||||
const clearInput = () => {
|
||||
inventoryRequestFormEntity.goodsId = ''
|
||||
inventoryRequestFormEntity.vehicleId = ''
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -242,7 +237,7 @@ export default {
|
|||
/* padding: 5px; */
|
||||
}
|
||||
|
||||
.main-area {
|
||||
.search-area {
|
||||
margin: auto;
|
||||
min-height: fit-content;
|
||||
max-height: 90%;
|
||||
|
|
@ -252,150 +247,32 @@ export default {
|
|||
border-radius: 10px;
|
||||
box-shadow: 0px 15px 10px -15px #000;
|
||||
overflow: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.title-area {
|
||||
display: flex;
|
||||
/* min-height: 10%; */
|
||||
max-height: max-content;
|
||||
.confirm-area {
|
||||
margin: auto;
|
||||
min-height: fit-content;
|
||||
max-height: 90%;
|
||||
margin-bottom: 10px;
|
||||
min-width: inherit;
|
||||
border: solid 1px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 15px 10px -15px #000;
|
||||
overflow: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
background: linear-gradient(-105deg,
|
||||
transparent 50%,
|
||||
#309330 50%,
|
||||
#309330 100%) top right,
|
||||
linear-gradient(-75deg,
|
||||
transparent 50%,
|
||||
#309330 50%,
|
||||
#309330 100%) bottom right;
|
||||
background-size: 100% 50%;
|
||||
height: 400px;
|
||||
width: 250px;
|
||||
background-repeat: no-repeat;
|
||||
display: inline-flex;
|
||||
cursor: pointer;
|
||||
.el-form-item {
|
||||
margin: 10px 5px 10px 5px;
|
||||
}
|
||||
|
||||
:deep(.el-input) {
|
||||
width: 195px;
|
||||
height: 130px;
|
||||
font-size: 25px;
|
||||
.el-form-item .el-input {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
:deep(.el-input-number) {
|
||||
width: 125px;
|
||||
height: 130px;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
/* :deep(.el-input .el-input__inner) {
|
||||
font-size: 60px;
|
||||
height: 130px;
|
||||
}
|
||||
|
||||
:deep(.el-input-number .el-input__inner) {
|
||||
font-size: 60px;
|
||||
height: 130px;
|
||||
} */
|
||||
|
||||
.title-div {
|
||||
display: inline-flex;
|
||||
width: -webkit-fill-available;
|
||||
margin-right: 5px;
|
||||
padding: 5px;
|
||||
background-color: #CCCCCC;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
align-self: center;
|
||||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.station-div {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
width: 150px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
padding: 5px;
|
||||
background-color: #FFFAAA;
|
||||
}
|
||||
|
||||
.station-text {
|
||||
align-self: center;
|
||||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.station-no-div {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
width: 200px;
|
||||
padding: 5px;
|
||||
border: 5px double #000000;
|
||||
}
|
||||
|
||||
.station-no-text {
|
||||
align-self: center;
|
||||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.display-title-div {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
width: 205px;
|
||||
height: 80px;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
background-color: #FFFAAA;
|
||||
}
|
||||
|
||||
.display-title-text {
|
||||
align-self: center;
|
||||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.display-form-div {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
width: 195px;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
border: 5px double #000000;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.display-form-div-left {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
width: 125px;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
border: 5px double #000000;
|
||||
}
|
||||
|
||||
.display-form-div-right {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
width: 50px;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
background-color: #CCCCCC;
|
||||
}
|
||||
|
||||
.display-form-text-right {
|
||||
align-self: center;
|
||||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,388 +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: 256px; margin-right: 10px;" placeholder="工单"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="goodsIdQuery" style="width: 256px; margin-right: 10px;" placeholder="料号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="smallBoxQuery" style="width: 256px; margin-right: 10px;" placeholder="小工位"
|
||||
:suffix-icon="Search" />
|
||||
<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="ordersList" 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.orderId" v-model="orderId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="workOrder" label="工单" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="goodsId" label="料号" min-width="120px" />
|
||||
<el-table-column prop="supplyArea" label="小工位" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="item" label="Item" min-width="120px" />
|
||||
<el-table-column prop="description" label="描述" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="sLoc" label="SLoc" min-width="120px" />
|
||||
<el-table-column prop="type" label="Type" min-width="120px" />
|
||||
<el-table-column prop="originStatus" label="Status" min-width="120px" />
|
||||
<el-table-column prop="sortString" label="SortStrng" min-width="120px" />
|
||||
<el-table-column prop="requirementQuantity" label="需求数量" sortable min-width="120px" />
|
||||
<el-table-column prop="goodsUnit" label="单位" min-width="120px" />
|
||||
<el-table-column prop="orderStatus" label="状态" min-width="120px" />
|
||||
<el-table-column prop="lackQuantity" label="缺少数量" min-width="120px" />
|
||||
<el-table-column prop="pickedQuantity" label="已拣数量" min-width="120px" />
|
||||
<el-table-column prop="finishTime" label="完成时间" :formatter="timeFormat" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="userName" label="操作人员" min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="240px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRowOrders(scope.row)">编辑</el-button>
|
||||
<el-button plain type="danger" @click="deleteCurrentRowOrders(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="ordersFormRef" :model="ordersFormEntity" :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="orderId">
|
||||
<el-input v-model="ordersFormEntity.orderId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工单" prop="workOrder">
|
||||
<el-input v-model="ordersFormEntity.workOrder" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="小工位" prop="supplyArea">
|
||||
<el-input v-model="ordersFormEntity.supplyArea" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="料号" prop="goodsId">
|
||||
<el-input v-model="ordersFormEntity.goodsId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="需求数量" prop="requirementQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.requirementQuantity"
|
||||
controls-position="right" :min="0" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="orderStatus">
|
||||
<el-input-number v-model.number="ordersFormEntity.orderStatus"
|
||||
controls-position="right" :min="0" :max="4" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="缺少数量" prop="lackQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.lackQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已拣数量" prop="pickedQuantity">
|
||||
<el-input-number v-model.number="ordersFormEntity.pickedQuantity"
|
||||
controls-position="right" :min="0" :max="ordersFormEntity.requirementQuantity" clearable />
|
||||
</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="submitOrdersInfo(ordersFormEntity)">
|
||||
确定
|
||||
</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>
|
||||
<UploadExcelOrders></UploadExcelOrders>
|
||||
</fieldset>
|
||||
</el-dialog>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getOrders, deleteOrders, updateOrders } from '@/api/kateWork.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
import { errorBox } from '@/utils/myMessageBox.js'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import { queryUploadRecord } from '@/api/excel.js'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: 'kateOrders',
|
||||
data() {
|
||||
return {
|
||||
ordersList: [],
|
||||
currentPage: 1,
|
||||
uploadRecord: reactive({
|
||||
fileName: '',
|
||||
uploadTime: '',
|
||||
uploadUser: ''
|
||||
}),
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
workOrderQuery: '',
|
||||
goodsIdQuery: '',
|
||||
smallBoxQuery: '',
|
||||
loading: true,
|
||||
dialogVisible: false,
|
||||
uploadDialogVisible: false,
|
||||
orderId: '',
|
||||
ordersFormEntity: reactive({}),
|
||||
labelPosition: 'top',
|
||||
ordersFormRef: ref(),
|
||||
rules: reactive({})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.search()
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
this.loading = true
|
||||
const request = {
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
workOrder: this.workOrderQuery.trim(),
|
||||
goodsId: this.goodsIdQuery.trim(),
|
||||
supplyArea: this.smallBoxQuery.trim(),
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getOrders(request).then(res => {
|
||||
const tableResponse = res.data
|
||||
if (tableResponse.code == 0) {
|
||||
this.ordersList = 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)
|
||||
},
|
||||
reset() {
|
||||
this.workOrderQuery = ''
|
||||
this.goodsIdQuery = ''
|
||||
this.smallBoxQuery = ''
|
||||
this.search()
|
||||
},
|
||||
editCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
this.ordersFormEntity = {
|
||||
orderId: row.orderId,
|
||||
workOrder: row.workOrder,
|
||||
goodsId: row.goodsId,
|
||||
supplyArea: row.supplyArea,
|
||||
requirementQuantity: row.requirementQuantity,
|
||||
orderStatus: row.orderStatus,
|
||||
lackQuantity: row.lackQuantity,
|
||||
pickedQuantity: row.pickedQuantity
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
deleteCurrentRowOrders(row) {
|
||||
this.orderId = row.orderId
|
||||
ElMessageBox.confirm(
|
||||
'该操作会删除选择的工单数据。\n是否继续',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
).then(() => {
|
||||
const params = {
|
||||
orderId: this.orderId,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
deleteOrders(params).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
ElMessage.success('删除工单信息成功。')
|
||||
this.search()
|
||||
} else {
|
||||
errorBox(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
errorBox('删除工单信息成功')
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage.info('操作取消')
|
||||
})
|
||||
},
|
||||
submitOrdersInfo(formData) {
|
||||
const params = {
|
||||
orderId: formData.orderId,
|
||||
workOrder: formData.workOrder,
|
||||
goodsId: formData.goodsId,
|
||||
supplyArea: formData.supplyArea,
|
||||
requirementQuantity: formData.requirementQuantity,
|
||||
orderStatus: formData.orderStatus,
|
||||
lackQuantity: formData.lackQuantity,
|
||||
pickedQuantity: formData.pickedQuantity,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
updateOrders(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.orderId = row.orderId
|
||||
},
|
||||
openUploadDialog() {
|
||||
// 请求上传记录
|
||||
const param = {
|
||||
userName: store.getters.getUserName,
|
||||
fileDescription: 'ORDERS',
|
||||
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>
|
||||
|
|
@ -306,7 +306,6 @@ const route = useRoute()// 路由
|
|||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
initWorkOptions()
|
||||
searchKittingGoods()
|
||||
timer.value = setInterval(() => {
|
||||
timerTask_1()
|
||||
}, 1000)
|
||||
|
|
@ -364,6 +363,8 @@ const timerTask_1 = () => {
|
|||
getWork()
|
||||
// 判断是否需要显示料盒信息
|
||||
ifNeedShowBoxSummary()
|
||||
// 查询当前配料的物料信息
|
||||
searchKittingGoods()
|
||||
}
|
||||
// 自定义方法
|
||||
const solveEnterKey = (e) => {
|
||||
|
|
@ -446,7 +447,6 @@ const confirmStart = () => {
|
|||
errorBox('请求错误。')
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
searchKittingGoods()
|
||||
})
|
||||
}
|
||||
// 显示料盒总览
|
||||
|
|
@ -562,7 +562,6 @@ const ifNeedShowBoxSummary = () => {
|
|||
storeKittingWork.productId = confirmEntity.productId
|
||||
storeKittingWork.singleProductId = confirmEntity.singleProductId
|
||||
storeKittingWork.boxNo = confirmEntity.boxNo
|
||||
searchKittingGoods()
|
||||
}
|
||||
} else {
|
||||
// 替换store
|
||||
|
|
@ -603,25 +602,20 @@ const confirmOrRelease = () => {
|
|||
if (response.code == 0) {
|
||||
// 设置form
|
||||
resetConfirmEntity()
|
||||
// 继续刷新
|
||||
pauseGetWorkFlag.value = false
|
||||
ElMessage.success(response.message)
|
||||
} else if (response.code == 400) {
|
||||
// 设置form
|
||||
resetConfirmEntity()
|
||||
// 警告
|
||||
pauseGetWorkFlag.value = false
|
||||
warningBox(response.message)
|
||||
} else {
|
||||
// 错误
|
||||
errorBox(response.message)
|
||||
}
|
||||
pauseGetWorkFlag.value = false
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
errorBox('请求错误,请检查完原因后刷新界面。')
|
||||
}).finally(() => {
|
||||
// 刷新一下物料显示
|
||||
searchKittingGoods()
|
||||
})
|
||||
}
|
||||
const resetConfirmEntity = () => {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="配料单类型">
|
||||
<el-select-v2 v-model="kittingBomQueryFormEntity.bomType" placeholder="配料单类型"
|
||||
<el-select-v2 style="width: 196px" v-model="kittingBomQueryFormEntity.bomType" placeholder="配料单类型"
|
||||
:options="kittingBomTypeOptions" @change="search()"></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="机型">
|
||||
|
|
@ -450,10 +450,6 @@ const openUploadDialog = () => {
|
|||
width: 196px;
|
||||
}
|
||||
|
||||
.el-form-item .el-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
|
|
|
|||
|
|
@ -409,10 +409,6 @@ const openUploadDialog = () => {
|
|||
width: 196px;
|
||||
}
|
||||
|
||||
.el-form-item .el-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
|
|
|
|||
|
|
@ -1,293 +1,278 @@
|
|||
<template>
|
||||
<div style="margin-bottom: 10px; height: 100%; padding-left: 1%; padding-right: 1%;">
|
||||
<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-input v-model="vehicleIdQuery" style="width: 158px; margin-right: 10px;" placeholder="箱号"
|
||||
:suffix-icon="Search" />
|
||||
<el-input v-model="standQuery" style="width: 158px; margin-right: 10px;" placeholder="工站"
|
||||
:suffix-icon="Search" />
|
||||
<el-select-v2 v-model="pickStatusQuery" style="width: 158px; margin-right: 10px;"
|
||||
placeholder="请选择状态" :options="pickStatusOptions" @change="search()"></el-select-v2>
|
||||
<el-button type="primary" @click="search()">搜索</el-button>
|
||||
<el-button type="warning" @click="reset()">重置</el-button>
|
||||
<el-form-item label="任务状态">
|
||||
<el-select-v2 style="width: 196px" v-model="searchQueryFormEntity.pickStatus" placeholder="任务状态"
|
||||
:options="addAllOptionOfOptions(pickingTaskStatusOptions)"
|
||||
@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.pickStand" @keyup.enter="search()" clearable />
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<div style="align-content: center;">
|
||||
<el-row>
|
||||
<el-button type="primary" class="btn-search" @click="search()">查询</el-button>
|
||||
<el-button type="warning" class="btn-search" @click="clearQuery()">清除输入</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<br />
|
||||
<el-table :data="pickTaskList" 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' }">
|
||||
</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">
|
||||
<template v-slot="scope">
|
||||
<el-radio :label="scope.row.pickTaskId" v-model="pickTaskId"> </el-radio>
|
||||
<el-radio :label="scope.row.pickId" v-model="pickId"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="pickTaskId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="standId" label="站台号" fixed="left" min-width="120px" />
|
||||
<el-table-column prop="pickStatus" label="拣选状态" :formatter="pickStatusFormat" min-width="120px" />
|
||||
<el-table-column prop="lastUpdateTime" label="最近更新时间" :formatter="timeFormat" show-overflow-tooltip
|
||||
min-width="120px" />
|
||||
<el-table-column fixed="right" label="操作" width="120px">
|
||||
<el-table-column prop="pickId" label="任务号" fixed="left" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="pickStatus" label="任务状态" :formatter="pickStatusFormat" fixed="right" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="pickStand" label="目标站台" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" 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="sendTime" label="发送时间" :formatter="timeFormat" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="arriveTime" label="到达时间" :formatter="timeFormat" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="leaveTime" label="离开时间" :formatter="timeFormat" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<!-- <el-table-column fixed="right" label="操作" width="170px">
|
||||
<template v-slot="scope">
|
||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||
<div style="display: inline-block; align-content: center;">
|
||||
<el-button type="primary"
|
||||
@click="editCurrentRowFormEntity(scope.row)">编辑</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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="pickTaskFormRef" :model="pickTaskFormEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="width: 95%;" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="id" prop="pickTaskId">
|
||||
<el-input v-model="pickTaskFormEntity.pickTaskId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工站" prop="vehicleId">
|
||||
<el-input v-model="pickTaskFormEntity.vehicleId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="小盒子" prop="standId">
|
||||
<el-input v-model="pickTaskFormEntity.standId" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="任务状态" prop="pickStatus">
|
||||
<el-select-v2 v-model="pickTaskFormEntity.pickStatus" placeholder="请选择任务状态"
|
||||
:options="taskStatusOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-pagination v-model:current-page="baseTableQuery.currentPage"
|
||||
v-model:page-size="baseTableQuery.pageSize" :page-sizes="[10, 25, 50]" :small="false"
|
||||
:disabled="false" :background="false" :default-page-size="10" @size-change="search"
|
||||
@current-change="search" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="baseTableQuery.total" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitInfo(pickTaskFormEntity)">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-container>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { getPickTasksByPage, updatePickTaskInfo } from '@/api/taskOperation.js'
|
||||
import { errorBox } from '@/utils/myMessageBox.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
</script>
|
||||
<script>
|
||||
export default {
|
||||
name: 'pickTaskMonitor',
|
||||
data() {
|
||||
return {
|
||||
pickTaskList: [],
|
||||
import { queryPickTasksByPage } from '@/api/taskQuery.js'
|
||||
import { timeFormatter, pickTaskStatusFormatter } from '@/utils/formatter.js'
|
||||
import { ref, reactive, onMounted, nextTick, onBeforeUnmount } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { genTableRequest } from '@/utils/generator.js'
|
||||
import { labelPosition } from '@/constant/form.js'
|
||||
import {pickingTaskStatusOptions} 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,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
vehicleIdQuery: '',
|
||||
standQuery: '',
|
||||
pickStatusQuery: -99,
|
||||
loading: true,
|
||||
dialogVisible: false,
|
||||
pickTaskId: '',
|
||||
pickTaskFormEntity: reactive({}),
|
||||
pickTaskFormRef: ref(),
|
||||
labelPosition: 'top',
|
||||
rules: reactive({}),
|
||||
taskStatusOptions: [
|
||||
{
|
||||
value: -1,
|
||||
label: '暂存'
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: '待下发'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已下发'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已到达'
|
||||
}
|
||||
],
|
||||
pickStatusOptions: [
|
||||
{
|
||||
value: -99,
|
||||
label: '全部'
|
||||
},
|
||||
{
|
||||
value: -1,
|
||||
label: '暂存'
|
||||
},
|
||||
{
|
||||
value: 0,
|
||||
label: '待下发'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已下发'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已到达'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.search()
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
this.loading = true
|
||||
const request = {
|
||||
pageNo: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
vehicleId: this.vehicleIdQuery.trim(),
|
||||
standId: this.standQuery.trim(),
|
||||
pickStatus: this.pickStatusQuery == -99 ? null : this.pickStatusQuery,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
getPickTasksByPage(request).then(res => {
|
||||
const tableResponse = res.data
|
||||
if (tableResponse.code == 0) {
|
||||
this.pickTaskList = tableResponse.returnData.lists
|
||||
this.total = tableResponse.returnData.total
|
||||
sortBy: new Map([['createTime', true]]),// 按照成品号顺序排序
|
||||
standId: STAND_ID,
|
||||
userName: USER_NAME
|
||||
})
|
||||
let searchQueryFormEntity = reactive({
|
||||
vehicleId: '',
|
||||
pickStand: '',
|
||||
pickStatus: -99
|
||||
})
|
||||
let searchQueryFormRef = ref()
|
||||
let pickId = ''
|
||||
/**
|
||||
* 系统方法
|
||||
*/
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
window.addEventListener('resize', resizeHeight)
|
||||
search()
|
||||
})
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
nextTick(() => {
|
||||
window.removeEventListener('resize', resizeHeight)
|
||||
})
|
||||
})
|
||||
const resizeHeight = () => {
|
||||
maxHeight.value = window.innerHeight * 0.55
|
||||
}
|
||||
/**
|
||||
* 自定义方法
|
||||
*/
|
||||
// 查询
|
||||
const search = () => {
|
||||
tableLoading.value = true
|
||||
let request = genTableRequest(baseTableQuery)
|
||||
// 设定查询参数
|
||||
request.vehicleId = searchQueryFormEntity.vehicleId.trim()
|
||||
request.pickStand = searchQueryFormEntity.pickStand.trim()
|
||||
request.pickStatus = searchQueryFormEntity.pickStatus === -99 ? null : searchQueryFormEntity.pickStatus
|
||||
queryPickTasksByPage(request).then((res) => {
|
||||
const response = res.data
|
||||
if (response.code === 0) {
|
||||
const data = response.data
|
||||
if (data != null) {
|
||||
tableData.value = data.lists
|
||||
baseTableQuery.total = data.total
|
||||
} else {
|
||||
errorBox(tableResponse.message)
|
||||
tableData.value = []
|
||||
baseTableQuery.total = 0
|
||||
}
|
||||
} else {
|
||||
ElMessage.error(response.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
errorBox('查询拣选任务错误')
|
||||
ElMessage.error('查询数据异常。')
|
||||
}).finally(() => {
|
||||
tableLoading.value = false
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
dateFormat: (row, column, cellValue, index) => {
|
||||
return dateFormatter(cellValue)
|
||||
},
|
||||
timeFormat: (row, column, cellValue, index) => {
|
||||
}
|
||||
const clearQuery = () => {
|
||||
searchQueryFormEntity.vehicleId = ''
|
||||
searchQueryFormEntity.goodsId = ''
|
||||
}
|
||||
const handleSortChange = (data) => {
|
||||
if (baseTableQuery.sortBy.has(data.prop)) {
|
||||
baseTableQuery.sortBy.delete(data.prop)
|
||||
}
|
||||
baseTableQuery.sortBy.set(data.prop, data.order.toLowerCase() === 'ascending')
|
||||
search()
|
||||
}
|
||||
const getCurrentRow = (row) => {
|
||||
pickId = row.pickId
|
||||
}
|
||||
const timeFormat = (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
},
|
||||
pickStatusFormat: (row, column, cellValue, index) => {
|
||||
switch (cellValue) {
|
||||
case -1:
|
||||
return '暂存'
|
||||
case 0:
|
||||
return '待下发'
|
||||
case 1:
|
||||
return '已下发'
|
||||
case 2:
|
||||
return '已到达'
|
||||
default:
|
||||
return '未知'
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.vehicleIdQuery = ''
|
||||
this.standQuery = ''
|
||||
this.search()
|
||||
},
|
||||
editCurrentRow(row) {
|
||||
this.pickTaskId = row.pickTaskId
|
||||
this.pickTaskFormEntity = {
|
||||
pickTaskId: row.pickTaskId,
|
||||
vehicleId: row.vehicleId,
|
||||
standId: row.standId,
|
||||
pickStatus: row.pickStatus,
|
||||
lastUpdateTime: row.lastUpdateTime
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
submitInfo(formData) {
|
||||
const params = {
|
||||
pickTaskId: formData.pickTaskId,
|
||||
pickStatus: formData.pickStatus,
|
||||
userName: store.getters.getUserName
|
||||
}
|
||||
updatePickTaskInfo(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.pickTaskId = row.pickTaskId
|
||||
},
|
||||
},
|
||||
}
|
||||
const pickStatusFormat = (row, column, cellValue, index) => {
|
||||
return pickTaskStatusFormatter(cellValue)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-pagination {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.el-row .el-button {
|
||||
width: 72px;
|
||||
margin-left: 0px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
.content {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-row .el-form-item {
|
||||
width: 10% inherit;
|
||||
justify-content: center;
|
||||
.work-area {
|
||||
width: 100%;
|
||||
/* padding: 5px; */
|
||||
}
|
||||
|
||||
.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 {
|
||||
.search-area {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.title-area {
|
||||
display: flex;
|
||||
/* min-height: 10%; */
|
||||
max-height: max-content;
|
||||
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;
|
||||
flex-direction: column;
|
||||
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;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
.el-pagination {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.my-autocomplete li {
|
||||
width: 196px;
|
||||
line-height: normal;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.my-autocomplete li .name {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.my-autocomplete li .addr {
|
||||
font-size: 12px;
|
||||
color: #b4b4b4;
|
||||
}
|
||||
|
||||
.my-autocomplete li .highlighted .addr {
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.my-autocomplete li .goods_id {
|
||||
color: brown;
|
||||
}
|
||||
|
||||
.my-autocomplete li .goods_name {
|
||||
color: cornflowerblue;
|
||||
}
|
||||
|
||||
.btn-search {
|
||||
height: 30px;
|
||||
width: 80px;
|
||||
margin: auto 5px 5px auto;
|
||||
color: black;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -17,6 +17,8 @@ import { requestImageDetail } from '@/api/kateWork.js'
|
|||
import { isSingleCharacter, isNumber } from '@/utils/stringUtils';
|
||||
import { onBeforeUnmount, onMounted, reactive } from 'vue';
|
||||
// 声明变量
|
||||
const USER_NAME = store.getters.getUserName
|
||||
const STAND_ID = store.getters.getStandId
|
||||
const fit = 'contain'
|
||||
let imageData = reactive({
|
||||
url: '',
|
||||
|
|
@ -27,8 +29,8 @@ let imageData = reactive({
|
|||
let inputStr = ''
|
||||
let imageRequest = reactive({
|
||||
imageId: '',
|
||||
userName: store.getters.getUserName,
|
||||
standId: store.getters.getStandId
|
||||
userName: USER_NAME,
|
||||
standId: STAND_ID
|
||||
})
|
||||
// 声明系统方法
|
||||
onMounted(() => {
|
||||
|
|
@ -39,10 +41,10 @@ onBeforeUnmount(() => {
|
|||
})
|
||||
// 声明自定义方法
|
||||
const handleKeyDown = (event) => {
|
||||
if (event.key.toLowerCase() == 'enter') {
|
||||
if (event.key.toLowerCase() === 'enter') {
|
||||
solveInput()
|
||||
} else {
|
||||
if (event.key.toLowerCase() == 'backspace') {
|
||||
if (event.key.toLowerCase() === 'backspace') {
|
||||
inputStr = inputStr.substring(0, inputStr.length - 1)
|
||||
} else if (isSingleCharacter(event.key) || isNumber(event.key)) {
|
||||
inputStr += event.key
|
||||
|
|
@ -52,7 +54,7 @@ const handleKeyDown = (event) => {
|
|||
// 处理输入
|
||||
const solveInput = () => {
|
||||
// 空输入
|
||||
if (inputStr == '') {
|
||||
if (inputStr === '') {
|
||||
closePreview('空输入。')
|
||||
}
|
||||
// 解析
|
||||
|
|
@ -62,15 +64,15 @@ const solveInput = () => {
|
|||
}
|
||||
// 查询图纸
|
||||
const findImage = () => {
|
||||
if (imageRequest.imageId == '') {
|
||||
if (imageRequest.imageId === '') {
|
||||
closePreview('请求缺少图纸编号。')
|
||||
}
|
||||
requestImageDetail(imageRequest).then(res => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
if (response.code === 0) {
|
||||
const results = response.data
|
||||
if (results == undefined || results.length != 1) {
|
||||
closePreview('无图纸。')
|
||||
if (results === undefined || results.length !== 1) {
|
||||
closePreview('无图纸或图纸歧义。')
|
||||
return
|
||||
}
|
||||
const image = results[0]
|
||||
|
|
|
|||
|
|
@ -28,12 +28,12 @@
|
|||
<el-input v-model="stockQuery.locationId" @keyup.enter="search()" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="库存状态">
|
||||
<el-select-v2 v-model="stockQuery.stockStatus" placeholder="库存状态"
|
||||
<el-select-v2 style="width: 196px" v-model="stockQuery.stockStatus" placeholder="库存状态"
|
||||
:options="addAllOptionOfOptions(stockStatusOptions)"
|
||||
@change="search()"></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料状态">
|
||||
<el-select-v2 v-model="stockQuery.goodsStatus" placeholder="物料状态"
|
||||
<el-select-v2 style="width: 196px" v-model="stockQuery.goodsStatus" placeholder="物料状态"
|
||||
:options="addAllOptionOfOptions(goodsStatusOptions)"
|
||||
@change="search()"></el-select-v2>
|
||||
</el-form-item>
|
||||
|
|
@ -550,10 +550,6 @@ const submitStockInfo = () => {
|
|||
width: 196px;
|
||||
}
|
||||
|
||||
.el-form-item .el-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
|
|
|
|||
|
|
@ -269,10 +269,6 @@ const exportExcel = () => {
|
|||
width: 196px;
|
||||
}
|
||||
|
||||
.el-form-item .el-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
|
|
|
|||
|
|
@ -8,20 +8,20 @@
|
|||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="任务类型">
|
||||
<el-select-v2 v-model="searchQueryFormEntity.taskType" placeholder="任务类型"
|
||||
<el-select-v2 style="width: 196px" v-model="searchQueryFormEntity.taskType" placeholder="任务类型"
|
||||
:options="addAllOptionOfOptions(taskTypeOptions)"
|
||||
@change="search()"></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态">
|
||||
<el-select-v2 v-model="searchQueryFormEntity.taskStatus" placeholder="任务状态"
|
||||
<el-select-v2 style="width: 196px" v-model="searchQueryFormEntity.taskStatus" placeholder="任务状态"
|
||||
: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-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-input v-model="searchQueryFormEntity.goodsId" @keyup.enter="search()" clearable/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<div style="align-content: center;">
|
||||
|
|
@ -44,127 +44,173 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taskId" label="任务号" fixed="left" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="taskType" label="任务类型" fixed="left" :formatter="taskTypeFormat" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="taskStatus" label="任务状态" :formatter="taskStatusFormat" fixed="right" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="taskType" label="任务类型" fixed="left" :formatter="taskTypeFormat" min-width="120px"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="taskStatus" label="任务状态" :formatter="taskStatusFormat" fixed="right"
|
||||
min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="taskPriority" label="优先级" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="vehicleId" label="箱号" fixed="left" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="goodsId" label="料号" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="goodsDesc" label="物料描述"
|
||||
min-width="120px" sortable="custom" show-overflow-tooltip />
|
||||
min-width="120px" sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="opNum" label="操作数量" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="stockNum" label="库存数量" min-width="120px"
|
||||
sortable="custom" show-overflow-tooltip />
|
||||
sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="origin" label="起点" min-width="120px" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="destination" label="终点" min-width="120px"
|
||||
sortable="custom" show-overflow-tooltip />
|
||||
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 />
|
||||
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 />
|
||||
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">
|
||||
sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column prop="remark" label="备注" min-width="120px"
|
||||
sortable="custom" show-overflow-tooltip/>
|
||||
<el-table-column fixed="right" label="操作" width="170px">
|
||||
<template v-slot="scope">
|
||||
<div style="display: inline-block; align-content: center;">
|
||||
<el-button type="primary"
|
||||
@click="editCurrentRowFormEntity(scope.row)">编辑</el-button>
|
||||
@click="editCurrentRowTask(scope.row)">编辑
|
||||
</el-button>
|
||||
<el-button type="danger"
|
||||
@click="deleteCurrentRowTask(scope.row)">删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<br />
|
||||
<br/>
|
||||
<el-pagination v-model:current-page="baseTableQuery.currentPage"
|
||||
v-model:page-size="baseTableQuery.pageSize" :page-sizes="[10, 25, 50]" :small="false"
|
||||
:disabled="false" :background="false" :default-page-size="10" @size-change="search"
|
||||
@current-change="search" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="baseTableQuery.total" />
|
||||
:total="baseTableQuery.total"/>
|
||||
</div>
|
||||
<el-dialog v-model="rowEditFlag" title="工作信息" width="40%" draggable :show-close="false">
|
||||
<el-form ref="rowEditFormRef" :model="rowFormEntity" :label-position="labelPosition"
|
||||
<el-dialog v-model="rowEditFlag" title="任务详情" width="40%" draggable :show-close="false">
|
||||
<el-form ref="rowEditFormRef" :model="rowEditFormEntity" :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 label="任务号">
|
||||
<el-input v-model="rowEditFormEntity.taskId" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工单号">
|
||||
<el-input v-model="rowFormEntity.workOrder" disabled />
|
||||
<el-form-item label="任务类型">
|
||||
<el-select-v2 v-model="rowEditFormEntity.taskType" placeholder="请选择任务类型"
|
||||
:options="taskTypeOptions" disabled></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="总成号">
|
||||
<el-input v-model="rowFormEntity.productId" disabled />
|
||||
<el-form-item label="任务状态">
|
||||
<el-select-v2 v-model="rowEditFormEntity.taskStatus" placeholder="请选择任务状态"
|
||||
:options="wmsTaskStatusOptions"></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成品号">
|
||||
<el-input v-model="rowFormEntity.singleProductId" disabled />
|
||||
<el-form-item label="优先级">
|
||||
<el-input-number v-model.number="rowEditFormEntity.taskPriority" controls-position="right"
|
||||
:min="0" :max="9"/>
|
||||
</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 label="箱号">
|
||||
<el-input v-model="rowEditFormEntity.vehicleId" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="料号">
|
||||
<el-input v-model="rowFormEntity.goodsId" disabled />
|
||||
<el-input v-model="rowEditFormEntity.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 label="描述">
|
||||
<el-input v-model="rowEditFormEntity.goodsDesc" 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 label="wcs任务号">
|
||||
<el-input v-model="rowEditFormEntity.wcsTaskId" 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.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 label="操作数量">
|
||||
<el-input-number v-model.number="rowEditFormEntity.opNum" controls-position="right"
|
||||
:min="0" clearable/>
|
||||
</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 label="库存数量">
|
||||
<el-input-number v-model.number="rowEditFormEntity.stockNum" controls-position="right" 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="rowEditFormEntity.origin" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点">
|
||||
<el-input v-model="rowEditFormEntity.destination" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="创建时间">
|
||||
<el-input type="text" v-model="rowEditFormEntity.createTime" :formatter="timeFormatter" disabled>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="完成时间">
|
||||
<el-input type="text" v-model="rowEditFormEntity.finishTime" :formatter="timeFormatter" disabled>
|
||||
</el-input>
|
||||
</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="rowEditFormEntity.opUser" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="呼叫站台">
|
||||
<el-input v-model="rowEditFormEntity.callStand" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="备注">
|
||||
<el-input type="textarea" style="width: 196px" v-model="rowEditFormEntity.remark" maxlength="1024"
|
||||
:autosize="{minRows: 1, maxRows: 4}"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -172,7 +218,7 @@
|
|||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="rowEditFlag = false">取消</el-button>
|
||||
<el-button type="success" @click="submitUpdateRow(rowFormEntity)">
|
||||
<el-button type="success" @click="submitUpdateRow(rowEditFormEntity)">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
|
|
@ -186,15 +232,17 @@
|
|||
<script setup>
|
||||
import store from '@/store'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { queryTasksByPage } from '@/api/taskQuery.js'
|
||||
import { timeFormatter, wmsTaskTypeFormatter, wmsTaskStatusFormatter } from '@/utils/formatter.js'
|
||||
import { ref, reactive, onMounted, nextTick, onBeforeUnmount } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { genTableRequest } from '@/utils/generator.js'
|
||||
import { labelPosition } from '@/constant/form.js'
|
||||
import { taskTypeOptions, wmsTaskStatusOptions } from '@/constant/options.js'
|
||||
import { addAllOptionOfOptions } from '@/utils/generator.js'
|
||||
import { loading } from '@/utils/loading'
|
||||
import {queryTasksByPage} from '@/api/taskQuery.js'
|
||||
import {deleteWmsTask, updateWmsTask} from '@/api/taskOperation'
|
||||
import {timeFormatter, wmsTaskTypeFormatter, wmsTaskStatusFormatter} from '@/utils/formatter.js'
|
||||
import {ref, reactive, onMounted, nextTick, onBeforeUnmount} from 'vue'
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import {genTableRequest} from '@/utils/generator.js'
|
||||
import {labelPosition} from '@/constant/form.js'
|
||||
import {taskTypeOptions, wmsTaskStatusOptions} from '@/constant/options.js'
|
||||
import {addAllOptionOfOptions} from '@/utils/generator.js'
|
||||
import {loading} from '@/utils/loading'
|
||||
|
||||
/**
|
||||
* 常量定义
|
||||
*/
|
||||
|
|
@ -224,7 +272,25 @@ let searchQueryFormRef = ref()
|
|||
let rowEditFlag = ref(false)
|
||||
let taskId = ''
|
||||
let rowEditFormRef = ref()
|
||||
let rowFormEntity = reactive({})
|
||||
let rowEditFormEntity = reactive({
|
||||
taskId: '',
|
||||
taskType: null,
|
||||
taskStatus: null,
|
||||
taskPriority: null,
|
||||
vehicleId: '',
|
||||
origin: '',
|
||||
destination: '',
|
||||
wcsTaskId: '',
|
||||
createTime: null,
|
||||
finishTime: null,
|
||||
goodsId: '',
|
||||
opNum: null,
|
||||
stockNum: null,
|
||||
opUser: '',
|
||||
remark: '',
|
||||
callStand: '',
|
||||
goodsDesc: ''
|
||||
})
|
||||
/**
|
||||
* 系统方法
|
||||
*/
|
||||
|
|
@ -252,11 +318,11 @@ const search = () => {
|
|||
// 设定查询参数
|
||||
request.vehicleId = searchQueryFormEntity.vehicleId.trim()
|
||||
request.goodsId = searchQueryFormEntity.goodsId.trim()
|
||||
request.taskType = searchQueryFormEntity.taskType == -99 ? null : searchQueryFormEntity.taskType
|
||||
request.taskStatus = searchQueryFormEntity.taskStatus == -99 ? null : searchQueryFormEntity.taskStatus
|
||||
request.taskType = searchQueryFormEntity.taskType === -99 ? null : searchQueryFormEntity.taskType
|
||||
request.taskStatus = searchQueryFormEntity.taskStatus === -99 ? null : searchQueryFormEntity.taskStatus
|
||||
queryTasksByPage(request).then((res) => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
if (response.code === 0) {
|
||||
const data = response.data
|
||||
if (data != null) {
|
||||
tableData.value = data.lists
|
||||
|
|
@ -283,7 +349,7 @@ const handleSortChange = (data) => {
|
|||
if (baseTableQuery.sortBy.has(data.prop)) {
|
||||
baseTableQuery.sortBy.delete(data.prop)
|
||||
}
|
||||
baseTableQuery.sortBy.set(data.prop, data.order == 'ascending')
|
||||
baseTableQuery.sortBy.set(data.prop, data.order.toLowerCase() === 'ascending')
|
||||
search()
|
||||
}
|
||||
const getCurrentRow = (row) => {
|
||||
|
|
@ -299,59 +365,78 @@ const taskStatusFormat = (row, column, cellValue, index) => {
|
|||
return wmsTaskStatusFormatter(cellValue)
|
||||
}
|
||||
// 编辑弹框
|
||||
const editCurrentRowFormEntity = (row) => {
|
||||
const editCurrentRowTask = (row) => {
|
||||
// 设置form值
|
||||
rowFormEntity.workIndex = row.workIndex
|
||||
rowFormEntity.workOrder = row.workOrder
|
||||
rowFormEntity.productId = row.productId
|
||||
rowFormEntity.singleProductId = row.singleProductId
|
||||
rowFormEntity.boxNo = row.boxNo
|
||||
rowFormEntity.goodsId = row.goodsId
|
||||
rowFormEntity.needNum = row.needNum
|
||||
rowFormEntity.distributeNum = row.distributeNum
|
||||
rowFormEntity.finishNum = row.finishNum
|
||||
rowFormEntity.workStatus = row.workStatus
|
||||
rowFormEntity.lackStatus = row.lackStatus
|
||||
rowEditFormEntity.taskId = row.taskId
|
||||
rowEditFormEntity.taskType = row.taskType
|
||||
rowEditFormEntity.taskStatus = row.taskStatus
|
||||
rowEditFormEntity.taskPriority = row.taskPriority
|
||||
rowEditFormEntity.vehicleId = row.vehicleId
|
||||
rowEditFormEntity.origin = row.origin
|
||||
rowEditFormEntity.destination = row.destination
|
||||
rowEditFormEntity.wcsTaskId = row.wcsTaskId
|
||||
rowEditFormEntity.createTime = row.createTime
|
||||
rowEditFormEntity.finishTime = row.finishTime
|
||||
rowEditFormEntity.goodsId = row.goodsId
|
||||
rowEditFormEntity.opNum = row.opNum
|
||||
rowEditFormEntity.stockNum = row.stockNum
|
||||
rowEditFormEntity.opUser = row.opUser
|
||||
rowEditFormEntity.remark = row.remark
|
||||
rowEditFormEntity.callStand = row.callStand
|
||||
rowEditFormEntity.goodsDesc = row.goodsDesc
|
||||
// 弹出框
|
||||
rowEditFlag.value = true
|
||||
}
|
||||
// 关闭当前缺料工作
|
||||
const closeLackWork = (row) => {
|
||||
const request = {
|
||||
workIndex: row.workIndex,
|
||||
standId: STAND_ID,
|
||||
userName: USER_NAME
|
||||
// 删除当前任务行
|
||||
const deleteCurrentRowTask = (row) => {
|
||||
ElMessageBox.confirm(
|
||||
'当前操作仅涉及删除当前任务行。\n是否确认',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
loading.open('关闭中...')
|
||||
closeCurrentWorks(request).then(res => {
|
||||
).then(() => {
|
||||
const request = {
|
||||
taskId: row.taskId,
|
||||
userName: USER_NAME,
|
||||
standId: STAND_ID
|
||||
}
|
||||
loading.open('删除中...')
|
||||
deleteWmsTask(request).then(res => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
if (response.code === 0) {
|
||||
ElMessage.success(response.message)
|
||||
search()
|
||||
} else {
|
||||
ElMessage.error(response.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
ElMessage.error('请求异常。')
|
||||
ElMessage.error('删除异常')
|
||||
}).finally(() => {
|
||||
search()
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {
|
||||
ElMessage.info('操作取消')
|
||||
})
|
||||
}
|
||||
// 更新当前行数据
|
||||
const submitUpdateRow = (rowFormEntity) => {
|
||||
const request = {
|
||||
workIndex: rowFormEntity.workIndex,
|
||||
distributeNum: rowFormEntity.distributeNum,
|
||||
finishNum: rowFormEntity.finishNum,
|
||||
workStatus: rowFormEntity.workStatus,
|
||||
lackStatus: rowFormEntity.lackStatus,
|
||||
taskId: rowFormEntity.taskId,
|
||||
taskStatus: rowFormEntity.taskStatus,
|
||||
taskPriority: rowFormEntity.taskPriority,
|
||||
opNum: rowFormEntity.opNum,
|
||||
destination: rowFormEntity.destination,
|
||||
remark: rowFormEntity.remark,
|
||||
standId: STAND_ID,
|
||||
userName: USER_NAME
|
||||
}
|
||||
loading.open('更新中...')
|
||||
updateKateWorks(request).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
updateWmsTask(request).then(res => {
|
||||
if (res.data.code === 0) {
|
||||
ElMessage.success('更新数据成功。')
|
||||
rowEditFlag.value = false
|
||||
search()
|
||||
|
|
@ -415,10 +500,6 @@ const submitUpdateRow = (rowFormEntity) => {
|
|||
width: 196px;
|
||||
}
|
||||
|
||||
.el-form-item .el-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
|
|
@ -462,4 +543,9 @@ const submitUpdateRow = (rowFormEntity) => {
|
|||
margin: auto 5px 5px auto;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -8,17 +8,17 @@
|
|||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="空箱">
|
||||
<el-select-v2 v-model="searchQueryFormEntity.isEmpty" placeholder="任务类型"
|
||||
<el-select-v2 style="width: 196px" v-model="searchQueryFormEntity.isEmpty" placeholder="任务类型"
|
||||
:options="addAllOptionOfOptions(yesOrNoOptions)"
|
||||
@change="search()"></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="锁定">
|
||||
<el-select-v2 v-model="searchQueryFormEntity.isLock" placeholder="任务状态"
|
||||
<el-select-v2 style="width: 196px" v-model="searchQueryFormEntity.isLock" placeholder="任务状态"
|
||||
:options="addAllOptionOfOptions(yesOrNoOptions)"
|
||||
@change="search()"></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select-v2 v-model="searchQueryFormEntity.vehicleStatus" placeholder="任务状态"
|
||||
<el-select-v2 style="width: 196px" v-model="searchQueryFormEntity.vehicleStatus" placeholder="任务状态"
|
||||
:options="addAllOptionOfOptions(vehicleStatusOptions)"
|
||||
@change="search()"></el-select-v2>
|
||||
</el-form-item>
|
||||
|
|
@ -407,10 +407,6 @@ const submitUpdateRow = (rowFormEntity) => {
|
|||
width: 196px;
|
||||
}
|
||||
|
||||
.el-form-item .el-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@
|
|||
<el-container class="content">
|
||||
<div class="work-area">
|
||||
<fieldset class="search-area">
|
||||
<el-form ref="dbsQueryFormRef" :model="dbsQueryFormEntity" :label-position="labelPosition"
|
||||
<el-form ref="configQueryFormRef" :model="configQueryFormEntity" :label-position="labelPosition"
|
||||
label-width="158px" style="max-width: 100%" status-icon>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="工单号">
|
||||
<el-input v-model="dbsQueryFormEntity.workOrder" clearable />
|
||||
<el-form-item label="配置键">
|
||||
<el-input v-model="configQueryFormEntity.configKey" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件号">
|
||||
<el-input v-model="dbsQueryFormEntity.productId" clearable />
|
||||
<el-form-item label="配置名">
|
||||
<el-input v-model="configQueryFormEntity.configName" clearable/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<div style="align-content: center;">
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
</el-form>
|
||||
</fieldset>
|
||||
<div class="table-area">
|
||||
<el-table :data="displayDbs" stripe border v-loading="tableLoading" class="table-class"
|
||||
<el-table :data="displayConfigs" 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">
|
||||
|
|
@ -34,38 +34,38 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="configId" label="配置id" fixed="left" min-width="80px"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="configName" label="配置名称" fixed="left" min-width="120px"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="configKey" label="配置键" show-overflow-tooltip min-width="120px" />
|
||||
<el-table-column prop="configValue" label="配置值" show-overflow-tooltip min-width="140px" />
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column prop="configKey" label="配置键" show-overflow-tooltip min-width="120px"/>
|
||||
<el-table-column prop="configValue" label="配置值" show-overflow-tooltip min-width="140px"/>
|
||||
<el-table-column prop="configType" label="配置类型" :formatter="configTypeFormat" min-width="100px"
|
||||
show-overflow-tooltip />
|
||||
show-overflow-tooltip/>
|
||||
<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 />
|
||||
<br/>
|
||||
<el-pagination v-model:current-page="baseTableQuery.currentPage"
|
||||
v-model:page-size="baseTableQuery.pageSize" :page-sizes="[10, 25, 50]" :small="false"
|
||||
:disabled="false" :background="false" :default-page-size="10" @size-change="search"
|
||||
@current-change="search" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="baseTableQuery.total" />
|
||||
:total="baseTableQuery.total"/>
|
||||
</div>
|
||||
<el-dialog v-model="dialogVisible" title="库存信息" width="40%" draggable :show-close="false">
|
||||
<el-form ref="configFormRef" :model="configFormEntity" :label-position="labelPosition"
|
||||
<el-dialog v-model="showConfigEditFlag" title="编辑配置信息" width="40%" draggable :show-close="false">
|
||||
<el-form ref="configEditFormRef" :model="configEditFormEntity" :label-position="labelPosition"
|
||||
label-width="100px" style="max-width: 100%" :rules="rules" status-icon>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="配置名称" prop="configName">
|
||||
<el-input v-model="configFormEntity.configName" disabled />
|
||||
<el-input v-model="configEditFormEntity.configName" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="配置类型" prop="configType">
|
||||
<el-select-v2 v-model="configFormEntity.configType" placeholder="请选择配置类型"
|
||||
<el-select-v2 v-model="configEditFormEntity.configType" placeholder="请选择配置类型"
|
||||
:options="configTypeOptions" disabled></el-select-v2>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
<el-row :gutter="16">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="配置键" prop="configKey">
|
||||
<el-input v-model="configFormEntity.configKey" disabled />
|
||||
<el-input v-model="configFormEntity.configKey" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -86,10 +86,10 @@
|
|||
v-model="configFormEntity.configValue" multiple collapse-tags
|
||||
collapse-tags-tooltip :placeholder="'请选择' + configFormEntity.configName">
|
||||
<el-option v-for="(value, index) in mails" :key="index" :label="value"
|
||||
:value="value" />
|
||||
:value="value"/>
|
||||
</el-select>
|
||||
<el-switch v-if="configFormEntity.configType == '3'" style="margin-left: 5px;"
|
||||
v-model="configFormEntity.configValue" active-value="1" inactive-value="0" />
|
||||
v-model="configFormEntity.configValue" active-value="1" inactive-value="0"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -110,18 +110,33 @@
|
|||
|
||||
<script setup>
|
||||
import store from '@/store'
|
||||
import { queryDbsByPage } from '@/api/kateWork.js'
|
||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
import {queryDbsByPage} from '@/api/kateWork.js'
|
||||
import {dateFormatter, timeFormatter, configTypeFormatter} from '@/utils/formatter.js'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import { ref, reactive, onMounted, nextTick, onBeforeUnmount } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { genTableRequest, addAllOptionOfOptions } from '@/utils/generator.js'
|
||||
import { labelPosition, shortcuts } from '@/constant/form'
|
||||
import { dbsStatusOptions } from '@/constant/options'
|
||||
import { exportDbsWithExcel } from '@/api/excel'
|
||||
import {ref, reactive, onMounted, nextTick, onBeforeUnmount} from 'vue'
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {genTableRequest, addAllOptionOfOptions} from '@/utils/generator.js'
|
||||
import {labelPosition, shortcuts} from '@/constant/form'
|
||||
import {dbsStatusOptions} from '@/constant/options'
|
||||
import {exportDbsWithExcel} from '@/api/excel'
|
||||
|
||||
/**
|
||||
* 常量定义
|
||||
*/
|
||||
const configTypeOptions = [
|
||||
{
|
||||
value: '1',
|
||||
label: '输入框'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '下拉多选'
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '开关'
|
||||
}
|
||||
]
|
||||
/**
|
||||
* 变量定义
|
||||
*/
|
||||
|
|
@ -170,16 +185,14 @@ const search = () => {
|
|||
tableLoading.value = true
|
||||
let request = genTableRequest(baseTableQuery)
|
||||
// 设定查询参数
|
||||
request.workOrder = dbsQueryFormEntity.workOrder
|
||||
request.productId = dbsQueryFormEntity.productId
|
||||
request.dbsStatus = dbsQueryFormEntity.dbsStatus == -99 ? null : dbsQueryFormEntity.dbsStatus
|
||||
request.planStartDate = dateFormatter(dbsQueryFormEntity.planStartDate)
|
||||
request.configKey = configQueryFormEntity.configKey
|
||||
request.configName = configQueryFormEntity.configName
|
||||
queryDbsByPage(request).then((res) => {
|
||||
const response = res.data
|
||||
if (response.code == 0) {
|
||||
const data = response.data
|
||||
if (data != null) {
|
||||
displayDbs.value = data.lists
|
||||
displayConfigs.value = data.lists
|
||||
baseTableQuery.total = data.total
|
||||
} else {
|
||||
displayDbs.value = []
|
||||
|
|
@ -209,7 +222,10 @@ const handleSortChange = (data) => {
|
|||
search()
|
||||
}
|
||||
const getCurrentRow = (row) => {
|
||||
dbsId = row.dbsId
|
||||
configId = row.configId
|
||||
}
|
||||
const configTypeFormat = (row, column, cellValue, index) => {
|
||||
return configTypeFormatter(cellValue)
|
||||
}
|
||||
const exportExcel = () => {
|
||||
const params = {
|
||||
|
|
@ -244,25 +260,9 @@ const exportExcel = () => {
|
|||
ElMessage.error('导出失败')
|
||||
})
|
||||
}
|
||||
const editCurrentRowStock = (row) => {
|
||||
this.stockFormEntity = {
|
||||
stockId: row.stockId,
|
||||
locationId: row.locationId,
|
||||
vehicleId: row.vehicleId,
|
||||
stockStatus: row.stockStatus,
|
||||
createTime: row.createTime,
|
||||
lastUpdateTime: row.lastUpdateTime,
|
||||
lastUpdateUser: row.lastUpdateUser,
|
||||
isInventory: row.isInventory,
|
||||
inventoryTaskId: row.inventoryTaskId,
|
||||
noUseDays: row.noUseDays,
|
||||
goodsId: row.goodsId,
|
||||
goodsName: row.goodsName,
|
||||
goodsStatus: row.goodsStatus,
|
||||
remainNum: row.remainNum,
|
||||
totalNum: row.totalNum
|
||||
}
|
||||
this.dialogVisible = true
|
||||
const editCurrentRow = (row) => {
|
||||
|
||||
showConfigEditFlag.value = true
|
||||
}
|
||||
const submitStockInfo = () => {
|
||||
const request = {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-row>
|
||||
<el-form-item label="数据类型">
|
||||
<el-select-v2 v-model="searchQueryFormEntity.summaryType" placeholder="数据类型"
|
||||
<el-select-v2 style="width: 196px" v-model="searchQueryFormEntity.summaryType" placeholder="数据类型"
|
||||
:options="summaryTypeOptions" @change="search()"></el-select-v2>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单号">
|
||||
|
|
@ -689,10 +689,6 @@ const getPrintTabs = (boxSummary) => {
|
|||
width: 196px;
|
||||
}
|
||||
|
||||
.el-form-item .el-select-v2 {
|
||||
width: 196px;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
margin: 5px 5px 5px 5px;
|
||||
width: inherit;
|
||||
|
|
@ -793,4 +789,9 @@ const getPrintTabs = (boxSummary) => {
|
|||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import {createRouter, createWebHashHistory} from 'vue-router'
|
||||
import HomeView from '@/views/HomeView.vue'
|
||||
import login from '@/views/login.vue'
|
||||
import systemCenter from'@/views/SystemCenter.vue'
|
||||
import systemCenter from '@/views/SystemCenter.vue'
|
||||
|
||||
const routes = [
|
||||
{
|
||||
|
|
@ -10,32 +10,33 @@ const routes = [
|
|||
component: HomeView,
|
||||
// redirect: '/stock',
|
||||
children: [
|
||||
{ path: '/stock', component: () => import('@/layout/stock.vue')},// 库存
|
||||
{ path: '/goodsIn', component: () => import('@/layout/goodsIn.vue') },// 入库
|
||||
{ path: '/goodsOut', component: () => import('@/layout/goodsOut.vue') },// 出库
|
||||
{ path: '/kitting', component: () => import('@/layout/kitting.vue') },// 配料
|
||||
{ path: '/inTaskRecord', component: () => import('@/layout/inTaskRecord.vue') },// 入库记录
|
||||
{ path: '/outTaskRecord', component: () => import('@/layout/outTaskRecord.vue') },// 出库记录
|
||||
{ path: '/location', component: () => import('@/layout/locationsTable.vue') },// 库位
|
||||
{ path: '/goods', component: () => import('@/layout/goods.vue') },// 物料
|
||||
{ path: '/standSettings', component: () => import('@/layout/standSettings.vue') },// 站台(库口)设置
|
||||
{ path: '/config', component: () => import('@/layout/wmsConfigNew.vue') },// 系统配置
|
||||
{ path: '/taskMonitor', component: () => import('@/layout/taskMonitor.vue') },// 任务监控
|
||||
{ path: '/vehicles', component: () => import('@/layout/vehicle.vue') },// 料箱监控
|
||||
{ path: '/inventory', component: () => import('@/layout/inventory.vue') },// 盘点
|
||||
{ path: '/inventoryRecord', component: () => import('@/layout/inventoryRecord.vue') },// 盘点记录
|
||||
{ path: '/wmsLog', component: () => import('@/layout/wmsLog.vue') },// 日志
|
||||
{ path: '/workSummary', component: () => import('@/layout/workSummary.vue') },// 工作总结
|
||||
{ path: '/pickTask', component: () => import('@/layout/pickTaskMonitor.vue') },// 拣选任务
|
||||
{ path: '/clcKanban', component: () => import('@/layout/clcKanban.vue') },// 需求看板
|
||||
{ path: '/stockUpdateRecord', component: () => import('@/layout/stockUpdateRecord.vue') },// 库存更新记录
|
||||
{ path: '/roleUser', component: () => import('@/layout/role_user.vue') },// 角色——用户列表
|
||||
{ path: '/rolePermission', component: () => import('@/layout/role_permission.vue') },// 角色——权限列表
|
||||
{ path: '/test', component: () => import('@/layout/testView.vue') },// 测试
|
||||
{ path: '/dbsList', component: () => import('@/layout/dbsList.vue') },// dbs计划
|
||||
{ path: '/kittingList', component: () => import('@/layout/kittingList.vue') },// 配料单
|
||||
{ path: '/kittingRelation', component: () => import('@/layout/kittingRelation.vue') },// 配料单
|
||||
{ path: '/locationVisualization', component: () => import('@/layout/locationVisualization.vue')} // 库位可视化
|
||||
{path: '/stock', component: () => import('@/layout/stock.vue')},// 库存
|
||||
{path: '/goodsIn', component: () => import('@/layout/goodsIn.vue')},// 入库
|
||||
{path: '/goodsOut', component: () => import('@/layout/goodsOut.vue')},// 出库
|
||||
{path: '/kitting', component: () => import('@/layout/kitting.vue')},// 配料
|
||||
{path: '/inTaskRecord', component: () => import('@/layout/inTaskRecord.vue')},// 入库记录
|
||||
{path: '/outTaskRecord', component: () => import('@/layout/outTaskRecord.vue')},// 出库记录
|
||||
{path: '/location', component: () => import('@/layout/locationsTable.vue')},// 库位
|
||||
{path: '/goods', component: () => import('@/layout/goods.vue')},// 物料
|
||||
{path: '/standSettings', component: () => import('@/layout/standSettings.vue')},// 站台(库口)设置
|
||||
{path: '/config', component: () => import('@/layout/wmsConfigNew.vue')},// 系统配置
|
||||
{path: '/taskMonitor', component: () => import('@/layout/taskMonitor.vue')},// 任务监控
|
||||
{path: '/vehicles', component: () => import('@/layout/vehicle.vue')},// 料箱监控
|
||||
{path: '/inventory', component: () => import('@/layout/inventory.vue')},// 盘点
|
||||
{path: '/inventoryRecord', component: () => import('@/layout/inventoryRecord.vue')},// 盘点记录
|
||||
{path: '/wmsLog', component: () => import('@/layout/wmsLog.vue')},// 日志
|
||||
{path: '/workSummary', component: () => import('@/layout/workSummary.vue')},// 工作总结
|
||||
{path: '/pickTask', component: () => import('@/layout/pickTaskMonitor.vue')},// 拣选任务
|
||||
{path: '/outsMonitor', component: () => import('@/layout/OutsMonitor.vue')},// 任务表单
|
||||
{path: '/clcKanban', component: () => import('@/layout/clcKanban.vue')},// 需求看板
|
||||
{path: '/stockUpdateRecord', component: () => import('@/layout/stockUpdateRecord.vue')},// 库存更新记录
|
||||
{path: '/roleUser', component: () => import('@/layout/role_user.vue')},// 角色——用户列表
|
||||
{path: '/rolePermission', component: () => import('@/layout/role_permission.vue')},// 角色——权限列表
|
||||
{path: '/test', component: () => import('@/layout/testView.vue')},// 测试
|
||||
{path: '/dbsList', component: () => import('@/layout/dbsList.vue')},// dbs计划
|
||||
{path: '/kittingList', component: () => import('@/layout/kittingList.vue')},// 配料单
|
||||
{path: '/kittingRelation', component: () => import('@/layout/kittingRelation.vue')},// 对应关系
|
||||
{path: '/imageTable', component: () => import('@/layout/ImageTable.vue')},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -53,11 +54,6 @@ const routes = [
|
|||
name: 'imageDisplay',
|
||||
component: () => import('@/layout/imageDisplay.vue')
|
||||
},
|
||||
{
|
||||
path: '/imageTable',
|
||||
name: 'imageTable',
|
||||
component: () => import('@/layout/imageTable.vue')
|
||||
},
|
||||
{
|
||||
path: '/scanForImage',
|
||||
name: 'scanForImage',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import moment from "moment";
|
|||
import { revertSeconds } from '@/utils/dateUtils'
|
||||
// 时间格式化
|
||||
export const timeFormatter = (date) => {
|
||||
if (date === null || date === undefined) {
|
||||
if (date === null || date === undefined || date === '') {
|
||||
return ''
|
||||
}
|
||||
return moment(date).format('yyyy-MM-DD HH:mm:ss');
|
||||
|
|
@ -24,13 +24,13 @@ export const dueFormatter = (date) => {
|
|||
|
||||
// 库位格式化
|
||||
export const locationFormatter = (locationId) => {
|
||||
if (locationId === null || locationId == undefined) {
|
||||
if (locationId === null || locationId === undefined || locationId === '') {
|
||||
return ''
|
||||
}
|
||||
const locationArray = locationId.split('-')
|
||||
if (locationArray.length == 3) {
|
||||
if (locationArray.length === 3) {
|
||||
return locationArray[0] + '排' + locationArray[1] + '列' + locationArray[2] + '层'
|
||||
} else if (locationArray.length == 4) {
|
||||
} else if (locationArray.length === 4) {
|
||||
return locationArray[0] + '排' + locationArray[1] + '列' + locationArray[2] + '层' + locationArray[3] + '深度'
|
||||
} else {
|
||||
return ''
|
||||
|
|
@ -104,11 +104,11 @@ export const replaceEnglishAndNumberIGAI = (value) => {
|
|||
}
|
||||
// 是否格式化
|
||||
export const yesOrNoFormatter = (value) => {
|
||||
return value == 1 ? '是' : '否'
|
||||
return value === 1 ? '是' : '否'
|
||||
}
|
||||
// 反转是否格式化
|
||||
export const converseYesOrNoFormatter = (value) => {
|
||||
return value == 0 ? '是' : '否'
|
||||
return value === 0 ? '是' : '否'
|
||||
}
|
||||
// 任务类型格式化
|
||||
export const wmsTaskTypeFormatter = (value) => {
|
||||
|
|
@ -161,3 +161,43 @@ export const vehicleStatusFormatter = (value) => {
|
|||
return '未知状态'
|
||||
}
|
||||
}
|
||||
// 拣选任务状态
|
||||
export const pickTaskStatusFormatter = (value) => {
|
||||
switch (value) {
|
||||
case -2:
|
||||
return '入库用'
|
||||
case -1:
|
||||
return '暂存中'
|
||||
case 0:
|
||||
return '待下发'
|
||||
case 1:
|
||||
return '已下发'
|
||||
case 2:
|
||||
return '执行中'
|
||||
case 3:
|
||||
return '已到达'
|
||||
case 4:
|
||||
return '已离开'
|
||||
case 5:
|
||||
return '拣选取消'
|
||||
default:
|
||||
return '已取消'
|
||||
}
|
||||
}
|
||||
// 出库单类型格式化
|
||||
export const outTaskTypeFormatter = (value) => {
|
||||
switch (value) {
|
||||
case 1:
|
||||
return '空箱出库'
|
||||
case 2:
|
||||
return '普通出库'
|
||||
case 4:
|
||||
return '完整出库'
|
||||
case 5:
|
||||
return '入库使用'
|
||||
case 9:
|
||||
return '紧急出库'
|
||||
default:
|
||||
return '未知类型'
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +1,40 @@
|
|||
package com.wms_main;
|
||||
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
||||
/**
|
||||
* 系统启动类
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class WmsMainApplication {
|
||||
|
||||
/**
|
||||
* 用于重启程序的上下文
|
||||
*/
|
||||
private static ConfigurableApplicationContext context;
|
||||
|
||||
/**
|
||||
* 主函数,程序的入口
|
||||
*
|
||||
* @param args 命令行参数,以字符串数组形式传入
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(WmsMainApplication.class, args);
|
||||
context = SpringApplication.run(WmsMainApplication.class, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重启程序
|
||||
*/
|
||||
public static void restart() {
|
||||
ApplicationArguments args = context.getBean(ApplicationArguments.class);
|
||||
Thread thread = new Thread(() -> {
|
||||
context.close();
|
||||
context = SpringApplication.run(WmsMainApplication.class, args.getSourceArgs());
|
||||
});
|
||||
thread.setDaemon(false);
|
||||
thread.start();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ package com.wms_main.constant.enums.jobs;
|
|||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 定时器定时类型
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum JobTimerTypeEnums {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 盘点结果枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsInvResultEnums {
|
||||
NONE(-99, "未盘点"),
|
||||
MINUS(-1, "盘亏"),
|
||||
EQUAL(0, "正常"),
|
||||
PLUS(1, "盘盈");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 盘点状态枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsInvStatusEnums {
|
||||
INIT(0, "初始化"),
|
||||
EXECUTED(1, "已解析"),
|
||||
CONFIRMED(2, "已确认");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 盘点类型枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsInvTypeEnums {
|
||||
INV_TYPE_1(1, "明盘"),
|
||||
INV_TYPE_2(2, "盲盘");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -113,6 +113,16 @@ public class KateWorkController {
|
|||
return kateWorkControllerService.requestImageDetail(imageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询图纸---分页
|
||||
* @param imageQuery 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
@PostMapping("/queryImagesByPage")
|
||||
public WmsApiResponse<PageVo<ImageVo>> queryImagesByPage(@RequestBody ImageQuery imageQuery) {
|
||||
return kateWorkControllerService.queryImagesByPage(imageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询DBS数据--分页
|
||||
* @param dbsQuery 查询参数
|
||||
|
|
@ -202,4 +212,14 @@ public class KateWorkController {
|
|||
WmsApiResponse<BoxSummary> requestPrintBoxTags(@RequestBody KateWorksQuery kateWorksQuery) {
|
||||
return kateWorkControllerService.requestPrintBoxTags(kateWorksQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当前dbs工单计划
|
||||
* @param dbsRequest 关闭请求
|
||||
* @return 删除结果
|
||||
*/
|
||||
@PostMapping("/deleteDbsPlan")
|
||||
public BaseWmsApiResponse deleteDbsPlan(@RequestBody DbsRequest dbsRequest) {
|
||||
return kateWorkControllerService.deleteDbsPlan(dbsRequest);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.wms_main.model.dto.response.wcs.BaseWcsApiResponse;
|
|||
import com.wms_main.model.dto.response.wcs.WcsApiResponse;
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||
import com.wms_main.model.vo.wms.InventoryConfirmVo;
|
||||
import com.wms_main.model.vo.wms.TaskConfirmVo;
|
||||
import com.wms_main.service.controller.ITaskControllerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
|
@ -114,4 +115,34 @@ public class TaskController {
|
|||
public BaseWmsApiResponse confirmCurrentTask(@RequestBody ConfirmTaskRequest confirmTaskRequest) {
|
||||
return taskControllerService.confirmCurrentTask(confirmTaskRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下发盘点请求
|
||||
* @param inventoryRequest 盘点请求
|
||||
* @return 请求结果
|
||||
*/
|
||||
@PostMapping("/requestInventory")
|
||||
public BaseWmsApiResponse requestInventory(@RequestBody InventoryRequest inventoryRequest) {
|
||||
return taskControllerService.requestInventory(inventoryRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询盘点任务确认信息
|
||||
* @param inventoryConfirmRequest 请求
|
||||
* @return 请求结果
|
||||
*/
|
||||
@PostMapping("/getInventoryConfirm")
|
||||
WmsApiResponse<InventoryConfirmVo> getInventoryConfirm(@RequestBody InventoryConfirmRequest inventoryConfirmRequest) {
|
||||
return taskControllerService.getInventoryConfirm(inventoryConfirmRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认盘点信息
|
||||
* @param inventoryConfirmRequest 确认请求
|
||||
* @return 处理结果
|
||||
*/
|
||||
@PostMapping("/confirmInventory")
|
||||
BaseWmsApiResponse confirmInventory(@RequestBody InventoryConfirmRequest inventoryConfirmRequest) {
|
||||
return taskControllerService.confirmInventory(inventoryConfirmRequest);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import com.wms_main.model.dto.request.wms.WmsTaskRequest;
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
import com.wms_main.service.controller.ITaskOperationControllerService;
|
||||
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;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 任务操作控制类
|
||||
|
|
@ -16,4 +16,25 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
@RequiredArgsConstructor
|
||||
@RequestMapping("/wms/taskOperation")
|
||||
public class TaskOperationController {
|
||||
private final ITaskOperationControllerService taskOperationControllerService;
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
* @param wmsTaskRequest 请求
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/deleteWmsTask")
|
||||
public BaseWmsApiResponse deleteWmsTask(@RequestBody WmsTaskRequest wmsTaskRequest) {
|
||||
return taskOperationControllerService.deleteWmsTask(wmsTaskRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新任务
|
||||
* @param wmsTaskRequest 请求
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/updateWmsTask")
|
||||
public BaseWmsApiResponse updateWmsTask(@RequestBody WmsTaskRequest wmsTaskRequest) {
|
||||
return taskOperationControllerService.updateWmsTask(wmsTaskRequest);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import com.wms_main.model.dto.query.OutsQuery;
|
||||
import com.wms_main.model.dto.query.PickTaskQuery;
|
||||
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.TaskRecordVo;
|
||||
import com.wms_main.model.vo.wms.TaskVo;
|
||||
import com.wms_main.model.vo.wms.*;
|
||||
import com.wms_main.service.controller.ITaskQueryControllerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -53,4 +53,26 @@ public class TaskQueryController {
|
|||
{
|
||||
return taskQueryControllerService.queryOutTaskRecordByPage(wmsTaskQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wms拣选任务分页查询
|
||||
* @param pickTaskQuery 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
@PostMapping("/queryPickTasksByPage")
|
||||
public WmsApiResponse<PageVo<PickTaskVo>> queryPickTasksByPage(@RequestBody PickTaskQuery pickTaskQuery)
|
||||
{
|
||||
return taskQueryControllerService.queryPickTasksByPage(pickTaskQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库单分页查询
|
||||
* @param outsQuery 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
@PostMapping("/queryOutsByPage")
|
||||
public WmsApiResponse<PageVo<OutsVo>> queryOutsByPage(@RequestBody OutsQuery outsQuery)
|
||||
{
|
||||
return taskQueryControllerService.queryOutsByPage(outsQuery);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppInventoryRecord;
|
||||
|
||||
/**
|
||||
* 盘点任务记录服务接口
|
||||
*/
|
||||
public interface ITAppInventoryRecordService extends IService<TAppInventoryRecord> {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppInventory;
|
||||
|
||||
/**
|
||||
* 盘点任务服务接口
|
||||
*/
|
||||
public interface ITAppInventoryService extends IService<TAppInventory> {
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.wms_main.dao.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.wms_main.dao.ITAppInventoryRecordService;
|
||||
import com.wms_main.mapper.AppInventoryRecordMapper;
|
||||
import com.wms_main.model.po.TAppInventoryRecord;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 盘点记录表服务实现
|
||||
*/
|
||||
@Service
|
||||
public class TAppInventoryRecordServiceImpl extends ServiceImpl<AppInventoryRecordMapper, TAppInventoryRecord> implements ITAppInventoryRecordService {
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.wms_main.dao.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.wms_main.dao.ITAppInventoryService;
|
||||
import com.wms_main.mapper.AppInventoryMapper;
|
||||
import com.wms_main.model.po.TAppInventory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 盘点任务表服务实现
|
||||
*/
|
||||
@Service
|
||||
public class TAppInventoryServiceImpl extends ServiceImpl<AppInventoryMapper, TAppInventory> implements ITAppInventoryService {
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ public class ImportExcelEasyPoi extends BaseImportExcelEasyPoi implements IImpor
|
|||
|| dbsRawData.getPlanProduction() == null
|
||||
|| StringUtils.isEmpty(dbsRawData.getFamily())
|
||||
|| StringUtils.isEmpty(dbsRawData.getTestNo())) {
|
||||
continue;
|
||||
return BaseWmsApiResponse.error("存在信息不全的数据行。");
|
||||
}
|
||||
if (dbsRawData.getFamily().contains("NGH")) {
|
||||
// 去除J列的NGH
|
||||
|
|
@ -131,7 +131,8 @@ public class ImportExcelEasyPoi extends BaseImportExcelEasyPoi implements IImpor
|
|||
tAppDbsService.saveBatch(newDbsMapToSave.values());
|
||||
// 保存导入file记录
|
||||
saveFileVo(fileVo);
|
||||
return BaseWmsApiResponse.success("导入计划成功。");
|
||||
return BaseWmsApiResponse.success("导入计划成功。\n非NGH:" + dbsList.size() + "条,成功:" + newDbsMapToSave.size()
|
||||
+ "条。");
|
||||
} catch (Exception e) {
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
|
|
@ -166,13 +167,12 @@ public class ImportExcelEasyPoi extends BaseImportExcelEasyPoi implements IImpor
|
|||
|| StringUtils.isEmpty(productRawData.getProductId())
|
||||
|| productRawData.getQuantity1Pair() == null
|
||||
|| StringUtils.isEmpty(productRawData.getGoodsId())
|
||||
|| StringUtils.isEmpty(productRawData.getGoodsDesc())
|
||||
|| productRawData.getQuantityOfPairs() == null
|
||||
|| StringUtils.isEmpty(productRawData.getBoxNo())) {
|
||||
continue;
|
||||
return BaseWmsApiResponse.error("存在信息不全的数据行。");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(thisProductId) && !thisProductId.equals(productRawData.getProductId())) {
|
||||
continue;
|
||||
return BaseWmsApiResponse.error("存在多个成品号。");
|
||||
} else {
|
||||
thisProductId = productRawData.getProductId();
|
||||
}
|
||||
|
|
@ -210,7 +210,8 @@ public class ImportExcelEasyPoi extends BaseImportExcelEasyPoi implements IImpor
|
|||
tAppImageService.saveOrUpdateBatch(imageList);
|
||||
// 保存导入file记录
|
||||
saveFileVo(fileVo);
|
||||
return BaseWmsApiResponse.success("导入配料单成功。");
|
||||
return BaseWmsApiResponse.success("导入配料单成功。\n原始:" + productRawDatas.size() + "条,成功:" + productList.size()
|
||||
+ "条。\n图纸原始:" + imageRawDatas.size() + "条,成功:" + imageList.size() + "条。");
|
||||
} catch (Exception e) {
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
|
|
@ -245,13 +246,12 @@ public class ImportExcelEasyPoi extends BaseImportExcelEasyPoi implements IImpor
|
|||
|| StringUtils.isEmpty(productRawData.getSingleProductId())
|
||||
|| productRawData.getQuantity1Pair() == null
|
||||
|| StringUtils.isEmpty(productRawData.getGoodsId())
|
||||
|| StringUtils.isEmpty(productRawData.getGoodsDesc())
|
||||
|| productRawData.getQuantityOfPairs() == null
|
||||
|| StringUtils.isEmpty(productRawData.getBoxNo())) {
|
||||
continue;
|
||||
return BaseWmsApiResponse.error("存在信息不全的数据行。");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(thisProductId) && !thisProductId.equals(productRawData.getSingleProductId())) {
|
||||
continue;
|
||||
return BaseWmsApiResponse.error("存在多个服务件成品号。");
|
||||
} else {
|
||||
thisProductId = productRawData.getSingleProductId();
|
||||
}
|
||||
|
|
@ -289,7 +289,8 @@ public class ImportExcelEasyPoi extends BaseImportExcelEasyPoi implements IImpor
|
|||
tAppImageService.saveOrUpdateBatch(imageList);
|
||||
// 保存导入file记录
|
||||
saveFileVo(fileVo);
|
||||
return BaseWmsApiResponse.success("导入服务件配料单成功。");
|
||||
return BaseWmsApiResponse.success("导入服务件配料单成功。\n原始:" + productRawDatas.size() + "条,成功:" + productList.size()
|
||||
+ "条。\n图纸原始:" + imageRawDatas.size() + "条,成功:" + imageList.size() + "条。");
|
||||
} catch (Exception e) {
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
package com.wms_main.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wms_main.model.po.TAppConfig;
|
||||
import com.wms_main.model.po.TAppInventory;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 盘点任务表mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppInventoryMapper extends BaseMapper<TAppInventory> {
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.wms_main.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wms_main.model.po.TAppInventory;
|
||||
import com.wms_main.model.po.TAppInventoryRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 盘点记录表mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface AppInventoryRecordMapper extends BaseMapper<TAppInventoryRecord> {
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.wms_main.model.dto.query;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
|
@ -21,59 +22,72 @@ public class DbsQuery extends PageQuery {
|
|||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@JsonProperty("dbsId")
|
||||
private String dbsId;
|
||||
/**
|
||||
* 工单
|
||||
*/
|
||||
@JsonProperty("workOrder")
|
||||
private String workOrder;
|
||||
/**
|
||||
* dbs原始未处理的零件号,成品号
|
||||
*/
|
||||
@JsonProperty("productIdOrigin")
|
||||
private String productIdOrigin;
|
||||
/**
|
||||
* 零件号,成品号
|
||||
*/
|
||||
@JsonProperty("productId")
|
||||
private String productId;
|
||||
/**
|
||||
* 计划开始时间
|
||||
*/
|
||||
@JsonProperty("planStartDate")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate planStartDate;
|
||||
/**
|
||||
* 计划产量/套
|
||||
*/
|
||||
@JsonProperty("planProduction")
|
||||
private Integer planProduction;
|
||||
/**
|
||||
* Family
|
||||
*/
|
||||
@JsonProperty("family")
|
||||
private String family;
|
||||
/**
|
||||
* Test No#
|
||||
*/
|
||||
@JsonProperty("testNo")
|
||||
private String testNo;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@JsonProperty("dbsStatus")
|
||||
private Integer dbsStatus;
|
||||
/**
|
||||
* 工作站台
|
||||
*/
|
||||
@JsonProperty("workStand")
|
||||
private String workStand;
|
||||
/**
|
||||
* 实际工作日期
|
||||
*/
|
||||
@JsonProperty("realWorkDate")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate realWorkDate;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@JsonProperty("finishTime")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private LocalDateTime finishTime;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@JsonProperty("remark")
|
||||
private String remark;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
package com.wms_main.model.dto.query;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 出库单查询
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OutsQuery extends PageQuery {
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
@JsonProperty("taskId")
|
||||
private String taskId;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 需求数量
|
||||
*/
|
||||
@JsonProperty("needNum")
|
||||
private Integer needNum;
|
||||
/**
|
||||
* 已分发数量
|
||||
*/
|
||||
@JsonProperty("distributeNum")
|
||||
private Integer distributeNum;
|
||||
/**
|
||||
* 已拣选数量
|
||||
*/
|
||||
@JsonProperty("pickNum")
|
||||
private Integer pickNum;
|
||||
/**
|
||||
* 出库类型
|
||||
*/
|
||||
@JsonProperty("outType")
|
||||
private Integer outType;
|
||||
/**
|
||||
* 目的地
|
||||
*/
|
||||
@JsonProperty("destination")
|
||||
private String destination;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@JsonProperty("userName")
|
||||
private String userName;
|
||||
/**
|
||||
* 出库理由
|
||||
* 紧急出库必填
|
||||
*/
|
||||
@JsonProperty("reason")
|
||||
private String reason;
|
||||
/**
|
||||
* 请求时间
|
||||
*/
|
||||
@JsonProperty("requestTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime requestTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.wms_main.model.dto.query;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 拣选任务查询参数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PickTaskQuery extends PageQuery {
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@JsonProperty("pickId")
|
||||
private String pickId;
|
||||
/**
|
||||
* 拣选站台
|
||||
*/
|
||||
@JsonProperty("pickStand")
|
||||
private String pickStand;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@JsonProperty("pickStatus")
|
||||
private Integer pickStatus;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonProperty("createTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 发送时间
|
||||
*/
|
||||
@JsonProperty("sendTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime sendTime;
|
||||
/**
|
||||
* 到达时间
|
||||
*/
|
||||
@JsonProperty("arriveTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime arriveTime;
|
||||
/**
|
||||
* 离开时间
|
||||
*/
|
||||
@JsonProperty("leaveTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime leaveTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.wms_main.model.dto.request.wms;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* Dbs请求
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DbsRequest extends BaseWmsRequest {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private String dbsId;
|
||||
/**
|
||||
* 工单
|
||||
*/
|
||||
private String workOrder;
|
||||
/**
|
||||
* dbs原始未处理的零件号,成品号
|
||||
*/
|
||||
private String productIdOrigin;
|
||||
/**
|
||||
* 零件号,成品号
|
||||
*/
|
||||
private String productId;
|
||||
/**
|
||||
* 计划开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate planStartDate;
|
||||
/**
|
||||
* 计划产量/套
|
||||
*/
|
||||
private Integer planProduction;
|
||||
/**
|
||||
* Family
|
||||
*/
|
||||
private String family;
|
||||
/**
|
||||
* Test No#
|
||||
*/
|
||||
private String testNo;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer dbsStatus;
|
||||
/**
|
||||
* 工作站台
|
||||
*/
|
||||
private String workStand;
|
||||
/**
|
||||
* 实际工作日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate realWorkDate;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
private LocalDateTime finishTime;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.wms_main.model.dto.request.wms;
|
||||
|
||||
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 InventoryConfirmRequest extends BaseWmsRequest {
|
||||
/**
|
||||
* 盘点任务号
|
||||
*/
|
||||
@JsonProperty("inventoryId")
|
||||
private String inventoryId;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 箱号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
@JsonProperty("confirmNum")
|
||||
private Integer confirmNum;
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.wms_main.model.dto.request.wms;
|
||||
|
||||
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 InventoryRequest extends BaseWmsRequest {
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 箱号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
}
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
package com.wms_main.model.dto.request.wms;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* Wms任务请求
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class WmsTaskRequest extends BaseWmsRequest {
|
||||
/**
|
||||
* 任务ID
|
||||
*/
|
||||
@JsonProperty("taskId")
|
||||
private String taskId;
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@JsonProperty("taskType")
|
||||
private Integer taskType;
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@JsonProperty("taskStatus")
|
||||
private Integer taskStatus;
|
||||
/**
|
||||
* 任务优先级
|
||||
*/
|
||||
@JsonProperty("taskPriority")
|
||||
private Integer taskPriority;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 起点
|
||||
*/
|
||||
@JsonProperty("origin")
|
||||
private String origin;
|
||||
/**
|
||||
* 终点
|
||||
*/
|
||||
@JsonProperty("destination")
|
||||
private String destination;
|
||||
/**
|
||||
* wcs任务id
|
||||
*/
|
||||
@JsonProperty("wcsTaskId")
|
||||
private String wcsTaskId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonProperty("createTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@JsonProperty("finishTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime finishTime;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 操作数量
|
||||
*/
|
||||
@JsonProperty("opNum")
|
||||
private Integer opNum;
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
@JsonProperty("stockNum")
|
||||
private Integer stockNum;
|
||||
/**
|
||||
* 操纵用户
|
||||
*/
|
||||
@JsonProperty("opUser")
|
||||
private String opUser;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@JsonProperty("remark")
|
||||
private String remark;
|
||||
/**
|
||||
* 申请出库的站台
|
||||
*/
|
||||
@JsonProperty("callStand")
|
||||
private String callStand;
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
@JsonProperty("goodsDesc")
|
||||
private String goodsDesc;
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.wms_main.model.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 盘点任务
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "t_app_inventory", autoResultMap = true)
|
||||
public class TAppInventory {
|
||||
/**
|
||||
* 盘点id
|
||||
*/
|
||||
@TableId(value = "inventory_id")
|
||||
private String inventoryId;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@TableField(value = "goods_id")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@TableField(value = "vehicle_id")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 库存数量
|
||||
* 只记录盘点确认时间点
|
||||
*/
|
||||
@TableField(value = "stock_num")
|
||||
private Integer stockNum;
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
@TableField(value = "confirm_num")
|
||||
private Integer confirmNum;
|
||||
/**
|
||||
* 盘点站台
|
||||
*/
|
||||
@TableField(value = "inv_stand")
|
||||
private String invStand;
|
||||
/**
|
||||
* 盘点人
|
||||
*/
|
||||
@TableField(value = "inv_user")
|
||||
private String invUser;
|
||||
/**
|
||||
* 盘点类型:1:明盘;2:盲盘
|
||||
*/
|
||||
@TableField(value = "inv_type")
|
||||
private Integer invType;
|
||||
/**
|
||||
* 盘点状态
|
||||
* 0. 初始化
|
||||
* 1. 已解析
|
||||
* 2. 已确认
|
||||
*/
|
||||
@TableField(value = "inv_status")
|
||||
private Integer invStatus;
|
||||
/**
|
||||
* 盘点结果
|
||||
* -99:未盘
|
||||
* -1: 盘亏
|
||||
* 0: 正常
|
||||
* 1: 盘盈
|
||||
*/
|
||||
@TableField(value = "inv_result")
|
||||
private Integer invResult;
|
||||
/**
|
||||
* 盘点任务创建时间
|
||||
*/
|
||||
@TableField(value = "inv_create_time")
|
||||
private LocalDateTime invCreateTime;
|
||||
/**
|
||||
* 盘点确认时间
|
||||
*/
|
||||
@TableField(value = "inv_confirm_time")
|
||||
private LocalDateTime invConfirmTime;
|
||||
/**
|
||||
* 这个字段用于合并哪些任务是同一时间下发的
|
||||
*/
|
||||
@TableField(value = "inv_order_id")
|
||||
private String invOrderId;
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.wms_main.model.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 盘点记录
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "t_app_inventory_record", autoResultMap = true)
|
||||
public class TAppInventoryRecord {
|
||||
/**
|
||||
* 盘点id
|
||||
*/
|
||||
@TableId(value = "inventory_id")
|
||||
private String inventoryId;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@TableField(value = "goods_id")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@TableField(value = "vehicle_id")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 库存数量
|
||||
* 只记录盘点确认时间点
|
||||
*/
|
||||
@TableField(value = "stock_num")
|
||||
private Integer stockNum;
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
@TableField(value = "confirm_num")
|
||||
private Integer confirmNum;
|
||||
/**
|
||||
* 盘点站台
|
||||
*/
|
||||
@TableField(value = "inv_stand")
|
||||
private String invStand;
|
||||
/**
|
||||
* 盘点人
|
||||
*/
|
||||
@TableField(value = "inv_user")
|
||||
private String invUser;
|
||||
/**
|
||||
* 盘点类型:1:明盘;2:盲盘
|
||||
*/
|
||||
@TableField(value = "inv_type")
|
||||
private Integer invType;
|
||||
/**
|
||||
* 盘点状态
|
||||
* 1. 初始化
|
||||
* 2. 已解析
|
||||
* 3. 数量确认
|
||||
* 4. 盘点关闭
|
||||
*/
|
||||
@TableField(value = "inv_status")
|
||||
private Integer invStatus;
|
||||
/**
|
||||
* 盘点结果
|
||||
* -1: 盘亏
|
||||
* 0: 正常
|
||||
* 1: 盘盈
|
||||
*/
|
||||
@TableField(value = "inv_result")
|
||||
private Integer invResult;
|
||||
/**
|
||||
* 盘点任务创建时间
|
||||
*/
|
||||
@TableField(value = "inv_create_time")
|
||||
private LocalDateTime invCreateTime;
|
||||
/**
|
||||
* 盘点确认时间
|
||||
*/
|
||||
@TableField(value = "inv_confirm_time")
|
||||
private LocalDateTime invConfirmTime;
|
||||
/**
|
||||
* 这个字段用于合并哪些任务是同一时间下发的
|
||||
*/
|
||||
@TableField(value = "inv_order_id")
|
||||
private String invOrderId;
|
||||
}
|
||||
|
|
@ -7,7 +7,6 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
|
@ -99,4 +98,14 @@ public class TAppStock {
|
|||
*/
|
||||
@TableField(value = "sled")
|
||||
private Integer sled;
|
||||
/**
|
||||
* 上次盘点任务号
|
||||
*/
|
||||
@TableField(value = "last_inventory_id")
|
||||
private String lastInventoryId;
|
||||
/**
|
||||
* 上次盘点时间
|
||||
*/
|
||||
@TableField(value = "last_inventory_time")
|
||||
private LocalDateTime lastInventoryTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,15 +4,17 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||
import com.wms_main.model.po.TAppImage;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 图纸Vo
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ImageVo {
|
||||
public class ImageVo extends BaseImportVo {
|
||||
/**
|
||||
* 图纸id
|
||||
*/
|
||||
|
|
@ -55,4 +57,25 @@ public class ImageVo {
|
|||
*/
|
||||
@JsonProperty("imageType")
|
||||
private Integer imageType;
|
||||
|
||||
/**
|
||||
* 将po对象转换为vo对象
|
||||
* @param po po对象
|
||||
* @return vo
|
||||
*/
|
||||
public static ImageVo ofPo(TAppImage po)
|
||||
{
|
||||
ImageVo imageVo = new ImageVo();
|
||||
if (po == null) {
|
||||
return imageVo;
|
||||
}
|
||||
imageVo.setImageId(po.getImageId());
|
||||
imageVo.setProductId(po.getProductId());
|
||||
imageVo.setBoxNo(po.getBoxNo());
|
||||
imageVo.setImagePath(po.getImagePath());
|
||||
imageVo.setImageName(po.getImageName());
|
||||
// imageVo.setImageDetail(po.getImageDetail());
|
||||
imageVo.setImageType(po.getImageType());
|
||||
return imageVo;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
package com.wms_main.model.vo.wms;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 盘点确认界面显示Vo
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class InventoryConfirmVo {
|
||||
/**
|
||||
* 盘点任务号
|
||||
*/
|
||||
@JsonProperty("inventoryId")
|
||||
private String inventoryId;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
@JsonProperty("stockNum")
|
||||
private Integer stockNum;
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
@JsonProperty("confirmNum")
|
||||
private Integer confirmNum;
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.wms_main.model.vo.wms;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.wms_main.model.po.TAppOuts;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 出库单Vo
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OutsVo {
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
@JsonProperty("taskId")
|
||||
private String taskId;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 需求数量
|
||||
*/
|
||||
@JsonProperty("needNum")
|
||||
private Integer needNum;
|
||||
/**
|
||||
* 已分发数量
|
||||
*/
|
||||
@JsonProperty("distributeNum")
|
||||
private Integer distributeNum;
|
||||
/**
|
||||
* 已拣选数量
|
||||
*/
|
||||
@JsonProperty("pickNum")
|
||||
private Integer pickNum;
|
||||
/**
|
||||
* 出库类型
|
||||
*/
|
||||
@JsonProperty("outType")
|
||||
private Integer outType;
|
||||
/**
|
||||
* 目的地
|
||||
*/
|
||||
@JsonProperty("destination")
|
||||
private String destination;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@JsonProperty("userName")
|
||||
private String userName;
|
||||
/**
|
||||
* 出库理由
|
||||
* 紧急出库必填
|
||||
*/
|
||||
@JsonProperty("reason")
|
||||
private String reason;
|
||||
/**
|
||||
* 请求时间
|
||||
*/
|
||||
@JsonProperty("requestTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime requestTime;
|
||||
|
||||
/**
|
||||
* 将po转换为vo
|
||||
* @param po 数据库实体
|
||||
* @return 转化结果
|
||||
*/
|
||||
public static OutsVo of(TAppOuts po) {
|
||||
if (po == null) {
|
||||
return new OutsVo();
|
||||
}
|
||||
return new OutsVo(
|
||||
po.getTaskId(),
|
||||
po.getGoodsId(),
|
||||
po.getVehicleId(),
|
||||
po.getNeedNum(),
|
||||
po.getDistributeNum(),
|
||||
po.getPickNum(),
|
||||
po.getOutType(),
|
||||
po.getDestination(),
|
||||
po.getUserName(),
|
||||
po.getReason(),
|
||||
po.getRequestTime()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package com.wms_main.model.vo.wms;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.wms_main.model.po.TAppPickTask;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 拣选任务Vo
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PickTaskVo {
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@JsonProperty("pickId")
|
||||
private String pickId;
|
||||
/**
|
||||
* 拣选站台
|
||||
*/
|
||||
@JsonProperty("pickStand")
|
||||
private String pickStand;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@JsonProperty("pickStatus")
|
||||
private Integer pickStatus;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonProperty("createTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 发送时间
|
||||
*/
|
||||
@JsonProperty("sendTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime sendTime;
|
||||
/**
|
||||
* 到达时间
|
||||
*/
|
||||
@JsonProperty("arriveTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime arriveTime;
|
||||
/**
|
||||
* 离开时间
|
||||
*/
|
||||
@JsonProperty("leaveTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime leaveTime;
|
||||
|
||||
/**
|
||||
* 将Po转化为Vo
|
||||
* @param po 数据库实体
|
||||
* @return 转化结果
|
||||
*/
|
||||
public static PickTaskVo of(TAppPickTask po) {
|
||||
if (po == null) {
|
||||
return new PickTaskVo();
|
||||
}
|
||||
return new PickTaskVo(
|
||||
po.getPickId(),
|
||||
po.getPickStand(),
|
||||
po.getVehicleId(),
|
||||
po.getPickStatus(),
|
||||
po.getCreateTime(),
|
||||
po.getSendTime(),
|
||||
po.getArriveTime(),
|
||||
po.getLeaveTime()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,9 @@ import lombok.RequiredArgsConstructor;
|
|||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 定时任务启动类
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class JobStarter implements CommandLineRunner {
|
||||
|
|
|
|||
|
|
@ -2,11 +2,10 @@ package com.wms_main.service.business;
|
|||
|
||||
import com.wms_main.model.bo.wms.WmsPickTask;
|
||||
import com.wms_main.model.po.TAppPickTask;
|
||||
import com.wms_main.model.po.TAppStock;
|
||||
import com.wms_main.model.vo.wms.InventoryConfirmVo;
|
||||
import com.wms_main.model.vo.wms.TaskConfirmVo;
|
||||
import com.wms_main.model.vo.wms.WorkConfirmVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -49,4 +48,11 @@ public interface IConveyTaskService {
|
|||
* @return 结果
|
||||
*/
|
||||
TaskConfirmVo getCurrentStandTask(TAppPickTask thisPickTask);
|
||||
|
||||
/**
|
||||
* 获取这个载具的盘点确认信息
|
||||
* @param vehicleId 载具号
|
||||
* @return 盘点确认信息
|
||||
*/
|
||||
InventoryConfirmVo getInventoryConfirm(String vehicleId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,9 @@ public interface IStockDataService {
|
|||
* @param stockConfirm 库存确认信息
|
||||
* @param standId 站台号
|
||||
* @param userName 用户名
|
||||
* @param inventoryId 盘点任务号
|
||||
*/
|
||||
void updateStockInfo(StockConfirmEntity stockConfirm, String standId, String userName, String reason);
|
||||
void updateStockInfo(StockConfirmEntity stockConfirm, String standId, String userName, String reason, String inventoryId);
|
||||
|
||||
/**
|
||||
* 查询库存预警值
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import com.wms_main.model.dto.request.wcs.WcsReleaseBoxRequest;
|
|||
import com.wms_main.model.dto.response.wcs.BaseWcsApiResponse;
|
||||
import com.wms_main.model.dto.response.wcs.WcsApiResponse;
|
||||
import com.wms_main.model.po.*;
|
||||
import com.wms_main.model.vo.wms.InventoryConfirmVo;
|
||||
import com.wms_main.model.vo.wms.TaskConfirmVo;
|
||||
import com.wms_main.model.vo.wms.WorkConfirmVo;
|
||||
import com.wms_main.repository.utils.StringUtils;
|
||||
|
|
@ -51,6 +52,7 @@ public class ConveyTaskServiceImpl implements IConveyTaskService {
|
|||
private final ITAppStockService appStockService;// 库存服务
|
||||
private final AppCommon appCommon;
|
||||
private final ITAppVehicleService appVehicleService;// 载具服务
|
||||
private final ITAppInventoryService appInventoryService;// 盘点服务
|
||||
|
||||
/**
|
||||
* 取消拣选任务实现
|
||||
|
|
@ -457,4 +459,50 @@ public class ConveyTaskServiceImpl implements IConveyTaskService {
|
|||
|
||||
return resultVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取这个载具的盘点确认信息
|
||||
* @param vehicleId 载具号
|
||||
* @return 盘点确认信息
|
||||
*/
|
||||
@Override
|
||||
public InventoryConfirmVo getInventoryConfirm(String vehicleId) {
|
||||
// 获取这个箱子的盘点任务
|
||||
List<TAppInventory> inventoryList = appInventoryService.list(new LambdaQueryWrapper<TAppInventory>()
|
||||
.eq(TAppInventory::getVehicleId, vehicleId));
|
||||
if (inventoryList == null || inventoryList.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
List<String> goodsIds = inventoryList.stream().map(TAppInventory::getGoodsId).distinct().toList();
|
||||
// 查询这个箱子的库存信息
|
||||
List<TAppStock> stockList = appStockService.list(new LambdaQueryWrapper<TAppStock>()
|
||||
.eq(TAppStock::getVehicleId, vehicleId)
|
||||
.in(TAppStock::getGoodsId, goodsIds));
|
||||
if (stockList == null || stockList.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
// 将这些库存根据料号Map一下, 并汇总库存数量
|
||||
Map<String, Integer> sumNumByGoodsMap = new HashMap<>();
|
||||
for (TAppStock stock : stockList) {
|
||||
if (sumNumByGoodsMap.containsKey(stock.getGoodsId())) {
|
||||
sumNumByGoodsMap.replace(stock.getGoodsId(), sumNumByGoodsMap.get(stock.getGoodsId()) + stock.getRealNum());
|
||||
} else {
|
||||
sumNumByGoodsMap.put(stock.getGoodsId(), stock.getRealNum());
|
||||
}
|
||||
}
|
||||
for (TAppInventory inventory : inventoryList) {
|
||||
if (sumNumByGoodsMap.containsKey(inventory.getGoodsId())) {
|
||||
// 返回盘点确认信息
|
||||
InventoryConfirmVo inventoryConfirmVo = new InventoryConfirmVo();
|
||||
inventoryConfirmVo.setInventoryId(inventory.getInventoryId());
|
||||
inventoryConfirmVo.setGoodsId(inventory.getGoodsId());
|
||||
inventoryConfirmVo.setVehicleId(inventory.getVehicleId());
|
||||
inventoryConfirmVo.setStockNum(sumNumByGoodsMap.get(inventory.getGoodsId()));
|
||||
inventoryConfirmVo.setConfirmNum(sumNumByGoodsMap.get(inventory.getGoodsId()));
|
||||
// 返回结果
|
||||
return inventoryConfirmVo;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,10 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
* 输送线任务服务
|
||||
*/
|
||||
private final IConveyTaskService conveyTaskService;
|
||||
/**
|
||||
* 库存更新服务
|
||||
*/
|
||||
private final ITAppStockUpdateService appStockUpdateService;
|
||||
/**
|
||||
* 业务通用
|
||||
*/
|
||||
|
|
@ -311,6 +315,8 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
List<String> goodsIds = new ArrayList<>();
|
||||
// 新的库存信息
|
||||
List<TAppStock> newStockList = new ArrayList<>();
|
||||
// 库存更新记录
|
||||
List<TAppStockUpdate> stockUpdateList = new ArrayList<>();
|
||||
// 入库记录
|
||||
List<TAppTaskBak> newTaskBakList = new ArrayList<>();
|
||||
// 需要删除的任务id
|
||||
|
|
@ -352,7 +358,7 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
}
|
||||
}
|
||||
// 新库存,增加库存信息
|
||||
newStockList.add(new TAppStock(
|
||||
TAppStock thisTimeNewStock = new TAppStock(
|
||||
UUIDUtils.getNewUUID(),
|
||||
vehicleId,
|
||||
thisVehicleInTask.getDestination(),
|
||||
|
|
@ -368,8 +374,24 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
thisVehicleInTask.getOpNum(),
|
||||
thisVehicleInTask.getGoodsDesc(),
|
||||
expireDate,
|
||||
sledDays
|
||||
));
|
||||
sledDays,
|
||||
null,
|
||||
null
|
||||
);
|
||||
newStockList.add(thisTimeNewStock);
|
||||
// 库存更新记录
|
||||
TAppStockUpdate stockUpdate = new TAppStockUpdate(
|
||||
UUIDUtils.getNewUUID(),
|
||||
thisTimeNewStock.getVehicleId(),
|
||||
thisTimeNewStock.getGoodsId(),
|
||||
thisTimeNewStock.getFirstInTime(),
|
||||
0,
|
||||
thisTimeNewStock.getRealNum(),
|
||||
thisVehicleInTask.getOrigin() + ":入库",
|
||||
LocalDateTime.now(),
|
||||
thisVehicleInTask.getOpUser()
|
||||
);
|
||||
stockUpdateList.add(stockUpdate);
|
||||
}
|
||||
}
|
||||
// 当前载具是否是空载具
|
||||
|
|
@ -414,6 +436,10 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
if (!newStockList.isEmpty()) {
|
||||
appStockService.saveOrUpdateBatch(newStockList);
|
||||
}
|
||||
// 增加库存更新记录
|
||||
if (!stockUpdateList.isEmpty()) {
|
||||
appStockUpdateService.saveBatch(stockUpdateList);
|
||||
}
|
||||
// 添加任务记录
|
||||
if (!newTaskBakList.isEmpty()) {
|
||||
appTaskBakService.saveBatch(newTaskBakList);
|
||||
|
|
@ -455,6 +481,8 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
List<String> goodsIds = new ArrayList<>();
|
||||
// 新的库存信息
|
||||
List<TAppStock> newStockList = new ArrayList<>();
|
||||
// 库存更新记录
|
||||
List<TAppStockUpdate> stockUpdateList = new ArrayList<>();
|
||||
// 待删除的库存信息
|
||||
List<String> needDeleteStockIds = new ArrayList<>();
|
||||
// 入库记录
|
||||
|
|
@ -506,7 +534,7 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
}
|
||||
if (oldStockList.isEmpty()) {
|
||||
// 新库存,增加库存信息
|
||||
newStockList.add(new TAppStock(
|
||||
TAppStock thisTimeNewStock = new TAppStock(
|
||||
UUIDUtils.getNewUUID(),
|
||||
vehicleId,
|
||||
thisVehicleInTask.getDestination(),
|
||||
|
|
@ -522,8 +550,24 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
thisVehicleInTask.getOpNum(),
|
||||
thisVehicleInTask.getGoodsDesc(),
|
||||
expireDate,
|
||||
sledDays
|
||||
));
|
||||
sledDays,
|
||||
null,
|
||||
null
|
||||
);
|
||||
newStockList.add(thisTimeNewStock);
|
||||
// 库存更新记录
|
||||
TAppStockUpdate stockUpdate = new TAppStockUpdate(
|
||||
UUIDUtils.getNewUUID(),
|
||||
thisTimeNewStock.getVehicleId(),
|
||||
thisTimeNewStock.getGoodsId(),
|
||||
thisTimeNewStock.getFirstInTime(),
|
||||
0,
|
||||
thisTimeNewStock.getRealNum(),
|
||||
thisVehicleInTask.getOrigin() + ":入库",
|
||||
LocalDateTime.now(),
|
||||
thisVehicleInTask.getOpUser()
|
||||
);
|
||||
stockUpdateList.add(stockUpdate);
|
||||
} else {
|
||||
// 更新已有库存信息
|
||||
if (oldStockList.size() > 1) {
|
||||
|
|
@ -535,7 +579,7 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
.mapToInt(TAppStock::getTotalNum)
|
||||
.sum();
|
||||
// 新库存,增加库存信息
|
||||
newStockList.add(new TAppStock(
|
||||
TAppStock thisTimeOldNewStock = new TAppStock(
|
||||
UUIDUtils.getNewUUID(),
|
||||
vehicleId,
|
||||
thisVehicleInTask.getDestination(),
|
||||
|
|
@ -551,8 +595,24 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
originSum + thisVehicleInTask.getOpNum(),
|
||||
thisVehicleInTask.getGoodsDesc(),
|
||||
expireDate,
|
||||
sledDays
|
||||
));
|
||||
sledDays,
|
||||
null,
|
||||
null
|
||||
);
|
||||
newStockList.add(thisTimeOldNewStock);
|
||||
// 库存更新记录
|
||||
TAppStockUpdate stockUpdate = new TAppStockUpdate(
|
||||
UUIDUtils.getNewUUID(),
|
||||
thisTimeOldNewStock.getVehicleId(),
|
||||
thisTimeOldNewStock.getGoodsId(),
|
||||
thisTimeOldNewStock.getFirstInTime(),
|
||||
originSum,
|
||||
thisTimeOldNewStock.getRealNum(),
|
||||
thisVehicleInTask.getOrigin() + ":入库",
|
||||
LocalDateTime.now(),
|
||||
thisVehicleInTask.getOpUser()
|
||||
);
|
||||
stockUpdateList.add(stockUpdate);
|
||||
needDeleteStockIds.addAll(oldStockList.stream()
|
||||
.map(TAppStock::getStockId)
|
||||
.toList());
|
||||
|
|
@ -568,6 +628,19 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
oldStock.setLastUpdateUser(thisVehicleInTask.getOpUser());
|
||||
oldStock.setStockStatus(WmsStockStatusEnums.OK.getCode());
|
||||
newStockList.add(oldStock);
|
||||
// 库存更新记录
|
||||
TAppStockUpdate stockUpdate = new TAppStockUpdate(
|
||||
UUIDUtils.getNewUUID(),
|
||||
oldStock.getVehicleId(),
|
||||
oldStock.getGoodsId(),
|
||||
oldStock.getFirstInTime(),
|
||||
oldStock.getRealNum() - thisVehicleInTask.getOpNum(),
|
||||
oldStock.getRealNum(),
|
||||
thisVehicleInTask.getOrigin() + ":入库",
|
||||
LocalDateTime.now(),
|
||||
thisVehicleInTask.getOpUser()
|
||||
);
|
||||
stockUpdateList.add(stockUpdate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -618,6 +691,10 @@ public class StackerTaskServiceImpl implements IStackerTaskService {
|
|||
if (!newStockList.isEmpty()) {
|
||||
appStockService.saveOrUpdateBatch(newStockList);
|
||||
}
|
||||
// 增加库存更新记录
|
||||
if (!stockUpdateList.isEmpty()) {
|
||||
appStockUpdateService.saveBatch(stockUpdateList);
|
||||
}
|
||||
// 添加任务记录
|
||||
if (!newTaskBakList.isEmpty()) {
|
||||
appTaskBakService.saveBatch(newTaskBakList);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class StockDataServiceImpl implements IStockDataService {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateStockInfo(StockConfirmEntity stockConfirm, String standId, String userName, String reason) {
|
||||
public void updateStockInfo(StockConfirmEntity stockConfirm, String standId, String userName, String reason, String inventoryId) {
|
||||
if (stockConfirm == null || StringUtils.isEmpty(stockConfirm.getVehicleId()) || StringUtils.isEmpty(stockConfirm.getGoodsId())
|
||||
|| stockConfirm.getRealRemainQty() == null) {
|
||||
return;
|
||||
|
|
@ -59,7 +59,12 @@ public class StockDataServiceImpl implements IStockDataService {
|
|||
List<TAppStockUpdate> stockUpdateList = new ArrayList<>();
|
||||
// 剩余数量
|
||||
int remainQty = stockConfirm.getRealRemainQty();
|
||||
for (TAppStock stock : stockList) {
|
||||
for (int i = 0; i < stockList.size(); i++) {
|
||||
TAppStock stock = stockList.get(i);
|
||||
if (StringUtils.isNotEmpty(inventoryId)) {
|
||||
stock.setLastInventoryId(inventoryId);
|
||||
stock.setLastInventoryTime(LocalDateTime.now());
|
||||
}
|
||||
if (remainQty <= 0) {
|
||||
// 需要移除的库存
|
||||
removeStocks.add(stock);
|
||||
|
|
@ -78,11 +83,8 @@ public class StockDataServiceImpl implements IStockDataService {
|
|||
stockUpdateList.add(stockUpdate);
|
||||
continue;
|
||||
}
|
||||
if (stock.getRealNum() <= remainQty) {
|
||||
// 库存不变
|
||||
remainQty -= stock.getRealNum();
|
||||
} else {
|
||||
// 增加库存更新记录
|
||||
if ((i == stockList.size() - 1) || stock.getRealNum() > remainQty) {
|
||||
// 最先进的库存,剩余数量全部分配给他
|
||||
TAppStockUpdate stockUpdate = new TAppStockUpdate(
|
||||
UUIDUtils.getNewUUID(),
|
||||
stock.getVehicleId(),
|
||||
|
|
@ -100,6 +102,9 @@ public class StockDataServiceImpl implements IStockDataService {
|
|||
remainQty = 0;
|
||||
// 添加更新库存列表
|
||||
updateStocks.add(stock);
|
||||
} else {
|
||||
// 库存不变
|
||||
remainQty -= stock.getRealNum();
|
||||
}
|
||||
}
|
||||
// 删除库存
|
||||
|
|
|
|||
|
|
@ -90,6 +90,13 @@ public interface IKateWorkControllerService {
|
|||
*/
|
||||
WmsApiResponse<PageVo<KittingBomVo>> queryKittingBomByPage(KittingBomQuery kittingBomQuery);
|
||||
|
||||
/**
|
||||
* 查询图纸列表---分页
|
||||
* @param imageQuery 查询参数
|
||||
* @return 查询结果---分页
|
||||
*/
|
||||
WmsApiResponse<PageVo<ImageVo>> queryImagesByPage(ImageQuery imageQuery);
|
||||
|
||||
/**
|
||||
* 查询配料单对应关系列表---分页
|
||||
* @param kittingBomRelationQuery 查询参数
|
||||
|
|
@ -138,4 +145,11 @@ public interface IKateWorkControllerService {
|
|||
* @return 需要打印的料盒标签
|
||||
*/
|
||||
WmsApiResponse<BoxSummary> requestPrintBoxTags(KateWorksQuery kateWorksQuery);
|
||||
|
||||
/**
|
||||
* 删除dbs计划
|
||||
* @param dbsRequest 删除请求
|
||||
* @return 删除结果
|
||||
*/
|
||||
BaseWmsApiResponse deleteDbsPlan(DbsRequest dbsRequest);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.wms_main.model.dto.response.wcs.BaseWcsApiResponse;
|
|||
import com.wms_main.model.dto.response.wcs.WcsApiResponse;
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||
import com.wms_main.model.vo.wms.InventoryConfirmVo;
|
||||
import com.wms_main.model.vo.wms.TaskConfirmVo;
|
||||
|
||||
/**
|
||||
|
|
@ -77,4 +78,25 @@ public interface ITaskControllerService {
|
|||
* @return 处理结果
|
||||
*/
|
||||
BaseWmsApiResponse confirmCurrentTask(ConfirmTaskRequest confirmTaskRequest);
|
||||
|
||||
/**
|
||||
* 下发盘点请求
|
||||
* @param inventoryRequest 盘点请求
|
||||
* @return 请求结果
|
||||
*/
|
||||
BaseWmsApiResponse requestInventory(InventoryRequest inventoryRequest);
|
||||
|
||||
/**
|
||||
* 查询盘点任务确认信息
|
||||
* @param inventoryConfirmRequest 请求
|
||||
* @return 请求结果
|
||||
*/
|
||||
WmsApiResponse<InventoryConfirmVo> getInventoryConfirm(InventoryConfirmRequest inventoryConfirmRequest);
|
||||
|
||||
/**
|
||||
* 确认盘点信息
|
||||
* @param inventoryConfirmRequest 确认请求
|
||||
* @return 处理结果
|
||||
*/
|
||||
BaseWmsApiResponse confirmInventory(InventoryConfirmRequest inventoryConfirmRequest);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,23 @@
|
|||
package com.wms_main.service.controller;
|
||||
|
||||
import com.wms_main.model.dto.request.wms.WmsTaskRequest;
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
|
||||
/**
|
||||
* 任务操作控制类 服务接口
|
||||
*/
|
||||
public interface ITaskOperationControllerService {
|
||||
/**
|
||||
* 删除Wms任务
|
||||
* @param wmsTaskRequest 请求参数
|
||||
* @return 删除结果
|
||||
*/
|
||||
BaseWmsApiResponse deleteWmsTask(WmsTaskRequest wmsTaskRequest);
|
||||
|
||||
/**
|
||||
* 更新Wms任务
|
||||
* @param wmsTaskRequest 请求参数
|
||||
* @return 更新结果
|
||||
*/
|
||||
BaseWmsApiResponse updateWmsTask(WmsTaskRequest wmsTaskRequest);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package com.wms_main.service.controller;
|
||||
|
||||
import com.wms_main.model.dto.query.OutsQuery;
|
||||
import com.wms_main.model.dto.query.PickTaskQuery;
|
||||
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.TaskRecordVo;
|
||||
import com.wms_main.model.vo.wms.TaskVo;
|
||||
import com.wms_main.model.vo.wms.*;
|
||||
|
||||
/**
|
||||
* 任务查询控制类 服务接口
|
||||
|
|
@ -30,4 +30,18 @@ public interface ITaskQueryControllerService {
|
|||
* @return 查询结果---分页
|
||||
*/
|
||||
WmsApiResponse<PageVo<TaskRecordVo>> queryOutTaskRecordByPage(WmsTaskQuery wmsTaskQuery);
|
||||
|
||||
/**
|
||||
* 查询拣选任务信息---分页
|
||||
* @param pickTaskQuery 查询参数
|
||||
* @return 查询结果---分页
|
||||
*/
|
||||
WmsApiResponse<PageVo<PickTaskVo>> queryPickTasksByPage(PickTaskQuery pickTaskQuery);
|
||||
|
||||
/**
|
||||
* 查询出库单信息---分页
|
||||
* @param outsQuery 查询参数
|
||||
* @return 查询结果---分页
|
||||
*/
|
||||
WmsApiResponse<PageVo<OutsVo>> queryOutsByPage(OutsQuery outsQuery);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
|||
private final ITAppKanbanService appKanbanService;// 看板服务
|
||||
private final ITAppWorkRecordService appWorkRecordService;// 工作记录服务
|
||||
private final ITAppPickPlanService appPickPlanService;// 拣选计划服务
|
||||
private final ITAppInventoryService appInventoryService;// 盘点任务服务
|
||||
private final AppCommon appCommon;
|
||||
|
||||
/**
|
||||
|
|
@ -402,7 +403,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
|||
}
|
||||
}
|
||||
// 更新库存信息
|
||||
stockDataService.updateStockInfo(confirmWorkRequest.getStockConfirm(), confirmWorkRequest.getStandId(), confirmWorkRequest.getUserName(), "配料拣选");
|
||||
stockDataService.updateStockInfo(confirmWorkRequest.getStockConfirm(), confirmWorkRequest.getStandId(), confirmWorkRequest.getUserName(), "配料拣选", null);
|
||||
// 查询库存获得当前载具中存储的库存列表
|
||||
LambdaQueryWrapper<TAppStock> stockQueryWrapper = new LambdaQueryWrapper<TAppStock>()
|
||||
.eq(TAppStock::getVehicleId, thisPickTask.getVehicleId())
|
||||
|
|
@ -419,6 +420,14 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
|||
if (taskConfirmVo != null) {
|
||||
return BaseWmsApiResponse.warn("当前载具还有其他拣选任务,请切换到出库界面进行拣配。");
|
||||
}
|
||||
// 判断当前载具是否还有盘点任务
|
||||
List<String> goodsIds = stockList.stream().map(TAppStock::getGoodsId).distinct().toList();
|
||||
List<TAppInventory> inventoryTasks = appInventoryService.list(new LambdaQueryWrapper<TAppInventory>()
|
||||
.eq(TAppInventory::getVehicleId, thisPickTask.getVehicleId())
|
||||
.in(TAppInventory::getGoodsId, goodsIds));
|
||||
if (inventoryTasks != null && !inventoryTasks.isEmpty()) {
|
||||
return BaseWmsApiResponse.warn("当前载具还有盘点任务,请切换到盘点界面进行拣配。");
|
||||
}
|
||||
} else {
|
||||
// 取消后续拣选任务
|
||||
conveyTaskService.cancelOtherStandPickTasks(thisPickTask.getVehicleId(), thisPickTask.getPickStand());
|
||||
|
|
@ -814,7 +823,7 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
|||
imageIp,
|
||||
image.getImagePath(),
|
||||
image.getImageName(),
|
||||
FileUtils.getImageDetail(imageList.getFirst().getImagePath(), imageList.getFirst().getImageName()),
|
||||
FileUtils.getImageDetail(image.getImagePath(), image.getImageName()),
|
||||
image.getImageType());
|
||||
imageVoList.add(imageVo);
|
||||
}
|
||||
|
|
@ -880,6 +889,25 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询图纸列表(分页)---实现
|
||||
* @param imageQuery 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public WmsApiResponse<PageVo<ImageVo>> queryImagesByPage(ImageQuery imageQuery) {
|
||||
Page<TAppImage> page = imageQuery.toMpPage();
|
||||
LambdaQueryWrapper<TAppImage> lambdaQueryWrapper = new LambdaQueryWrapper<TAppImage>()
|
||||
.like(StringUtils.isNotEmpty(imageQuery.getImageId()), TAppImage::getImageId, imageQuery.getImageId())
|
||||
.like(StringUtils.isNotEmpty(imageQuery.getProductId()), TAppImage::getProductId, imageQuery.getProductId())
|
||||
.like(StringUtils.isNotEmpty(imageQuery.getBoxNo()), TAppImage::getBoxNo, imageQuery.getBoxNo())
|
||||
.eq(imageQuery.getImageType() != null, TAppImage::getImageType, imageQuery.getImageType());
|
||||
Page<TAppImage> pagePo = appImageService.page(page, lambdaQueryWrapper);
|
||||
|
||||
PageVo<ImageVo> pageVo = PageVo.of(pagePo, ImageVo::ofPo);
|
||||
return WmsApiResponse.success("查询图纸数据成功", pageVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 配料单对应关系实现---分页
|
||||
*
|
||||
|
|
@ -1183,6 +1211,38 @@ public class KateWorkControllerServiceImpl implements IKateWorkControllerService
|
|||
return WmsApiResponse.success("获取料盒标签数据成功。", boxSummary);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除dbs计划---实现
|
||||
* @param dbsRequest 删除请求
|
||||
* @return 删除结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BaseWmsApiResponse deleteDbsPlan(DbsRequest dbsRequest) {
|
||||
if (dbsRequest == null) {
|
||||
// 请求为空
|
||||
return BaseWmsApiResponse.error("请求为空。");
|
||||
}
|
||||
if (StringUtils.isEmpty(dbsRequest.getDbsId()) && StringUtils.isEmpty(dbsRequest.getWorkOrder())) {
|
||||
return BaseWmsApiResponse.error("dbsId、工单号必须输入一个。");
|
||||
}
|
||||
// 查询对应的dbs信息
|
||||
List<TAppDbs> targetDbsList = appDbsService.list(new LambdaQueryWrapper<TAppDbs>()
|
||||
.eq(StringUtils.isNotEmpty(dbsRequest.getDbsId()), TAppDbs::getDbsId, dbsRequest.getDbsId())
|
||||
.eq(StringUtils.isNotEmpty(dbsRequest.getWorkOrder()), TAppDbs::getWorkOrder, dbsRequest.getWorkOrder()));
|
||||
if (targetDbsList == null || targetDbsList.isEmpty()) {
|
||||
// 未查询到对应的dbs信息
|
||||
return BaseWmsApiResponse.error("未查询到对应的dbs信息。");
|
||||
}
|
||||
TAppDbs targetDbs = targetDbsList.getFirst();
|
||||
if (!Objects.equals(targetDbs.getDbsStatus(), DbsStatusEnums.NEW.getValue())) {
|
||||
// 当前dbs状态为关闭
|
||||
return BaseWmsApiResponse.error("当前DBS已经在做,无法删除。");
|
||||
}
|
||||
// 删除dbs
|
||||
return appDbsService.removeById(targetDbs.getDbsId()) ? BaseWmsApiResponse.success("删除DBS成功。") : BaseWmsApiResponse.error("删除DBS失败。");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取服务件成品号的物料需求
|
||||
*
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.wms_main.constant.enums.wms.*;
|
|||
import com.wms_main.dao.*;
|
||||
import com.wms_main.model.bo.wcs.WcsStackerTask;
|
||||
import com.wms_main.model.bo.wms.GoodsInfoForTask;
|
||||
import com.wms_main.model.bo.wms.StockConfirmEntity;
|
||||
import com.wms_main.model.bo.wms.TaskConfirmEntity;
|
||||
import com.wms_main.model.bo.wms.WmsPickTask;
|
||||
import com.wms_main.model.dto.request.wcs.WcsBoxArriveRequest;
|
||||
|
|
@ -21,6 +22,7 @@ import com.wms_main.model.dto.response.wcs.WcsApiResponse;
|
|||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||
import com.wms_main.model.po.*;
|
||||
import com.wms_main.model.vo.wms.InventoryConfirmVo;
|
||||
import com.wms_main.model.vo.wms.TaskConfirmVo;
|
||||
import com.wms_main.model.vo.wms.WorkConfirmVo;
|
||||
import com.wms_main.repository.utils.ConvertUtils;
|
||||
|
|
@ -60,6 +62,8 @@ public class TaskControllerServiceImpl implements ITaskControllerService {
|
|||
private final IStockDataService stockDataService;// 库存数据服务
|
||||
private final ITAppOutsRecordService appOutsRecordService;// 出库单记录服务
|
||||
private final ITAppPickPlanService appPickPlanService;// 拣选计划服务
|
||||
private final ITAppInventoryService appInventoryService;// 盘点任务服务
|
||||
private final ITAppInventoryRecordService appInventoryRecordService;// 盘点记录服务
|
||||
private final AppCommon appCommon;
|
||||
|
||||
/**
|
||||
|
|
@ -267,6 +271,10 @@ public class TaskControllerServiceImpl implements ITaskControllerService {
|
|||
}
|
||||
}
|
||||
} else if (stockOutRequest.getOutType().equals(WmsOutTypeEnums.EMERGE.getCode())) {
|
||||
if (!appStandService.exists(new LambdaQueryWrapper<TAppStand>().eq(TAppStand::getStandId, stockOutRequest.getDestination())
|
||||
.eq(TAppStand::getStandType, 1))) {
|
||||
return BaseWmsApiResponse.error("非拣选站台不允许紧急出库。");
|
||||
}
|
||||
// 判断理由是否输入
|
||||
if (StringUtils.isEmpty(stockOutRequest.getReason())) {
|
||||
return BaseWmsApiResponse.error("请求错误:紧急出库必须输入原因。");
|
||||
|
|
@ -712,7 +720,7 @@ public class TaskControllerServiceImpl implements ITaskControllerService {
|
|||
}
|
||||
}
|
||||
// 更新库存信息
|
||||
stockDataService.updateStockInfo(confirmTaskRequest.getStockConfirm(), confirmTaskRequest.getStandId(), confirmTaskRequest.getUserName(), "出库拣选");
|
||||
stockDataService.updateStockInfo(confirmTaskRequest.getStockConfirm(), confirmTaskRequest.getStandId(), confirmTaskRequest.getUserName(), "出库拣选", null);
|
||||
// 查询库存获得当前载具中存储的库存列表
|
||||
LambdaQueryWrapper<TAppStock> stockQueryWrapper = new LambdaQueryWrapper<TAppStock>()
|
||||
.eq(TAppStock::getVehicleId, thisPickTask.getVehicleId())
|
||||
|
|
@ -729,6 +737,235 @@ public class TaskControllerServiceImpl implements ITaskControllerService {
|
|||
if (resultVo != null) {
|
||||
return BaseWmsApiResponse.warn("当前载具还有工作,请切换到拣配界面进行拣配。");
|
||||
}
|
||||
// 判断当前载具是否还有盘点任务
|
||||
List<String> goodsIds = stockList.stream().map(TAppStock::getGoodsId).distinct().toList();
|
||||
List<TAppInventory> inventoryTasks = appInventoryService.list(new LambdaQueryWrapper<TAppInventory>()
|
||||
.eq(TAppInventory::getVehicleId, thisPickTask.getVehicleId())
|
||||
.in(TAppInventory::getGoodsId, goodsIds));
|
||||
if (inventoryTasks != null && !inventoryTasks.isEmpty()) {
|
||||
return BaseWmsApiResponse.warn("当前载具还有盘点任务,请切换到盘点界面进行拣配。");
|
||||
}
|
||||
} else {
|
||||
// 取消后续拣选任务
|
||||
conveyTaskService.cancelOtherStandPickTasks(thisPickTask.getVehicleId(), thisPickTask.getPickStand());
|
||||
}
|
||||
// 放行
|
||||
if (conveyTaskService.releaseStandVehicle(thisPickTask)) {
|
||||
return BaseWmsApiResponse.success("确认成功。");
|
||||
} else {
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
return BaseWmsApiResponse.error("释放箱子失败。");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求盘点---实现
|
||||
* @param inventoryRequest 盘点请求
|
||||
* @return 请求结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BaseWmsApiResponse requestInventory(InventoryRequest inventoryRequest) {
|
||||
if (inventoryRequest == null) {
|
||||
return BaseWmsApiResponse.error("请求为NULL。");
|
||||
}
|
||||
if (StringUtils.isEmpty(inventoryRequest.getStandId())) {
|
||||
return BaseWmsApiResponse.error("请求缺少信息,请输入站台号。");
|
||||
}
|
||||
if (!appStandService.exists(new LambdaQueryWrapper<TAppStand>().eq(TAppStand::getStandId, inventoryRequest.getStandId())
|
||||
.eq(TAppStand::getStandType, 1))) {
|
||||
return BaseWmsApiResponse.error("非拣选站台不允许盘点。");
|
||||
}
|
||||
if (StringUtils.isEmpty(inventoryRequest.getGoodsId())) {
|
||||
return BaseWmsApiResponse.error("请求缺少信息,请输入料号。");
|
||||
}
|
||||
// 判断这个料有没有还没盘点完的任务
|
||||
List<TAppInventory> inventoryList = appInventoryService.list(new LambdaQueryWrapper<TAppInventory>()
|
||||
.eq(TAppInventory::getGoodsId, inventoryRequest.getGoodsId())
|
||||
.eq(StringUtils.isNotEmpty(inventoryRequest.getVehicleId()), TAppInventory::getVehicleId, inventoryRequest.getVehicleId()));
|
||||
if (inventoryList != null && !inventoryList.isEmpty()) {
|
||||
String errMsg = StringUtils.isNotEmpty(inventoryRequest.getVehicleId()) ? "载具:" + inventoryRequest.getVehicleId() : "";
|
||||
return BaseWmsApiResponse.error(errMsg + "料号:" + inventoryRequest.getGoodsId() + "还有盘点任务未完成。");
|
||||
}
|
||||
// 查询库存,创建盘点任务
|
||||
List<TAppStock> stockList = appStockService.list(new LambdaQueryWrapper<TAppStock>()
|
||||
.eq(TAppStock::getGoodsId, inventoryRequest.getGoodsId())
|
||||
.eq(StringUtils.isNotEmpty(inventoryRequest.getVehicleId()), TAppStock::getVehicleId, inventoryRequest.getVehicleId()));
|
||||
if (stockList == null || stockList.isEmpty()) {
|
||||
return BaseWmsApiResponse.error("物料" + inventoryRequest.getGoodsId() + "没有库存。");
|
||||
}
|
||||
// 根据载具号map一下
|
||||
Map<String, TAppInventory> inventoryByVehicleMap = new HashMap<>();
|
||||
// 盘点单号
|
||||
String orderId = UUIDUtils.getNewUUID();
|
||||
for (TAppStock stock : stockList) {
|
||||
if (!inventoryByVehicleMap.containsKey(stock.getVehicleId())) {
|
||||
// 添加盘点任务
|
||||
TAppInventory inventoryTask = new TAppInventory(
|
||||
UUIDUtils.getNewUUID(),
|
||||
inventoryRequest.getGoodsId(),
|
||||
stock.getVehicleId(),
|
||||
null,
|
||||
null,
|
||||
inventoryRequest.getStandId(),
|
||||
inventoryRequest.getUserName(),
|
||||
WmsInvTypeEnums.INV_TYPE_1.getCode(),
|
||||
WmsInvStatusEnums.INIT.getCode(),
|
||||
WmsInvResultEnums.NONE.getCode(),
|
||||
LocalDateTime.now(),
|
||||
null,
|
||||
orderId
|
||||
);
|
||||
inventoryByVehicleMap.put(stock.getVehicleId(), inventoryTask);
|
||||
}
|
||||
}
|
||||
if (!inventoryByVehicleMap.isEmpty()) {
|
||||
appInventoryService.saveBatch(inventoryByVehicleMap.values());
|
||||
}
|
||||
// 保存盘点任务
|
||||
return BaseWmsApiResponse.success("创建盘点任务成功。");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询盘点确认信息
|
||||
* @param inventoryConfirmRequest 请求
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public WmsApiResponse<InventoryConfirmVo> getInventoryConfirm(InventoryConfirmRequest inventoryConfirmRequest) {
|
||||
// 判断请求是否参数完备
|
||||
if (inventoryConfirmRequest == null) {
|
||||
return WmsApiResponse.error("请求参数为空。", null);
|
||||
}
|
||||
if (StringUtils.isEmpty(inventoryConfirmRequest.getStandId())) {
|
||||
return WmsApiResponse.error("请求参数缺少站台号。", null);
|
||||
}
|
||||
// 查询当前站台的拣选任务
|
||||
List<TAppPickTask> pickTaskList = appPickTaskService.list(new LambdaQueryWrapper<TAppPickTask>()
|
||||
.eq(TAppPickTask::getPickStand, inventoryConfirmRequest.getStandId())
|
||||
.eq(TAppPickTask::getPickStatus, WmsPickTaskStatusEnum.ARRIVE.getCode()));
|
||||
if (pickTaskList == null || pickTaskList.isEmpty()) {
|
||||
return WmsApiResponse.error("当前站台没有箱子到达, 请检查。", null);
|
||||
}
|
||||
if (pickTaskList.size() > 1) {
|
||||
return WmsApiResponse.error("当前站台有多个箱子到达,请检查。", null);
|
||||
}
|
||||
// 获取当前拣选任务
|
||||
TAppPickTask thisPickTask = pickTaskList.getFirst();
|
||||
InventoryConfirmVo inventoryConfirmVo = conveyTaskService.getInventoryConfirm(thisPickTask.getVehicleId());
|
||||
if (inventoryConfirmVo != null) {
|
||||
// 返回结果
|
||||
return WmsApiResponse.success("查询盘点确认信息成功。", inventoryConfirmVo);
|
||||
}
|
||||
return WmsApiResponse.instanceOf(WmsApiResponseCodeEnums.WARNING.getCode(),"当前箱子没有要盘点的任务,请放行。", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认盘点信息
|
||||
* @param inventoryConfirmRequest 确认请求
|
||||
* @return 处理结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BaseWmsApiResponse confirmInventory(InventoryConfirmRequest inventoryConfirmRequest) {
|
||||
if (inventoryConfirmRequest == null) {
|
||||
return BaseWmsApiResponse.error("请求信息为空。");
|
||||
}
|
||||
if (StringUtils.isEmpty(inventoryConfirmRequest.getStandId())) {
|
||||
return BaseWmsApiResponse.error("请求信息缺少站台号。");
|
||||
}
|
||||
// 查询当前站台上的已到达的拣选任务
|
||||
List<TAppPickTask> pickTaskList = appPickTaskService.list(new LambdaQueryWrapper<TAppPickTask>()
|
||||
.eq(TAppPickTask::getPickStand, inventoryConfirmRequest.getStandId())
|
||||
.eq(TAppPickTask::getPickStatus, WmsPickTaskStatusEnum.ARRIVE.getCode()));
|
||||
if (pickTaskList == null || pickTaskList.isEmpty()) {
|
||||
return BaseWmsApiResponse.error("当前站台没有箱子到达, 请检查。");
|
||||
}
|
||||
if (pickTaskList.size() > 1) {
|
||||
return BaseWmsApiResponse.error("当前站台有多个箱子到达,请检查。");
|
||||
}
|
||||
// 当前站台到达的拣选任务
|
||||
TAppPickTask thisPickTask = pickTaskList.getFirst();
|
||||
if (StringUtils.isNotEmpty(inventoryConfirmRequest.getInventoryId())) {
|
||||
TAppInventory targetInventory = appInventoryService.getById(inventoryConfirmRequest.getInventoryId());
|
||||
if (targetInventory != null) {
|
||||
if (!Objects.equals(targetInventory.getVehicleId(), thisPickTask.getVehicleId())) {
|
||||
// 盘点的载具号与当前站台到达的拣选任务载具号不一致,请检查。
|
||||
return BaseWmsApiResponse.error("盘点的载具号与当前站台到达的载具号不一致,请检查。");
|
||||
}
|
||||
if (inventoryConfirmRequest.getConfirmNum() == null || inventoryConfirmRequest.getConfirmNum() < 0) {
|
||||
return BaseWmsApiResponse.error("请求信息中的盘点确认数量不正确。");
|
||||
}
|
||||
// 添加盘点记录
|
||||
TAppInventoryRecord inventoryRecord = new TAppInventoryRecord();
|
||||
inventoryRecord.setInventoryId(inventoryConfirmRequest.getInventoryId());
|
||||
inventoryRecord.setGoodsId(targetInventory.getGoodsId());
|
||||
inventoryRecord.setVehicleId(targetInventory.getVehicleId());
|
||||
// 查询这个载具-料号对应的库存数量
|
||||
List<TAppStock> thisVehicleAndGoodsStock = appStockService.list(new LambdaQueryWrapper<TAppStock>()
|
||||
.eq(TAppStock::getVehicleId, targetInventory.getVehicleId())
|
||||
.eq(TAppStock::getGoodsId, targetInventory.getGoodsId()));
|
||||
int stockNum = 0;
|
||||
if (thisVehicleAndGoodsStock != null && !thisVehicleAndGoodsStock.isEmpty()) {
|
||||
// 获取realNum总和
|
||||
stockNum = thisVehicleAndGoodsStock.stream().mapToInt(TAppStock::getRealNum).sum();
|
||||
}
|
||||
inventoryRecord.setStockNum(stockNum);
|
||||
inventoryRecord.setConfirmNum(inventoryConfirmRequest.getConfirmNum());
|
||||
inventoryRecord.setInvStand(inventoryConfirmRequest.getStandId());
|
||||
inventoryRecord.setInvUser(inventoryConfirmRequest.getUserName());
|
||||
inventoryRecord.setInvType(WmsInvTypeEnums.INV_TYPE_1.getCode());
|
||||
inventoryRecord.setInvStatus(WmsInvStatusEnums.CONFIRMED.getCode());
|
||||
if (stockNum < inventoryConfirmRequest.getConfirmNum()) {
|
||||
// 盘盈
|
||||
inventoryRecord.setInvResult(WmsInvResultEnums.PLUS.getCode());
|
||||
} else if (stockNum == inventoryConfirmRequest.getConfirmNum()) {
|
||||
// 正常
|
||||
inventoryRecord.setInvResult(WmsInvResultEnums.EQUAL.getCode());
|
||||
} else {
|
||||
// 盘亏
|
||||
inventoryRecord.setInvResult(WmsInvResultEnums.MINUS.getCode());
|
||||
}
|
||||
inventoryRecord.setInvCreateTime(targetInventory.getInvCreateTime());
|
||||
inventoryRecord.setInvConfirmTime(LocalDateTime.now());
|
||||
inventoryRecord.setInvOrderId(targetInventory.getInventoryId());
|
||||
appInventoryRecordService.save(inventoryRecord);
|
||||
// 移除任务表
|
||||
appInventoryService.removeById(inventoryConfirmRequest.getInventoryId());
|
||||
// 根据盘点确认信息更新库存
|
||||
StockConfirmEntity stockConfirm = new StockConfirmEntity();
|
||||
stockConfirm.setVehicleId(targetInventory.getVehicleId());
|
||||
stockConfirm.setGoodsId(targetInventory.getGoodsId());
|
||||
stockConfirm.setRealRemainQty(inventoryConfirmRequest.getConfirmNum());
|
||||
// 更新库存信息
|
||||
stockDataService.updateStockInfo(stockConfirm, inventoryConfirmRequest.getStandId(), inventoryConfirmRequest.getUserName(), "盘点确认", targetInventory.getInventoryId());
|
||||
} else {
|
||||
return BaseWmsApiResponse.error("请求的盘点任务号未查到对应的盘点任务。");
|
||||
}
|
||||
}
|
||||
// 查询库存获得当前载具中存储的库存列表
|
||||
LambdaQueryWrapper<TAppStock> stockQueryWrapper = new LambdaQueryWrapper<TAppStock>()
|
||||
.eq(TAppStock::getVehicleId, thisPickTask.getVehicleId());
|
||||
List<TAppStock> stockList = appStockService.list(stockQueryWrapper);
|
||||
// 界面直接点击确认/放行
|
||||
if (!stockList.isEmpty()) {
|
||||
// 判断是否还有其他盘点任务
|
||||
List<TAppInventory> otherInventoryList = appInventoryService.list(new LambdaQueryWrapper<TAppInventory>()
|
||||
.eq(TAppInventory::getVehicleId, thisPickTask.getVehicleId())
|
||||
.ne(TAppInventory::getInventoryId, inventoryConfirmRequest.getInventoryId()));
|
||||
if (otherInventoryList != null && !otherInventoryList.isEmpty()) {
|
||||
return BaseWmsApiResponse.error("当前载具还有其他的盘点任务,请继续盘点。");
|
||||
}
|
||||
// 判断还有没有当前站台的其他拣选任务
|
||||
TaskConfirmVo taskConfirmVo = conveyTaskService.getCurrentStandTask(thisPickTask);
|
||||
if (taskConfirmVo != null) {
|
||||
return BaseWmsApiResponse.warn("当前载具还有紧急出库任务,请切换到出库界面信息进行拣配。");
|
||||
}
|
||||
WorkConfirmVo resultVo = conveyTaskService.getCurrentStandWork(thisPickTask);
|
||||
if (resultVo != null) {
|
||||
return BaseWmsApiResponse.warn("当前载具还有工作,请切换到拣配界面进行拣配。");
|
||||
}
|
||||
} else {
|
||||
// 取消后续拣选任务
|
||||
conveyTaskService.cancelOtherStandPickTasks(thisPickTask.getVehicleId(), thisPickTask.getPickStand());
|
||||
|
|
|
|||
|
|
@ -1,8 +1,28 @@
|
|||
package com.wms_main.service.controller.serviceImpl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.wms_main.constant.enums.wcs.WcsStackerTaskStatusEnums;
|
||||
import com.wms_main.constant.enums.wms.WmsStackerTaskStatusEnums;
|
||||
import com.wms_main.dao.ITAppTaskBakService;
|
||||
import com.wms_main.dao.ITAppTaskService;
|
||||
import com.wms_main.dao.ITAppWcsTaskBakService;
|
||||
import com.wms_main.dao.ITAppWcsTaskService;
|
||||
import com.wms_main.model.dto.request.wms.WmsTaskRequest;
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
import com.wms_main.model.po.TAppTask;
|
||||
import com.wms_main.model.po.TAppTaskBak;
|
||||
import com.wms_main.model.po.TAppWcsTask;
|
||||
import com.wms_main.model.po.TAppWcsTaskBak;
|
||||
import com.wms_main.repository.utils.ConvertUtils;
|
||||
import com.wms_main.repository.utils.StringUtils;
|
||||
import com.wms_main.service.controller.ITaskOperationControllerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 任务操作控制类 服务实现
|
||||
|
|
@ -10,5 +30,170 @@ import org.springframework.stereotype.Service;
|
|||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class TaskOperationControllerServiceImpl implements ITaskOperationControllerService {
|
||||
private final ITAppTaskService appTaskService;// wms任务服务
|
||||
private final ITAppTaskBakService appTaskBakService;// wms任务记录服务
|
||||
private final ITAppWcsTaskService appWcsTaskService;// wcs任务服务
|
||||
private final ITAppWcsTaskBakService appWcsTaskBakService;// wcs任务记录服务
|
||||
|
||||
/**
|
||||
* 删除wms任务
|
||||
* @param wmsTaskRequest 请求参数
|
||||
* @return 删除结果
|
||||
*/
|
||||
@Override
|
||||
public BaseWmsApiResponse deleteWmsTask(WmsTaskRequest wmsTaskRequest) {
|
||||
if (wmsTaskRequest == null) {
|
||||
return BaseWmsApiResponse.error("请求参数不能为NULL");
|
||||
}
|
||||
if (StringUtils.isEmpty(wmsTaskRequest.getTaskId())) {
|
||||
return BaseWmsApiResponse.error("请求参数不完整,缺少taskId。");
|
||||
}
|
||||
// 查询对应的任务
|
||||
List<TAppTask> tasks = appTaskService.list(new LambdaQueryWrapper<TAppTask>()
|
||||
.eq(TAppTask::getTaskId, wmsTaskRequest.getTaskId()));
|
||||
if (tasks == null || tasks.isEmpty()) {
|
||||
return BaseWmsApiResponse.error("未查询到对应的任务");
|
||||
}
|
||||
TAppTask targetTask = tasks.getFirst();
|
||||
return appTaskService.removeById(targetTask.getTaskId()) ? BaseWmsApiResponse.success("删除任务成功。") : BaseWmsApiResponse.error("删除任务失败。");
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新wms任务
|
||||
* @param wmsTaskRequest 请求参数
|
||||
* @return 更新结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BaseWmsApiResponse updateWmsTask(WmsTaskRequest wmsTaskRequest) {
|
||||
if (wmsTaskRequest == null) {
|
||||
return BaseWmsApiResponse.error("请求参数不能为NULL");
|
||||
}
|
||||
if (StringUtils.isEmpty(wmsTaskRequest.getTaskId())) {
|
||||
return BaseWmsApiResponse.error("请求参数不完整,缺少taskId。");
|
||||
}
|
||||
// 查询对应的任务
|
||||
List<TAppTask> tasks = appTaskService.list(new LambdaQueryWrapper<TAppTask>()
|
||||
.eq(TAppTask::getTaskId, wmsTaskRequest.getTaskId()));
|
||||
if (tasks == null || tasks.isEmpty()) {
|
||||
return BaseWmsApiResponse.error("未查询到对应的任务");
|
||||
}
|
||||
TAppTask targetTask = tasks.getFirst();
|
||||
// 更新除任务状态之外的其他信息
|
||||
updateDetailInfoExceptStatus(targetTask, wmsTaskRequest);
|
||||
// 判断任务状态是否变更
|
||||
if (!Objects.equals(targetTask.getTaskStatus(), wmsTaskRequest.getTaskStatus())) {
|
||||
// 如果是取消任务
|
||||
if (Objects.equals(wmsTaskRequest.getTaskStatus(), WmsStackerTaskStatusEnums.CANCEL.getCode())) {
|
||||
// 判断当前任务状态是已发送、正在执行、已完成状态,那么不允许修改状态
|
||||
if (!Objects.equals(targetTask.getTaskStatus(), WmsStackerTaskStatusEnums.TEMP.getCode()) &&
|
||||
!Objects.equals(targetTask.getTaskStatus(), WmsStackerTaskStatusEnums.WAIT.getCode())) {
|
||||
return BaseWmsApiResponse.error("当前任务已生成wcs任务,如需取消,请先取消对应的wcs任务。");
|
||||
}
|
||||
// 将这个载具的任务删除,并存进备份表
|
||||
List<TAppTask> thisVehicleTasks = appTaskService.list(new LambdaQueryWrapper<TAppTask>()
|
||||
.eq(TAppTask::getVehicleId, targetTask.getVehicleId())
|
||||
.eq(TAppTask::getTaskType, targetTask.getTaskType()));
|
||||
List<TAppTaskBak> thisVehicleTasksBak = thisVehicleTasks.stream()
|
||||
.map(task -> new TAppTaskBak(
|
||||
task.getTaskId(),
|
||||
task.getTaskType(),
|
||||
WmsStackerTaskStatusEnums.CANCEL.getCode(),
|
||||
task.getTaskPriority(),
|
||||
task.getVehicleId(),
|
||||
task.getOrigin(),
|
||||
task.getDestination(),
|
||||
task.getWcsTaskId(),
|
||||
task.getCreateTime(),
|
||||
task.getFinishTime(),
|
||||
task.getGoodsId(),
|
||||
task.getOpNum(),
|
||||
task.getStockNum(),
|
||||
task.getOpUser(),
|
||||
task.getRemark(),
|
||||
task.getCallStand(),
|
||||
task.getGoodsDesc()
|
||||
)).toList();
|
||||
if (appTaskService.removeByIds(thisVehicleTasks.stream().map(TAppTask::getTaskId).toList())) {
|
||||
return appTaskBakService.saveBatch(thisVehicleTasksBak) ? BaseWmsApiResponse.success("取消任务成功。") : BaseWmsApiResponse.error("取消任务失败,添加任务记录失败。");
|
||||
} else {
|
||||
return BaseWmsApiResponse.error("取消任务失败,删除任务失败。");
|
||||
}
|
||||
} else if (Objects.equals(wmsTaskRequest.getTaskStatus(), WmsStackerTaskStatusEnums.FINISH.getCode())) {
|
||||
// 将对应的wcs任务完成,并存进备份表
|
||||
List<TAppWcsTask> wcsTasks = appWcsTaskService.list(new LambdaQueryWrapper<TAppWcsTask>()
|
||||
.eq(TAppWcsTask::getWcsTaskId, targetTask.getWcsTaskId()));
|
||||
if (wcsTasks != null && !wcsTasks.isEmpty()) {
|
||||
TAppWcsTask wcsTask = wcsTasks.getFirst();
|
||||
// 移除wcs任务,并向wcs备份表添加记录
|
||||
TAppWcsTaskBak wcsTaskBak = new TAppWcsTaskBak(
|
||||
wcsTask.getWcsTaskId(),
|
||||
WcsStackerTaskStatusEnums.FINISH.getCode(),
|
||||
wcsTask.getWcsTaskType(),
|
||||
wcsTask.getTaskPriority(),
|
||||
wcsTask.getVehicleId(),
|
||||
wcsTask.getOrigin(),
|
||||
wcsTask.getDestination(),
|
||||
wcsTask.getCreateTime(),
|
||||
wcsTask.getSendTime(),
|
||||
wcsTask.getFinishTime(),
|
||||
wmsTaskRequest.getUserName() + "手动完成"
|
||||
);
|
||||
appWcsTaskService.removeById(wcsTask.getWcsTaskId());
|
||||
appWcsTaskBakService.save(wcsTaskBak);
|
||||
}
|
||||
// 更新这个箱子的任务为完成状态
|
||||
appTaskService.update(
|
||||
new LambdaUpdateWrapper<TAppTask>()
|
||||
.set(TAppTask::getTaskStatus, WmsStackerTaskStatusEnums.FINISH.getCode())
|
||||
.eq(TAppTask::getTaskType, targetTask.getTaskType())
|
||||
.eq(TAppTask::getVehicleId, targetTask.getVehicleId())
|
||||
);
|
||||
return BaseWmsApiResponse.success("完成任务成功。");
|
||||
} else {
|
||||
// 更新任务状态
|
||||
targetTask.setTaskStatus(wmsTaskRequest.getTaskStatus());
|
||||
// 更新任务信息
|
||||
appTaskService.updateById(targetTask);
|
||||
// 更新这个箱子其他任务的状态
|
||||
appTaskService.update(
|
||||
new LambdaUpdateWrapper<TAppTask>()
|
||||
.set(TAppTask::getTaskStatus, wmsTaskRequest.getTaskStatus())
|
||||
.eq(TAppTask::getTaskType, targetTask.getTaskType())
|
||||
.eq(TAppTask::getVehicleId, targetTask.getVehicleId())
|
||||
.ne(TAppTask::getTaskId, targetTask.getTaskId())
|
||||
);
|
||||
// 转化wcs任务状态
|
||||
Integer wcsTaskStatus = ConvertUtils.convertWmsTaskStatusToWcsStackerTaskStatus(wmsTaskRequest.getTaskStatus());
|
||||
appWcsTaskService.update(new LambdaUpdateWrapper<TAppWcsTask>()
|
||||
.set(TAppWcsTask::getWcsTaskStatus, wcsTaskStatus)
|
||||
.eq(TAppWcsTask::getWcsTaskId, targetTask.getWcsTaskId()));
|
||||
return BaseWmsApiResponse.success("更新任务信息成功。");
|
||||
}
|
||||
} else {
|
||||
// 只更新数据
|
||||
return appTaskService.updateById(targetTask) ? BaseWmsApiResponse.success("更新任务信息成功。") : BaseWmsApiResponse.error("更新任务信息失败。");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新详情
|
||||
* @param targetTask 目标任务
|
||||
* @param wmsTaskRequest 请求信息
|
||||
*/
|
||||
private void updateDetailInfoExceptStatus(TAppTask targetTask, WmsTaskRequest wmsTaskRequest) {
|
||||
targetTask.setTaskType(wmsTaskRequest.getTaskType());
|
||||
targetTask.setTaskPriority(wmsTaskRequest.getTaskPriority());
|
||||
targetTask.setVehicleId(wmsTaskRequest.getVehicleId());
|
||||
targetTask.setOrigin(wmsTaskRequest.getOrigin());
|
||||
targetTask.setDestination(wmsTaskRequest.getDestination());
|
||||
targetTask.setWcsTaskId(wmsTaskRequest.getWcsTaskId());
|
||||
targetTask.setGoodsId(wmsTaskRequest.getGoodsId());
|
||||
targetTask.setOpNum(wmsTaskRequest.getOpNum());
|
||||
targetTask.setStockNum(wmsTaskRequest.getStockNum());
|
||||
targetTask.setOpUser(wmsTaskRequest.getOpUser());
|
||||
targetTask.setRemark(wmsTaskRequest.getRemark());
|
||||
targetTask.setCallStand(wmsTaskRequest.getCallStand());
|
||||
targetTask.setGoodsDesc(wmsTaskRequest.getGoodsDesc());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,15 +3,19 @@ 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.constant.enums.wms.WmsTaskTypeEnums;
|
||||
import com.wms_main.dao.ITAppOutsService;
|
||||
import com.wms_main.dao.ITAppPickTaskService;
|
||||
import com.wms_main.dao.ITAppTaskBakService;
|
||||
import com.wms_main.dao.ITAppTaskService;
|
||||
import com.wms_main.model.dto.query.OutsQuery;
|
||||
import com.wms_main.model.dto.query.PickTaskQuery;
|
||||
import com.wms_main.model.dto.query.WmsTaskQuery;
|
||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||
import com.wms_main.model.po.TAppOuts;
|
||||
import com.wms_main.model.po.TAppPickTask;
|
||||
import com.wms_main.model.po.TAppTask;
|
||||
import com.wms_main.model.po.TAppTaskBak;
|
||||
import com.wms_main.model.vo.wms.PageVo;
|
||||
import com.wms_main.model.vo.wms.TaskRecordVo;
|
||||
import com.wms_main.model.vo.wms.TaskVo;
|
||||
import com.wms_main.model.vo.wms.*;
|
||||
import com.wms_main.repository.utils.StringUtils;
|
||||
import com.wms_main.service.controller.ITaskQueryControllerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
|
@ -25,6 +29,8 @@ import org.springframework.stereotype.Service;
|
|||
public class TaskQueryControllerServiceImpl implements ITaskQueryControllerService {
|
||||
private final ITAppTaskService appTaskService;// 任务服务
|
||||
private final ITAppTaskBakService appTaskBakService;// 任务记录服务
|
||||
private final ITAppPickTaskService appPickTaskService;// 拣选任务服务
|
||||
private final ITAppOutsService appOutsService;// 出库单服务
|
||||
|
||||
/**
|
||||
* 查询wms任务监控---分页
|
||||
|
|
@ -114,4 +120,48 @@ public class TaskQueryControllerServiceImpl implements ITaskQueryControllerServi
|
|||
PageVo<TaskRecordVo> pageVo = PageVo.of(outTaskRecordsPage, TaskRecordVo::of);
|
||||
return WmsApiResponse.success("查询出库记录成功。", pageVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询拣选任务---实现
|
||||
* @param pickTaskQuery 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public WmsApiResponse<PageVo<PickTaskVo>> queryPickTasksByPage(PickTaskQuery pickTaskQuery) {
|
||||
if (pickTaskQuery == null) {
|
||||
return WmsApiResponse.error("查询参数不能为NULL", null);
|
||||
}
|
||||
Page<TAppPickTask> page = pickTaskQuery.toMpPage();
|
||||
LambdaQueryWrapper<TAppPickTask> lambdaQueryWrapper = new LambdaQueryWrapper<TAppPickTask>()
|
||||
.like(StringUtils.isNotEmpty(pickTaskQuery.getPickId()), TAppPickTask::getPickId, pickTaskQuery.getPickId())
|
||||
.like(StringUtils.isNotEmpty(pickTaskQuery.getPickStand()), TAppPickTask::getPickStand, pickTaskQuery.getPickStand())
|
||||
.like(StringUtils.isNotEmpty(pickTaskQuery.getVehicleId()), TAppPickTask::getVehicleId, pickTaskQuery.getVehicleId())
|
||||
.eq(pickTaskQuery.getPickStatus() != null, TAppPickTask::getPickStatus, pickTaskQuery.getPickStatus());
|
||||
Page<TAppPickTask> tasksPage = appPickTaskService.page(page, lambdaQueryWrapper);
|
||||
|
||||
PageVo<PickTaskVo> pageVo = PageVo.of(tasksPage, PickTaskVo::of);
|
||||
return WmsApiResponse.success("查询拣选任务成功。", pageVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询出库单---实现
|
||||
* @param outsQuery 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public WmsApiResponse<PageVo<OutsVo>> queryOutsByPage(OutsQuery outsQuery) {
|
||||
if (outsQuery == null) {
|
||||
return WmsApiResponse.error("查询参数不能为NULL", null);
|
||||
}
|
||||
Page<TAppOuts> page = outsQuery.toMpPage();
|
||||
LambdaQueryWrapper<TAppOuts> lambdaQueryWrapper = new LambdaQueryWrapper<TAppOuts>()
|
||||
.like(StringUtils.isNotEmpty(outsQuery.getTaskId()), TAppOuts::getTaskId, outsQuery.getTaskId())
|
||||
.like(StringUtils.isNotEmpty(outsQuery.getGoodsId()), TAppOuts::getGoodsId, outsQuery.getGoodsId())
|
||||
.like(StringUtils.isNotEmpty(outsQuery.getVehicleId()), TAppOuts::getVehicleId, outsQuery.getVehicleId())
|
||||
.eq(outsQuery.getOutType() != null, TAppOuts::getOutType, outsQuery.getOutType());
|
||||
Page<TAppOuts> outsPage = appOutsService.page(page, lambdaQueryWrapper);
|
||||
|
||||
PageVo<OutsVo> pageVo = PageVo.of(outsPage, OutsVo::of);
|
||||
return WmsApiResponse.success("查询出库单成功。", pageVo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,19 +3,42 @@ package com.wms_main.service.quartz_job;
|
|||
import com.wms_main.quartz.config.JobBean;
|
||||
|
||||
/**
|
||||
* 定时任务服务实现
|
||||
* 定时任务服务
|
||||
*/
|
||||
public interface IJobService {
|
||||
/**
|
||||
* 创建任务
|
||||
* @param jobBean 任务信息
|
||||
*/
|
||||
void createJob(JobBean jobBean);
|
||||
|
||||
/**
|
||||
* 删除定时任务
|
||||
* @param jobName 任务名
|
||||
*/
|
||||
void deleteJob(String jobName);
|
||||
|
||||
/**
|
||||
* 修改定时任务
|
||||
* @param jobBean 任务信息
|
||||
*/
|
||||
void modifyJob(JobBean jobBean);
|
||||
|
||||
/**
|
||||
* 暂停定时任务
|
||||
* @param jobName 任务名
|
||||
*/
|
||||
void pauseJob(String jobName);
|
||||
|
||||
/**
|
||||
* 恢复定时任务
|
||||
* @param jobName 任务名
|
||||
*/
|
||||
void resumeJob(String jobName);
|
||||
|
||||
/**
|
||||
* 立即执行一次任务
|
||||
* @param jobName 任务名
|
||||
*/
|
||||
void runJobOnce(String jobName);
|
||||
/**
|
||||
* 初始化所有的定时任务
|
||||
* 只创建启用的
|
||||
*/
|
||||
void initAllJobs();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,4 +25,9 @@ public interface IOutsExecutorService {
|
|||
* 修复出库单
|
||||
*/
|
||||
void repairOuts();
|
||||
|
||||
/**
|
||||
* 执行盘点
|
||||
*/
|
||||
void executeInventory();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,5 +39,11 @@ public class OutsExecutor implements Job {
|
|||
} catch (Exception e) {
|
||||
log.error("处理出库单失败{}", StringUtils.objectToString(e));
|
||||
}
|
||||
// 处理盘点单
|
||||
try {
|
||||
outsExecutorService.executeInventory();
|
||||
} catch (Exception e) {
|
||||
log.error("处理盘点单失败{}", StringUtils.objectToString(e));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class WmsTaskFinisher implements Job {
|
|||
*/
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) {
|
||||
// 获取到所有待下发的任务
|
||||
// 获取到所有已完成的任务
|
||||
List<TAppTask> waitFinishWmsTaskList = appTaskService.list(
|
||||
new LambdaQueryWrapper<TAppTask>()
|
||||
.eq(TAppTask::getTaskStatus, WmsStackerTaskStatusEnums.FINISH.getCode())
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ public class OutsExecutorServiceImpl implements IOutsExecutorService {
|
|||
private final ITAppPickPlanService appPickPlanService;// 拣选计划服务
|
||||
private final IStockDataService stockDataService;// 库存数据服务
|
||||
private final ITAppOutsRecordService appOutsRecordService;// 出库单记录服务
|
||||
private final ITAppInventoryService appInventoryService;// 盘点任务服务
|
||||
private final AppCommon appCommon;// 应用共通数据
|
||||
|
||||
/**
|
||||
|
|
@ -197,6 +198,7 @@ public class OutsExecutorServiceImpl implements IOutsExecutorService {
|
|||
|
||||
/**
|
||||
* 处理出库(入库用)请求
|
||||
*
|
||||
* @param equipVehicleMap 载具与载具编号的映射
|
||||
* @param appOuts 出库单
|
||||
* @param allStocks 所有库存
|
||||
|
|
@ -326,10 +328,6 @@ public class OutsExecutorServiceImpl implements IOutsExecutorService {
|
|||
// 不是这个料
|
||||
continue;
|
||||
}
|
||||
// if (StringUtils.isNotEmpty(appOuts.getVehicleId()) && !Objects.equals(stock.getVehicleId(), appOuts.getVehicleId())) {
|
||||
// // 紧急出库选择了箱号
|
||||
// continue;
|
||||
// }
|
||||
String stockId = stockDataService.getFirstInStock(stock.getGoodsId(), allStocks);
|
||||
if (StringUtils.isNotEmpty(stockId) && !Objects.equals(stockId, stock.getStockId())) {
|
||||
// 不是当前物料最先进的库存
|
||||
|
|
@ -742,8 +740,8 @@ public class OutsExecutorServiceImpl implements IOutsExecutorService {
|
|||
continue;
|
||||
}
|
||||
if (work.getWorkStatus() == 2 && work.getLackStatus() == 1) {
|
||||
// 缺料,添加记录
|
||||
workRecords.add(RecordOfWork(work));
|
||||
// 缺料,不算完成
|
||||
ifAllFinished = false;
|
||||
continue;
|
||||
}
|
||||
// 判断库内料分配的数量是否需要修正
|
||||
|
|
@ -943,6 +941,143 @@ public class OutsExecutorServiceImpl implements IOutsExecutorService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理盘点任务
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void executeInventory() {
|
||||
// 查询对应的盘点任务
|
||||
List<TAppInventory> waitExecuteInventoryList = appInventoryService.list(new LambdaQueryWrapper<TAppInventory>()
|
||||
.eq(TAppInventory::getInvStatus, WmsInvStatusEnums.INIT.getCode()));
|
||||
if (waitExecuteInventoryList == null || waitExecuteInventoryList.isEmpty()) {
|
||||
// 没有需要解析的盘点任务
|
||||
return;
|
||||
}
|
||||
// 筛选出对应载具号
|
||||
List<String> vehicleIds = waitExecuteInventoryList.stream().map(TAppInventory::getVehicleId).distinct().toList();
|
||||
if (vehicleIds.isEmpty()) {
|
||||
// 没有对应载具号
|
||||
return;
|
||||
}
|
||||
// 查询对应的库存信息
|
||||
List<TAppStock> targetStocks = appStockService.list(new LambdaQueryWrapper<TAppStock>()
|
||||
.in(TAppStock::getVehicleId, vehicleIds)
|
||||
.le(TAppStock::getStockStatus, WmsStockStatusEnums.OUTED.getCode())
|
||||
.orderByAsc(TAppStock::getFirstInTime));
|
||||
// 拣选任务
|
||||
List<TAppPickTask> pickTasks = appPickTaskService.list(new LambdaQueryWrapper<TAppPickTask>()
|
||||
.in(TAppPickTask::getVehicleId, vehicleIds));
|
||||
// 需要保存的信息
|
||||
List<TAppTask> newOutWmsTasks = new ArrayList<>();// 新的出库任务
|
||||
List<TAppPickTask> newPickTasks = new ArrayList<>();// 新的拣选任务
|
||||
List<String> thisTimeOutVehicleIds = new ArrayList<>();// 本次出库载具
|
||||
// 获取可用堆垛机
|
||||
List<TAppEquipment> usableStackers = appEquipmentService.list(new LambdaQueryWrapper<TAppEquipment>()
|
||||
.eq(TAppEquipment::getEquipmentType, 1)
|
||||
.eq(TAppEquipment::getEquipmentStatus, WmsUsableStatusEnums.USABLE.getCode()));
|
||||
Map<Integer, String> equipVehicleMap = new HashMap<>();
|
||||
getVehicleEquipMap("", true, equipVehicleMap, usableStackers);
|
||||
for (TAppInventory inventory : waitExecuteInventoryList) {
|
||||
// 查找
|
||||
for (TAppStock stock : targetStocks) {
|
||||
if (thisTimeOutVehicleIds.contains(stock.getVehicleId())) {
|
||||
// 设置这个箱子的库存都为出库中
|
||||
stock.setStockStatus(WmsStockStatusEnums.OUTING.getCode());
|
||||
}
|
||||
if (!Objects.equals(inventory.getGoodsId(), stock.getGoodsId())) {
|
||||
// 不是这个料
|
||||
continue;
|
||||
}
|
||||
if (!Objects.equals(stock.getVehicleId(), inventory.getVehicleId())) {
|
||||
// 不是这个箱子
|
||||
continue;
|
||||
}
|
||||
if (Objects.equals(stock.getStockStatus(), WmsStockStatusEnums.OK.getCode()) && ifThisLocationCantOut(stock.getLocationId(), equipVehicleMap)) {
|
||||
// 当前堆垛机已经无法生成新的出库任务了
|
||||
continue;
|
||||
}
|
||||
// 拣选任务状态
|
||||
int pickTaskStatus = WmsPickTaskStatusEnum.TEMP.getCode();
|
||||
// 库存正常
|
||||
if (Objects.equals(stock.getStockStatus(), WmsStockStatusEnums.OK.getCode())) {
|
||||
// 需要生成出库任务
|
||||
newOutWmsTasks.add(new TAppTask(
|
||||
UUIDUtils.getNewUUID(),
|
||||
WmsTaskTypeEnums.OUT.getCode(),
|
||||
0,
|
||||
2,
|
||||
stock.getVehicleId(),
|
||||
stock.getLocationId(),
|
||||
null,
|
||||
null,
|
||||
LocalDateTime.now(),
|
||||
null,
|
||||
AppConstant.EMPTY_GOODS_ID,
|
||||
0,
|
||||
0,
|
||||
inventory.getInvUser(),
|
||||
"",
|
||||
inventory.getInvStand(),
|
||||
""
|
||||
));
|
||||
stock.setStockStatus(WmsStockStatusEnums.OUTING.getCode());
|
||||
thisTimeOutVehicleIds.add(stock.getVehicleId());
|
||||
updateVehicleEquipMapByLocation(equipVehicleMap, stock.getVehicleId(), stock.getLocationId());
|
||||
}
|
||||
// 如果是已经出库的库存
|
||||
if (Objects.equals(stock.getStockStatus(), WmsStockStatusEnums.OUTED.getCode())) {
|
||||
pickTaskStatus = WmsPickTaskStatusEnum.WAIT.getCode();
|
||||
}
|
||||
// 已有的拣选任务
|
||||
List<TAppPickTask> oldPickTasks = new ArrayList<>();
|
||||
if (pickTasks != null) {
|
||||
oldPickTasks = pickTasks.stream().filter(pickTask ->
|
||||
Objects.equals(pickTask.getPickStand(), inventory.getInvStand())
|
||||
&& pickTask.getVehicleId().equals(stock.getVehicleId())
|
||||
&& !Objects.equals(pickTask.getPickStatus(), WmsPickTaskStatusEnum.FOR_IN.getCode())).toList();
|
||||
}
|
||||
// 新生成的拣选任务
|
||||
List<TAppPickTask> newOldPickTasks = newPickTasks.stream().filter(pickTask -> pickTask.getVehicleId().equals(stock.getVehicleId())
|
||||
&& Objects.equals(pickTask.getPickStand(), inventory.getInvStand())
|
||||
&& !Objects.equals(pickTask.getPickStatus(), WmsPickTaskStatusEnum.FOR_IN.getCode())).toList();
|
||||
// 生成拣选任务
|
||||
if (oldPickTasks.isEmpty() && newOldPickTasks.isEmpty()) {
|
||||
newPickTasks.add(new TAppPickTask(
|
||||
UUIDUtils.getNewUUID(),
|
||||
inventory.getInvStand(),
|
||||
stock.getVehicleId(),
|
||||
pickTaskStatus,
|
||||
LocalDateTime.now(),
|
||||
null, null, null
|
||||
));
|
||||
}
|
||||
// 设置盘点状态
|
||||
inventory.setInvStatus(WmsInvStatusEnums.EXECUTED.getCode());
|
||||
}
|
||||
}
|
||||
// 更新盘点信息
|
||||
appInventoryService.updateBatchById(waitExecuteInventoryList);
|
||||
// 保存出库任务
|
||||
if (!newOutWmsTasks.isEmpty()) {
|
||||
appTaskService.saveBatch(newOutWmsTasks);
|
||||
}
|
||||
// 保存拣选任务
|
||||
if (!newPickTasks.isEmpty()) {
|
||||
appPickTaskService.saveBatch(newPickTasks);
|
||||
}
|
||||
// 更新载具信息
|
||||
if (!thisTimeOutVehicleIds.isEmpty()) {
|
||||
appVehicleService.update(new LambdaUpdateWrapper<TAppVehicle>()
|
||||
.set(TAppVehicle::getVehicleStatus, WmsVehicleStatusEnums.OUT.getCode())
|
||||
.in(TAppVehicle::getVehicleId, thisTimeOutVehicleIds));
|
||||
// 更新库存状态
|
||||
appStockService.update(new LambdaUpdateWrapper<TAppStock>()
|
||||
.set(TAppStock::getStockStatus, WmsStockStatusEnums.OUTING.getCode())
|
||||
.in(TAppStock::getVehicleId, thisTimeOutVehicleIds));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 转化记录
|
||||
*
|
||||
|
|
@ -1191,6 +1326,7 @@ public class OutsExecutorServiceImpl implements IOutsExecutorService {
|
|||
|
||||
/**
|
||||
* 添加待删除序号以及记录
|
||||
*
|
||||
* @param outIds 待删除id列表
|
||||
* @param thisOuts 待删除outs
|
||||
* @param addRecords 待添加的记录
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
package com.wms_main.service.system;
|
||||
|
||||
/**
|
||||
* 系统服务接口
|
||||
*/
|
||||
public interface ISystemService {
|
||||
/**
|
||||
* 重启系统
|
||||
*/
|
||||
boolean restartSystem();
|
||||
|
||||
/**
|
||||
* 重新加载配置
|
||||
*/
|
||||
boolean reloadConfig();
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.wms_main.service.system.serviceImpl;
|
||||
|
||||
import com.wms_main.WmsMainApplication;
|
||||
import com.wms_main.app.AppCommon;
|
||||
import com.wms_main.dao.ITAppConfigService;
|
||||
import com.wms_main.service.system.ISystemService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统服务接口实现
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SystemServiceImpl implements ISystemService {
|
||||
/**
|
||||
* 应用共通数据
|
||||
*/
|
||||
private final AppCommon appCommon;
|
||||
|
||||
/**
|
||||
* 重启系统
|
||||
* @return 重启结果
|
||||
*/
|
||||
@Override
|
||||
public boolean restartSystem() {
|
||||
try {
|
||||
WmsMainApplication.restart();
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 重载配置
|
||||
* @return 重载结果
|
||||
*/
|
||||
@Override
|
||||
public boolean reloadConfig() {
|
||||
return appCommon.initConfigMap();
|
||||
}
|
||||
}
|
||||
|
|
@ -9,13 +9,13 @@ spring:
|
|||
# username: developer
|
||||
# password: developer
|
||||
# 本地
|
||||
# url: jdbc:mysql://localhost:3306/wms_kate_wuxi_test?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||
# username: root
|
||||
# password: liangzhou
|
||||
url: jdbc:mysql://localhost:3306/wms_kate_wuxi?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||
username: root
|
||||
password: liangzhou
|
||||
# 卡特服务器
|
||||
url: jdbc:mysql://10.90.83.37:3306/wms_kate_wuxi?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||
username: developer
|
||||
password: baokai
|
||||
# url: jdbc:mysql://10.90.83.37:3306/wms_kate_wuxi?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||
# username: developer
|
||||
# password: baokai
|
||||
|
||||
profiles:
|
||||
active: online
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.wms_main.mapper.AppInventoryMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.wms_main.mapper.AppInventoryRecordMapper">
|
||||
|
||||
</mapper>
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user