Commit 8a11412e authored by 高宇's avatar 高宇

1.阻止表单的默认上传行为

parent 688a0086
......@@ -197,6 +197,7 @@ export default {
}).then(() => {
this.clearForm(e)
this.getDictData()
this.queryForm.cj = this.manufacturer[0].value
this.$message({
type: 'success',
message: '清空成功!'
......@@ -304,15 +305,11 @@ export default {
}, () => {})
} else {
const inputValues = this.queryForm.value1.split(',')
console.log('inputValues', inputValues.length)
if (inputValues.length === 2) {
console.log('查询1')
this.queryForm.location = inputValues[0].trim()
this.queryForm.pn = inputValues[1].trim()
console.log('inputValues', inputValues.length)
findByLocation(this.queryForm.location).then(res => {
if (res.code === 200) {
console.log('resDate', res.data)
if (res.data != null) {
if (res.data.pn !== null && res.data.pn !== '') {
this.incomeWmsLabelList = res.data
......@@ -450,6 +447,7 @@ export default {
} else {
const values = this.queryForm.value2.split(':')
// 校验第三个值是否为整数
// 校验第三个值是否为整数
// if (/^\d+$/.test(values[3])) {
const obj = {
whId: this.queryForm.whId,
......@@ -463,10 +461,9 @@ export default {
orderCode: this.incomeWmsBoxList.order_code
}
// this.incomeWmsBoxList.pn = values[1]
console.log(obj)
if (obj.labelId !== null && obj.labelId !== '' && obj.labelId !== undefined) {
if (this.incomeWmsLabelList.pn && this.incomeWmsLabelList.pn !== '' && this.incomeWmsLabelList.pn !== undefined) {
if (obj.pn !== this.incomeWmsLabelList.pn) {
if (obj.pn.toUpperCase() !== this.incomeWmsLabelList.pn.toUpperCase()) {
playAudio(true)
this.$message.error({
message: '输入的pn值:' + obj.pn + '与数据库中pn值:' + this.incomeWmsLabelList.pn + '不匹配,请重新输入',
......@@ -480,12 +477,12 @@ export default {
} else {
let isLegalLot = false
this.enterTable.forEach(item => {
if (item.lot === obj.lot) {
if (item.lot.toUpperCase() === obj.lot.toUpperCase() ) {
isLegalLot = true
}
})
if (isLegalLot) {
if (this.enterTable[0].pn === obj.pn) {
if (this.enterTable[0].pn.toUpperCase() === obj.pn.toUpperCase()) {
successAudio(true)
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
......@@ -509,7 +506,7 @@ export default {
if (res.code === 200) {
if (res.data) {
if (this.enterTable.length > 0) {
if (this.enterTable[0].pn === obj.pn) {
if (this.enterTable[0].pn.toUpperCase() === obj.pn.toUpperCase()) {
successAudio(true)
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
......@@ -557,12 +554,12 @@ export default {
if (res.data != null) {
let isLegalLot = false
this.enterTable.forEach(item => {
if (item.lot === obj.lot) {
if (item.lot.toUpperCase() === obj.lot.toUpperCase() ) {
isLegalLot = true
}
})
if (isLegalLot) {
if (this.enterTable[0].pn === obj.pn) {
if (this.enterTable[0].pn.toUpperCase() === obj.pn.toUpperCase()) {
successAudio(true)
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
......@@ -586,7 +583,7 @@ export default {
if (res.code === 200) {
if (res.data) {
if (this.enterTable.length > 0) {
if (this.enterTable[0].pn === obj.pn) {
if (this.enterTable[0].pn.toUpperCase() === obj.pn.toUpperCase() ) {
successAudio(true)
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
......
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