Commit 4338b6bb authored by Hagsn3's avatar Hagsn3

修改代码

parent 49cef197
......@@ -56,7 +56,7 @@
import { handleOutWarehouse, persistOut } from '@/api/setup/applicationTable'
import { getDict } from '@/api/system/dict/data'
import {isAudioAble, playAudio} from "@/utils/common";
import { playAudio } from '@/utils/common'
export default {
name: 'Dispose',
......@@ -193,12 +193,12 @@ export default {
}
}
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '输入的位置' + this.searchForm.search + '不正确请重新输入',
duration: 3000,
duration: 5000,
onClose: () => {
playAudio(isAudioAble)
playAudio(false)
}
})
this.searchForm.search = null
......@@ -232,12 +232,12 @@ export default {
return last
}
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '输入的位置' + this.searchForm.search + '不正确请重新输入',
duration: 3000,
duration: 5000,
onClose: () => {
playAudio(isAudioAble)
playAudio(false)
}
})
this.searchForm.search = null
......
......@@ -82,7 +82,7 @@ import {
import { findByLocation, updateIncomeWmsLabel } from '@/api/incomeWmsLabel'
import { getInfo } from '@/api/login'
import { getDict } from '@/api/system/dict/data'
import { isAudioAble, playAudio } from '@/utils/common'
import { playAudio } from '@/utils/common'
export default {
name: 'EnterBound',
......@@ -263,12 +263,12 @@ export default {
}
this.$refs.queryForm.validateField('value1', (error) => {
if (error) {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '输入值不符合格式要求,请重新输入',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
}, () => {})
} else {
......@@ -300,12 +300,12 @@ export default {
})
}
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '数据库中无对应数据location:' + this.queryForm.location,
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
}, () => {
})
......@@ -351,12 +351,12 @@ export default {
})
}
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '数据库中无对应数据location:' + this.queryForm.location,
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.queryForm.value1 = ''
......@@ -367,13 +367,13 @@ export default {
}
})
} else {
playAudio(isAudioAble)
playAudio(true)
// 输入值不符合格式要求,进行报错处理
this.$message.error({
message: '输入值不符合格式要求,请重新输入',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.queryForm.value1 = ''
......@@ -402,12 +402,12 @@ export default {
addList() {
this.$refs.queryForm.validateField('value2', (error) => {
if (error) {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '输入值不符合格式要求,请重新输入',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.queryForm.value2 = ''
......@@ -429,12 +429,12 @@ export default {
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) {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '输入的pn值:' + obj.pn + '与数据库中pn值:' + this.incomeWmsLabelList.pn + '不匹配,请重新输入',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.queryForm.value2 = null
......@@ -452,12 +452,12 @@ export default {
this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = ''
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '与下方列表的pn:' + this.enterTable[0].pn + '不匹配',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.queryForm.value2 = null
......@@ -475,12 +475,12 @@ export default {
this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = ''
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '与下方列表的pn:' + this.enterTable[0].pn + '不匹配',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.queryForm.value2 = null
......@@ -492,13 +492,13 @@ export default {
}
} else {
// 创建一个新的音频元素
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '该LOT值' + obj.lot + '未被检查!',
duration: 2000,
duration: 5000,
onClose: () => {
// 当消息提示框关闭时停止播放声音
playAudio(!isAudioAble)
playAudio(false)
}
}, () => {
})
......@@ -526,12 +526,12 @@ export default {
this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = ''
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '与下方列表的pn值' + this.enterTable[0].pn + '不匹配',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.queryForm.value2 = null
......@@ -549,12 +549,12 @@ export default {
this.incomeWmsBoxList.pn = obj.pn
this.queryForm.value2 = ''
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '与下方列表的pn值' + this.enterTable[0].pn + '不匹配',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.queryForm.value2 = null
......@@ -565,13 +565,13 @@ export default {
this.queryForm.value2 = ''
}
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '该LOT值' + obj.lot + '未被检查!',
duration: 2000,
duration: 5000,
onClose: () => {
// 当消息提示框关闭时停止播放声音
playAudio(!isAudioAble)
playAudio(false)
}
}, () => {
})
......@@ -581,12 +581,12 @@ export default {
})
}
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '该location的值' + this.queryForm.location + '无效' + '请输入有效的location值',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.queryForm.location = ''
......@@ -595,12 +595,12 @@ export default {
})
}
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '输入格式不符合要求,请重新输入',
duration: 2500,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
}
......
......@@ -56,7 +56,7 @@ import { getDict } from '@/api/system/dict/data'
import { addIncomeWmsBox, getJcCode } from '@/api/incomeWmsBox'
import { findByLocation } from '@/api/incomeWmsLabel'
import { queryByPnAndType } from '@/api/income_mat_baseinfo'
import { isAudioAble, playAudio } from '@/utils/common'
import { playAudio } from '@/utils/common'
export default {
name: 'EnterboundTwo',
......@@ -211,12 +211,12 @@ export default {
that.$refs['input' + index].focus()
})
} else {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '数据库中无对应' + location + '请重新输入',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.form.value1 = null
......@@ -229,12 +229,12 @@ export default {
}
})
} else {
playAudio(isAudioAble)
playAudio(true)
return this.$message.error({
message: '输入值不符合格式要求,请重新输入',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
}
......@@ -254,12 +254,12 @@ export default {
console.log('formPn', this.form.pn)
console.log('responsePn', this.responsePn)
if (this.form.pn !== this.responsePn) {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '您输入的pn' + this.form.pn + '与返回pn' + this.responsePn + '的不一样',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.form.pn = ''
......@@ -313,12 +313,12 @@ export default {
if (valid) {
if (this.responsePn && this.responsePn !== '') {
if (this.form.pn !== this.responsePn) {
playAudio(isAudioAble)
playAudio(true)
this.$message.error({
message: '您输入的pn' + this.form.pn + '与返回pn' + this.responsePn + '的不一样',
duration: 2000,
duration: 5000,
onClose: () => {
playAudio(!isAudioAble)
playAudio(false)
}
})
this.form.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