Commit 172367d7 authored by Hagsn3's avatar Hagsn3

修改代码

parent 374e85e7
......@@ -132,7 +132,8 @@ export default {
getcheckIsZero() {
const obj = {
whId: '0'
whId: '1',
lot: 'ascsacsa'
}
checkIsZero(obj).then(res => {
if (res.code === 200) {
......@@ -416,10 +417,16 @@ export default {
addList() {
this.$refs.queryForm.validateField('value2', (error) => {
if (error) {
const errorSound = new Audio(require('../../assets/audio/y1840.mp3'))
errorSound.play()
this.$message.error({
message: '输入值不符合格式要求,请重新输入',
duration: 2000
duration: 2000,
onClose: () => {
errorSound.pause()
}
})
this.queryForm.value2 = ''
} else {
const values = this.queryForm.value2.split(':')
// 校验第三个值是否为整数
......@@ -473,7 +480,8 @@ export default {
}
} else {
const Zbj = {
whId: this.queryForm.whId
whId: this.queryForm.whId,
lot: obj.lot
}
checkIsZero(Zbj).then(res => {
if (res.code === 200) {
......@@ -500,43 +508,17 @@ export default {
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 {
// 创建一个新的音频元素
const successSound = new Audio(require('../../assets/audio/y1840.mp3'))
successSound.play()
this.$message.error({
message: '该LOT值' + obj.lot + '未被检查!',
duration: 2000,
onClose: () => {
// 当消息提示框关闭时停止播放声音
successSound.pause()
}
}, () => {
})
// 创建一个新的音频元素
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 {
}
} else {
const Zbj = {
whId: this.queryForm.whId
whId: this.queryForm.whId,
lot: obj.lot
}
checkIsZero(Zbj).then(res => {
if (res.code === 200) {
......@@ -600,43 +583,17 @@ export default {
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 {
// 创建一个新的音频元素
const successSound = new Audio(require('../../assets/audio/y1840.mp3'))
successSound.play()
this.$message.error({
message: '该LOT值' + obj.lot + '未被检查!',
duration: 2000,
onClose: () => {
// 当消息提示框关闭时停止播放声音
successSound.pause()
}
}, () => {
})
// 创建一个新的音频元素
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