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
49cef197
Commit
49cef197
authored
Apr 10, 2024
by
Hagsn3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
051893e9
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
61 deletions
+57
-61
common.js
src/utils/common.js
+13
-0
dispose.vue
src/views/setup/dispose.vue
+5
-6
enterbound.vue
src/views/setup/enterbound.vue
+30
-43
enterboundTwo.vue
src/views/setup/enterboundTwo.vue
+9
-12
No files found.
src/utils/common.js
View file @
49cef197
...
...
@@ -182,3 +182,16 @@ export function includePermission(accessName) {
if
(
!
store
.
getters
.
permissions
)
{
return
false
}
return
(
store
.
getters
.
permissions
.
includes
(
accessName
)
||
store
.
getters
.
permissions
.
includes
(
'*:*:*'
))
}
// 控制音频启用状态
export
const
isAudioAble
=
true
export
function
playAudio
(
isAudioAble
)
{
const
errorSound
=
new
Audio
(
require
(
'../assets/audio/y1840.mp3'
))
if
(
isAudioAble
)
{
errorSound
.
play
()
}
else
{
errorSound
.
pause
()
}
}
src/views/setup/dispose.vue
View file @
49cef197
...
...
@@ -56,6 +56,7 @@
import
{
handleOutWarehouse
,
persistOut
}
from
'@/api/setup/applicationTable'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
isAudioAble
,
playAudio
}
from
"@/utils/common"
;
export
default
{
name
:
'Dispose'
,
...
...
@@ -192,13 +193,12 @@ export default {
}
}
}
else
{
const
errorSound
=
new
Audio
(
require
(
'../../assets/audio/y1840.mp3'
))
errorSound
.
play
()
playAudio
(
isAudioAble
)
this
.
$message
.
error
({
message
:
'输入的位置'
+
this
.
searchForm
.
search
+
'不正确请重新输入'
,
duration
:
3000
,
onClose
:
()
=>
{
errorSound
.
pause
(
)
playAudio
(
isAudioAble
)
}
})
this
.
searchForm
.
search
=
null
...
...
@@ -232,13 +232,12 @@ export default {
return
last
}
}
else
{
const
errorSound
=
new
Audio
(
require
(
'../../assets/audio/y1840.mp3'
))
errorSound
.
play
()
playAudio
(
isAudioAble
)
this
.
$message
.
error
({
message
:
'输入的位置'
+
this
.
searchForm
.
search
+
'不正确请重新输入'
,
duration
:
3000
,
onClose
:
()
=>
{
errorSound
.
pause
(
)
playAudio
(
isAudioAble
)
}
})
this
.
searchForm
.
search
=
null
...
...
src/views/setup/enterbound.vue
View file @
49cef197
This diff is collapsed.
Click to expand it.
src/views/setup/enterboundTwo.vue
View file @
49cef197
...
...
@@ -56,6 +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'
export
default
{
name
:
'EnterboundTwo'
,
...
...
@@ -210,13 +211,12 @@ export default {
that
.
$refs
[
'input'
+
index
].
focus
()
})
}
else
{
const
errorSound
=
new
Audio
(
require
(
'../../assets/audio/y1840.mp3'
))
errorSound
.
play
()
playAudio
(
isAudioAble
)
this
.
$message
.
error
({
message
:
'数据库中无对应'
+
location
+
'请重新输入'
,
duration
:
2000
,
onClose
:
()
=>
{
errorSound
.
pause
(
)
playAudio
(
!
isAudioAble
)
}
})
this
.
form
.
value1
=
null
...
...
@@ -229,13 +229,12 @@ export default {
}
})
}
else
{
const
errorSound
=
new
Audio
(
require
(
'../../assets/audio/y1840.mp3'
))
errorSound
.
play
()
playAudio
(
isAudioAble
)
return
this
.
$message
.
error
({
message
:
'输入值不符合格式要求,请重新输入'
,
duration
:
2000
,
onClose
:
()
=>
{
errorSound
.
pause
(
)
playAudio
(
!
isAudioAble
)
}
})
}
...
...
@@ -255,13 +254,12 @@ export default {
console
.
log
(
'formPn'
,
this
.
form
.
pn
)
console
.
log
(
'responsePn'
,
this
.
responsePn
)
if
(
this
.
form
.
pn
!==
this
.
responsePn
)
{
const
errorSound
=
new
Audio
(
require
(
'../../assets/audio/y1840.mp3'
))
errorSound
.
play
()
playAudio
(
isAudioAble
)
this
.
$message
.
error
({
message
:
'您输入的pn'
+
this
.
form
.
pn
+
'与返回pn'
+
this
.
responsePn
+
'的不一样'
,
duration
:
2000
,
onClose
:
()
=>
{
errorSound
.
pause
(
)
playAudio
(
!
isAudioAble
)
}
})
this
.
form
.
pn
=
''
...
...
@@ -315,13 +313,12 @@ export default {
if
(
valid
)
{
if
(
this
.
responsePn
&&
this
.
responsePn
!==
''
)
{
if
(
this
.
form
.
pn
!==
this
.
responsePn
)
{
const
errorSound
=
new
Audio
(
require
(
'../../assets/audio/y1840.mp3'
))
errorSound
.
play
()
playAudio
(
isAudioAble
)
this
.
$message
.
error
({
message
:
'您输入的pn'
+
this
.
form
.
pn
+
'与返回pn'
+
this
.
responsePn
+
'的不一样'
,
duration
:
2000
,
onClose
:
()
=>
{
errorSound
.
pause
(
)
playAudio
(
!
isAudioAble
)
}
})
this
.
form
.
pn
=
''
...
...
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