代码更新

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

View File

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

View File

@ -7,7 +7,7 @@
工作台 工作台
</legend> </legend>
<div class="title-div"> <div class="title-div">
<span class="title-text">呼叫空箱</span> <span class="title-text">物料入库</span>
</div> </div>
<div class="station-div"> <div class="station-div">
<span class="station-text">工作站</span> <span class="station-text">工作站</span>
@ -18,7 +18,7 @@
</fieldset> </fieldset>
<fieldset class="main-area"> <fieldset class="main-area">
<legend> <legend>
备料执行 物料入库
</legend> </legend>
<el-form ref="workFormRef" :model="workFormEntity" :label-position="labelPosition" <el-form ref="workFormRef" :model="workFormEntity" :label-position="labelPosition"
label-width="150px" style="max-width: 100%" :rules="rules" status-icon> 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'" /> <el-image :src="icon_img_url" :fit="'fill'" />
</div> --> </div> -->
<div class="title"> <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>
<div class="user"> <div class="user">
<el-dropdown @command="handleCommand"> <el-dropdown @command="handleCommand">
<span class="el-dropdown-link"> <span class="el-dropdown-link" style="font-size: 15px; font-weight: bold;">
{{ userName }} {{ userName }}
</span> </span>
<template #dropdown> <template #dropdown>
@ -42,13 +42,14 @@
</router-view> </router-view>
</el-scrollbar> </el-scrollbar>
</el-main> </el-main>
</el-container>
</el-container>
<el-footer class="footer"> <el-footer class="footer">
<span style="align-self: center; margin-left: 10px;">Lets do the work!</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;">Caterpillar © 2024. All Rights Reserved</span> <span style="align-self: center; margin-right: 10px; font-weight: bold;">Caterpillar © 2024. All Rights Reserved</span>
</el-footer> </el-footer>
</el-container> </el-container>
</el-container>
</el-container>
</template> </template>
<script setup> <script setup>
@ -113,7 +114,7 @@ export default {
} }
.content { .content {
height: 95%; height: 92%;
background-color: #FFFFFF; background-color: #FFFFFF;
} }
@ -174,4 +175,11 @@ export default {
height: 97% - 35px; height: 97% - 35px;
width: 100%; width: 100%;
} }
.example-showcase .el-dropdown-link {
cursor: pointer;
color: var(--el-color-primary);
display: flex;
align-items: center;
}
</style> </style>