Commit c53c9ce9 authored by Hagsn3's avatar Hagsn3

修改代码

parent f9b9fb17
......@@ -4,13 +4,13 @@
<div class="search">
<el-form ref="queryForm" class="formClass" :model="queryForm" :rules="rules" label-width="80px">
<el-form-item label="仓库:" prop="whId">
<el-select v-model="queryForm.whId" filterable class="normalSelect" placeholder="请选择">
<el-select v-model="queryForm.whId" filterable class="normalSelect" placeholder="请选择">
<el-option
v-for="(item,index) in warehouseList"
:key="index"
:label="item.dictLabel"
:value="item.dictValue">
</el-option>
:value="item.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="XX:" prop="value1">
......@@ -19,7 +19,7 @@
<el-form-item>
<div class="location"> location: {{ queryForm.location }}</div>
<div v-show="showPN(queryForm.location,incomeWmsLabelList.pn)">
<!-- 库PN: {{ incomeWmsLabelList.pn }}-->
<!-- 库PN: {{ incomeWmsLabelList.pn }}-->
<span style="color: black;">库PN: </span><span style="color: red;">{{ incomeWmsLabelList.pn }}</span>
</div>
</el-form-item>
......@@ -81,8 +81,7 @@ import {
} from '@/api/incomeWmsBox'
import { findByLocation, updateIncomeWmsLabel } from '@/api/incomeWmsLabel'
import { getInfo } from '@/api/login'
import { error } from 'autoprefixer/lib/utils'
import {getDict} from "@/api/system/dict/data";
import { getDict } from '@/api/system/dict/data'
export default {
name: 'EnterBound',
data() {
......@@ -138,9 +137,9 @@ export default {
getDictData() {
// 获取仓库的数据字段
getDict('WAREHOUSE').then(res => {
console.log('仓库数据字典',res)
console.log('仓库数据字典', res)
this.warehouseList = res.data
let whId = res.data[0].dictValue
const whId = res.data[0].dictValue
this.queryForm.whId = whId
})
},
......@@ -293,6 +292,8 @@ export default {
}
} else {
this.$message.error('数据库中无对应数据')
this.incomeWmsLabelList.pn = ''
this.queryForm.value2 = ''
}
}
})
......@@ -332,6 +333,8 @@ export default {
}
} else {
this.$message.error('数据库中无对应数据')
this.incomeWmsLabelList.pn = ''
this.queryForm.value2 = ''
}
}
})
......@@ -422,24 +425,18 @@ export default {
}
}
} else {
let isLegalLot = false
this.enterTable.forEach(item => {
if (item.lot === obj.lot) {
isLegalLot = true
}
})
if (isLegalLot) {
if (this.enterTable[0].pn === obj.pn) {
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = ''
} else {
this.$message.error('与下方列表的pn值不匹配')
}
} else {
queryPass(obj.lot).then(lotResponse => {
if (lotResponse.code === 200 && lotResponse.data > 0) {
if (this.enterTable.length > 0) {
const inputValues = this.queryForm.value1.split(',')
this.queryForm.location = inputValues[0].trim()
findByLocation(this.queryForm.location).then(res => {
if (res.code === 200) {
if (res.data != null) {
let isLegalLot = false
this.enterTable.forEach(item => {
if (item.lot === obj.lot) {
isLegalLot = true
}
})
if (isLegalLot) {
if (this.enterTable[0].pn === obj.pn) {
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
......@@ -448,15 +445,31 @@ export default {
this.$message.error('与下方列表的pn值不匹配')
}
} else {
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = ''
queryPass(obj.lot).then(lotResponse => {
if (lotResponse.code === 200 && lotResponse.data > 0) {
if (this.enterTable.length > 0) {
if (this.enterTable[0].pn === obj.pn) {
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = ''
} else {
this.$message.error('与下方列表的pn值不匹配')
}
} else {
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = ''
}
} else {
this.$message.error('该LOT值未被检查')
}
})
}
} else {
this.$message.error('该LOT值未被检查')
this.$message.error('请输入有效的location值')
}
})
}
}
})
}
} else {
this.$message.error('输入格式不符合要求,请重新输入')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment