Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pda-scan
Project
Project
Details
Activity
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
ximai
mes-pda-scan
Commits
51e81212
Commit
51e81212
authored
Jul 27, 2025
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫码到货数量重复计划BUG修复
parent
a61fb8b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
Main.vue
pages/dhd/Main.vue
+3
-3
scanning.vue
pages/dhd/scanning.vue
+9
-1
No files found.
pages/dhd/Main.vue
View file @
51e81212
...
...
@@ -140,12 +140,12 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
// 接收扫码页面返回的数据
updateGoodsList
(
newGoodsList
)
{
if
(
newGoodsList
&&
newGoodsList
.
length
>
0
)
{
//
合并新的扫码数据到现有列表
//
智能合并数据,避免重复累加
newGoodsList
.
forEach
(
newItem
=>
{
const
existingIndex
=
this
.
goodsList
.
findIndex
(
item
=>
item
.
joinlabel
===
newItem
.
joinlabel
);
if
(
existingIndex
>
-
1
)
{
// 如果已存在,
更新数量
this
.
goodsList
[
existingIndex
].
arrivalQuantity
=
Number
(
this
.
goodsList
[
existingIndex
].
arrivalQuantity
)
+
Number
(
newItem
.
arrivalQuantity
);
// 如果已存在,
直接替换数量(因为scanning页面已经处理了累加逻辑)
this
.
goodsList
[
existingIndex
].
arrivalQuantity
=
Number
(
newItem
.
arrivalQuantity
);
}
else
{
// 如果不存在,添加新项
this
.
goodsList
.
push
(
newItem
);
...
...
pages/dhd/scanning.vue
View file @
51e81212
...
...
@@ -68,6 +68,14 @@ export default {
this
.
isFocus
=
true
;
});
},
onLoad
(
options
)
{
// 接收主页面传递的数据
const
pages
=
getCurrentPages
();
const
prevPage
=
pages
[
pages
.
length
-
2
];
if
(
prevPage
&&
prevPage
.
$vm
&&
prevPage
.
$vm
.
goodsList
)
{
this
.
goodsList
=
[...
prevPage
.
$vm
.
goodsList
];
}
},
methods
:
{
focus
(){
this
.
$nextTick
(()
=>
{
...
...
@@ -81,7 +89,7 @@ export default {
this
.
$nextTick
(()
=>
{
setTimeout
(()
=>
{
this
.
isFocus
=
true
;
},
1
00
);
},
5
00
);
});
},
getBtnHandle
(
row
)
{
...
...
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