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
74185580
authored
May 18, 2021
by
wong.peiyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
自助下单过滤、消耗确认过滤已消耗订单、ios上传图片加文件名
parent
ef444ba0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
431 additions
and
33 deletions
app/base/BaseStyle.js
app/containers/common/listDataComponent/ChooseCardList.js
app/containers/equipConsu/EquipConsuPage.js
app/containers/selfOrder/SelfOrderPage.js
app/containers/selfOrder/module/ChooseFilter.js
app/containers/selfOrder/module/ChooseProductPage.js
app/containers/transOrder/TransOrderPage.js
app/base/BaseStyle.js
View file @
74185580
...
@@ -87,7 +87,7 @@ export const list_common_item = {
...
@@ -87,7 +87,7 @@ export const list_common_item = {
color
:
first_text_color
,
color
:
first_text_color
,
fontFamily
:
font_family_regular
fontFamily
:
font_family_regular
// fontWeight: 'bold'
// fontWeight: 'bold'
},
},
rema_Input_outer
:
{
rema_Input_outer
:
{
height
:
120
,
height
:
120
,
alignItems
:
'center'
,
alignItems
:
'center'
,
...
@@ -432,10 +432,10 @@ export const list_common_item = {
...
@@ -432,10 +432,10 @@ export const list_common_item = {
ser_text_input
:
{
ser_text_input
:
{
backgroundColor
:
'#F5F5F5'
,
backgroundColor
:
'#F5F5F5'
,
height
:
38
,
height
:
38
,
lineHeight
:
16
,
lineHeight
:
20
,
paddingLeft
:
34
,
paddingLeft
:
34
,
borderRadius
:
10
,
borderRadius
:
10
,
fontSize
:
14
,
fontSize
:
14
,
fontFamily
:
font_family_regular
fontFamily
:
font_family_regular
},
},
}
}
\ No newline at end of file
app/containers/common/listDataComponent/ChooseCardList.js
View file @
74185580
...
@@ -90,10 +90,13 @@ class ChooseCardList extends Component {
...
@@ -90,10 +90,13 @@ class ChooseCardList extends Component {
resizeMode
=
"center"
/>
:
<
Image
source
=
{
cur_icon
}
style
=
{
icon_style
}
resizeMode
=
"cover"
/>
resizeMode
=
"center"
/>
:
<
Image
source
=
{
cur_icon
}
style
=
{
icon_style
}
resizeMode
=
"cover"
/>
}
}
<
/View> : null
}
<
/View> : null
}
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
list_item_tit
,
cardStyleItemTit
,
cur_icon
?
''
:
cardStyleNotIconTit
,
index
==
curActIndex
?
[
styles
.
list_tit_act
,
cardStyleItemTitAct
]
:
''
]}
>
{
{
item
[
cardItemTitle
]}
cardItemTitle
&&
{(
item
[
cardCountName
]
&&
countStyleType
[
0
]
===
cardStyleType
)
?
<
Text
style
=
{[
styles
.
sum_def
,
cardCouStyle
]}
>
({
item
[
cardCountName
]})
<
/Text> : null
}
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
list_item_tit
,
cardStyleItemTit
,
cur_icon
?
''
:
cardStyleNotIconTit
,
index
==
curActIndex
?
[
styles
.
list_tit_act
,
cardStyleItemTitAct
]
:
''
]}
>
<
/Text
>
{
item
[
cardItemTitle
]}
{(
item
[
cardCountName
]
&&
countStyleType
[
0
]
===
cardStyleType
)
?
<
Text
style
=
{[
styles
.
sum_def
,
cardCouStyle
]}
>
({
item
[
cardCountName
]})
<
/Text> : null
}
<
/Text
>
}
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
{(
item
[
cardCountName
]
&&
countStyleType
[
1
]
===
cardStyleType
)
?
<
View
style
=
{[
styles
.
card_def_count
,
cardCouStyle
]}
>
{(
item
[
cardCountName
]
&&
countStyleType
[
1
]
===
cardStyleType
)
?
<
View
style
=
{[
styles
.
card_def_count
,
cardCouStyle
]}
>
...
@@ -177,4 +180,4 @@ const mapDispatchToProps = (dispatch) => {
...
@@ -177,4 +180,4 @@ const mapDispatchToProps = (dispatch) => {
}
}
}
}
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
ChooseCardList
);
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
ChooseCardList
);
\ No newline at end of file
app/containers/equipConsu/EquipConsuPage.js
View file @
74185580
...
@@ -768,7 +768,8 @@ class EquipConsuPage extends Component {
...
@@ -768,7 +768,8 @@ class EquipConsuPage extends Component {
access_token
:
props
.
token
,
access_token
:
props
.
token
,
org_code
:
state
.
listOptionData
[
1
].
value
,
org_code
:
state
.
listOptionData
[
1
].
value
,
customer_code
:
state
.
listOptionData
[
2
].
value
,
customer_code
:
state
.
listOptionData
[
2
].
value
,
collect_header_status
:
'RETURNED,COLLECTED'
collect_header_status
:
'RETURNED,COLLECTED'
,
filter_none_flag
:
'Y'
,
}
}
if
(
OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY
>
0
)
{
if
(
OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY
>
0
)
{
params
.
department_code
=
state
.
listOptionData
[
15
].
value
params
.
department_code
=
state
.
listOptionData
[
15
].
value
...
@@ -787,7 +788,8 @@ class EquipConsuPage extends Component {
...
@@ -787,7 +788,8 @@ class EquipConsuPage extends Component {
access_token
:
props
.
token
,
access_token
:
props
.
token
,
org_code
:
state
.
listOptionData
[
1
].
value
,
org_code
:
state
.
listOptionData
[
1
].
value
,
customer_code
:
state
.
listOptionData
[
2
].
value
,
customer_code
:
state
.
listOptionData
[
2
].
value
,
collect_header_status
:
'RETURNED,COLLECTED'
collect_header_status
:
'RETURNED,COLLECTED'
,
filter_none_flag
:
'Y'
,
}
}
if
(
OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY
>
0
&&
!!
state
.
listOptionData
[
15
].
value
)
{
if
(
OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY
>
0
&&
!!
state
.
listOptionData
[
15
].
value
)
{
params
.
department_code
=
state
.
listOptionData
[
15
].
value
params
.
department_code
=
state
.
listOptionData
[
15
].
value
...
...
app/containers/selfOrder/SelfOrderPage.js
View file @
74185580
...
@@ -1389,6 +1389,9 @@ class SelfOrderPage extends Component {
...
@@ -1389,6 +1389,9 @@ class SelfOrderPage extends Component {
source
=
res
.
uri
;
source
=
res
.
uri
;
}
else
{
}
else
{
source
=
res
.
uri
.
replace
(
'file://'
,
''
);
source
=
res
.
uri
.
replace
(
'file://'
,
''
);
if
(
!
res
.
fileName
)
{
res
.
fileName
=
new
Date
().
getTime
()
+
'.HEIC'
}
}
}
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
let
file
=
{
uri
:
source
,
type
:
'multipart/form-data'
,
name
:
res
.
fileName
};
let
file
=
{
uri
:
source
,
type
:
'multipart/form-data'
,
name
:
res
.
fileName
};
...
...
app/containers/selfOrder/module/ChooseFilter.js
0 → 100644
View file @
74185580
/*
* @FilePath: /BoneHouse_Business_APP/app/containers/selfOrder/module/ChooseFilter.js
* @Author: peii
* @Date: 2021-05-18 11:07:03
* @Vision: 1.0
* @Description:
*
* @Revision:
*
*/
import
React
,
{
Component
}
from
'react'
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
,
Image
,
TextInput
,
SafeAreaView
,
ScrollView
,
}
from
'react-native'
import
*
as
R
from
'ramda'
import
{
foundation_color
,
home_background_color
,
Width
,
Height
,
third_text_size
,
pxSize
,
promary_color
,
safe_view
,
font_family_regular
,
icon_style
,
title_text_color
,
font_family_medium
,
list_common_item
,
point_color
,
second_text_size
,
second_text_color
,
first_text_color
,
}
from
'../../../base/BaseStyle'
const
PropTypes
=
require
(
'prop-types'
)
export
default
class
ChoolseFilter
extends
Component
{
static
propTypes
=
{
filterData
:
PropTypes
.
arrayOf
(
PropTypes
.
any
).
isRequired
,
onCallback
:
PropTypes
.
func
.
isRequired
,
}
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
visible
:
false
,
}
}
render
()
{
const
{
visible
}
=
this
.
state
const
{
filterData
,
onCallback
}
=
this
.
props
return
(
<
View
style
=
{
styles
.
filterBar
}
>
<
View
style
=
{
styles
.
filterBarTitle
}
>
<
TouchableOpacity
style
=
{
styles
.
filterBtn
}
activeOpacity
=
{
0.8
}
onPress
=
{()
=>
{
this
.
setState
({
visible
:
!
visible
})
}}
>
<
Text
style
=
{
styles
.
filterBtnText
}
>
筛选
<
/Text
>
<
Image
source
=
{
require
(
'../../../images/arr_bom.png'
)}
style
=
{[
icon_style
,
styles
.
btnIcon
]}
/
>
<
/TouchableOpacity
>
{
filterData
&&
R
.
compose
(
R
.
map
(
filter
=>
{
return
<
Text
style
=
{
styles
.
filterSelect
}
>
{
filter
.
value
}
<
/Text
>
}),
R
.
filter
(
R
.
prop
(
'value'
)),
)(
filterData
)}
<
/View
>
{
visible
&&
(
<
View
style
=
{
styles
.
searchModal
}
visible
=
{
visible
}
animationType
=
"slide"
transparent
=
{
true
}
>
<
TouchableOpacity
style
=
{
styles
.
mask
}
onPress
=
{()
=>
{
this
.
setState
({
visible
:
!
visible
})
}}
><
/TouchableOpacity
>
<
View
style
=
{
styles
.
searchContent
}
>
<
ScrollView
style
=
{
styles
.
scrollView
}
>
{
filterData
&&
filterData
.
map
(
item
=>
{
return
(
<
View
key
=
{
item
.
field
}
>
<
Text
style
=
{
styles
.
searchLabel
}
>
{
item
.
label
}
<
/Text
>
{
item
.
type
===
'select'
?
(
<
View
style
=
{
styles
.
optionsBox
}
>
{
!!
item
.
options
&&
item
.
options
.
map
(
option
=>
{
return
(
<
TouchableOpacity
key
=
{
option
.
value
}
style
=
{
item
.
value
===
option
.
value
?
[
styles
.
optionItem
,
styles
.
optionItemActive
]
:
styles
.
optionItem
}
activeOpacity
=
{
0.8
}
onPress
=
{()
=>
{
if
(
item
.
value
===
option
.
value
)
{
onCallback
&&
onCallback
(
item
.
field
,
''
)
}
else
{
onCallback
&&
onCallback
(
item
.
field
,
option
.
value
)
}
}}
>
<
Text
style
=
{
item
.
value
===
option
.
value
?
[
styles
.
optionItemText
,
styles
.
optionItemTextActive
]
:
styles
.
optionItemText
}
>
{
option
.
label
}
<
/Text
>
{
item
.
value
===
option
.
value
&&
(
<
Image
style
=
{
styles
.
optionItemImgActive
}
source
=
{
require
(
'../../../images/his_ord_sel.png'
)}
/
>
)}
<
/TouchableOpacity
>
)
})}
<
/View
>
)
:
(
<><
/
>
)}
<
/View
>
)
})}
<
/ScrollView
>
<
View
style
=
{
styles
.
searchBtns
}
>
<
TouchableOpacity
style
=
{[
styles
.
searchBtn
,
styles
.
resetBtn
]}
activeOpacity
=
{
0.8
}
onPress
=
{()
=>
{
R
.
map
(
filter
=>
{
onCallback
&&
onCallback
(
filter
.
field
,
''
)
})(
filterData
)
}}
>
<
Text
style
=
{
styles
.
resetBtnText
}
>
重置
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{[
styles
.
searchBtn
,
styles
.
confirmBtn
]}
activeOpacity
=
{
0.8
}
onPress
=
{()
=>
{
this
.
setState
({
visible
:
!
visible
})
}}
>
<
Text
style
=
{
styles
.
confirmBtnText
}
>
确定
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
)}
<
/View
>
)
}
}
const
styles
=
StyleSheet
.
create
({
filterBar
:
{
width
:
Width
(),
height
:
pxSize
(
36
),
paddingLeft
:
pxSize
(
20
),
zIndex
:
999
,
},
filterBarTitle
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
},
filterSelect
:
{
fontSize
:
12
,
borderColor
:
'#E1F1FE'
,
borderWidth
:
1
,
padding
:
3
,
borderRadius
:
4
},
filterBtn
:
{
height
:
pxSize
(
36
),
flexDirection
:
'row'
,
alignItems
:
'center'
,
marginRight
:
20
,
},
filterBtnText
:
{
color
:
promary_color
,
},
btnIcon
:
{
width
:
pxSize
(
10
),
height
:
pxSize
(
10
),
},
searchModal
:
{
position
:
'absolute'
,
top
:
pxSize
(
36
),
width
:
Width
(),
height
:
Height
(),
backgroundColor
:
'rgba(0, 0, 0, 0.5)'
,
},
mask
:
{
position
:
'absolute'
,
width
:
'100%'
,
height
:
'100%'
,
},
searchContent
:
{
width
:
Width
(),
height
:
pxSize
(
300
),
backgroundColor
:
home_background_color
,
borderColor
:
'#ddd'
,
borderTopWidth
:
1
,
},
scrollView
:
{
height
:
pxSize
(
260
),
padding
:
pxSize
(
20
),
},
searchLabel
:
{
fontSize
:
second_text_size
,
color
:
first_text_color
,
fontWeight
:
'bold'
,
marginBottom
:
10
,
},
searchBtns
:
{
height
:
pxSize
(
40
),
width
:
Width
(),
flexDirection
:
'row'
,
},
searchBtn
:
{
width
:
'50%'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
resetBtn
:
{
backgroundColor
:
'#E1F1FE'
,
},
resetBtnText
:
{
color
:
promary_color
,
},
confirmBtn
:
{
backgroundColor
:
promary_color
,
},
confirmBtnText
:
{
color
:
'#fff'
,
},
optionsBox
:
{
flexDirection
:
'row'
,
},
optionItem
:
{
padding
:
pxSize
(
8
),
paddingLeft
:
pxSize
(
20
),
paddingRight
:
pxSize
(
20
),
marginRight
:
pxSize
(
15
),
marginBottom
:
pxSize
(
15
),
backgroundColor
:
'#fff'
,
},
optionItemActive
:
{
backgroundColor
:
'#E1F1FE'
,
},
optionItemText
:
{
color
:
second_text_color
,
},
optionItemTextActive
:
{
color
:
promary_color
,
},
optionItemImgActive
:
{
position
:
'absolute'
,
bottom
:
0
,
right
:
0
,
},
})
app/containers/selfOrder/module/ChooseProductPage.js
View file @
74185580
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
,
Image
,
TextInput
,
SafeAreaView
}
from
'react-native'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
,
Image
,
TextInput
,
SafeAreaView
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
debounce
from
'debounce'
;
import
{
foundation_color
,
home_background_color
,
Width
,
third_text_size
,
pxSize
,
promary_color
,
safe_view
,
font_family_regular
,
icon_style
,
title_text_color
,
font_family_medium
,
list_common_item
,
point_color
}
from
'../../../base/BaseStyle'
;
import
{
foundation_color
,
home_background_color
,
Width
,
third_text_size
,
pxSize
,
promary_color
,
safe_view
,
font_family_regular
,
icon_style
,
title_text_color
,
font_family_medium
,
list_common_item
,
point_color
}
from
'../../../base/BaseStyle'
;
import
ChooseFilter
from
'./ChooseFilter'
;
import
HeadBackItem
from
'../../common/HeadBackItem'
;
import
HeadBackItem
from
'../../common/HeadBackItem'
;
import
ProductRightStyle
from
'./ProductRightStyle'
;
import
ProductRightStyle
from
'./ProductRightStyle'
;
import
ProductModel
from
'../../common/ProductModel'
;
import
ProductModel
from
'../../common/ProductModel'
;
import
StatusBarView
from
'../../common/StatusBarView'
;
import
StatusBarView
from
'../../common/StatusBarView'
;
import
ChooseCardList
from
'../../common/listDataComponent/ChooseCardList'
;
import
ChooseCardList
from
'../../common/listDataComponent/ChooseCardList'
;
import
{
cloneObject
,
show
}
from
'../../../utils/Utils'
;
import
{
cloneObject
,
show
,
isNotBlank
}
from
'../../../utils/Utils'
;
import
{
reqPurSupplierSearch
,
reqProCategorySearch
,
reqSurTempHeadSearch
,
reqNailEquipHeadSearch
,
reqScatEquipmentSearch
,
reqSingleConsumSearch
,
setSelectProductOpts
}
from
'../../../action/SelfAction'
;
import
{
reqPurSupplierSearch
,
reqProCategorySearch
,
reqSurTempHeadSearch
,
reqNailEquipHeadSearch
,
reqScatEquipmentSearch
,
reqSingleConsumSearch
,
setSelectProductOpts
}
from
'../../../action/SelfAction'
;
import
LoadingModel
from
'../../common/listDataComponent/LoadingModel'
;
import
LoadingModel
from
'../../common/listDataComponent/LoadingModel'
;
import
LocalVariable
from
'../../common/LocalVariable'
;
import
LocalVariable
from
'../../common/LocalVariable'
;
...
@@ -68,8 +70,17 @@ class ChooseProductPage extends Component {
...
@@ -68,8 +70,17 @@ class ChooseProductPage extends Component {
[
LocalVariable
.
SELECTED_QUQNTITY
]:
0
[
LocalVariable
.
SELECTED_QUQNTITY
]:
0
}],
}],
local_cur_options
:
[],
local_cur_options
:
[],
cur_hc_opts
:
[]
cur_hc_opts
:
[],
filterData
:
[{
field
:
'surgery_type'
,
label
:
'手术类型'
,
options
:
[],
value
:
''
,
type
:
'select'
}]
}
}
this
.
inputSearchValue
=
debounce
(
this
.
inputSearchValue
.
bind
(
this
),
500
)
}
}
componentDidMount
()
{
componentDidMount
()
{
...
@@ -188,8 +199,12 @@ class ChooseProductPage extends Component {
...
@@ -188,8 +199,12 @@ class ChooseProductPage extends Component {
that
.
handleChangeThrShow
(
false
)
that
.
handleChangeThrShow
(
false
)
if
(
leftItem
[
LocalVariable
.
SELECTED_QUQNTITY
]
!==
0
)
{
if
(
leftItem
[
LocalVariable
.
SELECTED_QUQNTITY
]
!==
0
)
{
that
.
setState
({
that
.
setState
({
leftActiveIndex
:
leftIndex
leftActiveIndex
:
leftIndex
},
()
=>
{
if
(
leftIndex
)
return
this
.
setFilterData
(
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
].
localSecondData
)
})
})
return
return
}
}
...
@@ -206,7 +221,7 @@ class ChooseProductPage extends Component {
...
@@ -206,7 +221,7 @@ class ChooseProductPage extends Component {
access_token
:
token
,
access_token
:
token
,
org_code
:
cur_org_code
,
org_code
:
cur_org_code
,
manufacturer_code
:
topItem
.
supplier_code
,
manufacturer_code
:
topItem
.
supplier_code
,
doctor_name
:
cur_doctor_name
//
doctor_name: cur_doctor_name
}
}
console
.
log
(
'params='
,
params
)
console
.
log
(
'params='
,
params
)
let
sur_head_search
=
await
reqSurTempHeadSearch
(
global_domain_config
,
params
)
let
sur_head_search
=
await
reqSurTempHeadSearch
(
global_domain_config
,
params
)
...
@@ -214,6 +229,7 @@ class ChooseProductPage extends Component {
...
@@ -214,6 +229,7 @@ class ChooseProductPage extends Component {
if
(
sur_head_search
.
error_code
===
0
)
{
if
(
sur_head_search
.
error_code
===
0
)
{
if
(
sur_head_search
.
data
&&
sur_head_search
.
data
.
surgery_template_headers
)
{
if
(
sur_head_search
.
data
&&
sur_head_search
.
data
.
surgery_template_headers
)
{
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
]
=
that
.
getInitLocalSecondData
(
leftItem
,
sur_head_search
.
data
.
surgery_template_headers
)
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
]
=
that
.
getInitLocalSecondData
(
leftItem
,
sur_head_search
.
data
.
surgery_template_headers
)
this
.
setFilterData
(
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
].
localSecondData
)
}
else
{
}
else
{
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
]
=
[]
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
]
=
[]
}
}
...
@@ -598,20 +614,92 @@ class ChooseProductPage extends Component {
...
@@ -598,20 +614,92 @@ class ChooseProductPage extends Component {
}
}
}
}
setFilterData
(
localSecondData
)
{
let
options
=
R
.
compose
(
R
.
groupBy
(
R
.
prop
(
'value'
)),
R
.
map
(
R
.
applySpec
({
label
:
R
.
prop
(
'surgery_type_name'
),
value
:
R
.
prop
(
'surgery_type'
)
})
),
R
.
clone
)(
localSecondData
)
options
=
R
.
compose
(
R
.
map
(
k
=>
({
value
:
k
,
label
:
options
[
k
][
0
].
label
})),
R
.
filter
(
R
.
allPass
([
isNotBlank
,
R
.
complement
(
R
.
equals
)(
'undefined'
)])),
R
.
keys
)(
options
)
const
{
filterData
}
=
this
.
state
filterData
[
0
].
value
=
''
filterData
[
0
].
options
=
options
this
.
setState
({
filterData
})
}
inputSearchValue
(
text
)
{
this
.
setState
({
searchValue
:
text
})
}
fillterCallback
(
key
,
value
)
{
const
{
filterData
}
=
this
.
state
const
filter
=
R
.
find
(
R
.
propEq
(
'field'
,
key
))(
filterData
)
if
(
!
filter
)
return
filter
.
value
=
value
this
.
setState
({
filterData
})
}
/**
* @description: 手术模板过滤
* @param {*}
* @return {*}
*/
rightFilter
(
list
=
[])
{
const
{
filterData
}
=
this
.
state
R
.
compose
(
R
.
map
(
filter
=>
{
const
value
=
filter
.
value
if
(
isNotBlank
(
value
))
{
const
reg
=
new
RegExp
(
value
,
'g'
)
list
=
R
.
filter
(
item
=>
{
return
reg
.
test
(
item
[
filter
.
field
])
},
list
)
}
}))(
filterData
)
return
list
}
/**
* @description: 搜索过滤
* @param {*}
* @return {*}
*/
rightNameFilter
(
list
=
[])
{
const
{
searchValue
}
=
this
.
state
const
includes
=
item
=>
{
const
reg
=
new
RegExp
(
searchValue
,
'g'
)
return
reg
.
test
(
item
.
general_name
)
||
reg
.
test
(
item
.
item_name
)
}
return
R
.
filter
(
includes
,
list
)
}
// 返回搜索元素
// 返回搜索元素
renderSearchItem
()
{
renderSearchItem
()
{
return
(
const
{
leftActiveIndex
,
filterData
}
=
this
.
state
<
View
style
=
{
list_common_item
.
ser_cont
}
>
if
(
leftActiveIndex
)
{
<
TextInput
return
(
placeholder
=
{
'请输入搜索关键词'
}
<
View
style
=
{
list_common_item
.
ser_cont
}
>
style
=
{
list_common_item
.
ser_text_input
}
<
TextInput
defaultValue
=
{
this
.
state
.
searchValue
}
placeholder
=
{
'请输入搜索关键词'
}
/
>
style
=
{
list_common_item
.
ser_text_input
}
<
View
style
=
{
list_common_item
.
ser_img_box
}
>
defaultValue
=
{
this
.
state
.
searchValue
}
<
Image
source
=
{
require
(
'../../../images/search_icon.png'
)}
style
=
{
icon_style
}
/
>
onChangeText
=
{(
text
)
=>
this
.
inputSearchValue
(
text
)}
/
>
<
View
style
=
{
list_common_item
.
ser_img_box
}
>
<
Image
source
=
{
require
(
'../../../images/search_icon.png'
)}
style
=
{
icon_style
}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
)
}
else
{
return
<
ChooseFilter
filterData
=
{
filterData
}
onCallback
=
{
this
.
fillterCallback
.
bind
(
this
)}
/
>
}
}
}
// 返回顶部厂家
// 返回顶部厂家
...
@@ -633,7 +721,7 @@ class ChooseProductPage extends Component {
...
@@ -633,7 +721,7 @@ class ChooseProductPage extends Component {
cardStyleItemTit
=
{
styles
.
top_tit
}
cardStyleItemTit
=
{
styles
.
top_tit
}
cardStyleItemTitAct
=
{
styles
.
top_tit_act
}
cardStyleItemTitAct
=
{
styles
.
top_tit_act
}
cardListOptions
=
{
topProcOptionList
}
cardListOptions
=
{
topProcOptionList
}
cardItemTitle
=
{
cur_title
}
//
cardItemTitle={cur_title}
cardItemIcon
=
{
cur_icon
}
cardItemIcon
=
{
cur_icon
}
curActIndex
=
{
topActiveIndex
}
curActIndex
=
{
topActiveIndex
}
cardCallBack
=
{(
item
,
index
)
=>
this
.
handleTopNav
(
item
,
index
)}
cardCallBack
=
{(
item
,
index
)
=>
this
.
handleTopNav
(
item
,
index
)}
...
@@ -681,7 +769,7 @@ class ChooseProductPage extends Component {
...
@@ -681,7 +769,7 @@ class ChooseProductPage extends Component {
// 返回右侧二级数据
// 返回右侧二级数据
renderContItem
()
{
renderContItem
()
{
let
{
leftActiveIndex
,
defaultThridShow
,
topProcOptionList
,
topActiveIndex
}
=
this
.
state
let
{
leftActiveIndex
,
defaultThridShow
,
topProcOptionList
,
topActiveIndex
}
=
this
.
state
let
curRigSecoOption
=
[]
let
curRigSecoOption
=
[]
let
curSuperLeftOption
=
[]
let
curSuperLeftOption
=
[]
let
topItem
=
topProcOptionList
[
topActiveIndex
]
let
topItem
=
topProcOptionList
[
topActiveIndex
]
...
@@ -693,6 +781,12 @@ class ChooseProductPage extends Component {
...
@@ -693,6 +781,12 @@ class ChooseProductPage extends Component {
}
}
}
}
if
(
leftActiveIndex
)
{
curRigSecoOption
=
this
.
rightNameFilter
(
curRigSecoOption
)
}
else
{
curRigSecoOption
=
this
.
rightFilter
(
curRigSecoOption
)
}
return
(
return
(
<
View
style
=
{
styles
.
cont_bom_box
}
>
<
View
style
=
{
styles
.
cont_bom_box
}
>
{
this
.
renderContLeftItem
()}
{
this
.
renderContLeftItem
()}
...
@@ -854,7 +948,7 @@ class ChooseProductPage extends Component {
...
@@ -854,7 +948,7 @@ class ChooseProductPage extends Component {
<
SafeAreaView
style
=
{
safe_view
}
>
<
SafeAreaView
style
=
{
safe_view
}
>
<
HeadBackItem
title
=
{
title
}
navigation
=
{
navigation
}
callback
=
{()
=>
this
.
handleGoBack
()}
/
>
<
HeadBackItem
title
=
{
title
}
navigation
=
{
navigation
}
callback
=
{()
=>
this
.
handleGoBack
()}
/
>
<
View
style
=
{
styles
.
choo_main
}
>
<
View
style
=
{
styles
.
choo_main
}
>
{
/* {this.renderSearchItem()} */
}
{
this
.
renderSearchItem
()
}
{
topProcOptionList
&&
topProcOptionList
.
length
>
0
?
this
.
renderTopProItem
()
:
null
}
{
topProcOptionList
&&
topProcOptionList
.
length
>
0
?
this
.
renderTopProItem
()
:
null
}
{
topProcOptionList
&&
topProcOptionList
.
length
>
0
?
this
.
renderContItem
()
:
null
}
{
topProcOptionList
&&
topProcOptionList
.
length
>
0
?
this
.
renderContItem
()
:
null
}
<
/View
>
<
/View
>
...
@@ -871,11 +965,12 @@ const styles = StyleSheet.create({
...
@@ -871,11 +965,12 @@ const styles = StyleSheet.create({
backgroundColor
:
home_background_color
backgroundColor
:
home_background_color
},
},
choo_main
:
{
choo_main
:
{
flex
:
1
flex
:
1
,
zIndex
:
99
,
},
},
top_box
:
{
top_box
:
{
width
:
Width
(),
width
:
Width
(),
height
:
89
,
height
:
58
,
backgroundColor
:
foundation_color
,
backgroundColor
:
foundation_color
,
paddingHorizontal
:
20
,
paddingHorizontal
:
20
,
paddingTop
:
12
,
paddingTop
:
12
,
...
@@ -885,7 +980,8 @@ const styles = StyleSheet.create({
...
@@ -885,7 +980,8 @@ const styles = StyleSheet.create({
top_scroll_cont
:
{},
top_scroll_cont
:
{},
top_inner
:
{
top_inner
:
{
borderBottomColor
:
foundation_color
,
borderBottomColor
:
foundation_color
,
minWidth
:
60
minWidth
:
60
,
paddingBottom
:
10
},
},
top_inner_act
:
{},
top_inner_act
:
{},
top_tit
:
{},
top_tit
:
{},
...
@@ -895,7 +991,7 @@ const styles = StyleSheet.create({
...
@@ -895,7 +991,7 @@ const styles = StyleSheet.create({
},
},
cont_bom_box
:
{
cont_bom_box
:
{
position
:
'relative'
,
position
:
'relative'
,
flex
:
1
flex
:
1
,
},
},
cont_left_box
:
{
cont_left_box
:
{
backgroundColor
:
'#F5F5F5'
,
backgroundColor
:
'#F5F5F5'
,
...
...
app/containers/transOrder/TransOrderPage.js
View file @
74185580
...
@@ -1067,6 +1067,9 @@ class TransOrderPage extends Component {
...
@@ -1067,6 +1067,9 @@ class TransOrderPage extends Component {
source
=
res
.
uri
;
source
=
res
.
uri
;
}
else
{
}
else
{
source
=
res
.
uri
.
replace
(
'file://'
,
''
);
source
=
res
.
uri
.
replace
(
'file://'
,
''
);
if
(
!
res
.
fileName
)
{
res
.
fileName
=
new
Date
().
getTime
()
+
'.HEIC'
}
}
}
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
let
file
=
{
uri
:
source
,
type
:
'multipart/form-data'
,
name
:
res
.
fileName
};
let
file
=
{
uri
:
source
,
type
:
'multipart/form-data'
,
name
:
res
.
fileName
};
...
...
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