代码更新:

1. 删除体验界面
2. 请求中增加用户名的设定
3. 整理盒子界面完善
This commit is contained in:
梁州 2024-08-11 20:09:45 +08:00
parent b45d1057a5
commit e9014815a9
13 changed files with 66 additions and 448 deletions

View File

@ -144,6 +144,14 @@ const requestPrintData = (params) => {
})
}
const requestSortBox = (params) => {
return request({
url: '/task/requestSortBox',
method: 'post',
data: params
})
}
export {
sendGoodsInTask,
sendGoodsOutTask,
@ -162,5 +170,6 @@ export {
requestPickTest,
requestBackTest,
requestInTest,
requestPrintData
requestPrintData,
requestSortBox
}

View File

@ -167,16 +167,16 @@ export default {
]
}),
printTabs: [
{
sequenceNo: 1,
machineNo: 'WF800471',
smallWorkCenter: 'abd1111',
workOrder: '115000262768',
goodsCount: 30,
goodsNumCount: 132,
opUser: 'test',
opTime: '2024/8/11'
}
// {
// sequenceNo: 1,
// machineNo: 'WF800471',
// smallWorkCenter: 'abd1111',
// workOrder: '115000262768',
// goodsCount: 30,
// goodsNumCount: 132,
// opUser: 'test',
// opTime: '2024/8/11'
// }
]
}
},

View File

@ -119,8 +119,7 @@ export default {
workFormRef: ref(),
workFormEntity: reactive({
vehicleId: '',
goodsId: '',
goodsNum: null
goodsId: ''
}),
rules: reactive({
goodsId: [
@ -145,8 +144,7 @@ export default {
resetForms() {
this.workFormEntity = reactive({
vehicleId: '',
goodsId: '',
goodsNum: null
goodsId: ''
})
},
addTempTask() {

View File

@ -1,387 +0,0 @@
<template>
<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>
</div>
</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: 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="focusChange()" 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="focusChange()" 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.goodsNum" ref="goodsNum"
controls-position="right" :min="0" :max="4" v-on:keyup.enter="focusChange()" />
</div>
<div class="display-form-div-right">
<span class="display-form-text-right">PC</span>
</div>
</div>
</div>
</div>
</div>
<div style="margin: 10px; margin-left: 20px;" v-if="standId != 'ASRS-#0'">
<div class="arrow" @click="requestPick()">
<span
style="margin-left: 25px; align-self: center; font-weight: bold;font-size: 45px; writing-mode: vertical-lr;">请求拣选</span>
</div>
</div>
<div style="margin: 10px;">
<div class="arrow" @click="requestBack()" v-if="standId != 'ASRS-#0'">
<span
style="margin-left: 25px; align-self: center; font-weight: bold;font-size: 45px; writing-mode: vertical-lr;">请求回库</span>
</div>
</div>
<div style="margin: 10px;">
<div class="arrow" @click="requestIn()" v-if="standId == 'ASRS-#0'">
<span
style="margin-left: 25px; align-self: center; font-weight: bold;font-size: 45px; writing-mode: vertical-lr;">请求入库</span>
</div>
</div>
</div>
</el-form>
</fieldset>
</div>
</el-container>
</el-config-provider>
</template>
<script setup>
import store from '@/store'
import { requestPickTest, requestBackTest, requestInTest } from '@/api/task'
import { replaceEnglishAndNumberIGAI } from '@/utils/formatter'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
<script>
export default {
name: 'inventory',
data() {
return {
standId: store.getters.getStandId,
// timer: '',
labelPosition: 'top',
workFormRef: ref(),
workFormEntity: reactive({
vehicleId: '',
goodsId: '',
goodsNum: null
}),
rules: reactive({}),
}
},
mounted() {
this.$refs.vehicleId.focus()
// this.timer = setInterval(() => {
// this.queryFinish()
// }, 2000)
},
beforeUnmount() {
// clearInterval(this.timer)
},
methods: {
//
resetForms() {
this.workFormEntity = reactive({
vehicleId: '',
goodsId: '',
goodsNum: null,
})
this.$refs.vehicleId.focus()
},
focusChange() {
this.workFormEntity.vehicleId = replaceEnglishAndNumberIGAI(this.workFormEntity.vehicleId)
if (this.workFormEntity.vehicleId == '') {
this.$refs.vehicleId.focus()
} else if (this.workFormEntity.goodsId == '') {
this.$refs.goodsId.focus()
} else if (this.workFormEntity.goodsNum == null || this.workFormEntity.goodsNum <= 0) {
this.$refs.goodsNum.focus()
}
},
//
requestPick() {
const confirmParams = {
userName: store.getters.getUserName,
pickStand: this.standId,
goodsId: this.workFormEntity.goodsId,
vehicleId: this.workFormEntity.vehicleId,
goodsNum: this.workFormEntity.goodsNum
}
requestPickTest(confirmParams).then(res => {
const response = res.data
if (response.code == 0) {
this.resetForms()
ElMessage.success(response.message)
} else {
ElMessage.error(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('确认时发生异常')
})
},
//
requestBack() {
const confirmParams = {
userName: store.getters.getUserName,
pickStand: this.standId,
goodsId: this.workFormEntity.goodsId,
vehicleId: this.workFormEntity.vehicleId,
goodsNum: this.workFormEntity.goodsNum
}
requestBackTest(confirmParams).then(res => {
const response = res.data
if (response.code == 0) {
this.resetForms()
ElMessage.success(response.message)
} else {
ElMessage.error(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('确认时发生异常')
})
},
//
requestIn() {
const confirmParams = {
userName: store.getters.getUserName,
pickStand: this.standId,
goodsId: this.workFormEntity.goodsId,
vehicleId: this.workFormEntity.vehicleId,
goodsNum: this.workFormEntity.goodsNum
}
requestInTest(confirmParams).then(res => {
const response = res.data
if (response.code == 0) {
this.resetForms()
ElMessage.success(response.message)
} else {
ElMessage.error(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('确认时发生异常')
})
}
}
}
</script>
<style scoped>
.content {
display: flex;
width: 100%;
}
.work-area {
width: 100%;
/* padding: 5px; */
}
.main-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;
}
.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;
}
.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: 270px;
width: 250px;
background-repeat: no-repeat;
display: inline-flex;
cursor: pointer;
}
:deep(.el-input) {
width: 195px;
height: 130px;
font-size: 25px;
}
: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;
height: 150px;
background-color: #87CEFA;
}
.title-text {
align-self: center;
font-weight: bold;
font-size: 45px;
}
.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;
}
</style>

View File

@ -7,7 +7,7 @@
工作台
</legend>
<div class="title-div">
<span class="title-text">盒子分类</span>
<span class="title-text">整理盒子</span>
</div>
<div class="station-div">
<span class="station-text">工作站</span>
@ -18,7 +18,7 @@
</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>
@ -31,21 +31,21 @@
<span class="display-title-text">大盒子</span>
</div>
<div class="display-form-div">
<el-input v-model="workFormEntity.goodsId" size="default"
<el-input v-model="workFormEntity.bigBoxNo" size="default" id="bigBoxNo"
clearable></el-input>
</div>
</div>
<div style="display: flex; flex-direction: column;">
<!-- <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.goodsNum"
<el-input-number v-model.number="workFormEntity.orderOfOrders"
controls-position="right" :min="1" :max="10" />
</div>
</div>
</div>
</div> -->
</div>
</div>
<div style="margin: 10px;">
@ -64,7 +64,7 @@
<script setup>
import store from '@/store'
import { sendGoodsInTask } from '@/api/task'
import { requestSortBox } from '@/api/task'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
@ -80,18 +80,10 @@ export default {
labelPosition: 'top',
workFormRef: ref(),
workFormEntity: reactive({
vehicleId: '',
goodsId: '',
goodsNum: 0
}),
rules: reactive({
goodsId: [
{ required: true, message: '请输入料号' }
],
vehicleId: [
{ required: true, message: '请输入箱号' }
]
bigBoxNo: '',
// orderOfOrders: 1
}),
rules: reactive({}),
}
},
mounted() {
@ -104,37 +96,31 @@ export default {
},
methods: {
resetForms() {
this.$refs.bigBoxNo.focus()
this.workFormEntity = reactive({
vehicleId: '',
goodsId: '',
goodsNum: 0
bigBoxNo: '',
// orderOfOrders: 1
})
},
confirmTask() {
if (this.workFormEntity.vehicleId == '') {
if (this.workFormEntity.bigBoxNo == '') {
ElMessage({
message: '必须输入料箱号',
type: 'error',
})
return
}
if (this.workFormEntity.goodsNum <= 0) {
ElMessage({
message: '入库数量必须大于等于1',
message: '请输入大盒子号',
type: 'error',
})
return
}
const request = {
vehicleId: this.workFormEntity.vehicleId,
standId: this.standId,
bigBoxNo: this.workFormEntity.bigBoxNo,
// orderOfOrders: this.workFormEntity.orderOfOrders,
userName: store.getters.getUserName,
goodsList: this.workFormEntity.goodsId == '' ? [] : [{ goodsId: this.workFormEntity.goodsId, goodsNum: this.workFormEntity.goodsNum }],
}
sendGoodsInTask(request).then(res => {
requestSortBox(request).then(res => {
const response = res.data
if (response.code == 0) {
ElMessage({
message: '入库确认成功。',
message: '请根据灯光拣选盒子。',
type: 'success',
})
this.resetForms()
@ -143,7 +129,7 @@ export default {
}
}).catch(err => {
console.log(err)
ElMessage.error('入库处理异常')
ElMessage.error('请求发生异常。')
})
}
}

View File

@ -251,7 +251,8 @@ export default {
const request = {
pageNo: this.currentPage,
pageSize: this.pageSize,
goodsId: this.goodsIdQuery.trim()
goodsId: this.goodsIdQuery.trim(),
userName: store.getters.getUserName
}
getAllStocks(request).then(res => {
const tableResponse = res.data

View File

@ -196,7 +196,8 @@ export default {
pageNo: this.currentPage,
pageSize: this.pageSize,
goodsId: this.goodsIdQuery.trim(),
vehicleId: this.vehicleIdQuery.trim()
vehicleId: this.vehicleIdQuery.trim(),
userName: store.getters.getUserName
}
getTasksByPage(tableRequest).then(res => {
const tableResponse = res.data

View File

@ -95,7 +95,8 @@ export default {
getCurrentWorkInfo() {
const request = {
standId: this.standId,
goodsId: this.workFormEntity.goodsId
goodsId: this.workFormEntity.goodsId,
userName: store.getters.getUserName
}
getWorkByStandAndGoods(request).then(res => {
const response = res.data
@ -127,7 +128,8 @@ export default {
}
const request = {
standId: this.standId,
goodsId: this.workFormEntity.goodsId
goodsId: this.workFormEntity.goodsId,
userName: store.getters.getUserName
}
queryFinishByStandAndGoods(request).then(res => {
const response = res.data

View File

@ -151,7 +151,8 @@ export default {
const tableRequest = {
pageNo: this.currentPage,
pageSize: this.pageSize,
vehicleId: this.queryKey.trim()
vehicleId: this.queryKey.trim(),
userName: store.getters.getUserName
}
getAllVehicles(tableRequest).then(res => {
const tableResponse = res.data
@ -203,7 +204,8 @@ export default {
currentLocation: formData.currentLocation,
isEmpty: formData.isEmpty,
vehicleStatus: formData.vehicleStatus,
lastInTime: row.lastInTime
lastInTime: row.lastInTime,
userName: store.getters.getUserName
}
updateVehicleInfo(request).then(res => {
if (res.data.code == 0) {
@ -229,7 +231,8 @@ export default {
vehicleId: formData.vehicleId,
currentLocation: formData.currentLocation,
isEmpty: formData.isEmpty,
vehicleStatus: formData.vehicleStatus
vehicleStatus: formData.vehicleStatus,
userName: store.getters.getUserName
}
downloadVehicleExcel(request).then(res => {
const link = document.createElement('a');//a

View File

@ -156,7 +156,8 @@ export default {
const request = {
pageNo: this.currentPage,
pageSize: this.pageSize,
configName: this.configNameQuery.trim()
configName: this.configNameQuery.trim(),
userName: store.getters.getUserName
}
getConfigsByPage(request).then(res => {
const tableResponse = res.data
@ -205,7 +206,8 @@ export default {
configName: this.configFormEntity.configName,
configKey: this.configFormEntity.configKey,
configValue: this.configFormEntity.configValue,
configType: this.configFormEntity.configType
configType: this.configFormEntity.configType,
userName: store.getters.getUserName
}
updateConfig(request).then(res => {
if (res.data.code == 0) {

View File

@ -138,7 +138,8 @@ export default {
const tableRequest = {
pageNo: this.currentPage,
pageSize: this.pageSize,
queryParam: this.queryKey.trim()
queryParam: this.queryKey.trim(),
userName: store.getters.getUserName
}
queryLogs(tableRequest).then(res => {
const tableResponse = res.data

View File

@ -31,7 +31,6 @@ const routes = [
{ path: '/testSortBoxs', component: () => import('@/layout/sortBoxs.vue') },// 整理盒子
{ path: '/uploadDbs', component: () => import('@/layout/uploadDbs.vue') },// 上传DBS
{ path: '/uploadOrders', component: () => import('@/layout/uploadOrders.vue') },// 上传工单
{ path: '/play_boy', component: () => import('@/layout/play_boy.vue') },// 体验拣选
]
},
{

View File

@ -163,6 +163,9 @@ function sizeFormatter(value) {
}
function jsonFormatter(value) {
if (value == null) {
return ""
}
if (typeof value == 'string') {
try {
return JSON.stringify(JSON.parse(value), null, 4)