Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsApp
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e25d2ff3
authored
May 30, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
打包箱号不能重复
parent
45a6858f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
pages/stockRecheck/sort.vue
pages/stockRecheck/sort.vue
View file @
e25d2ff3
...
...
@@ -1355,6 +1355,17 @@
return
false
;
}
// 使用 Set 和 Array.prototype.map() 来获取所有 box_name 的集合
const
boxNames
=
new
Set
(
this
.
packList
.
map
(
item
=>
item
.
box_name
));
// 如果 Set 的大小不等于原始数组长度,则表示有重复的 box_name
if
(
boxNames
.
size
!==
this
.
packList
.
length
)
{
uni
.
showToast
({
title
:
'打包箱号不能重复'
,
icon
:
'none'
});
return
false
;
}
this
.
request
(
API
.
updatePackInfo
,
'POST'
,
parmas
,
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
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