Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangzhonghua
/
BoneHouse_Business_APP
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
22bcd25a
authored
Oct 26, 2021
by
peii
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
过滤修改
parent
d3540216
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
app/containers/selfOrder/module/ChooseProductPage.js
app/containers/selfOrder/module/ChooseProductPage.js
View file @
22bcd25a
...
...
@@ -722,7 +722,7 @@ class ChooseProductPage extends Component {
rightNameFilter
(
list
=
[],
isChildFilter
=
false
)
{
if
(
isBlank
(
list
))
return
[]
const
{
searchValue
,
authorizations
,
productAuthorization
,
topActiveIndex
,
topProcOptionList
,
leftActiveIndex
,
defaultThridShow
}
=
this
.
state
const
{
searchValue
,
authorizations
,
productAuthorization
,
topActiveIndex
,
topProcOptionList
}
=
this
.
state
if
(
productAuthorization
===
'Y'
)
{
const
curSupplier
=
topProcOptionList
[
topActiveIndex
]
const
auth
=
R
.
find
(
R
.
propEq
(
'supplier_code'
,
curSupplier
.
supplier_code
))(
authorizations
)
...
...
@@ -738,18 +738,15 @@ class ChooseProductPage extends Component {
}
if
(
isBlank
(
searchValue
))
return
list
const
reg
=
new
RegExp
(
searchValue
,
'g'
)
const
keys
=
[
'general_name'
,
'item_name'
,
'specification'
,
'manufacturer_product_code'
,
'initials_pinyin'
,
'serial_number'
,
'category_name'
]
const
includes
=
item
=>
{
const
preds
=
R
.
compose
(
R
.
map
(
val
=>
R
.
test
(
R
.
__
,
val
)),
R
.
map
(
val
=>
R
.
includes
(
R
.
__
,
val
)),
R
.
filter
(
isNotBlank
),
R
.
map
(
key
=>
item
[
key
])
)(
keys
)
return
R
.
anyPass
(
preds
)(
reg
)
return
R
.
anyPass
(
preds
)(
searchValue
)
}
return
R
.
filter
(
includes
,
list
)
...
...
@@ -875,7 +872,6 @@ class ChooseProductPage extends Component {
superReduceBack
=
{()
=>
this
.
handleSubSelected
()}
superLeftData
=
{
curSuperLeftOption
}
rightNameFilter
=
{
this
.
rightNameFilter
.
bind
(
this
)}
inputSearchValue
=
{
this
.
inputSearchValue
.
bind
(
this
)}
/
>
<
/View
>
)
...
...
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