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

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

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