代码更新:

1. 整理盒子界面修正
2. 入库界面增加快速连点防护
This commit is contained in:
梁州 2024-10-04 17:04:16 +08:00
parent bd863e9989
commit affbe9bef5
9 changed files with 127 additions and 29 deletions

View File

@ -68,7 +68,8 @@ const getWorkByStandAndGoods = (params) => {
return request({ return request({
url: '/task/getWorkByStandAndGoods', url: '/task/getWorkByStandAndGoods',
method: 'post', method: 'post',
data: params data: params,
timeout: 10000
}) })
} }
@ -148,6 +149,15 @@ const requestSortBox = (params) => {
return request({ return request({
url: '/task/requestSortBox', url: '/task/requestSortBox',
method: 'post', method: 'post',
data: params,
timeout: 10000
})
}
const requestSumOfBox = (params) => {
return request({
url: '/task/requestSumOfBox',
method: 'post',
data: params data: params
}) })
} }
@ -211,6 +221,7 @@ export {
requestInTest, requestInTest,
requestPrintData, requestPrintData,
requestSortBox, requestSortBox,
requestSumOfBox,
getPickTasksByPage, getPickTasksByPage,
deletePickTasks, deletePickTasks,
updatePickTasks, updatePickTasks,

View File

@ -1,7 +1,7 @@
import axios from 'axios' import axios from 'axios'
const request = axios.create({ const request = axios.create({
baseURL: 'http://localhost:12315/wms', baseURL: 'http://10.90.36.70:443/wmsServer/wms',
timeout: 5000 timeout: 5000
}) })

View File

@ -31,7 +31,7 @@
</div> </div>
<div class="display-form-div"> <div class="display-form-div">
<el-input v-model="workFormEntity.goodsId" size="default" ref="needGoodsId" <el-input v-model="workFormEntity.goodsId" size="default" ref="needGoodsId"
@blur="getStockNumOfGoodsIdMethod()" clearable></el-input> v-on:keyup.enter="getStockNumOfGoodsIdMethod()" clearable></el-input>
</div> </div>
</div> </div>
<div style="display: flex; flex-direction: column;"> <div style="display: flex; flex-direction: column;">

View File

@ -103,6 +103,7 @@ import { replaceEnglishAndNumberIGAI } from '@/utils/formatter'
import { reactive, ref } from 'vue' import { reactive, ref } from 'vue'
import { errorBox } from '@/utils/myMessageBox.js' import { errorBox } from '@/utils/myMessageBox.js'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import loading from '@/utils/loading.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script> </script>
@ -254,7 +255,9 @@ export default {
} }
}, },
confirmTask() { confirmTask() {
loading.open('处理中,请稍等...')
if (this.currentVehicleId == '') { if (this.currentVehicleId == '') {
loading.close()
errorBox('必须输入料箱号') errorBox('必须输入料箱号')
return return
} }
@ -264,6 +267,7 @@ export default {
goodsList: this.tempTasks.length > 0 ? this.tempTasks : [], goodsList: this.tempTasks.length > 0 ? this.tempTasks : [],
} }
sendGoodsInTask(request).then(res => { sendGoodsInTask(request).then(res => {
loading.close()
const response = res.data const response = res.data
if (response.code == 0) { if (response.code == 0) {
ElMessage.success('入库确认成功。') ElMessage.success('入库确认成功。')
@ -275,6 +279,7 @@ export default {
errorBox(response.message) errorBox(response.message)
} }
}).catch(err => { }).catch(err => {
loading.close()
console.log(err) console.log(err)
errorBox('入库处理异常') errorBox('入库处理异常')
}) })

View File

@ -112,6 +112,7 @@ import { replaceEnglishAndNumberIGAI } from '@/utils/formatter'
import { reactive, ref } from 'vue' import { reactive, ref } from 'vue'
import { errorBox } from '@/utils/myMessageBox.js' import { errorBox } from '@/utils/myMessageBox.js'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import loading from '@/utils/loading.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script> </script>
@ -266,7 +267,9 @@ export default {
} }
}, },
confirmTask() { confirmTask() {
loading.open('处理中,请稍等...')
if (this.currentVehicleId == '') { if (this.currentVehicleId == '') {
loading.close()
errorBox('必须输入料箱号') errorBox('必须输入料箱号')
return return
} }
@ -276,6 +279,7 @@ export default {
goodsList: this.tempTasks.length > 0 ? this.tempTasks : [], goodsList: this.tempTasks.length > 0 ? this.tempTasks : [],
} }
sendGoodsInTask(request).then(res => { sendGoodsInTask(request).then(res => {
loading.close()
const response = res.data const response = res.data
if (response.code == 0) { if (response.code == 0) {
ElMessage.success('入库确认成功。') ElMessage.success('入库确认成功。')
@ -287,6 +291,7 @@ export default {
errorBox(response.message) errorBox(response.message)
} }
}).catch(err => { }).catch(err => {
loading.close()
console.log(err) console.log(err)
errorBox('入库处理异常') errorBox('入库处理异常')
}) })

View File

@ -31,18 +31,28 @@
<span class="display-title-text">大盒子</span> <span class="display-title-text">大盒子</span>
</div> </div>
<div class="display-form-div"> <div class="display-form-div">
<el-input v-model="workFormEntity.bigBoxNo" size="default" id="bigBoxNo" <el-input v-model="workFormEntity.bigBoxNo" size="default" id="bigBoxNo" v-on:keyup.enter="getSumOfBox()" clearable></el-input>
clearable></el-input>
</div> </div>
</div> </div>
<div style="display: flex; flex-direction: column;"> <div style="display: flex; flex-direction: column;">
<div class="display-title-div"> <div class="display-title-div">
<span class="display-title-text">机器号数量</span> <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.sumOfOrders"
disabled controls-position="right" />
</div>
</div>
</div>
<div style="display: flex; flex-direction: column;">
<div class="display-title-div">
<span class="display-title-text">当前盒子序号</span>
</div> </div>
<div style="display: flex; margin-top: 20px;"> <div style="display: flex; margin-top: 20px;">
<div class="display-form-div-left"> <div class="display-form-div-left">
<el-input-number v-model.number="workFormEntity.orderOfOrders" <el-input-number v-model.number="workFormEntity.orderOfOrders"
controls-position="right" :min="1" disabled /> controls-position="right" :min="0" :max="workFormEntity.sumOfOrders" clearable />
</div> </div>
</div> </div>
</div> </div>
@ -64,7 +74,7 @@
<script setup> <script setup>
import store from '@/store' import store from '@/store'
import { requestSortBox } from '@/api/task' import { requestSortBox, requestSumOfBox } from '@/api/task'
import { reactive, ref } from 'vue' import { reactive, ref } from 'vue'
import { errorBox } from '@/utils/myMessageBox.js' import { errorBox } from '@/utils/myMessageBox.js'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
@ -82,7 +92,8 @@ export default {
workFormRef: ref(), workFormRef: ref(),
workFormEntity: reactive({ workFormEntity: reactive({
bigBoxNo: '', bigBoxNo: '',
orderOfOrders: null orderOfOrders: null,
sumOfOrders: null
}), }),
rules: reactive({}), rules: reactive({}),
} }
@ -100,7 +111,29 @@ export default {
this.$refs.bigBoxNo.focus() this.$refs.bigBoxNo.focus()
this.workFormEntity = reactive({ this.workFormEntity = reactive({
bigBoxNo: '', bigBoxNo: '',
orderOfOrders: null orderOfOrders: null,
sumOfOrders: null
})
},
getSumOfBox() {
if (this.workFormEntity.bigBoxNo == '') {
return
}
const request = {
bigBoxNo: this.workFormEntity.bigBoxNo,
standId: this.standId,
userName: store.getters.getUserName
}
requestSumOfBox(request).then(res => {
const response = res.data
if (response.code == 0) {
this.workFormEntity.sumOfOrders = response.returnData.sumOfOrders
} else {
errorBox(response.message)
}
}).catch(err => {
console.log(err)
errorBox('请求发生异常。')
}) })
}, },
confirmTask() { confirmTask() {
@ -108,14 +141,10 @@ export default {
errorBox('请输入大盒子号') errorBox('请输入大盒子号')
return return
} }
// if (this.workFormEntity.orderOfOrders == null) {
// errorBox('')
// return
// }
const request = { const request = {
standId: this.standId, standId: this.standId,
bigBoxNo: this.workFormEntity.bigBoxNo, bigBoxNo: this.workFormEntity.bigBoxNo,
// orderOfOrders: this.workFormEntity.orderOfOrders, orderOfOrders: this.workFormEntity.orderOfOrders,
userName: store.getters.getUserName userName: store.getters.getUserName
} }
requestSortBox(request).then(res => { requestSortBox(request).then(res => {
@ -123,6 +152,7 @@ export default {
if (response.code == 0) { if (response.code == 0) {
this.workFormEntity.orderOfOrders = response.returnData.orderOfOrders this.workFormEntity.orderOfOrders = response.returnData.orderOfOrders
ElMessage.success('请根据灯光拣选盒子。') ElMessage.success('请根据灯光拣选盒子。')
this.resetForms()
} else { } else {
errorBox(response.message) errorBox(response.message)
} }
@ -188,13 +218,13 @@ export default {
} }
:deep(.el-input) { :deep(.el-input) {
width: 340px; width: 240px;
height: 130px; height: 130px;
font-size: 25px; font-size: 25px;
} }
:deep(.el-input-number) { :deep(.el-input-number) {
width: 340px; width: 240px;
height: 130px; height: 130px;
font-size: 25px; font-size: 25px;
} }
@ -246,7 +276,7 @@ export default {
.display-title-div { .display-title-div {
display: inline-flex; display: inline-flex;
justify-content: center; justify-content: center;
width: 350px; width: 250px;
height: 80px; height: 80px;
margin: 5px; margin: 5px;
padding: 5px; padding: 5px;
@ -262,7 +292,7 @@ export default {
.display-form-div { .display-form-div {
display: inline-flex; display: inline-flex;
justify-content: center; justify-content: center;
width: 340px; width: 240px;
margin: 5px; margin: 5px;
padding: 5px; padding: 5px;
border: 5px double #000000; border: 5px double #000000;
@ -272,7 +302,7 @@ export default {
.display-form-div-left { .display-form-div-left {
display: inline-flex; display: inline-flex;
justify-content: center; justify-content: center;
width: 340px; width: 240px;
margin: 5px; margin: 5px;
padding: 5px; padding: 5px;
border: 5px double #000000; border: 5px double #000000;

View File

@ -9,14 +9,16 @@
:suffix-icon="Search" /> :suffix-icon="Search" />
<el-input v-model="reasonQuery" style="width: 158px; margin-right: 10px;" placeholder="更新原因" <el-input v-model="reasonQuery" style="width: 158px; margin-right: 10px;" placeholder="更新原因"
:suffix-icon="Search" /> :suffix-icon="Search" />
<el-select-v2 v-model="reasonQuery" style="width: 158px; margin-right: 10px;"
placeholder="请选择更新原因" :options="reasonOptions" @change="search()"></el-select-v2>
<el-button type="primary" @click="search()">搜索</el-button> <el-button type="primary" @click="search()">搜索</el-button>
<el-button type="warning" @click="reset()">重置</el-button> <el-button type="warning" @click="reset()">重置</el-button>
</el-row> </el-row>
</div> </div>
<br /> <br />
<el-table :data="recordList" stripe border v-loading="loading" class="table-class" <el-table :data="recordList" stripe border v-loading="loading" class="table-class" highlight-current-row
highlight-current-row max-height="650px" @row-click="getCurrentRow" max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }"> :cell-style="{ 'text-align': 'center' }">
<el-table-column width="65px" fixed="left"> <el-table-column width="65px" fixed="left">
<template v-slot="scope"> <template v-slot="scope">
<el-radio :label="scope.row.recordId" v-model="recordId">&nbsp;</el-radio> <el-radio :label="scope.row.recordId" v-model="recordId">&nbsp;</el-radio>
@ -31,8 +33,7 @@
<el-table-column prop="locationAfter" label="新位置" min-width="120px" show-overflow-tooltip /> <el-table-column prop="locationAfter" label="新位置" min-width="120px" show-overflow-tooltip />
<el-table-column prop="quantityBefore" label="原数量" min-width="120px" /> <el-table-column prop="quantityBefore" label="原数量" min-width="120px" />
<el-table-column prop="quantityAfter" label="新数量" min-width="120px" /> <el-table-column prop="quantityAfter" label="新数量" min-width="120px" />
<el-table-column prop="reason" label="原因" fixed="right" show-overflow-tooltip <el-table-column prop="reason" label="原因" fixed="right" show-overflow-tooltip min-width="120px" />
min-width="120px" />
<el-table-column prop="updateTime" label="完成时间" :formatter="timeFormat" min-width="120px" <el-table-column prop="updateTime" label="完成时间" :formatter="timeFormat" min-width="120px"
show-overflow-tooltip /> show-overflow-tooltip />
<el-table-column prop="updateUser" label="操作用户" min-width="120px" /> <el-table-column prop="updateUser" label="操作用户" min-width="120px" />
@ -68,6 +69,52 @@ export default {
reasonQuery: '', reasonQuery: '',
loading: true, loading: true,
recordId: '', recordId: '',
reasonOptions: [
{
value: '',
label: '全部'
},
{
value: '备料拣选更新',
label: '备料拣选更新'
},
{
value: '站台确认更新',
label: '站台确认更新'
},
{
value: '直接物料非计划领料回库更新',
label: '直接物料非计划领料回库更新'
},
{
value: '站台处理箱料错误',
label: '站台处理箱料错误'
},
{
value: '界面修改库存',
label: '界面修改库存'
},
{
value: '界面删除库存',
label: '界面删除库存'
},
{
value: '界面增加库存',
label: '界面增加库存'
},
{
value: '入库更新库存',
label: '入库更新库存'
},
{
value: '入库增加库存',
label: '入库增加库存'
},
{
value: '整出',
label: '整出'
},
],
} }
}, },
mounted() { mounted() {

View File

@ -28,8 +28,8 @@
<el-table-column prop="taskGroup" label="任务组" min-width="120px" show-overflow-tooltip /> <el-table-column prop="taskGroup" label="任务组" min-width="120px" show-overflow-tooltip />
<el-table-column prop="origin" label="起点" min-width="120px" /> <el-table-column prop="origin" label="起点" min-width="120px" />
<el-table-column prop="destination" label="终点" min-width="120px" /> <el-table-column prop="destination" label="终点" min-width="120px" />
<el-table-column prop="opNum" label="操作数量" min-width="120px" /> <el-table-column prop="goodsRelated.opNum" label="操作数量" min-width="120px" />
<el-table-column prop="originNum" label="库存数量" min-width="120px" /> <el-table-column prop="goodsRelated.originNum" label="库存数量" min-width="120px" />
<el-table-column prop="taskPriority" label="任务优先级" min-width="120px" /> <el-table-column prop="taskPriority" label="任务优先级" min-width="120px" />
<el-table-column prop="preTask" label="前置任务" min-width="120px" show-overflow-tooltip /> <el-table-column prop="preTask" label="前置任务" min-width="120px" show-overflow-tooltip />
<el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" show-overflow-tooltip /> <el-table-column prop="createTime" label="创建时间" :formatter="timeFormat" min-width="120px" show-overflow-tooltip />