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
163cd886
authored
Oct 25, 2021
by
peii
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加支持客户销售员可自助下单
parent
3a87b630
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
8 deletions
app/containers/selfOrder/module/ChooseProductPage.js
app/containers/selfOrder/module/ProductRightStyle.js
app/containers/selfOrder/module/ChooseProductPage.js
View file @
163cd886
...
...
@@ -9,7 +9,7 @@ import ProductRightStyle from './ProductRightStyle';
import
ProductModel
from
'../../common/ProductModel'
;
import
StatusBarView
from
'../../common/StatusBarView'
;
import
ChooseCardList
from
'../../common/listDataComponent/ChooseCardList'
;
import
{
cloneObject
,
show
,
isNotBlank
}
from
'../../../utils/Utils'
;
import
{
cloneObject
,
show
,
isNotBlank
,
isBlank
}
from
'../../../utils/Utils'
;
import
{
reqPurSupplierSearch
,
reqProCategorySearch
,
reqSurTempHeadSearch
,
reqNailEquipHeadSearch
,
reqScatEquipmentSearch
,
reqSingleConsumSearch
,
setSelectProductOpts
}
from
'../../../action/SelfAction'
;
import
LoadingModel
from
'../../common/listDataComponent/LoadingModel'
;
import
LocalVariable
from
'../../common/LocalVariable'
;
...
...
@@ -114,6 +114,8 @@ class ChooseProductPage extends Component {
const
filterSuppliers
=
R
.
pluck
(
'supplier_code'
,
authorizations
)
if
(
isNotBlank
(
filterSuppliers
))
{
list
=
R
.
filter
(
R
.
propSatisfies
(
R
.
includes
(
R
.
__
,
filterSuppliers
),
'supplier_code'
))(
local_sele_pro_options
)
}
else
{
list
=
[]
}
}
...
...
@@ -122,7 +124,9 @@ class ChooseProductPage extends Component {
topProcOptionList
:
list
,
originManufacterList
:
local_sele_pro_options
},
()
=>
{
that
.
handleTopNav
(
list
[
0
],
0
)
if
(
isNotBlank
(
list
))
{
that
.
handleTopNav
(
list
[
0
],
0
)
}
})
return
}
...
...
@@ -158,6 +162,8 @@ class ChooseProductPage extends Component {
const
filterSuppliers
=
R
.
pluck
(
'supplier_code'
,
authorizations
)
if
(
isNotBlank
(
filterSuppliers
))
{
list
=
R
.
filter
(
R
.
propSatisfies
(
R
.
includes
(
R
.
__
,
filterSuppliers
),
'supplier_code'
))(
topProcOptionList
)
}
else
{
list
=
[]
}
}
...
...
@@ -166,7 +172,9 @@ class ChooseProductPage extends Component {
originManufacterList
:
topProcOptionList
,
},
()
=>
{
that
.
refs
.
LoadingModel
.
hide
()
that
.
handleTopNav
(
topProcOptionList
[
0
],
0
)
if
(
isNotBlank
(
list
))
{
that
.
handleTopNav
(
list
[
0
],
0
)
}
})
}
else
{
this
.
refs
.
LoadingModel
.
hide
()
...
...
@@ -688,6 +696,8 @@ class ChooseProductPage extends Component {
if
(
isNotBlank
(
auth
)
&&
isNotBlank
(
auth
.
product_line_category_list
))
{
const
typeCodes
=
R
.
pluck
(
'product_line_category_name'
,
auth
.
product_line_category_list
)
list
=
R
.
filter
(
R
.
propSatisfies
(
R
.
includes
(
R
.
__
,
typeCodes
),
'surgery_type'
))(
list
)
}
else
{
list
=
[]
}
}
...
...
@@ -709,22 +719,42 @@ class ChooseProductPage extends Component {
* @return {*}
*/
rightNameFilter
(
list
=
[])
{
const
{
searchValue
,
authorizations
,
productAuthorization
,
topActiveIndex
,
topProcOptionList
,
leftActiveIndex
}
=
this
.
state
if
(
isBlank
(
list
))
return
[]
if
(
productAuthorization
===
'Y'
&&
R
.
includes
(
leftActiveIndex
,
[
1
,
2
,
3
]))
{
const
{
searchValue
,
authorizations
,
productAuthorization
,
topActiveIndex
,
topProcOptionList
,
leftActiveIndex
}
=
this
.
state
if
(
productAuthorization
===
'Y'
)
{
const
curSupplier
=
topProcOptionList
[
topActiveIndex
]
const
auth
=
R
.
find
(
R
.
propEq
(
'supplier_code'
,
curSupplier
.
supplier_code
))(
authorizations
)
if
(
isNotBlank
(
auth
)
&&
isNotBlank
(
auth
.
product_line_category_list
))
{
const
typeCodes
=
R
.
pluck
(
'product_line_category_code'
,
auth
.
product_line_category_list
)
list
=
R
.
filter
(
R
.
propSatisfies
(
R
.
includes
(
R
.
__
,
typeCodes
),
'product_line_category_code'
))(
list
)
if
(
R
.
compose
(
R
.
isNil
,
R
.
path
([
0
,
'details'
]))(
list
))
{
list
=
R
.
filter
(
R
.
propSatisfies
(
R
.
includes
(
R
.
__
,
typeCodes
),
'product_line_category_code'
))(
list
)
}
else
{
R
.
map
(
item
=>
{
if
(
isBlank
(
item
.
details
))
return
item
.
details
=
R
.
filter
(
R
.
propSatisfies
(
R
.
includes
(
R
.
__
,
typeCodes
),
'product_line_category_code'
))(
item
.
details
)
})(
list
)
}
}
else
{
list
=
[]
}
}
const
includes
=
item
=>
{
const
reg
=
new
RegExp
(
searchValue
,
'g'
)
return
R
.
test
(
reg
,
item
.
general_name
)
||
R
.
test
(
reg
,
item
.
item_name
)
}
return
R
.
filter
(
includes
,
list
)
// if (R.compose(R.isNil, R.path([0, 'details']))(list)) {
// return R.filter(includes, list)
// } else {
// R.map(item => {
// if (isBlank(item.details)) return
// item.display_details = R.filter(includes, item.details)
// })(list)
// return list
// }
}
// 返回搜索元素
...
...
app/containers/selfOrder/module/ProductRightStyle.js
View file @
163cd886
import
React
,
{
Component
}
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
,
Image
,
ScrollView
,
FlatList
,
SafeAreaView
}
from
'react-native'
;
import
*
as
R
from
"ramda"
;
import
{
third_text_color
,
foundation_color
,
second_text_size
,
Width
,
pxSize
,
font_family_regular
,
icon_style
}
from
'../../../base/BaseStyle'
;
import
PicTitDetaiCalcu
from
'../../common/listDataComponent/PicTitDetaiCalcu'
;
import
{
cloneObject
}
from
'../../../utils/Utils'
;
...
...
@@ -160,7 +161,7 @@ class ProductRightStyle extends Component {
let
that
=
this
if
(
show
&&
superItem
)
{
// 大类点击标题
let
curRowData
=
cloneObject
(
superItem
[
'details'
])
let
curRowData
=
R
.
clone
(
superItem
[
'details'
])
curThridObj
=
{
superItem
:
superItem
,
superIndex
:
superIndex
,
...
...
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