代码更新

This commit is contained in:
梁州 2024-07-30 21:02:00 +08:00
parent 8d0d3de59b
commit a06930fd60
4 changed files with 124 additions and 121 deletions

View File

@ -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>
@ -38,7 +38,7 @@
v-on:keyup.enter="getCurrentWorkInfo()" clearable></el-input> -->
</div>
</div>
<div v-if="displayVehicleType1Selection"
<!-- <div v-if="displayVehicleType1Selection"
style="display: flex; flex-direction: column;">
<div class="display-title-div">
<span class="display-title-text">料箱种类选择</span>
@ -46,10 +46,8 @@
<div class="display-form-div">
<el-select-v2 v-model="workFormEntity.vehicleType1" placeholder="请选择类型"
:options="vehicleType1Options"></el-select-v2>
<!-- <el-input v-model="workFormEntity.goodsId" size="default"
v-on:keyup.enter="getCurrentWorkInfo()" clearable></el-input> -->
</div>
</div>
</div> -->
<div v-if="displayGoods" style="display: flex; flex-direction: column;">
<div class="display-title-div">
<span class="display-title-text">料号</span>
@ -104,12 +102,12 @@ export default {
return {
standId: store.getters.getStandId,
displayGoods: false,//
displayVehicleType1Selection: false,//
// displayVehicleType1Selection: false,//
// timer: '',
labelPosition: 'top',
workFormRef: ref(),
workFormEntity: reactive({
vehicleType1: '',
// vehicleType1: '',
vehicleType2: '',
goodsId: '',
needNum: 0
@ -119,7 +117,7 @@ export default {
{ required: true, message: '请输入料号' }
]
}),
vehicleType1Options: [],
// vehicleType1Options: [],
vehicleType2Options: [
{
value: 'CLC一箱一料',
@ -152,78 +150,74 @@ export default {
vehicleType2ChangeHandle() {
if (this.workFormEntity.vehicleType2 == '间接物料') {
this.displayGoods = true
this.displayVehicleType1Selection = false
this.vehicleType1Options = [
{
value: 'FB02',
label: '分包1/2个料箱'
},
{
value: 'FB03',
label: '分包1/3个料箱'
},
{
value: 'FB04',
label: '分包1/4个料箱'
},
{
value: 'FB05',
label: '分包1/5个料箱'
},
{
value: 'FB06',
label: '分包1/6个料箱'
}
]
// this.displayVehicleType1Selection = false
// this.vehicleType1Options = [
// {
// value: 'FB02',
// label: '1/2'
// },
// {
// value: 'FB03',
// label: '1/3'
// },
// {
// value: 'FB04',
// label: '1/4'
// },
// {
// value: 'FB05',
// label: '1/5'
// },
// {
// value: 'FB06',
// label: '1/6'
// }
// ]
} else if (this.workFormEntity.vehicleType2 == 'CLC一箱一料') {
this.displayGoods = false
this.displayVehicleType1Selection = true
this.vehicleType1Options = [
{
value: 'LR02',
label: '811左右2个'
},
{
value: 'FC01',
label: '822整体1个'
}
]
// this.displayVehicleType1Selection = false
// this.vehicleType1Options = [
// {
// value: 'FC01',
// label: '8221'
// }
// ]
} else if (this.workFormEntity.vehicleType2 == 'CLC一箱两料') {
this.displayGoods = true
this.displayVehicleType1Selection = true
this.vehicleType1Options = [
{
value: 'LR01',
label: '810左右4个'
},
{
value: 'UD01',
label: '911上下2个'
}
]
this.displayGoods = false
// this.displayVehicleType1Selection = false
// this.vehicleType1Options = [
// {
// value: 'LR01',
// label: '8104'
// },
// {
// value: 'UD01',
// label: '9112'
// }
// ]
} else {
this.displayGoods = false
this.displayVehicleType1Selection = false
this.vehicleType1Options = [
{
value: 'FB01',
label: '分包1个料箱'
},
]
// this.displayVehicleType1Selection = false
// this.vehicleType1Options = [
// {
// value: 'FB01',
// label: '1'
// },
// ]
}
},
resetForms() {
this.workFormEntity = reactive({
vehicleType1: '',
// vehicleType1: '',
vehicleType2: '',
goodsId: '',
needNum: 0
})
},
confirmTask() {
if (this.workFormEntity.vehicleType1 == '' && this.workFormEntity.vehicleType2 == '') {
if (this.workFormEntity.vehicleType2 == '') {
ElMessage({
message: '存放类型和料箱类型至少需要一个',
message: '请选择物料种类',
type: 'error',
})
return
@ -236,16 +230,17 @@ export default {
return
}
const request = {
vehicleType1: this.workFormEntity.vehicleType1,
// vehicleType1: this.workFormEntity.vehicleType1,
vehicleType2: this.workFormEntity.vehicleType2,
goodsId: this.workFormEntity.goodsId,
needNum: this.workFormEntity.needNum
needNum: this.workFormEntity.needNum,
userName: store.getters.getUserName
}
callEmptyVehicle(request).then(res => {
const response = res.data
if (response.code == 0) {
ElMessage({
message: '出空箱成功,请等待箱子到达',
message: response.message,
type: 'success',
})
this.resetForms()

View File

@ -42,7 +42,7 @@
<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" />
controls-position="right" :min="0" width="200px" disabled />
</div>
<div class="display-form-div-right">
<span class="display-form-text-right">{{ workFormEntity.goodsUnit
@ -50,7 +50,7 @@
</div>
</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>
@ -64,7 +64,7 @@
}}</span>
</div>
</div>
</div>
</div> -->
</div>
<div style="display: flex; margin-top: 15px">
<div
@ -168,44 +168,44 @@ export default {
},
methods: {
getCurrentWorkInfo() {
// this.workFormEntity = {
// goodsId: 'text0001',
// goodsUnit: 'PC',
// planPickNum: 10,
// actualDifference: 0,
// remark: '',
// finishedRows: 800,
// totalRows: 2500,
// finishedCounts: 2500,
// totalCounts: 6000,
// tip: ''
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
// }
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
} else {
this.resetForms()
ElMessage.error(response.message)
}
}).catch(err => {
console.log(err)
this.resetForms()
ElMessage.error('查询工作信息错误')
})
// 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
// } else {
// this.resetForms()
// ElMessage.error(response.message)
// }
// }).catch(err => {
// console.log(err)
// this.resetForms()
// ElMessage.error('')
// })
},
resetForms() {
this.workFormEntity = reactive({
@ -312,7 +312,7 @@ export default {
}
:deep(.el-input-number) {
width: 270px;
width: 300px;
height: 130px;
font-size: 25px;
}
@ -364,7 +364,7 @@ export default {
.display-title-div {
display: inline-flex;
justify-content: center;
width: 280px;
width: 430px;
height: 80px;
margin: 5px;
padding: 5px;
@ -380,7 +380,7 @@ export default {
.display-form-div {
display: inline-flex;
justify-content: center;
width: 270px;
width: 420px;
margin: 5px;
padding: 5px;
border: 5px double #000000;
@ -390,7 +390,7 @@ export default {
.display-form-div-left {
display: inline-flex;
justify-content: center;
width: 170px;
width: 300px;
margin: 5px;
padding: 5px;
border: 5px double #000000;
@ -399,7 +399,7 @@ export default {
.display-form-div-right {
display: inline-flex;
justify-content: center;
width: 80px;
width: 100px;
margin: 5px;
padding: 5px;
background-color: #CCCCCC;

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>

View File

@ -5,11 +5,11 @@
<el-image :src="icon_img_url" :fit="'fill'" />
</div> -->
<div class="title">
<span style="font-size: 15px;font-weight: bold;">Caterpillar CSCL ASRS Management System</span>
<span style="font-size: 20px;font-weight: bold;">Caterpillar CSCL ASRS Management System</span>
</div>
<div class="user">
<el-dropdown @command="handleCommand">
<span class="el-dropdown-link">
<span class="el-dropdown-link" style="font-size: 15px; font-weight: bold;">
{{ userName }}
</span>
<template #dropdown>
@ -42,13 +42,14 @@
</router-view>
</el-scrollbar>
</el-main>
</el-container>
</el-container>
<el-footer class="footer">
<span style="align-self: center; margin-left: 10px;">Lets do the work!</span>
<span style="align-self: center; margin-right: 10px;">Caterpillar © 2024. All Rights Reserved</span>
<span style="align-self: center; margin-left: 10px; font-weight: bold;">Lets do the work!</span>
<span style="align-self: center; margin-right: 10px; font-weight: bold;">Caterpillar © 2024. All Rights Reserved</span>
</el-footer>
</el-container>
</el-container>
</el-container>
</template>
<script setup>
@ -113,7 +114,7 @@ export default {
}
.content {
height: 95%;
height: 92%;
background-color: #FFFFFF;
}
@ -174,4 +175,11 @@ export default {
height: 97% - 35px;
width: 100%;
}
.example-showcase .el-dropdown-link {
cursor: pointer;
color: var(--el-color-primary);
display: flex;
align-items: center;
}
</style>