Commit 4338b6bb authored by Hagsn3's avatar Hagsn3

修改代码

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