代码更新

This commit is contained in:
梁州 2024-07-26 17:00:49 +08:00
parent 31afefafe9
commit 8d0d3de59b
4 changed files with 505 additions and 454 deletions

View File

@ -96,6 +96,14 @@ const confirmFinishWork = (params) => {
})
}
const callEmptyVehicle = (params) => {
return request({
url: '/task/callEmptyVehicle',
method: 'post',
data: params
})
}
export {
sendGoodsInTask,
sendGoodsOutTask,
@ -108,5 +116,6 @@ export {
getWorkByStandAndGoods,
confirmFinishedWork,
confirmFinishWork,
getFinishedWorkInfo
getFinishedWorkInfo,
callEmptyVehicle
}

View File

@ -27,86 +27,53 @@
<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-select-v2 v-model="workFormEntity.vehicleType2" placeholder="请选择类型"
:options="vehicleType2Options"
@change="vehicleType2ChangeHandle()"></el-select-v2>
<!-- <el-input v-model="workFormEntity.goodsId" size="default"
v-on:keyup.enter="getCurrentWorkInfo()" clearable></el-input> -->
</div>
</div>
<div v-if="displayVehicleType1Selection"
style="display: flex; flex-direction: column;">
<div class="display-title-div">
<span class="display-title-text">料箱种类选择</span>
</div>
<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 v-if="displayGoods" 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.enter="getCurrentWorkInfo()" clearable></el-input>
clearable></el-input>
</div>
</div>
<div style="display: flex; flex-direction: column;">
<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.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"
<el-input-number v-model.number="workFormEntity.needNum"
controls-position="right" :min="0" />
</div>
<div class="display-form-div-right">
<span class="display-form-text-right">{{ workFormEntity.goodsUnit
}}</span>
<span class="display-form-text-right"></span>
</div>
</div>
</div>
</div>
<div style="display: flex; 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: 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" @click="confirmTask()">
@ -124,7 +91,7 @@
<script setup>
import store from '@/store'
import { getWorkByStandAndGoods, confirmFinishWork } from '@/api/task'
import { callEmptyVehicle } from '@/api/task'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
@ -136,26 +103,41 @@ export default {
data() {
return {
standId: store.getters.getStandId,
displayGoods: false,//
displayVehicleType1Selection: false,//
// timer: '',
labelPosition: 'top',
workFormRef: ref(),
workFormEntity: reactive({
vehicleType1: '',
vehicleType2: '',
goodsId: '',
goodsUnit: '',
planPickNum: 0,
actualDifference: 0,
remark: '',
finishedRows: 0,
totalRows: 0,
finishedCounts: 0,
totalCounts: 0,
tip: ''
needNum: 0
}),
rules: reactive({
goodsId: [
{ required: true, message: '请输入料号' }
]
}),
vehicleType1Options: [],
vehicleType2Options: [
{
value: 'CLC一箱一料',
label: 'CLC一箱一料'
},
{
value: 'CLC一箱两料',
label: 'CLC一箱两料'
},
{
value: 'No-CLC',
label: 'No-CLC'
},
{
value: '间接物料',
label: '间接物料'
}
]
}
},
mounted() {
@ -167,78 +149,103 @@ export default {
// 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
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个料箱'
}
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 if (this.workFormEntity.vehicleType2 == 'CLC一箱一料') {
this.displayGoods = false
this.displayVehicleType1Selection = true
this.vehicleType1Options = [
{
value: 'LR02',
label: '811左右2个'
},
{
value: 'FC01',
label: '822整体1个'
}
]
} else if (this.workFormEntity.vehicleType2 == 'CLC一箱两料') {
this.displayGoods = true
this.displayVehicleType1Selection = true
this.vehicleType1Options = [
{
value: 'LR01',
label: '810左右4个'
},
{
value: 'UD01',
label: '911上下2个'
}
]
} else {
this.resetForms()
ElMessage.error(response.message)
this.displayGoods = false
this.displayVehicleType1Selection = false
this.vehicleType1Options = [
{
value: 'FB01',
label: '分包1个料箱'
},
]
}
}).catch(err => {
console.log(err)
this.resetForms()
ElMessage.error('查询工作信息错误')
})
},
resetForms() {
this.workFormEntity = reactive({
vehicleType1: '',
vehicleType2: '',
goodsId: '',
goodsUnit: '',
planPickNum: 0,
actualDifference: 0,
remark: '',
finishedRows: 0,
totalRows: 0,
finishedCounts: 0,
totalCounts: 0,
tip: ''
needNum: 0
})
},
confirmTask() {
if (this.standId == '' || this.workFormEntity.goodsId == '') {
if (this.workFormEntity.vehicleType1 == '' && this.workFormEntity.vehicleType2 == '') {
ElMessage({
message: '站台号和料号不可缺少',
message: '存放类型和料箱类型至少需要一个',
type: 'error',
})
return
}
const confirmParams = {
standId: this.standId,
goodsId: this.workFormEntity.goodsId,
actualDifference: this.workFormEntity.actualDifference
if (this.workFormEntity.needNum <= 0) {
ElMessage({
message: '料箱数量必须为大于0的整数',
type: 'error',
})
return
}
confirmFinishWork(confirmParams).then(res => {
const request = {
vehicleType1: this.workFormEntity.vehicleType1,
vehicleType2: this.workFormEntity.vehicleType2,
goodsId: this.workFormEntity.goodsId,
needNum: this.workFormEntity.needNum
}
callEmptyVehicle(request).then(res => {
const response = res.data
if (response.code == 0) {
ElMessage({
message: response.message,
message: '出空箱成功,请等待箱子到达',
type: 'success',
})
this.resetForms()
@ -247,7 +254,7 @@ export default {
}
}).catch(err => {
console.log(err)
ElMessage.error('确认时发生异常')
ElMessage.error('出空箱异常')
})
}
}
@ -299,7 +306,7 @@ export default {
#309330 50%,
#309330 100%) bottom right;
background-size: 100% 50%;
height: 400px;
height: 270px;
width: 250px;
background-repeat: no-repeat;
display: inline-flex;
@ -307,11 +314,19 @@ export default {
}
:deep(.el-input) {
width: 230px;
height: 130px;
font-size: 25px;
}
:deep(.el-input-number) {
width: 150px;
height: 130px;
font-size: 25px;
}
:deep(.el-select-v2__wrapper) {
width: 230px;
height: 130px;
font-size: 25px;
}
@ -363,7 +378,7 @@ export default {
.display-title-div {
display: inline-flex;
justify-content: center;
width: 280px;
width: 240px;
height: 80px;
margin: 5px;
padding: 5px;
@ -379,7 +394,7 @@ export default {
.display-form-div {
display: inline-flex;
justify-content: center;
width: 270px;
width: 230px;
margin: 5px;
padding: 5px;
border: 5px double #000000;
@ -389,7 +404,7 @@ export default {
.display-form-div-left {
display: inline-flex;
justify-content: center;
width: 170px;
width: 150px;
margin: 5px;
padding: 5px;
border: 5px double #000000;
@ -398,7 +413,7 @@ export default {
.display-form-div-right {
display: inline-flex;
justify-content: center;
width: 80px;
width: 60px;
margin: 5px;
padding: 5px;
background-color: #CCCCCC;

View File

@ -312,6 +312,7 @@ export default {
}
:deep(.el-input-number) {
width: 270px;
height: 130px;
font-size: 25px;
}

View File

@ -1,112 +1,72 @@
<template>
<el-config-provider :locale="zhCn">
<el-container class="content">
<div class="left">
<fieldset class="display-area">
<div class="work-area">
<fieldset class="title-area">
<legend>
入库暂存信息
工作台
</legend>
<el-table :data="tempTasks" stripe border class="table-class" max-height="684px"
:header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }">
<el-table-column prop="vehicleId" label="载具号" fixed="left" min-width="120px" />
<el-table-column prop="goodsId" label="物料编号" fixed="left" min-width="120px" />
<el-table-column prop="goodsNum" label="数量" min-width="120px" />
<el-table-column prop="goodsName" label="物料名称" min-width="120px" />
<el-table-column prop="singleWeight" label="单个物料重量" min-width="120px" />
<el-table-column prop="weight" label="物料总重量" min-width="120px" />
<el-table-column prop="originPoint" label="入库站点" min-width="120px" />
<el-table-column fixed="right" label="操作" width="120px">
<template #default>
<el-button plain type="primary" @click="deleteRowTask(row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<br />
</fieldset>
<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: 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"
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.needNum"
controls-position="right" :min="0" />
</div>
<div class="display-form-div-right">
<span class="display-form-text-right"></span>
</div>
</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.goodsId" size="default"
clearable></el-input>
</div>
</div>
</div>
</div>
<div style="margin: 10px;">
<div class="arrow" @click="confirmTask()">
<span
style="margin-left: 25px; align-self: center; font-weight: bold;font-size: 45px; writing-mode: vertical-lr;">完成确认</span>
</div>
</div>
</div>
<div class="right">
<fieldset class="input-area">
<legend>输入入库信息</legend>
<el-form ref="taskInRequestRef" :model="taskInRequestEntity" :label-position="labelPosition"
label-width="100px" style="max-width: 100%" :rules="rules" status-icon>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="载具号" prop="vehicleId">
<el-input v-model="taskInRequestEntity.vehicleId" clearable />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料编号" prop="goodsId">
<el-input v-model="taskInRequestEntity.goodsId" :disabled="disabledEmpty"
clearable />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="数量" prop="goodsNum">
<el-input-number v-model.number="taskInRequestEntity.goodsNum" clearable
controls-position="right" :min="1" :disabled="disabledEmpty"
@blur="calWeight(taskInRequestEntity)"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料名称" prop="goodsName">
<el-input v-model="taskInRequestEntity.goodsName" :disabled="disabledEmpty"
clearable />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="单个物料重量" prop="singleWeight">
<el-input-number v-model.number="taskInRequestEntity.singleWeight" clearable
controls-position="right" :min="0" :precision="3" :disabled="disabledEmpty"
@blur="calWeight(taskInRequestEntity)"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料总重量" prop="weight">
<el-input-number v-model.number="taskInRequestEntity.weight" clearable
controls-position="right" :min="0" :precision="3"
:disabled="disabledEmpty"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="12" :offset="0">
<el-form-item label="入库站点" prop="originPoint">
<el-select-v2 v-model="taskInRequestEntity.originPoint" placeholder="请选择入库站点"
:options="standOptions"></el-select-v2>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否空托" prop="isEmpty">
<el-select-v2 v-model="taskInRequestEntity.isEmpty" placeholder="请选择入库类型"
:options="stockTypeOptions"
@change="autoCompleteEmptyInfo(taskInRequestEntity)"></el-select-v2>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16" class="btn-area">
<el-col :span="8" :offset="0">
<el-form-item>
<el-button type="primary" round
@click="addTempTasks(taskInRequestRef)">绑定信息</el-button>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="success" round
@click="submitGoodsInTask(taskInRequestRef)">下发任务</el-button>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="danger" round @click="resetForm(taskInRequestRef)">清空信息</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</fieldset>
</div>
@ -115,12 +75,11 @@
</template>
<script setup>
import { sendGoodsInTask } from '@/api/task'
import store from '@/store'
import { callEmptyVehicle } from '@/api/task'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import store from '@/store'
const taskInRequestRef = ref()
</script>
<script>
@ -128,193 +87,160 @@ export default {
name: 'goodsIn',
data() {
return {
labelPosition: "top",
tempTasks: [],
tempVehicleId: '',
tempOriginPoint: '',
totalWeight: 0,
isEmptyTask: false,
disabledEmpty: false,
taskInRequestEntity: reactive({
vehicleId: '',
originPoint: 'RC1',
standId: store.getters.getStandId,
displayGoods: false,//
displayVehicleType1Selection: false,//
// timer: '',
labelPosition: 'top',
workFormRef: ref(),
workFormEntity: reactive({
vehicleType1: '',
vehicleType2: '',
goodsId: '',
goodsName: '',
singleWeight: 0,
goodsNum: 1,
weight: 0,
isEmpty: '1'
needNum: 0
}),
rules: reactive({
vehicleId: [
{ required: true, message: '请输入载具号' }
],
goodsId: [
{ required: true, message: '请输入物料号' }
],
goodsNum: [
{ required: true, message: '请输入数量' },
{ type: 'number', message: '请输入数字' }
{ required: true, message: '请输入料号' }
]
}),
standOptions: [
vehicleType1Options: [],
vehicleType2Options: [
{
value: "RC1",
label: '入库口'
}
],
stockTypeOptions: [
{
value: '0',
label: '空载具入库'
value: 'CLC一箱一料',
label: 'CLC一箱一料'
},
{
value: '1',
label: '带料入库'
value: 'CLC一箱两料',
label: 'CLC一箱两料'
},
{
value: 'No-CLC',
label: 'No-CLC'
},
{
value: '间接物料',
label: '间接物料'
}
],
]
}
},
mounted() {
// this.timer = setInterval(() => {
// // this.getAllTasks()
// }, 2000)
},
beforeUnmount() {
// clearInterval(this.timer)
},
methods: {
autoCompleteEmptyInfo(taskInRequestEntity) {//
if (taskInRequestEntity.isEmpty == '0') {//
taskInRequestEntity.goodsId = 'empty'
taskInRequestEntity.goodsName = '空载具'
taskInRequestEntity.goodsNum = 1
taskInRequestEntity.singleWeight = 0
taskInRequestEntity.weight = 0
this.disabledEmpty = true
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个料箱'
}
]
} else if (this.workFormEntity.vehicleType2 == 'CLC一箱一料') {
this.displayGoods = false
this.displayVehicleType1Selection = true
this.vehicleType1Options = [
{
value: 'LR02',
label: '811左右2个'
},
{
value: 'FC01',
label: '822整体1个'
}
]
} else if (this.workFormEntity.vehicleType2 == 'CLC一箱两料') {
this.displayGoods = true
this.displayVehicleType1Selection = true
this.vehicleType1Options = [
{
value: 'LR01',
label: '810左右4个'
},
{
value: 'UD01',
label: '911上下2个'
}
]
} else {
taskInRequestEntity.goodsId = ''
taskInRequestEntity.goodsName = ''
taskInRequestEntity.goodsNum = 1
taskInRequestEntity.singleWeight = 0
taskInRequestEntity.weight = 0
this.disabledEmpty = false
this.displayGoods = false
this.displayVehicleType1Selection = false
this.vehicleType1Options = [
{
value: 'FB01',
label: '分包1个料箱'
},
]
}
},
calWeight(taskInRequestEntity) {
if (taskInRequestEntity.singleWeight != null | undefined) {
taskInRequestEntity.weight = taskInRequestEntity.singleWeight * taskInRequestEntity.goodsNum
}
resetForms() {
this.workFormEntity = reactive({
vehicleType1: '',
vehicleType2: '',
goodsId: '',
needNum: 0
})
},
addTempTasks(taskInRequestRef) {//
if (!taskInRequestRef) return
taskInRequestRef.validate((valid) => {
if (!valid) {
confirmTask() {
if (this.workFormEntity.vehicleType1 == '' && this.workFormEntity.vehicleType2 == '') {
ElMessage({
message: '请输入必须的入库信息!',
type: 'warning',
message: '存放类型和料箱类型至少需要一个',
type: 'error',
})
return
}
if (this.isEmptyTask != null | undefined) {
if (this.isEmptyTask) {
if (this.workFormEntity.needNum <= 0) {
ElMessage({
message: '当前载具已绑定空载具入库',
type: 'warning',
})
return
} else {
if (this.taskInRequestEntity.isEmpty == '1' && this.tempTasks.length != 0) {
ElMessage({
message: '当前载具已绑定过任务,不允许再绑定空载具入库',
type: 'warning',
})
}
}
}
if (this.tempOriginPoint != '' && this.tempOriginPoint != this.taskInRequestEntity.originPoint) {
ElMessage({
message: '入库站台不一致!',
type: 'warning',
message: '料箱数量必须为大于0的整数',
type: 'error',
})
return
}
if (this.tempVehicleId != '' && this.tempVehicleId != this.taskInRequestEntity.vehicleId) {
const request = {
vehicleType1: this.workFormEntity.vehicleType1,
vehicleType2: this.workFormEntity.vehicleType2,
goodsId: this.workFormEntity.goodsId,
needNum: this.workFormEntity.needNum
}
callEmptyVehicle(request).then(res => {
const response = res.data
if (response.code == 0) {
ElMessage({
message: '载具号不一致',
type: 'warning',
})
return
}
this.tempVehicleId = this.taskInRequestEntity.vehicleId
this.tempOriginPoint = this.taskInRequestEntity.originPoint
this.totalWeight = this.totalWeight + this.taskInRequestEntity.weight
if (this.taskInRequestEntity.isEmpty == '0') {
this.isEmptyTask = true
} else {
this.isEmptyTask = false
}
const tempTask = {
vehicleId: this.taskInRequestEntity.vehicleId,
originPoint: this.taskInRequestEntity.originPoint,
goodsId: this.taskInRequestEntity.goodsId,
goodsName: this.taskInRequestEntity.goodsName,
singleWeight: this.taskInRequestEntity.singleWeight,
goodsNum: this.taskInRequestEntity.goodsNum,
weight: this.taskInRequestEntity.weight
}
this.tempTasks.push(tempTask)
//
if (!this.isEmptyTask) {
this.taskInRequestEntity.goodsId = ''
this.taskInRequestEntity.goodsName = ''
this.taskInRequestEntity.goodsNum = 1
this.taskInRequestEntity.singleWeight = 0
this.taskInRequestEntity.weight = 0
this.taskInRequestEntity.isEmpty = '1'
this.disabledEmpty = false
}
ElMessage({
message: '绑定成功!',
message: '出空箱成功,请等待箱子到达',
type: 'success',
})
})
},
submitGoodsInTask(formEl) {//
const inParams = {
vehicleId: this.tempVehicleId,
originPoint: this.tempOriginPoint,
totalWeight: this.totalWeight,
userName: store.getters.getUserName,
goodsList: this.isEmptyTask == false && this.tempTasks.length > 0 ? this.tempTasks : null
}
sendGoodsInTask(inParams).then(res => {
if (res.data.code == 0) {
ElMessage({
message: '创建入库任务成功!',
type: 'success',
})
this.tempTasks = []
this.tempVehicleId = ''
this.tempOriginPoint = ''
this.totalWeight = 0
this.isEmptyTask == false
formEl.resetFields()
this.disabledEmpty = false
this.resetForms()
} else {
ElMessage.error(res.data.message)
ElMessage.error(response.message)
}
}).catch(err => {
console.log(err)
ElMessage.error('创建入库任务错误!' + err.message)
ElMessage.error('出空箱异常')
})
},
resetForm(formEl) {//
if (!formEl) return
formEl.resetFields()
},
deleteRowTask(row) {//
this.tempTasks.splice(this.tempTasks.indexOf(row), 1)
if (this.tempTasks.length == 0) {
this.tempVehicleId = ''
this.tempOriginPoint = ''
this.totalWeight = 0
this.isEmptyTask = false
}
}
}
}
@ -326,61 +252,161 @@ export default {
width: 100%;
}
.el-row .el-form-item {
width: 30% inherit;
justify-content: center;
}
/* .btn-area .el-form-item {
width: 30% inherit;
padding-left: 15px;
} */
.el-row .el-form-item .el-select {
width: 100% !important;
}
.el-row .el-form-item .el-select-v2 {
width: 100% !important;
}
.el-row .el-form-item .el-input-number {
width: 100% !important;
}
.el-row .el-form-item .el-button {
margin: auto;
}
.right {
width: 40%;
padding: 5px;
}
.left {
width: 60%;
padding: 5px;
}
.input-area {
margin: auto;
max-width: inherit;
height: 632px;
border: solid 1px;
border-radius: 10px;
box-shadow: 0px 15px 10px -15px #000;
}
.display-area {
margin: auto;
min-width: inherit;
height: 632px;
border: solid 1px;
border-radius: 10px;
box-shadow: 0px 15px 10px -15px #000;
}
.table-class {
.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: 230px;
height: 130px;
font-size: 25px;
}
:deep(.el-input-number) {
width: 150px;
height: 130px;
font-size: 25px;
}
:deep(.el-select-v2__wrapper) {
width: 230px;
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: 240px;
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: 230px;
margin: 5px;
padding: 5px;
border: 5px double #000000;
margin-top: 25px;
}
.display-form-div-left {
display: inline-flex;
justify-content: center;
width: 150px;
margin: 5px;
padding: 5px;
border: 5px double #000000;
}
.display-form-div-right {
display: inline-flex;
justify-content: center;
width: 60px;
margin: 5px;
padding: 5px;
background-color: #CCCCCC;
}
.display-form-text-right {
align-self: center;
font-weight: bold;
font-size: 25px;
}
</style>