Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_pda_Web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡宝山
template_pda_Web
Commits
381515da
Commit
381515da
authored
Apr 11, 2024
by
Hagsn3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改声音
parent
dd10b3c0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
25 deletions
+47
-25
common.js
src/utils/common.js
+8
-0
dispose.vue
src/views/setup/dispose.vue
+4
-3
enterbound.vue
src/views/setup/enterbound.vue
+26
-15
enterboundTwo.vue
src/views/setup/enterboundTwo.vue
+9
-7
No files found.
src/utils/common.js
View file @
381515da
...
...
@@ -186,6 +186,7 @@ export function includePermission(accessName) {
// 控制音频启用状态
export
const
isAudioAble
=
true
const
errorSound
=
new
Audio
(
require
(
'../assets/audio/y1840.mp3'
))
const
successSound
=
new
Audio
(
require
(
'../assets/audio/8858.mp3'
))
export
function
playAudio
(
start
)
{
if
(
!
isAudioAble
)
{
return
...
...
@@ -198,4 +199,11 @@ export function playAudio(start) {
errorSound
.
pause
()
}
}
export
function
successAudio
(
start
)
{
if
(
start
)
{
successSound
.
play
()
}
else
{
successSound
.
pause
()
}
}
src/views/setup/dispose.vue
View file @
381515da
...
...
@@ -56,7 +56,7 @@
import
{
handleOutWarehouse
,
persistOut
}
from
'@/api/setup/applicationTable'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
playAudio
}
from
'@/utils/common'
import
{
playAudio
,
successAudio
}
from
'@/utils/common'
export
default
{
name
:
'Dispose'
,
...
...
@@ -196,7 +196,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入的位置'
+
this
.
searchForm
.
search
+
'不正确请重新输入'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -235,7 +235,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入的位置'
+
this
.
searchForm
.
search
+
'不正确请重新输入'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -259,6 +259,7 @@ export default {
if
(
obj
)
{
const
{
index
,
needNumber
}
=
obj
if
(
!
this
.
rowIndexList
.
includes
(
index
))
{
successAudio
(
true
)
this
.
rowIndexList
.
push
(
index
)
}
this
.
total
=
this
.
total
+
needNumber
...
...
src/views/setup/enterbound.vue
View file @
381515da
...
...
@@ -82,7 +82,7 @@ import {
import
{
findByLocation
,
updateIncomeWmsLabel
}
from
'@/api/incomeWmsLabel'
import
{
getInfo
}
from
'@/api/login'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
playAudio
}
from
'@/utils/common'
import
{
playAudio
,
successAudio
}
from
'@/utils/common'
export
default
{
name
:
'EnterBound'
,
...
...
@@ -266,7 +266,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入值不符合格式要求,请重新输入'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -286,12 +286,14 @@ export default {
if
(
res
.
data
.
pn
!==
null
&&
res
.
data
.
pn
!==
''
)
{
this
.
incomeWmsLabelList
=
res
.
data
// this.getOrderCode()
successAudio
(
true
)
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
})
}
else
{
successAudio
(
true
)
this
.
incomeWmsLabelList
=
res
.
data
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
...
...
@@ -303,7 +305,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'数据库中无对应数据location:'
+
this
.
queryForm
.
location
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -327,6 +329,7 @@ export default {
if
(
res
.
data
!=
null
)
{
if
(
res
.
data
.
pn
!==
null
&&
res
.
data
.
pn
!==
''
)
{
if
(
res
.
data
.
pn
!==
this
.
queryForm
.
pn
)
{
successAudio
(
true
)
this
.
incomeWmsLabelList
=
res
.
data
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
...
...
@@ -334,6 +337,7 @@ export default {
that
.
$refs
[
'input'
+
index
].
focus
()
})
}
else
{
successAudio
(
true
)
this
.
incomeWmsLabelList
=
res
.
data
// this.getOrderCode()
that
.
$nextTick
(()
=>
{
...
...
@@ -343,6 +347,7 @@ export default {
})
}
}
else
{
successAudio
(
true
)
this
.
incomeWmsLabelList
=
res
.
data
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
...
...
@@ -354,7 +359,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'数据库中无对应数据location:'
+
this
.
queryForm
.
location
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -371,7 +376,7 @@ export default {
// 输入值不符合格式要求,进行报错处理
this
.
$message
.
error
({
message
:
'输入值不符合格式要求,请重新输入'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -405,7 +410,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入值不符合格式要求,请重新输入'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -432,7 +437,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入的pn值:'
+
obj
.
pn
+
'与数据库中pn值:'
+
this
.
incomeWmsLabelList
.
pn
+
'不匹配,请重新输入'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -448,6 +453,7 @@ export default {
})
if
(
isLegalLot
)
{
if
(
this
.
enterTable
[
0
].
pn
===
obj
.
pn
)
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeWmsBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
...
...
@@ -455,7 +461,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'与下方列表的pn:'
+
this
.
enterTable
[
0
].
pn
+
'不匹配'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -471,6 +477,7 @@ export default {
if
(
res
.
data
)
{
if
(
this
.
enterTable
.
length
>
0
)
{
if
(
this
.
enterTable
[
0
].
pn
===
obj
.
pn
)
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeWmsBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
...
...
@@ -478,7 +485,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'与下方列表的pn:'
+
this
.
enterTable
[
0
].
pn
+
'不匹配'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -486,6 +493,7 @@ export default {
this
.
queryForm
.
value2
=
null
}
}
else
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeWmsBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
...
...
@@ -495,7 +503,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'该LOT值'
+
obj
.
lot
+
'未被检查!'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
// 当消息提示框关闭时停止播放声音
playAudio
(
false
)
...
...
@@ -522,6 +530,7 @@ export default {
})
if
(
isLegalLot
)
{
if
(
this
.
enterTable
[
0
].
pn
===
obj
.
pn
)
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeWmsBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
...
...
@@ -529,7 +538,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'与下方列表的pn值'
+
this
.
enterTable
[
0
].
pn
+
'不匹配'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -545,6 +554,7 @@ export default {
if
(
res
.
data
)
{
if
(
this
.
enterTable
.
length
>
0
)
{
if
(
this
.
enterTable
[
0
].
pn
===
obj
.
pn
)
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeWmsBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
...
...
@@ -552,7 +562,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'与下方列表的pn值'
+
this
.
enterTable
[
0
].
pn
+
'不匹配'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -560,6 +570,7 @@ export default {
this
.
queryForm
.
value2
=
null
}
}
else
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeWmsBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
...
...
@@ -568,7 +579,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'该LOT值'
+
obj
.
lot
+
'未被检查!'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
// 当消息提示框关闭时停止播放声音
playAudio
(
false
)
...
...
@@ -584,7 +595,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'该location的值'
+
this
.
queryForm
.
location
+
'无效'
+
'请输入有效的location值'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -598,7 +609,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入格式不符合要求,请重新输入'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
src/views/setup/enterboundTwo.vue
View file @
381515da
...
...
@@ -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
{
playAudio
}
from
'@/utils/common'
import
{
playAudio
,
successAudio
}
from
'@/utils/common'
export
default
{
name
:
'EnterboundTwo'
,
...
...
@@ -205,6 +205,7 @@ export default {
if
(
res
.
data
.
location
)
{
this
.
form
.
location
=
res
.
data
.
location
}
successAudio
(
true
)
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
...
...
@@ -214,7 +215,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'数据库中无对应'
+
location
+
'请重新输入'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -232,7 +233,7 @@ export default {
playAudio
(
true
)
return
this
.
$message
.
error
({
message
:
'输入值不符合格式要求,请重新输入'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -251,13 +252,11 @@ export default {
* form.pn:表格pn
*/
if
(
this
.
responsePn
&&
this
.
responsePn
!==
''
&&
this
.
responsePn
!==
undefined
)
{
console
.
log
(
'formPn'
,
this
.
form
.
pn
)
console
.
log
(
'responsePn'
,
this
.
responsePn
)
if
(
this
.
form
.
pn
!==
this
.
responsePn
)
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'您输入的pn'
+
this
.
form
.
pn
+
'与返回pn'
+
this
.
responsePn
+
'的不一样'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
@@ -274,6 +273,7 @@ export default {
console
.
log
(
response
)
this
.
form
.
qty
=
response
.
data
.
qty
}
successAudio
(
true
)
this
.
$nextTick
().
then
(()
=>
{
this
.
$refs
.
input3
.
focus
()
})
...
...
@@ -289,11 +289,13 @@ export default {
if
(
response
.
code
===
200
&&
response
.
data
)
{
console
.
log
(
response
)
this
.
form
.
qty
=
response
.
data
.
qty
successAudio
(
true
)
this
.
$nextTick
().
then
(()
=>
{
this
.
$refs
.
input3
.
focus
()
})
this
.
confirmTheSubmission
=
true
}
else
{
successAudio
(
true
)
this
.
$nextTick
().
then
(()
=>
{
this
.
$refs
.
input3
.
focus
()
})
...
...
@@ -316,7 +318,7 @@ export default {
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'您输入的pn'
+
this
.
form
.
pn
+
'与返回pn'
+
this
.
responsePn
+
'的不一样'
,
duration
:
5
000
,
duration
:
2
000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment