Commit 172367d7 authored by Hagsn3's avatar Hagsn3

修改代码

parent 374e85e7
...@@ -132,7 +132,8 @@ export default { ...@@ -132,7 +132,8 @@ export default {
getcheckIsZero() { getcheckIsZero() {
const obj = { const obj = {
whId: '0' whId: '1',
lot: 'ascsacsa'
} }
checkIsZero(obj).then(res => { checkIsZero(obj).then(res => {
if (res.code === 200) { if (res.code === 200) {
...@@ -416,10 +417,16 @@ export default { ...@@ -416,10 +417,16 @@ export default {
addList() { addList() {
this.$refs.queryForm.validateField('value2', (error) => { this.$refs.queryForm.validateField('value2', (error) => {
if (error) { if (error) {
const errorSound = new Audio(require('../../assets/audio/y1840.mp3'))
errorSound.play()
this.$message.error({ this.$message.error({
message: '输入值不符合格式要求,请重新输入', message: '输入值不符合格式要求,请重新输入',
duration: 2000 duration: 2000,
onClose: () => {
errorSound.pause()
}
}) })
this.queryForm.value2 = ''
} else { } else {
const values = this.queryForm.value2.split(':') const values = this.queryForm.value2.split(':')
// 校验第三个值是否为整数 // 校验第三个值是否为整数
...@@ -473,7 +480,8 @@ export default { ...@@ -473,7 +480,8 @@ export default {
} }
} else { } else {
const Zbj = { const Zbj = {
whId: this.queryForm.whId whId: this.queryForm.whId,
lot: obj.lot
} }
checkIsZero(Zbj).then(res => { checkIsZero(Zbj).then(res => {
if (res.code === 200) { if (res.code === 200) {
...@@ -499,30 +507,6 @@ export default { ...@@ -499,30 +507,6 @@ export default {
this.incomeWmsBoxList.pn = obj.pn this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = '' this.queryForm.value2 = ''
} }
} else {
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 {
const errorSound = new Audio(require('../../assets/audio/y1840.mp3'))
errorSound.play()
this.$message.error({
message: '与下方列表的pn:' + this.enterTable[0].pn + '不匹配',
duration: 2000,
onClose: () => {
errorSound.pause()
}
})
}
} else {
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = ''
}
} else { } else {
// 创建一个新的音频元素 // 创建一个新的音频元素
const successSound = new Audio(require('../../assets/audio/y1840.mp3')) const successSound = new Audio(require('../../assets/audio/y1840.mp3'))
...@@ -537,8 +521,6 @@ export default { ...@@ -537,8 +521,6 @@ export default {
}, () => { }, () => {
}) })
} }
})
}
} }
}) })
} }
...@@ -573,7 +555,8 @@ export default { ...@@ -573,7 +555,8 @@ export default {
} }
} else { } else {
const Zbj = { const Zbj = {
whId: this.queryForm.whId whId: this.queryForm.whId,
lot: obj.lot
} }
checkIsZero(Zbj).then(res => { checkIsZero(Zbj).then(res => {
if (res.code === 200) { if (res.code === 200) {
...@@ -599,30 +582,6 @@ export default { ...@@ -599,30 +582,6 @@ export default {
this.incomeWmsBoxList.pn = obj.pn this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = '' this.queryForm.value2 = ''
} }
} else {
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 {
const errorSound = new Audio(require('../../assets/audio/y1840.mp3'))
errorSound.play()
this.$message.error({
message: '与下方列表的pn值' + this.enterTable[0].pn + '不匹配',
duration: 2000,
onClose: () => {
errorSound.pause()
}
})
}
} else {
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = ''
}
} else { } else {
// 创建一个新的音频元素 // 创建一个新的音频元素
const successSound = new Audio(require('../../assets/audio/y1840.mp3')) const successSound = new Audio(require('../../assets/audio/y1840.mp3'))
...@@ -637,8 +596,6 @@ export default { ...@@ -637,8 +596,6 @@ export default {
}, () => { }, () => {
}) })
} }
})
}
} }
}) })
} }
......
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