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
3bfce9c3
Commit
3bfce9c3
authored
Sep 06, 2025
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫码到货供应商唯一性验证修复
parent
755018cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
Main.vue
pages/dhd/Main.vue
+9
-3
scanning.vue
pages/dhd/scanning.vue
+10
-0
No files found.
pages/dhd/Main.vue
View file @
3bfce9c3
...
...
@@ -140,6 +140,15 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
// 接收扫码页面返回的数据
updateGoodsList
(
newGoodsList
)
{
if
(
newGoodsList
&&
newGoodsList
.
length
>
0
)
{
// 先验证供应商是否一致
if
(
this
.
goodsList
.
length
>
0
&&
newGoodsList
[
0
]
&&
newGoodsList
[
0
].
supplierNo
)
{
const
currentSupplier
=
this
.
goodsList
[
0
].
supplierNo
;
if
(
currentSupplier
&&
currentSupplier
!==
newGoodsList
[
0
].
supplierNo
)
{
this
.
$u
.
toast
(
i18n
.
t
(
'一个到货单无法录入两个供应商订单'
));
return
;
}
}
// 智能合并数据,避免重复累加
newGoodsList
.
forEach
(
newItem
=>
{
const
existingIndex
=
this
.
goodsList
.
findIndex
(
item
=>
item
.
joinlabel
===
newItem
.
joinlabel
);
...
...
@@ -156,9 +165,6 @@ import BottomBtn from "@/components/BottomBtn/index.vue";
if
(
newGoodsList
[
0
]
&&
newGoodsList
[
0
].
supplierNo
)
{
if
(
!
this
.
daohuoForm
.
supplierNo
)
{
this
.
daohuoForm
.
supplierNo
=
newGoodsList
[
0
].
supplierNo
;
}
else
if
(
this
.
daohuoForm
.
supplierNo
!==
newGoodsList
[
0
].
supplierNo
)
{
this
.
$u
.
toast
(
i18n
.
t
(
'一个到货单无法录入两个供应商订单'
));
return
;
}
}
}
...
...
pages/dhd/scanning.vue
View file @
3bfce9c3
...
...
@@ -115,6 +115,16 @@ export default {
if
(
index
>
-
1
)
{
this
.
goodsList
[
index
][
'arrivalQuantity'
]
=
Number
(
this
.
goodsList
[
index
][
'arrivalQuantity'
])
+
Number
(
arr
[
5
])
}
else
{
// 检查供应商是否一致
if
(
this
.
goodsList
.
length
>
0
)
{
const
firstSupplier
=
this
.
goodsList
[
0
].
supplierNo
;
if
(
firstSupplier
&&
firstSupplier
!==
arr
[
0
])
{
this
.
$u
.
toast
(
i18n
.
t
(
'一个到货单无法录入两个供应商订单'
));
this
.
input
=
''
;
return
;
}
}
const
data1
=
await
this
.
$u
.
api
.
getforinvmbinfo
({
mb001
:
arr
[
4
]
...
...
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