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
ffe3a3cb
Commit
ffe3a3cb
authored
Sep 06, 2025
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫码到货供应商唯一性验证修复
parent
c5797f81
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
8 deletions
+33
-8
pages.json
pages.json
+7
-0
Main.vue
pages/dhd/Main.vue
+16
-8
scanning.vue
pages/dhd/scanning.vue
+10
-0
No files found.
pages.json
View file @
ffe3a3cb
...
...
@@ -212,6 +212,13 @@
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/dhd/scanning"
,
"style"
:
{
"navigationBarTitleText"
:
"扫码到货"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/saleck/Main"
,
"style"
:
{
...
...
pages/dhd/Main.vue
View file @
ffe3a3cb
...
...
@@ -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
);
...
...
@@ -152,19 +161,18 @@ 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
;
}
// 更新供应商信息(只有在验证通过后才更新)
if
(
newSupplierNo
&&
!
currentSupplierNo
)
{
this
.
daohuoForm
.
supplierNo
=
newSupplierNo
;
}
}
},
deleGonds
(
idx
)
{
this
.
goodsList
.
splice
(
idx
,
1
);
// 如果删除了所有商品,清空供应商信息
if
(
this
.
goodsList
.
length
===
0
)
{
this
.
daohuoForm
.
supplierNo
=
''
;
}
},
goSubmit
(){
if
(
!
this
.
goodsList
.
length
)
return
;
...
...
pages/dhd/scanning.vue
View file @
ffe3a3cb
...
...
@@ -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