代码更新
This commit is contained in:
parent
086ac4146e
commit
ffa2fb6790
|
|
@ -64,6 +64,14 @@ const changeTaskStatus = (params) => {
|
|||
})
|
||||
}
|
||||
|
||||
const getWorkByStandAndGoods = (params) => {
|
||||
return request({
|
||||
url: '/task/getWorkByStandAndGoods',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
sendGoodsInTask,
|
||||
sendGoodsOutTask,
|
||||
|
|
@ -73,4 +81,5 @@ export {
|
|||
getTasks,
|
||||
finishPickingAndBack,
|
||||
changeTaskStatus,
|
||||
getWorkByStandAndGoods
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 8.1 KiB |
|
|
@ -1,7 +1,7 @@
|
|||
import axios from 'axios'
|
||||
|
||||
const request = axios.create({
|
||||
baseURL: 'http://192.168.3.254:12315/wms',
|
||||
baseURL: 'http://localhost:12315/wms',
|
||||
timeout: 5000
|
||||
})
|
||||
|
||||
|
|
|
|||
409
src/layout/prepareGoods.vue
Normal file
409
src/layout/prepareGoods.vue
Normal file
|
|
@ -0,0 +1,409 @@
|
|||
<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">Kitting备料</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: none;">{{ workFormEntity.tip }}</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" v-on:keyup.prevent.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.planPickNum"
|
||||
controls-position="right" :min="0" width="200px" />
|
||||
</div>
|
||||
<div class="display-form-div-right">
|
||||
<span class="display-form-text-right">{{ workFormEntity.goodsUnit }}</span>
|
||||
</div>
|
||||
</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.actualDifference"
|
||||
controls-position="right" :min="0" />
|
||||
</div>
|
||||
<div class="display-form-div-right">
|
||||
<span class="display-form-text-right">{{ workFormEntity.goodsUnit }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; margin-top: 65px">
|
||||
<div
|
||||
style="display: inline-flex; justify-content: center; width: 160px; margin: 5px; padding: 5px; background-color: #CCCCCC;">
|
||||
<span style="align-self: center; font-weight: bold;font-size: 25px;">备注</span>
|
||||
</div>
|
||||
<div
|
||||
style="display: inline-flex; justify-content: center; width: 700px; margin: 5px; padding: 5px; background-color: #00AAE8;">
|
||||
<span style="align-self: center; font-weight: bold;font-size: 25px;">{{ workFormEntity.remark }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; margin-top: 5px; margin-top: 15px">
|
||||
<div
|
||||
style="display: inline-flex; justify-content: center; width: 160px; margin: 5px; padding: 5px; background-color: #CCCCCC;">
|
||||
<span
|
||||
style="align-self: center; font-weight: bold;font-size: 20px;">当前进度:</span>
|
||||
</div>
|
||||
<div
|
||||
style="display: inline-flex; justify-content: center; width: 240px; margin: 5px; padding: 5px; background-color: #CCCCCC;">
|
||||
<span style="align-self: center; font-weight: bold;font-size: 20px;">
|
||||
{{ workFormEntity.finishedRows + '/' + workFormEntity.totalRows }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
style="display: inline-flex; justify-content: center; width: 80px; margin: 5px; padding: 5px; background-color: #CCCCCC;">
|
||||
<span style="align-self: center; font-weight: bold;font-size: 20px;">行</span>
|
||||
</div>
|
||||
<div
|
||||
style="display: inline-flex; justify-content: center; width: 240px; margin: 5px; padding: 5px; background-color: #CCCCCC;">
|
||||
<span style="align-self: center; font-weight: bold;font-size: 20px;">
|
||||
{{ workFormEntity.finishedCounts + '/' + workFormEntity.totalCounts }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
style="display: inline-flex; justify-content: center; width: 80px; margin: 5px; padding: 5px; background-color: #CCCCCC;">
|
||||
<span style="align-self: center; font-weight: bold;font-size: 20px;">{{ workFormEntity.goodsUnit }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 10px;">
|
||||
<div class="arrow">
|
||||
<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 { getWorkByStand } from '@/api/task'
|
||||
import { taskStatusFormatter, dueFormatter, timeFormatter } from '@/utils/formatter.js'
|
||||
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: 'prepareGoods',
|
||||
data() {
|
||||
return {
|
||||
standId: store.getters.getStandId,
|
||||
timer: '',
|
||||
labelPosition: 'top',
|
||||
workFormRef: ref(),
|
||||
workFormEntity: reactive({
|
||||
goodsId: '',
|
||||
goodsUnit: '',
|
||||
planPickNum: 0,
|
||||
actualDifference: 0,
|
||||
remark: '',
|
||||
finishedRows: 0,
|
||||
totalRows: 0,
|
||||
finishedCounts: 0,
|
||||
totalCounts: 0,
|
||||
tip: ''
|
||||
}),
|
||||
rules: reactive({
|
||||
goodsId: [
|
||||
{ required: true, message: '请输入料号' }
|
||||
]
|
||||
}),
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.timer = setInterval(() => {
|
||||
// // this.getAllTasks()
|
||||
// }, 2000)
|
||||
},
|
||||
beforeUnmount() {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
getCurrentWorkInfo() {
|
||||
this.workFormEntity = {
|
||||
goodsId: 'text0001',
|
||||
goodsUnit: 'PC',
|
||||
planPickNum: 10,
|
||||
actualDifference: 0,
|
||||
remark: '装盒子',
|
||||
finishedRows: 800,
|
||||
totalRows: 2500,
|
||||
finishedCounts: 2500,
|
||||
totalCounts: 6000,
|
||||
tip: ''
|
||||
}
|
||||
// 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.goodsUnit = response.returnData.goodsUnit
|
||||
// this.workFormEntity.planPickNum = response.returnData.planPickNum
|
||||
// this.workFormEntity.actualDifference = response.returnData.actualDifference
|
||||
// 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
|
||||
// }
|
||||
// }).catch(err => {
|
||||
// console.log(err)
|
||||
// ElMessage.error('查询工作信息错误')
|
||||
// })
|
||||
},
|
||||
// 任务状态中文化
|
||||
taskStatusFormat: (row, column, cellValue, index) => {
|
||||
return taskStatusFormatter(cellValue)
|
||||
},
|
||||
// 任务时长中文化
|
||||
dueFormat: (row, column, cellValue, index) => {
|
||||
return dueFormatter(cellValue)
|
||||
},
|
||||
// 时间格式化
|
||||
timeFormat: (row, column, cellValue, index) => {
|
||||
return timeFormatter(cellValue)
|
||||
},
|
||||
confirmTask(formEl, formData) {
|
||||
if (!formEl) return
|
||||
formEl.validate((valid) => {
|
||||
if (!valid) {
|
||||
ElMessage({
|
||||
message: '确认信息验证失败',
|
||||
type: 'warning',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (formData.taskId = '' || formData.vehicleId == '' || formData.goodsId == '') {
|
||||
ElMessage({
|
||||
message: '载具号、物料号、任务号不可缺少',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
const confirmParams = {
|
||||
taskId: formData.taskId,
|
||||
vehicleId: formData.vehicleId,
|
||||
goodsId: formData.goodsId,
|
||||
opNum: formData.opNum,
|
||||
originNum: formData.originNum,
|
||||
userName: formData.userName
|
||||
}
|
||||
finishPickingAndBack(confirmParams).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
ElMessage({
|
||||
message: '确认成功!',
|
||||
type: 'success',
|
||||
})
|
||||
formEl.resetFields()
|
||||
} else {
|
||||
ElMessage.error(res.data.message)
|
||||
}
|
||||
}).catch(err => {
|
||||
ElMessage.error('创建出库任务错误!')
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.content {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.work-area {
|
||||
width: 100%;
|
||||
/* padding: 5px; */
|
||||
}
|
||||
|
||||
.main-area {
|
||||
margin: auto;
|
||||
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;
|
||||
height: 10%;
|
||||
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: 450px;
|
||||
width: 250px;
|
||||
background-repeat: no-repeat;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
:deep(.el-input) {
|
||||
height: 130px;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
:deep(.el-input-number) {
|
||||
height: 130px;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.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: 125px;
|
||||
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: 75px;
|
||||
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: 280px;
|
||||
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: 270px;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
border: 5px double #000000;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.display-form-div-left {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
width: 170px;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
border: 5px double #000000;
|
||||
}
|
||||
|
||||
.display-form-div-right {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
width: 80px;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
background-color: #CCCCCC;
|
||||
}
|
||||
|
||||
.display-form-text-right {
|
||||
align-self: center;
|
||||
font-weight: bold;
|
||||
font-size: 25px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -25,6 +25,7 @@ const routes = [
|
|||
{ path: '/inventory', component: () => import('@/layout/inventory.vue') },// 盘点
|
||||
{ path: '/inventoryRecord', component: () => import('@/layout/inventoryRecord.vue') },// 盘点
|
||||
{ path: '/wmsLog', component: () => import('@/layout/wmsLog.vue') },// 日志
|
||||
{ path: '/testPrepareGoods', component: () => import('@/layout/prepareGoods.vue') },// 日志
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ export default createStore({
|
|||
user: {},
|
||||
menuList: [],
|
||||
token: '',
|
||||
verifier: ''
|
||||
verifier: '',
|
||||
standId: '# 1'
|
||||
},
|
||||
getters: {
|
||||
getUserName(state) {
|
||||
|
|
@ -25,6 +26,9 @@ export default createStore({
|
|||
getVerify(state) {
|
||||
return state.verifier
|
||||
},
|
||||
getStandId(state) {
|
||||
return state.standId
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<el-container class="wms-home">
|
||||
<el-header class="header">
|
||||
<div class="icon-img">
|
||||
<!-- <div class="icon-img">
|
||||
<el-image :src="icon_img_url" :fit="'fill'" />
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="title">
|
||||
<span style="font-size: 15px;font-weight: bold;">WMS仓库管理系统</span>
|
||||
<span style="font-size: 15px;font-weight: bold;">Caterpillar CSCL ASRS Management System</span>
|
||||
</div>
|
||||
<div class="user">
|
||||
<el-dropdown @command="handleCommand">
|
||||
|
|
@ -23,21 +23,15 @@
|
|||
</el-header>
|
||||
<el-container class="content">
|
||||
<el-aside class="aside">
|
||||
<el-scrollbar style="max-height: 95%;">
|
||||
<el-scrollbar style="height: max-content;">
|
||||
<sideMenu></sideMenu>
|
||||
</el-scrollbar>
|
||||
<div :class="$route.path === '/location' ? 'locationsSel' : 'locations'" @click="openLocations">
|
||||
<el-icon>
|
||||
<View />
|
||||
</el-icon>
|
||||
<span>库位监控</span>
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-container class="view-container">
|
||||
<el-header class="tag">
|
||||
<appTag></appTag>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-main class="view-main">
|
||||
<!-- 路由占位符 -->
|
||||
<el-scrollbar>
|
||||
<router-view v-slot="{ Component }">
|
||||
|
|
@ -48,7 +42,10 @@
|
|||
</router-view>
|
||||
</el-scrollbar>
|
||||
</el-main>
|
||||
<el-footer class="footer">© 1970- 江苏菲达宝开电气股份有限公司</el-footer>
|
||||
<el-footer class="footer">
|
||||
<span style="align-self: center; margin-left: 10px;">Let’s do the work!</span>
|
||||
<span style="align-self: center; margin-right: 10px;">Caterpillar © 2024. All Rights Reserved</span>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</el-container>
|
||||
|
|
@ -77,14 +74,6 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
openLocations() {
|
||||
this.$store.commit('mutationSelectTags', {
|
||||
id: '25',
|
||||
labelName: '库位监控',
|
||||
path: '/location'
|
||||
})
|
||||
this.$router.push('/location')
|
||||
},
|
||||
handleCommand: (command) => {
|
||||
const param = store.getters.getUser
|
||||
if (command == 1) {
|
||||
|
|
@ -118,7 +107,8 @@ export default {
|
|||
|
||||
<style scoped>
|
||||
.wms-home {
|
||||
height: 100%;
|
||||
height: calc(100vh);
|
||||
width: calc(100vw);
|
||||
background-color: #CCCCCC;
|
||||
}
|
||||
|
||||
|
|
@ -128,8 +118,7 @@ export default {
|
|||
}
|
||||
|
||||
.header {
|
||||
/* background-color: #66CCFF; */
|
||||
background-color: #D9E3EE;
|
||||
background-color: #FFC000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 5%;
|
||||
|
|
@ -144,10 +133,9 @@ export default {
|
|||
}
|
||||
|
||||
.footer {
|
||||
background-color: #F0FFFF;
|
||||
background-color: #FFC000;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
height: 3%;
|
||||
}
|
||||
|
||||
|
|
@ -155,7 +143,7 @@ export default {
|
|||
padding-left: 1px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 30px;
|
||||
height: 35px;
|
||||
border-bottom: solid 1px;
|
||||
}
|
||||
|
||||
|
|
@ -177,31 +165,13 @@ export default {
|
|||
margin-left: auto;
|
||||
}
|
||||
|
||||
.locations {
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 3.8%;
|
||||
border-top: solid 1px;
|
||||
cursor: pointer;
|
||||
color: #5A9CF8;
|
||||
.view-container {
|
||||
height: 100%;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.locationsSel {
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 3.8%;
|
||||
border-top: solid 1px;
|
||||
cursor: pointer;
|
||||
background-color: #5A9CF8;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.locations:hover {
|
||||
background-color: #5A9CF8;
|
||||
color: #000;
|
||||
.view-main {
|
||||
height: 97% - 35px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user