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
cda88459
Commit
cda88459
authored
May 22, 2024
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.默认将小写字母换成大写字母
parent
1b859f58
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
25 deletions
+33
-25
common.js
src/utils/common.js
+5
-0
checkTheApplicationForExit.vue
src/views/setup/checkTheApplicationForExit.vue
+11
-10
dispose.vue
src/views/setup/dispose.vue
+6
-5
enterbound.vue
src/views/setup/enterbound.vue
+11
-10
No files found.
src/utils/common.js
View file @
cda88459
...
...
@@ -209,3 +209,8 @@ export function successAudio(start) {
}
}
// 自定义转换成大写的
export
function
customUpperCase
(
sourceStr
)
{
return
sourceStr
&&
sourceStr
!==
''
?
sourceStr
.
toUpperCase
:
sourceStr
}
src/views/setup/checkTheApplicationForExit.vue
View file @
cda88459
...
...
@@ -79,7 +79,7 @@
<
script
>
import
manufacturer
from
"@/data/jsonData"
;
import
{
handleOutWarehouse
,
persistOut
}
from
'@/api/outcomeWmsJbapplyTemp'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
customUpperCase
}
from
"@/utils/common"
;
import
{
playAudio
,
successAudio
}
from
'@/utils/common'
export
default
{
...
...
@@ -137,6 +137,7 @@ export default {
this
.
getDetail
()
},
methods
:
{
customUpperCase
,
getLabelByCj
(
value
)
{
const
obj
=
manufacturer
.
find
(
item
=>
item
.
value
===
value
)
return
obj
?
obj
.
label
:
null
...
...
@@ -186,7 +187,7 @@ export default {
var
list
=
[]
// 判断tableList中location和search及lot相同的元素个数
this
.
tableList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
location
.
toUpperCase
()
===
search
.
toUpperCase
()
&&
item
.
lot
.
toUpperCase
()
===
lot
.
toUpperCase
())
{
if
(
customUpperCase
(
item
.
location
)
===
customUpperCase
(
search
)
&&
customUpperCase
(
item
.
lot
)
===
customUpperCase
(
lot
)
())
{
list
.
push
(
index
)
}
})
...
...
@@ -199,8 +200,8 @@ export default {
}
if
(
list
.
length
>
1
)
{
// 是否能从储存中找到location
if
(
this
.
storeList
.
find
(
Litem
=>
Litem
.
location
.
toUpperCase
()
===
search
.
toUpperCase
()
&&
Litem
.
lot
.
toUpperCase
()
===
lot
.
toUpperCase
(
)))
{
var
index
=
this
.
storeList
.
findIndex
(
Litem
=>
Litem
.
location
.
toUpperCase
()
===
search
.
toUpperCase
()
&&
Litem
.
lot
.
toUpperCase
()
===
lot
.
toUpperCase
(
))
if
(
this
.
storeList
.
find
(
Litem
=>
customUpperCase
(
Litem
.
location
)
===
customUpperCase
(
search
)
&&
customUpperCase
(
Litem
.
lot
)
===
customUpperCase
(
lot
)))
{
var
index
=
this
.
storeList
.
findIndex
(
Litem
=>
customUpperCase
(
Litem
.
location
)
===
customUpperCase
(
search
)
&&
customUpperCase
(
Litem
.
lot
)
===
customUpperCase
(
lot
))
this
.
storeList
[
index
].
frequency
=
this
.
storeList
[
index
].
frequency
+
1
if
(
this
.
storeList
[
index
].
frequency
<
this
.
storeList
[
index
].
list
.
length
)
{
last
.
index
=
this
.
storeList
[
index
].
list
[
this
.
storeList
[
index
].
frequency
]
...
...
@@ -251,12 +252,12 @@ export default {
let
oneLot
=
''
let
twoLot
=
''
if
(
item
.
lot
&&
item
.
lot
!==
''
)
{
oneLot
=
item
.
lot
.
toUpperCase
(
)
oneLot
=
customUpperCase
(
item
.
lot
)
}
if
(
lot
&&
lot
!==
''
)
{
twoLot
=
lot
.
toUpperCase
(
)
twoLot
=
customUpperCase
(
lot
)
}
if
(
item
.
location
.
toUpperCase
()
===
search
.
toUpperCase
(
)
&&
oneLot
===
twoLot
)
{
if
(
customUpperCase
(
item
.
location
)
===
customUpperCase
(
search
)
&&
oneLot
===
twoLot
)
{
obj
.
list
.
push
(
index
)
}
})
...
...
@@ -321,7 +322,7 @@ export default {
judgePush
(
data
)
{
let
isLegalLocation
=
false
this
.
tableList
.
forEach
(
item
=>
{
if
(
item
.
location
.
toUpperCase
()
===
data
.
toUpperCase
(
))
{
if
(
customUpperCase
(
item
.
location
)
===
customUpperCase
(
data
))
{
isLegalLocation
=
true
}
})
...
...
@@ -365,7 +366,7 @@ export default {
}
/** ptyp为1的时候*/
if
(
this
.
form
.
ptype
===
'1'
)
{
if
(
obj
.
pn
.
toUpperCase
()
!==
this
.
form
.
pn
.
toUpperCase
()
||
obj
.
lot
.
toUpperCase
()
!==
this
.
form
.
lot
.
toUpperCase
()
||
obj
.
rank
.
toUpperCase
()
!==
this
.
form
.
rank
.
toUpperCase
(
))
{
if
(
customUpperCase
(
obj
.
pn
)
!==
customUpperCase
(
this
.
form
.
pn
)
||
customUpperCase
(
obj
.
lot
)
!==
customUpperCase
(
this
.
form
.
lot
)
||
customUpperCase
(
obj
.
rank
)
!==
customUpperCase
(
this
.
form
.
rank
))
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入不符合要求请重新输入!'
,
...
...
@@ -400,7 +401,7 @@ export default {
}
}
else
{
// ptype不为1的时候
if
(
obj
.
pn
.
toUpperCase
()
!==
this
.
form
.
pn
.
toUpperCase
()
||
obj
.
lot
.
toUpperCase
()
!==
this
.
form
.
lot
.
toUpperCase
(
))
{
if
(
customUpperCase
(
obj
.
pn
)
!==
customUpperCase
(
this
.
form
.
pn
)
||
customUpperCase
(
obj
.
lot
)
!==
customUpperCase
(
this
.
form
.
lot
))
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入不符合要求请重新输入!'
,
...
...
src/views/setup/dispose.vue
View file @
cda88459
...
...
@@ -57,7 +57,7 @@
import
{
handleOutWarehouse
,
persistOut
}
from
'@/api/setup/applicationTable'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
playAudio
,
successAudio
}
from
'@/utils/common'
import
{
customUpperCase
}
from
"@/utils/common"
;
export
default
{
name
:
'Dispose'
,
data
()
{
...
...
@@ -94,6 +94,7 @@ export default {
this
.
getDetail
()
},
methods
:
{
customUpperCase
,
/**
* @description: 一开始将焦点聚焦到第一个输入框下
* @author: gaoyu
...
...
@@ -158,7 +159,7 @@ export default {
var
list
=
[]
// 判断tableList中location和search相同的元素个数
this
.
tableList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
location
.
toUpperCase
()
===
search
.
toUpperCase
(
))
{
if
(
customUpperCase
(
item
.
location
)
===
customUpperCase
(
search
))
{
list
.
push
(
index
)
}
})
...
...
@@ -170,8 +171,8 @@ export default {
}
if
(
list
.
length
>
1
)
{
// 是否能从储存中找到location
if
(
this
.
storeList
.
find
(
Litem
=>
Litem
.
location
.
toUpperCase
()
===
search
.
toUpperCase
(
)))
{
var
index
=
this
.
storeList
.
findIndex
(
Litem
=>
Litem
.
location
.
toUpperCase
()
===
search
.
toUpperCase
(
))
if
(
this
.
storeList
.
find
(
Litem
=>
customUpperCase
(
Litem
.
location
)
===
customUpperCase
(
search
)))
{
var
index
=
this
.
storeList
.
findIndex
(
Litem
=>
customUpperCase
(
Litem
.
location
)
===
customUpperCase
(
search
))
this
.
storeList
[
index
].
frequency
=
this
.
storeList
[
index
].
frequency
+
1
if
(
this
.
storeList
[
index
].
frequency
<
this
.
storeList
[
index
].
list
.
length
)
{
last
.
index
=
this
.
storeList
[
index
].
list
[
this
.
storeList
[
index
].
frequency
]
...
...
@@ -213,7 +214,7 @@ export default {
}
// 判断tableList中location和search相同的元素个数
this
.
tableList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
location
.
toUpperCase
()
===
search
.
toUpperCase
(
))
{
if
(
customUpperCase
(
item
.
location
)
===
customUpperCase
(
search
))
{
obj
.
list
.
push
(
index
)
}
})
...
...
src/views/setup/enterbound.vue
View file @
cda88459
...
...
@@ -92,13 +92,13 @@
<
script
>
import
manufacturer
from
"@/data/jsonData"
;
import
{
batchAddIncomeWmsBox
,
checkIsZero
,
getJcCode
,
queryPass
batchAddIncomeWmsBox
,
checkIsZero
,
getJcCode
}
from
'@/api/incomeWmsBox'
import
{
findByLocation
,
updateIncomeWmsLabel
}
from
'@/api/incomeWmsLabel'
import
{
findByLocation
}
from
'@/api/incomeWmsLabel'
import
{
getInfo
}
from
'@/api/login'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
playAudio
,
successAudio
}
from
'@/utils/common'
import
{
customUpperCase
}
from
"@/utils/common"
;
export
default
{
name
:
'EnterBound'
,
data
()
{
...
...
@@ -153,6 +153,7 @@ export default {
this
.
queryForm
.
cj
=
this
.
manufacturer
[
0
].
value
},
methods
:
{
customUpperCase
,
/**
* @description: 获取数据字典
* @author: gaoyu
...
...
@@ -458,7 +459,7 @@ export default {
// this.incomeWmsBoxList.pn = values[1]
if
(
obj
.
labelId
!==
null
&&
obj
.
labelId
!==
''
&&
obj
.
labelId
!==
undefined
)
{
if
(
this
.
incomeWmsLabelList
.
pn
&&
this
.
incomeWmsLabelList
.
pn
!==
''
&&
this
.
incomeWmsLabelList
.
pn
!==
undefined
)
{
if
(
obj
.
pn
.
toUpperCase
()
!==
this
.
incomeWmsLabelList
.
pn
.
toUpperCase
(
))
{
if
(
customUpperCase
(
obj
.
pn
)
!==
customUpperCase
(
this
.
incomeWmsLabelList
.
pn
))
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入的pn值:'
+
obj
.
pn
+
'与数据库中pn值:'
+
this
.
incomeWmsLabelList
.
pn
+
'不匹配,请重新输入'
,
...
...
@@ -472,12 +473,12 @@ export default {
}
else
{
let
isLegalLot
=
false
this
.
enterTable
.
forEach
(
item
=>
{
if
(
item
.
lot
.
toUpperCase
()
===
obj
.
lot
.
toUpperCase
(
)
)
{
if
(
customUpperCase
(
item
.
lot
)
===
customUpperCase
(
obj
.
lot
)
)
{
isLegalLot
=
true
}
})
if
(
isLegalLot
)
{
if
(
this
.
enterTable
[
0
].
pn
.
toUpperCase
()
===
obj
.
pn
.
toUpperCase
(
))
{
if
(
customUpperCase
(
this
.
enterTable
[
0
].
pn
)
===
customUpperCase
(
obj
.
pn
))
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeWmsBoxList
.
pn
=
obj
.
pn
...
...
@@ -501,7 +502,7 @@ export default {
if
(
res
.
code
===
200
)
{
if
(
res
.
data
)
{
if
(
this
.
enterTable
.
length
>
0
)
{
if
(
this
.
enterTable
[
0
].
pn
.
toUpperCase
()
===
obj
.
pn
.
toUpperCase
(
))
{
if
(
customUpperCase
(
this
.
enterTable
[
0
].
pn
)
===
customUpperCase
(
obj
.
pn
))
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeWmsBoxList
.
pn
=
obj
.
pn
...
...
@@ -549,12 +550,12 @@ export default {
if
(
res
.
data
!=
null
)
{
let
isLegalLot
=
false
this
.
enterTable
.
forEach
(
item
=>
{
if
(
item
.
lot
.
toUpperCase
()
===
obj
.
lot
.
toUpperCase
(
)
)
{
if
(
customUpperCase
(
item
.
lot
)
===
customUpperCase
(
obj
.
lot
)
)
{
isLegalLot
=
true
}
})
if
(
isLegalLot
)
{
if
(
this
.
enterTable
[
0
].
pn
.
toUpperCase
()
===
obj
.
pn
.
toUpperCase
(
))
{
if
(
customUpperCase
(
this
.
enterTable
[
0
].
pn
)
===
customUpperCase
(
obj
.
pn
))
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeWmsBoxList
.
pn
=
obj
.
pn
...
...
@@ -578,7 +579,7 @@ export default {
if
(
res
.
code
===
200
)
{
if
(
res
.
data
)
{
if
(
this
.
enterTable
.
length
>
0
)
{
if
(
this
.
enterTable
[
0
].
pn
.
toUpperCase
()
===
obj
.
pn
.
toUpperCase
(
)
)
{
if
(
customUpperCase
(
this
.
enterTable
[
0
].
pn
)
===
customUpperCase
(
obj
.
pn
)
)
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeWmsBoxList
.
pn
=
obj
.
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