Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiangyang-PDA
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
xujian
xiangyang-PDA
Commits
1184bd1a
Commit
1184bd1a
authored
Apr 07, 2026
by
wangwenjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
高亮
parent
909d8df0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
index.vue
src/views/ManualOperation/ScanResults/index.vue
+10
-6
No files found.
src/views/ManualOperation/ScanResults/index.vue
View file @
1184bd1a
...
...
@@ -70,7 +70,7 @@
v-for=
"(item, index) in currentPageList"
:key=
"item.BrandId || index"
:class=
"{
'selected-item':
fieldValue && item.boxBarProductLineDeviceCode === fieldValue
,
'selected-item':
isSelectedItem(item)
,
'scanned-item': isScannedItem(item)
}"
>
...
...
@@ -173,16 +173,16 @@ export default {
if
(
!
this
.
data
.
childrenList
||
this
.
data
.
childrenList
.
length
===
0
)
{
return
[{
text
:
"暂无机台号"
}];
// 兜底提示,避免选择器为空
}
// 过滤掉 boxBarProductLineDevice
Cod
e 为空/undefined 的项,再去重
// 过滤掉 boxBarProductLineDevice
Nam
e 为空/undefined 的项,再去重
const
numList
=
this
.
data
.
childrenList
.
map
(
item
=>
item
.
boxBarProductLineDeviceName
)
.
filter
(
code
=>
code
&&
cod
e
.
trim
()
!==
""
);
// 过滤空值
.
filter
(
name
=>
name
&&
nam
e
.
trim
()
!==
""
);
// 过滤空值
const
uniqueNums
=
Array
.
from
(
new
Set
(
numList
));
// 去重后仍为空,返回兜底提示
if
(
uniqueNums
.
length
===
0
)
{
return
[{
text
:
"暂无机台号"
}];
}
return
uniqueNums
.
map
(
code
=>
({
text
:
cod
e
}));
return
uniqueNums
.
map
(
name
=>
({
text
:
nam
e
}));
},
// 总页数
totalPages
()
{
...
...
@@ -260,7 +260,7 @@ export default {
// 格式化条码:截取后10位,前面拼接...
formatQrCode
(
qrCode
)
{
if
(
!
qrCode
)
return
""
;
// 截取后
10
位,前面拼接...
// 截取后
4
位,前面拼接...
return
`...
${
qrCode
.
slice
(
-
4
)}
`
;
},
// 扫码确认:校验并标记状态
...
...
@@ -300,6 +300,10 @@ export default {
Notify
({
type
:
'warning'
,
message
:
'条码已扫描'
});
}
},
// 新增:判断是否属于选中机台号的条码
isSelectedItem
(
item
)
{
return
this
.
fieldValue
&&
item
.
boxBarProductLineDeviceName
===
this
.
fieldValue
;
},
// 判断是否高亮:条码是否在已扫描列表中
isScannedItem
(
item
)
{
return
this
.
scannedCodes
.
includes
(
item
.
qrCode
);
...
...
@@ -496,4 +500,4 @@ export default {
.query-btns
{
bottom
:
1.2rem
;
}
</
style
>
</
style
>
\ No newline at end of file
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