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
ffa9fabc
authored
Jun 01, 2021
by
wong.peiyi
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'develop' into product
parents
b2734e21
7be4f296
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
569 additions
and
36 deletions
android/app/build.gradle
app/base/BaseStyle.js
app/containers/common/listDataComponent/ChooseCardList.js
app/containers/equipConsu/EquipConsuPage.js
app/containers/equipConsu/module/ChargeDetailsPage.js
app/containers/equipConsu/module/FillUnitPricePage.js
app/containers/selfOrder/SelfOrderPage.js
app/containers/selfOrder/module/ChooseFilter.js
app/containers/selfOrder/module/ChooseProductPage.js
app/containers/transOrder/TransOrderPage.js
app/containers/transOrder/module/TransSearchPage.js
android/app/build.gradle
View file @
ffa9fabc
...
...
@@ -130,6 +130,14 @@ android {
include
"armeabi-v7a"
,
"x86"
,
"arm64-v8a"
,
"x86_64"
}
}
signingConfigs
{
release
{
storeFile
file
(
'../keystores/key.jks'
)
storePassword
'gkzhc2020'
keyAlias
'key'
keyPassword
'gkzhc2020'
}
}
buildTypes
{
debug
{
resValue
"string"
,
"CodePushDeploymentKey"
,
'"OQxOHKC_pU5KPExPvQLLfeOdhO4_zss5pKduM"'
...
...
@@ -140,6 +148,7 @@ android {
proguardFiles
getDefaultProguardFile
(
"proguard-android.txt"
),
"proguard-rules.pro"
resValue
"string"
,
"CodePushDeploymentKey"
,
'"KEzx1DMpvRIuGoORIyvnxdf9j8HD42NEQvj1z0"'
resValue
'string'
,
"CODE_PUSH_APK_BUILD_TIME"
,
String
.
format
(
"\"%d\""
,
System
.
currentTimeMillis
())
signingConfig
signingConfigs
.
release
}
releaseStaging
.
initWith
(
release
)
releaseStaging
{
...
...
app/base/BaseStyle.js
View file @
ffa9fabc
...
...
@@ -228,6 +228,10 @@ export const list_common_item = {
detail_inner
:
{
flex
:
1
},
detail_title_box
:
{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
},
detail_tit
:
{
fontSize
:
second_text_size
,
color
:
'#A3A3A3'
,
...
...
@@ -359,8 +363,8 @@ export const list_common_item = {
height
:
2
},
shadowOpacity
:
1
,
elevation
:
10
,
height
:
80
//
elevation: 10,
height
:
80
,
},
sub_two_btn
:
{
width
:
Width
(),
...
...
@@ -432,7 +436,7 @@ export const list_common_item = {
ser_text_input
:
{
backgroundColor
:
'#F5F5F5'
,
height
:
38
,
lineHeight
:
16
,
lineHeight
:
20
,
paddingLeft
:
34
,
borderRadius
:
10
,
fontSize
:
14
,
...
...
app/containers/common/listDataComponent/ChooseCardList.js
View file @
ffa9fabc
...
...
@@ -90,10 +90,13 @@ class ChooseCardList extends Component {
resizeMode
=
"center"
/>
:
<
Image
source
=
{
cur_icon
}
style
=
{
icon_style
}
resizeMode
=
"cover"
/>
}
<
/View> : null
}
{
cardItemTitle
&&
<
Text
numberOfLines
=
{
3
}
style
=
{[
styles
.
list_item_tit
,
cardStyleItemTit
,
cur_icon
?
''
:
cardStyleNotIconTit
,
index
==
curActIndex
?
[
styles
.
list_tit_act
,
cardStyleItemTitAct
]
:
''
]}
>
{
item
[
cardItemTitle
]}
{(
item
[
cardCountName
]
&&
countStyleType
[
0
]
===
cardStyleType
)
?
<
Text
style
=
{[
styles
.
sum_def
,
cardCouStyle
]}
>
({
item
[
cardCountName
]})
<
/Text> : null
}
<
/Text
>
}
<
/View
>
<
/TouchableOpacity
>
{(
item
[
cardCountName
]
&&
countStyleType
[
1
]
===
cardStyleType
)
?
<
View
style
=
{[
styles
.
card_def_count
,
cardCouStyle
]}
>
...
...
app/containers/equipConsu/EquipConsuPage.js
View file @
ffa9fabc
...
...
@@ -768,7 +768,8 @@ class EquipConsuPage extends Component {
access_token
:
props
.
token
,
org_code
:
state
.
listOptionData
[
1
].
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
)
{
params
.
department_code
=
state
.
listOptionData
[
15
].
value
...
...
@@ -787,7 +788,8 @@ class EquipConsuPage extends Component {
access_token
:
props
.
token
,
org_code
:
state
.
listOptionData
[
1
].
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
)
{
params
.
department_code
=
state
.
listOptionData
[
15
].
value
...
...
@@ -1355,6 +1357,33 @@ class EquipConsuPage extends Component {
})
}
/**
* @description: 耗材总金额
* @return {*}
*/
consumeSum
()
{
try
{
const
{
listOptionData
}
=
this
.
state
return
R
.
compose
(
R
.
sum
,
R
.
pluck
(
'local_add_price'
),
R
.
pathOr
([],
[
12
,
'subOption'
]))(
listOptionData
)
}
catch
(
error
)
{
return
0
}
}
feeSum
()
{
try
{
const
{
listOptionData
}
=
this
.
state
return
R
.
compose
(
R
.
sum
,
R
.
map
(
x
=>
Number
(
x
)),
R
.
pluck
(
'fee_amount'
),
R
.
pathOr
([],
[
13
,
'subOption'
])
)(
listOptionData
)
}
catch
(
error
)
{
return
0
}
}
// 返回备注以上的元素
renderListItem
()
{
let
{
listOptionData
,
dateModelPop
,
sysValues
}
=
this
.
state
...
...
@@ -1616,10 +1645,15 @@ class EquipConsuPage extends Component {
// 返回耗材明细
renderConsumablesDetailsItem
()
{
let
{
state
}
=
this
const
sum
=
this
.
consumeSum
()
return
(
<
CellTextStyle
style
=
{
list_common_item
.
consu_detail
}
>
<
View
style
=
{
list_common_item
.
detail_inner
}
>
{
/* <View style={list_common_item.detail_title_box}> */
}
<
Text
style
=
{
list_common_item
.
detail_tit
}
>
耗材明细
<
/Text
>
{
/* </View> */
}
{
state
.
listOptionData
[
12
].
subOption
.
length
?
<
View
...
...
@@ -1628,6 +1662,7 @@ class EquipConsuPage extends Component {
<
Text
style
=
{
list_common_item
.
detail_tit_text
}
>
耗材(
{
state
.
listOptionData
[
12
].
subOption
.
length
}
)
<
/Text
>
<
Text
style
=
{
list_common_item
.
detail_tit_text
}
>
耗材总金额:
{
sum
}
<
/Text
>
<
/View
>
{
state
.
listOptionData
[
12
].
isShowSub
?
...
...
@@ -1674,6 +1709,8 @@ class EquipConsuPage extends Component {
// 返回费用明细
renderChargeDetailsItem
()
{
let
{
state
}
=
this
const
sum
=
this
.
feeSum
()
return
(
<
CellTextStyle
style
=
{
list_common_item
.
consu_detail
}
>
<
View
style
=
{
list_common_item
.
detail_inner
}
>
...
...
@@ -1686,6 +1723,7 @@ class EquipConsuPage extends Component {
<
Text
style
=
{
list_common_item
.
detail_tit_text
}
>
费用(
{
state
.
listOptionData
[
13
].
subOption
.
length
}
)
<
/Text
>
<
Text
style
=
{
list_common_item
.
detail_tit_text
}
>
费用总金额:
{
sum
}
<
/Text
>
<
/View
>
{
state
.
listOptionData
[
13
].
isShowSub
?
...
...
@@ -1728,10 +1766,15 @@ class EquipConsuPage extends Component {
// 返回添加图片
renderAddPicturesItem
()
{
let
{
state
}
=
this
const
sum
=
this
.
feeSum
()
+
this
.
consumeSum
()
return
(
<
CellTextStyle
style
=
{
list_common_item
.
consu_addpic
}
>
<
View
style
=
{
list_common_item
.
addpic_inner
}
>
<
View
style
=
{
list_common_item
.
detail_title_box
}
>
<
Text
style
=
{
list_common_item
.
addpic_tit
}
>
添加图片
<
/Text
>
<
Text
style
=
{
list_common_item
.
detail_tit
}
>
耗材
+
费用总金额:
{
sum
}
<
/Text
>
<
/View
>
<
View
style
=
{
list_common_item
.
addpic_cont
}
>
{
state
.
localPhoOption
.
length
?
state
.
localPhoOption
.
map
((
item
,
index
)
=>
this
.
renderPicItem
(
item
,
index
)
)
...
...
app/containers/equipConsu/module/ChargeDetailsPage.js
View file @
ffa9fabc
...
...
@@ -502,7 +502,10 @@ const styles = StyleSheet.create({
marginBottom
:
30
,
borderRadius
:
10
,
},
add_btn_cont
:
{},
add_btn_cont
:
{
alignItems
:
'center'
,
width
:
'100%'
},
add_btn_txt
:
{
height
:
46
,
lineHeight
:
46
...
...
app/containers/equipConsu/module/FillUnitPricePage.js
View file @
ffa9fabc
import
React
,
{
Component
}
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
SafeAreaView
,
TouchableOpacity
,
ScrollView
,
FlatList
,
TextInput
}
from
'react-native'
;
import
{
home_background_color
,
promary_color
,
safe_view
,
list_common_item
,
placehold_text_color
,
second_text_size
,
promary_text_color
,
font_family_regular
,
font_family_medium
,
list_tit_color
,
list_str_color
,
list_one_color
,
list_thr_color
,
third_text_size
,
font_family_semibold
}
from
'../../../base/BaseStyle'
;
import
{
second_text_color
,
home_background_color
,
promary_color
,
safe_view
,
list_common_item
,
placehold_text_color
,
second_text_size
,
promary_text_color
,
font_family_regular
,
font_family_medium
,
list_tit_color
,
list_str_color
,
list_one_color
,
list_thr_color
,
third_text_size
,
font_family_semibold
,
third_text_color
}
from
'../../../base/BaseStyle'
;
import
StatusBarView
from
'../../common/StatusBarView'
;
import
HeadBackItem
from
'../../common/HeadBackItem'
;
import
{
show
}
from
'../../../utils/Utils'
;
import
{
setSubdetailOption
}
from
'../../../action/EquipAction'
;
import
{
connect
}
from
'react-redux'
;
import
*
as
R
from
'ramda'
;
// 可填写单价
class
FillUnitPricePage
extends
Component
{
...
...
@@ -20,6 +21,11 @@ class FillUnitPricePage extends Component {
this
.
getLocalSelectedData
()
}
feeSum
()
{
const
{
unitPriceOption
}
=
this
.
state
return
R
.
compose
(
R
.
sum
,
R
.
map
(
x
=>
isNaN
(
x
)
?
0
:
x
),
R
.
pluck
(
'local_add_price'
))(
unitPriceOption
)
}
// 获取选择的数据
getLocalSelectedData
()
{
let
{
localSelectOption
}
=
this
.
props
.
navigation
.
state
.
params
...
...
@@ -157,6 +163,9 @@ class FillUnitPricePage extends Component {
render
()
{
let
{
navigation
}
=
this
.
props
let
{
title
}
=
navigation
.
state
.
params
const
{
unitPriceOption
}
=
this
.
state
const
sum
=
this
.
feeSum
()
return
(
<
View
style
=
{
styles
.
cu_dl_container
}
>
<
StatusBarView
...
...
@@ -168,6 +177,10 @@ class FillUnitPricePage extends Component {
<
HeadBackItem
title
=
{
title
}
navigation
=
{
navigation
}
/
>
<
View
style
=
{
styles
.
cu_dl_main
}
>
{
this
.
renderContItem
()
}
<
View
style
=
{
styles
.
sum_box
}
>
<
Text
style
=
{
styles
.
sum_text
}
>
总数量:
{
unitPriceOption
.
length
}
<
/Text
>
<
Text
style
=
{
styles
.
sum_text
}
>
总金额:
{
sum
}
<
/Text
>
<
/View
>
<
/View
>
{
this
.
renderFooterBtnItem
()}
<
/SafeAreaView
>
...
...
@@ -241,9 +254,16 @@ const styles = StyleSheet.create({
fontSize
:
14
,
color
:
list_thr_color
},
sum_box
:
{
flexDirection
:
'row'
,
justifyContent
:
'flex-end'
,
paddingTop
:
15
,
paddingBottom
:
15
},
sum_text
:
{
color
:
second_text_color
,
paddingRight
:
20
,
},
fot_btn
:
{
width
:
'100%'
,
borderRadius
:
10
...
...
app/containers/selfOrder/SelfOrderPage.js
View file @
ffa9fabc
...
...
@@ -1389,6 +1389,9 @@ class SelfOrderPage extends Component {
source
=
res
.
uri
;
}
else
{
source
=
res
.
uri
.
replace
(
'file://'
,
''
);
if
(
!
res
.
fileName
)
{
res
.
fileName
=
new
Date
().
getTime
()
+
'.HEIC'
}
}
const
formData
=
new
FormData
();
let
file
=
{
uri
:
source
,
type
:
'multipart/form-data'
,
name
:
res
.
fileName
};
...
...
app/containers/selfOrder/module/ChooseFilter.js
0 → 100644
View file @
ffa9fabc
/*
* @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
,
TouchableWithoutFeedback
,
Modal
,
Platform
,
}
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'
import
{
isIphoneX
}
from
'../../../utils/Utils'
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
&&
(
<
Modal
style
=
{
styles
.
searchModal
}
visible
=
{
visible
}
transparent
=
{
true
}
>
<
TouchableOpacity
style
=
{
styles
.
mask_touch
}
onPress
=
{
e
=>
{
this
.
setState
({
visible
:
!
visible
})
}}
activeOpacity
=
{
1
}
><
/TouchableOpacity
>
<
View
style
=
{
styles
.
mask
}
><
/View
>
<
View
style
=
{
Platform
.
OS
===
'ios'
?
isIphoneX
()
?
[
styles
.
searchContent
,
{
top
:
48
+
58
+
pxSize
(
36
)
}]
:
[
styles
.
searchContent
,
{
top
:
20
+
58
+
pxSize
(
36
)
}]
:
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
)
}
this
.
setState
({
visible
:
!
visible
})
}}
>
<
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
)
this
.
setState
({
visible
:
!
visible
})
}}
>
<
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
>
<
/Modal
>
)}
<
/View
>
)
}
}
const
styles
=
StyleSheet
.
create
({
filterBar
:
{
width
:
Width
(),
height
:
pxSize
(
36
),
paddingLeft
:
pxSize
(
20
),
},
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)',
// zIndex: 999,
},
mask_touch
:
{
position
:
'absolute'
,
width
:
Width
(),
height
:
Height
(),
zIndex
:
99
,
top
:
0
,
},
mask
:
{
position
:
'absolute'
,
width
:
Width
(),
height
:
Height
(),
backgroundColor
:
'rgba(0, 0, 0, 0.5)'
,
// zIndex: 99,
top
:
200
,
},
searchContent
:
{
width
:
Width
(),
height
:
pxSize
(
300
),
backgroundColor
:
home_background_color
,
top
:
58
+
pxSize
(
36
),
borderColor
:
'#ddd'
,
borderTopWidth
:
1
,
zIndex
:
999
,
},
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 @
ffa9fabc
import
React
,
{
Component
}
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
,
Image
,
TextInput
,
SafeAreaView
}
from
'react-native'
;
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
ChooseFilter
from
'./ChooseFilter'
;
import
HeadBackItem
from
'../../common/HeadBackItem'
;
import
ProductRightStyle
from
'./ProductRightStyle'
;
import
ProductModel
from
'../../common/ProductModel'
;
import
StatusBarView
from
'../../common/StatusBarView'
;
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
LoadingModel
from
'../../common/listDataComponent/LoadingModel'
;
import
LocalVariable
from
'../../common/LocalVariable'
;
...
...
@@ -68,8 +70,17 @@ class ChooseProductPage extends Component {
[
LocalVariable
.
SELECTED_QUQNTITY
]:
0
}],
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
()
{
...
...
@@ -188,8 +199,12 @@ class ChooseProductPage extends Component {
that
.
handleChangeThrShow
(
false
)
if
(
leftItem
[
LocalVariable
.
SELECTED_QUQNTITY
]
!==
0
)
{
that
.
setState
({
leftActiveIndex
:
leftIndex
},
()
=>
{
if
(
leftIndex
)
return
this
.
setFilterData
(
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
].
localSecondData
)
})
return
}
...
...
@@ -206,7 +221,7 @@ class ChooseProductPage extends Component {
access_token
:
token
,
org_code
:
cur_org_code
,
manufacturer_code
:
topItem
.
supplier_code
,
doctor_name
:
cur_doctor_name
//
doctor_name: cur_doctor_name
}
console
.
log
(
'params='
,
params
)
let
sur_head_search
=
await
reqSurTempHeadSearch
(
global_domain_config
,
params
)
...
...
@@ -214,6 +229,7 @@ class ChooseProductPage extends Component {
if
(
sur_head_search
.
error_code
===
0
)
{
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
)
this
.
setFilterData
(
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
].
localSecondData
)
}
else
{
topProcOptionList
[
topActiveIndex
].
leftOptionList
[
leftIndex
]
=
[]
}
...
...
@@ -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
R
.
test
(
reg
,
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
R
.
test
(
reg
,
item
.
general_name
)
||
R
.
test
(
reg
,
item
.
item_name
)
}
return
R
.
filter
(
includes
,
list
)
}
// 返回搜索元素
renderSearchItem
()
{
const
{
leftActiveIndex
,
filterData
}
=
this
.
state
if
(
leftActiveIndex
)
{
return
(
<
View
style
=
{
list_common_item
.
ser_cont
}
>
<
TextInput
placeholder
=
{
'请输入搜索关键词'
}
style
=
{
list_common_item
.
ser_text_input
}
defaultValue
=
{
this
.
state
.
searchValue
}
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
>
)
}
else
{
return
<
ChooseFilter
filterData
=
{
filterData
}
onCallback
=
{
this
.
fillterCallback
.
bind
(
this
)}
/
>
}
}
// 返回顶部厂家
...
...
@@ -633,7 +721,7 @@ class ChooseProductPage extends Component {
cardStyleItemTit
=
{
styles
.
top_tit
}
cardStyleItemTitAct
=
{
styles
.
top_tit_act
}
cardListOptions
=
{
topProcOptionList
}
cardItemTitle
=
{
cur_title
}
//
cardItemTitle={cur_title}
cardItemIcon
=
{
cur_icon
}
curActIndex
=
{
topActiveIndex
}
cardCallBack
=
{(
item
,
index
)
=>
this
.
handleTopNav
(
item
,
index
)}
...
...
@@ -681,7 +769,7 @@ class ChooseProductPage extends Component {
// 返回右侧二级数据
renderContItem
()
{
let
{
leftActiveIndex
,
defaultThridShow
,
topProcOptionList
,
topActiveIndex
}
=
this
.
state
let
{
leftActiveIndex
,
defaultThridShow
,
topProcOptionList
,
topActiveIndex
}
=
this
.
state
let
curRigSecoOption
=
[]
let
curSuperLeftOption
=
[]
let
topItem
=
topProcOptionList
[
topActiveIndex
]
...
...
@@ -693,6 +781,12 @@ class ChooseProductPage extends Component {
}
}
if
(
leftActiveIndex
)
{
curRigSecoOption
=
this
.
rightNameFilter
(
curRigSecoOption
)
}
else
{
curRigSecoOption
=
this
.
rightFilter
(
curRigSecoOption
)
}
return
(
<
View
style
=
{
styles
.
cont_bom_box
}
>
{
this
.
renderContLeftItem
()}
...
...
@@ -712,7 +806,7 @@ class ChooseProductPage extends Component {
// 返回底部按钮
renderFooterBtnItem
()
{
let
{
selectShowPopup
,
topProcOptionList
,
topActiveIndex
,
local_sel_options
,
local_cur_options
,
cur_hc_opts
}
=
this
.
state
let
{
selectShowPopup
,
topProcOptionList
,
topActiveIndex
,
l
eftActiveIndex
,
filterData
,
l
ocal_sel_options
,
local_cur_options
,
cur_hc_opts
}
=
this
.
state
let
allCountQuantity
=
this
.
getAllCountQuantity
()
let
cur_sel_options
=
[]
let
sel_tip
=
this
.
getAllCountQuantity
(
true
)
...
...
@@ -829,6 +923,7 @@ class ChooseProductPage extends Component {
changeCallBack
=
{(
options
,
clearFlag
)
=>
this
.
handleChangeCallBack
(
options
,
clearFlag
)}
/
>
{
this
.
renderLodingItem
()}
<
/View
>
)
}
...
...
@@ -843,7 +938,7 @@ class ChooseProductPage extends Component {
render
()
{
let
{
navigation
}
=
this
.
props
let
{
title
}
=
navigation
.
state
.
params
let
{
topProcOptionList
}
=
this
.
state
let
{
topProcOptionList
,
leftActiveIndex
,
filterData
}
=
this
.
state
return
(
<
View
style
=
{
styles
.
choo_container
}
>
<
StatusBarView
...
...
@@ -851,15 +946,17 @@ class ChooseProductPage extends Component {
backgroundColor
=
{
promary_color
}
barStyle
=
'light-content'
/>
<
SafeAreaView
style
=
{
safe_view
}
>
<
View
style
=
{
safe_view
}
>
<
HeadBackItem
title
=
{
title
}
navigation
=
{
navigation
}
callback
=
{()
=>
this
.
handleGoBack
()}
/
>
<
View
style
=
{
styles
.
choo_main
}
>
{
/* {this.renderSearchItem()} */
}
<
View
style
=
{
!
leftActiveIndex
?[
styles
.
choo_main
,
styles
.
choo_main_pd
]:
styles
.
choo_main
}
pointerEvents
=
"auto"
>
{
this
.
renderSearchItem
()
}
{
topProcOptionList
&&
topProcOptionList
.
length
>
0
?
this
.
renderTopProItem
()
:
null
}
{
topProcOptionList
&&
topProcOptionList
.
length
>
0
?
this
.
renderContItem
()
:
null
}
<
/View
>
{
this
.
renderFooterBtnItem
()}
<
/SafeAreaView
>
{
/* {!leftActiveIndex && <ChooseFilter filterData={filterData} onCallback={this.fillterCallback.bind(this)}/>} */
}
<
/View
>
<
/View
>
);
}
...
...
@@ -871,11 +968,15 @@ const styles = StyleSheet.create({
backgroundColor
:
home_background_color
},
choo_main
:
{
flex
:
1
flex
:
1
,
zIndex
:
99
,
},
choo_main_pd
:
{
// paddingTop: pxSize(36)
},
top_box
:
{
width
:
Width
(),
height
:
89
,
height
:
58
,
backgroundColor
:
foundation_color
,
paddingHorizontal
:
20
,
paddingTop
:
12
,
...
...
@@ -885,7 +986,8 @@ const styles = StyleSheet.create({
top_scroll_cont
:
{},
top_inner
:
{
borderBottomColor
:
foundation_color
,
minWidth
:
60
minWidth
:
60
,
paddingBottom
:
10
},
top_inner_act
:
{},
top_tit
:
{},
...
...
@@ -895,7 +997,7 @@ const styles = StyleSheet.create({
},
cont_bom_box
:
{
position
:
'relative'
,
flex
:
1
flex
:
1
,
},
cont_left_box
:
{
backgroundColor
:
'#F5F5F5'
,
...
...
app/containers/transOrder/TransOrderPage.js
View file @
ffa9fabc
...
...
@@ -505,12 +505,15 @@ class TransOrderPage extends Component {
let
{
listOptionData
,
localOtherObj
}
=
this
.
state
let
that
=
this
this
.
setState
({
listOptionData
:
listOptionData
.
map
((
item
,
index
)
=>
{
listOptionData
:
listOptionData
.
map
(
async
(
item
,
index
)
=>
{
if
(
index
>
startIndex
&&
index
<
endIndex
)
{
item
.
name
=
localOtherObj
.
name
item
.
value
=
localOtherObj
.
value
if
(
listOptionData
[
1
].
value
&&
item
.
title
==
'客户名称'
)
{
await
that
.
getDepartmentsByOrg
(
listOptionData
[
1
].
value
)
setTimeout
(()
=>
{
that
.
organizationGetCustomerData
()
},
0
);
}
if
(
listOptionData
[
2
].
value
&&
item
.
title
==
'目标订单信息'
)
{
that
.
customerGetTargetOrder
()
...
...
@@ -568,9 +571,8 @@ class TransOrderPage extends Component {
chItem
.
name
=
item
.
name
chItem
.
value
=
item
.
value
if
(
itemTitle
===
'组织'
)
{
that
.
clearInitNameAndValue
(
1
)
that
.
clearInitNameAndValue
(
8
,
10
)
that
.
getDepartmentsByOrg
(
item
.
value
)
that
.
clearInitNameAndValue
(
1
)
}
if
(
itemTitle
===
'客户名称'
)
{
that
.
clearInitNameAndValue
(
2
)
...
...
@@ -697,9 +699,11 @@ class TransOrderPage extends Component {
listOptionData
[
1
].
value
=
filterOpt
[
0
].
org_code
that
.
setState
({
listOptionData
},
()
=>
{
},
async
()
=>
{
await
that
.
getDepartmentsByOrg
(
listOptionData
[
1
].
value
)
setTimeout
(()
=>
{
that
.
organizationGetCustomerData
()
that
.
getDepartmentsByOrg
(
listOptionData
[
1
].
value
)
},
0
);
})
}
}
else
{
...
...
@@ -857,11 +861,16 @@ class TransOrderPage extends Component {
let
params
=
{
access_token
:
props
.
token
,
org_code
:
state
.
listOptionData
[
1
].
value
,
seller_code
:
props
.
userInfo
.
user_name
,
//
seller_code: props.userInfo.user_name,
customer_code
:
state
.
listOptionData
[
2
].
value
,
collect_header_status
:
'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED'
,
setting_type
:
'COLLECT'
}
if
(
state
.
sysValues
.
OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY
>
0
)
{
params
.
department_code
=
state
.
listOptionData
[
9
].
value
}
else
{
params
.
seller_code
=
props
.
userInfo
.
user_name
}
props
.
requestTransTargetOrderInfo
(
params
)
})
}
...
...
@@ -872,10 +881,15 @@ class TransOrderPage extends Component {
let
params
=
{
access_token
:
props
.
token
,
org_code
:
state
.
listOptionData
[
1
].
value
,
seller_code
:
props
.
userInfo
.
user_name
,
//
seller_code: props.userInfo.user_name,
customer_code
:
state
.
listOptionData
[
2
].
value
,
collect_header_status
:
'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED'
}
if
(
state
.
sysValues
.
OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY
>
0
)
{
params
.
department_code
=
state
.
listOptionData
[
9
].
value
}
else
{
params
.
seller_code
=
props
.
userInfo
.
user_name
}
let
that
=
this
let
{
global_domain_config
}
=
props
let
cusResult
=
await
requestSubSourBorOrdNum
(
global_domain_config
,
params
);
...
...
@@ -980,14 +994,16 @@ class TransOrderPage extends Component {
// 耗材明细 点击
handleConsumDetailCheck
()
{
let
{
listOptionData
}
=
this
.
state
let
{
listOptionData
,
sysValues
}
=
this
.
state
let
subTransObj
=
{
seller_name
:
listOptionData
[
0
].
name
,
seller_code
:
listOptionData
[
0
].
value
,
org_name
:
listOptionData
[
1
].
name
,
org_code
:
listOptionData
[
1
].
value
,
customer_code
:
listOptionData
[
2
].
value
,
collect_number
:
listOptionData
[
3
].
value
collect_number
:
listOptionData
[
3
].
value
,
department_code
:
listOptionData
[
9
].
value
,
sysValues
}
if
(
!
listOptionData
[
7
].
subOption
.
length
)
{
this
.
props
.
setTransDetailOption
([],
{})
...
...
@@ -1067,6 +1083,9 @@ class TransOrderPage extends Component {
source
=
res
.
uri
;
}
else
{
source
=
res
.
uri
.
replace
(
'file://'
,
''
);
if
(
!
res
.
fileName
)
{
res
.
fileName
=
new
Date
().
getTime
()
+
'.HEIC'
}
}
const
formData
=
new
FormData
();
let
file
=
{
uri
:
source
,
type
:
'multipart/form-data'
,
name
:
res
.
fileName
};
...
...
app/containers/transOrder/module/TransSearchPage.js
View file @
ffa9fabc
...
...
@@ -231,10 +231,15 @@ class TransSearchPage extends Component {
let
params
=
{
access_token
:
props
.
token
,
org_code
:
subTransObj
.
org_code
,
seller_code
:
props
.
userInfo
.
user_name
,
//
seller_code: props.userInfo.user_name,
collect_header_status
:
'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED'
,
setting_type
:
'COLLECT'
}
if
(
subTransObj
.
sysValues
.
OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY
>
0
)
{
params
.
department_code
=
subTransObj
.
department_code
}
else
{
params
.
seller_code
=
props
.
userInfo
.
user_name
}
let
{
global_domain_config
}
=
that
.
props
that
.
changeLodingFlag
(
true
)
let
sourResult
=
await
requestSubSourBorOrdNum
(
global_domain_config
,
params
)
...
...
@@ -380,9 +385,15 @@ class TransSearchPage extends Component {
}
let
params
=
{
access_token
:
token
,
seller_name
:
subTransObj
.
seller_name
,
org_name
:
subTransObj
.
org_name
,
destination_collect_number
:
subTransObj
.
collect_number
,
...
seaForm
// seller_name: subTransObj.seller_name,
}
if
(
subTransObj
.
sysValues
.
OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY
>
0
)
{
params
.
department_code
=
subTransObj
.
department_code
}
else
{
params
.
seller_name
=
subTransObj
.
seller_name
}
this
.
changeLodingFlag
(
true
)
let
{
global_domain_config
}
=
that
.
props
...
...
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