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
ef9935cb
authored
Jun 09, 2025
by
liangjianmin
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化过滤器逻辑,使用箭头函数简化代码,提高可读性
parent
b0447f70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
pages/arrivalRegister/index.vue
pages/arrivalRegister/index.vue
View file @
ef9935cb
...
@@ -777,9 +777,9 @@
...
@@ -777,9 +777,9 @@
filterChange
(
index
)
{
filterChange
(
index
)
{
this
.
$set
(
this
.
filter_list
,
index
,
(
this
.
filter_list
[
index
]
=
!
this
.
filter_list
[
index
]));
this
.
$set
(
this
.
filter_list
,
index
,
(
this
.
filter_list
[
index
]
=
!
this
.
filter_list
[
index
]));
let
filter_arr
=
this
.
findIndex
(
this
.
filter_list
,
true
);
let
filter_arr
=
this
.
findIndex
(
this
.
filter_list
,
true
);
this
.
filter_id
=
filter_arr
.
map
(
i
=>
this
.
list
[
i
]
.
stock_in_id
);
this
.
filter_id
=
filter_arr
.
map
(
i
tem
=>
item
.
stock_in_id
);
this
.
filter_id_warehouse_id
=
filter_arr
.
map
(
i
=>
this
.
list
[
i
]
.
warehouse_id
);
this
.
filter_id_warehouse_id
=
filter_arr
.
map
(
i
tem
=>
item
.
warehouse_id
);
this
.
filter_id_stock_in_sn
=
filter_arr
.
map
(
i
=>
this
.
list
[
i
]
.
stock_in_sn
);
this
.
filter_id_stock_in_sn
=
filter_arr
.
map
(
i
tem
=>
item
.
stock_in_sn
);
},
},
/**
/**
* 全选
* 全选
...
@@ -788,9 +788,9 @@
...
@@ -788,9 +788,9 @@
this
.
all_flag
=
!
this
.
all_flag
;
this
.
all_flag
=
!
this
.
all_flag
;
this
.
filter_list
=
createArray
(
this
.
list
.
length
,
this
.
all_flag
);
this
.
filter_list
=
createArray
(
this
.
list
.
length
,
this
.
all_flag
);
if
(
this
.
all_flag
)
{
if
(
this
.
all_flag
)
{
this
.
filter_id
=
this
.
list
.
map
(
function
(
item
)
{
this
.
filter_id
=
this
.
list
.
map
(
item
=>
item
.
stock_in_id
);
return
item
.
stock_in_id
;
this
.
filter_id_warehouse_id
=
this
.
list
.
map
(
item
=>
item
.
warehouse_id
)
;
}
);
this
.
filter_id_stock_in_sn
=
this
.
list
.
map
(
item
=>
item
.
stock_in_sn
);
}
else
{
}
else
{
this
.
filter_id
=
[];
this
.
filter_id
=
[];
}
}
...
@@ -1160,7 +1160,6 @@
...
@@ -1160,7 +1160,6 @@
});
});
return
false
;
return
false
;
}
}
//深圳自营仓 + 寄售仓
//深圳自营仓 + 寄售仓
if
(
this
.
filter_id_warehouse_id
[
0
]
==
9
||
this
.
filter_id_warehouse_id
[
0
]
==
16
)
{
if
(
this
.
filter_id_warehouse_id
[
0
]
==
9
||
this
.
filter_id_warehouse_id
[
0
]
==
16
)
{
//先判断一下自营货品信息判断是否是第一次入库
//先判断一下自营货品信息判断是否是第一次入库
...
...
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