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) {
...@@ -500,43 +508,17 @@ export default { ...@@ -500,43 +508,17 @@ export default {
this.queryForm.value2 = '' this.queryForm.value2 = ''
} }
} else { } else {
queryPass(obj.lot).then(lotResponse => { // 创建一个新的音频元素
if (lotResponse.code === 200 && lotResponse.data > 0) { const successSound = new Audio(require('../../assets/audio/y1840.mp3'))
if (this.enterTable.length > 0) { successSound.play()
if (this.enterTable[0].pn === obj.pn) { this.$message.error({
this.enterTable.push(obj) message: '该LOT值' + obj.lot + '未被检查!',
this.incomeWmsBoxList.pn = obj.pn duration: 2000,
this.queryForm.value2 = '' onClose: () => {
} else { // 当消息提示框关闭时停止播放声音
const errorSound = new Audio(require('../../assets/audio/y1840.mp3')) successSound.pause()
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 {
// 创建一个新的音频元素
const successSound = new Audio(require('../../assets/audio/y1840.mp3'))
successSound.play()
this.$message.error({
message: '该LOT值' + obj.lot + '未被检查!',
duration: 2000,
onClose: () => {
// 当消息提示框关闭时停止播放声音
successSound.pause()
}
}, () => {
})
} }
}, () => {
}) })
} }
} }
...@@ -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) {
...@@ -600,43 +583,17 @@ export default { ...@@ -600,43 +583,17 @@ export default {
this.queryForm.value2 = '' this.queryForm.value2 = ''
} }
} else { } else {
queryPass(obj.lot).then(lotResponse => { // 创建一个新的音频元素
if (lotResponse.code === 200 && lotResponse.data > 0) { const successSound = new Audio(require('../../assets/audio/y1840.mp3'))
if (this.enterTable.length > 0) { successSound.play()
if (this.enterTable[0].pn === obj.pn) { this.$message.error({
this.enterTable.push(obj) message: '该LOT值' + obj.lot + '未被检查!',
this.incomeWmsBoxList.pn = obj.pn duration: 2000,
this.queryForm.value2 = '' onClose: () => {
} else { // 当消息提示框关闭时停止播放声音
const errorSound = new Audio(require('../../assets/audio/y1840.mp3')) successSound.pause()
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 {
// 创建一个新的音频元素
const successSound = new Audio(require('../../assets/audio/y1840.mp3'))
successSound.play()
this.$message.error({
message: '该LOT值' + obj.lot + '未被检查!',
duration: 2000,
onClose: () => {
// 当消息提示框关闭时停止播放声音
successSound.pause()
}
}, () => {
})
} }
}, () => {
}) })
} }
} }
......
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