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
6dff0437
authored
Oct 13, 2020
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整【器械消耗】 - 耗材明细单价页面,隐藏单价显示
parent
19fe2c3f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
247 additions
and
16 deletions
app/Router.js
app/containers/equipConsu/EquipConsuPage.js
app/containers/equipConsu/module/ConsumDetailsPage.js
app/containers/equipConsu/module/DetailsModel.js
app/containers/equipConsu/module/ShowDetailPage.js
app/Router.js
View file @
6dff0437
...
...
@@ -13,6 +13,7 @@ import SubSuccessPage from './containers/selfOrder/module/SubSuccessPage';
import
EquipConsuPage
from
'./containers/equipConsu/EquipConsuPage'
;
import
ConsumDetailsPage
from
'./containers/equipConsu//module/ConsumDetailsPage'
;
import
FillUnitPricePage
from
'./containers/equipConsu/module/FillUnitPricePage'
;
import
ShowDetailPage
from
'./containers/equipConsu/module/ShowDetailPage'
;
import
QuickOrderPage
from
'./containers/quickOrder/QuickOrderPage'
;
import
TransOrderPage
from
'./containers/transOrder/TransOrderPage'
;
import
TransSearchPage
from
'./containers/transOrder/module/TransSearchPage'
;
...
...
@@ -31,6 +32,7 @@ const Router = createAppContainer(createStackNavigator({
EquipConsuPage
:
{
screen
:
EquipConsuPage
},
ConsumDetailsPage
:
{
screen
:
ConsumDetailsPage
},
FillUnitPricePage
:
{
screen
:
FillUnitPricePage
},
ShowDetailPage
:
{
screen
:
ShowDetailPage
},
QuickOrderPage
:
{
screen
:
QuickOrderPage
},
TransOrderPage
:
{
screen
:
TransOrderPage
},
TransSearchPage
:
{
screen
:
TransSearchPage
},
...
...
app/containers/equipConsu/EquipConsuPage.js
View file @
6dff0437
...
...
@@ -1388,9 +1388,9 @@ class EquipConsuPage extends Component {
<
Text
style
=
{
list_common_item
.
de_tip
}
>
序列号:
{
item
.
serial_number
}
<
/Text
>
<
Text
style
=
{
list_common_item
.
de_tip
}
>
{
/*
<Text style={list_common_item.de_tip}>
单价(¥):{ item.sale_price }
<
/Text
>
</Text>
*/
}
<
/View
>
)
}
...
...
app/containers/equipConsu/module/ConsumDetailsPage.js
View file @
6dff0437
...
...
@@ -169,6 +169,10 @@ class ConsumDetailsPage extends Component {
this
.
changeIsSelected
(
index
,
true
)
}
handleSubSelectCheck
(
index
,
selFlag
)
{
this
.
changeIsSelected
(
index
,
selFlag
)
}
// 修改 当前已选择
changeIsSelected
(
ind
,
selFlag
)
{
let
{
conDetaOption
}
=
this
.
state
...
...
@@ -233,8 +237,13 @@ class ConsumDetailsPage extends Component {
show
(
'请选择耗材'
)
return
}
this
.
props
.
navigation
.
navigate
(
'FillUnitPricePage'
,
{
title
:
'器械消耗 - 填写单价'
,
// this.props.navigation.navigate('FillUnitPricePage', {
// title: '器械消耗 - 填写单价',
// localSelectOption: localSelectOption
// })
this
.
props
.
navigation
.
navigate
(
'ShowDetailPage'
,
{
title
:
'器械消耗 - 已选明细'
,
localSelectOption
:
localSelectOption
})
...
...
@@ -285,33 +294,36 @@ class ConsumDetailsPage extends Component {
// 返回每一列数据
renderSubListItem
(
item
,
index
)
{
return
(
<
View
style
=
{
styles
.
cons_sub_list
}
>
<
TouchableOpacity
activeOpacity
=
{.
8
}
style
=
{
styles
.
cons_sub_list
}
onPress
=
{()
=>
this
.
handleSubSelectCheck
(
index
,
!
item
.
select
)}
>
<
View
style
=
{
styles
.
sub_list_lef
}
>
{
item
.
select
?
<
TouchableOpacity
activeOpacity
=
{.
8
}
<
View
style
=
{
styles
.
sub_icon_box
}
onPress
=
{()
=>
this
.
handleCelSelCheck
(
item
,
index
)}
>
// onPress={() => this.handleCelSelCheck(item, index)}
>
<
Image
style
=
{
icon_style
}
source
=
{
require
(
'../../../images/radio_yes.png'
)}
/
>
<
/TouchableOpacity
>
:
<
TouchableOpacity
activeOpacity
=
{.
8
}
<
/View
>
:
<
View
style
=
{
styles
.
sub_icon_box
}
onPress
=
{()
=>
this
.
handleSubSelectedCheck
(
item
,
index
)}
>
// onPress={() => this.handleSubSelectedCheck(item, index)}
>
<
Image
style
=
{
icon_style
}
source
=
{
require
(
'../../../images/radio_no.png'
)}
/
>
<
/
TouchableOpacity
>
<
/
View
>
}
<
/View
>
<
View
style
=
{
styles
.
sub_list_rig
}
>
<
Text
style
=
{
styles
.
rig_tit
}
>
{
item
.
item_name
}
{
i
ndex
+
1
}.
{
i
tem
.
item_name
}
<
/Text
>
<
Text
style
=
{
styles
.
rig_ser
}
>
序列号:
{
item
.
serial_number
}
<
/Text
>
<
/View
>
<
/
View
>
<
/
TouchableOpacity
>
)
}
...
...
app/containers/equipConsu/module/DetailsModel.js
View file @
6dff0437
...
...
@@ -211,7 +211,7 @@ class DetailsModel extends Component {
<
View
style
=
{
styles
.
ri_inner
}
>
<
View
style
=
{
styles
.
ri_text_box
}
>
<
Text
style
=
{
styles
.
ri_te_tit
}
>
{
item
.
item_name
}
-
{
item
.
specification
}
{
index
+
1
}.
{
item
.
item_name
}
-
{
item
.
specification
}
<
/Text
>
<
Text
style
=
{[
styles
.
ri_te_ot
,
styles
.
thr_ot
]}
>
序列号:
{
item
.
serial_number
}
<
/Text
>
<
/View
>
...
...
app/containers/equipConsu/module/ShowDetailPage.js
0 → 100644
View file @
6dff0437
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
}
from
'../../../base/BaseStyle'
;
import
StatusBarView
from
'../../common/StatusBarView'
;
import
HeadBackItem
from
'../../common/HeadBackItem'
;
import
{
show
}
from
'../../../utils/Utils'
;
import
{
getSubdetailOption
}
from
'../../../action/EquipAction'
;
import
{
connect
}
from
'react-redux'
;
class
ShowDetailPage
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
unitPriceOption
:
[
// {
// "id": "2",
// item_name: '人工髋关节假体-JS-HB ||| T',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// sale_price: 90890,
// local_add_price: 90890,
// select: true
// }
]
}
}
componentDidMount
()
{
this
.
getLocalSelectedData
()
}
// 获取选择的数据
getLocalSelectedData
()
{
let
{
localSelectOption
}
=
this
.
props
.
navigation
.
state
.
params
console
.
log
(
'localSelectOption----'
,
localSelectOption
)
this
.
setState
({
unitPriceOption
:
localSelectOption
})
}
// 确认明细 点击
handleSubmit
()
{
let
{
unitPriceOption
}
=
this
.
state
let
canSubFlag
=
true
let
{
props
}
=
this
if
(
canSubFlag
)
{
this
.
setState
({
unitPriceOption
})
// 存储于store中,并跳转
props
.
getSubdetailOption
(
unitPriceOption
)
props
.
navigation
.
navigate
(
'EquipConsuPage'
,
{
title
:
'器械消耗'
})
}
}
// 返回主要元素
renderContItem
()
{
return
(
<
ScrollView
style
=
{
styles
.
cons_cont_scroll
}
// showsVerticalScrollIndicator={false}
>
<
FlatList
style
=
{
styles
.
cons_cont
}
keyExtractor
=
{
item
=>
item
.
id
}
data
=
{
this
.
state
.
unitPriceOption
}
extraData
=
{
this
.
state
}
renderItem
=
{
({
item
,
index
})
=>
this
.
renderSubListItem
(
item
,
index
)
}
/
>
<
/ScrollView
>
)
}
// 返回每一列元素
renderSubListItem
(
item
,
index
)
{
let
price
=
''
if
(
item
.
local_add_price
)
{
price
=
String
(
item
.
local_add_price
)
}
return
(
<
View
style
=
{
styles
.
cons_sub_list
}
>
<
Text
style
=
{
styles
.
cont_tit
}
>
{
index
+
1
}.
{
item
.
item_name
}
<
/Text
>
<
Text
style
=
{
styles
.
cont_ser
}
>
序列号:
{
item
.
serial_number
}
<
/Text
>
<
/View
>
)
}
// 返回底部元素
renderFooterBtnItem
()
{
return
(
<
View
style
=
{
list_common_item
.
sub_box
}
>
<
View
style
=
{
list_common_item
.
sub_two_btn
}
>
<
TouchableOpacity
activeOpacity
=
{.
8
}
style
=
{[
list_common_item
.
rig_btn
,
styles
.
fot_btn
]}
onPress
=
{()
=>
this
.
handleSubmit
()}
>
<
Text
style
=
{
list_common_item
.
rig_tip
}
>
{
'确定耗材'
}
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
)
}
render
()
{
let
{
navigation
}
=
this
.
props
let
{
title
}
=
navigation
.
state
.
params
return
(
<
View
style
=
{
styles
.
cu_dl_container
}
>
<
StatusBarView
isReactStackNavigator
=
{
true
}
backgroundColor
=
{
promary_color
}
barStyle
=
'light-content'
/>
<
SafeAreaView
style
=
{
safe_view
}
>
<
HeadBackItem
title
=
{
title
}
navigation
=
{
navigation
}
/
>
<
View
style
=
{
styles
.
cu_dl_main
}
>
{
this
.
renderContItem
()
}
<
/View
>
{
this
.
renderFooterBtnItem
()}
<
/SafeAreaView
>
<
/View
>
);
}
}
const
styles
=
StyleSheet
.
create
({
cu_dl_container
:
{
flex
:
1
,
backgroundColor
:
home_background_color
,
padding
:
0
,
margin
:
0
},
cu_dl_main
:
{
flex
:
1
},
cons_cont_scroll
:
{},
cons_cont
:
{
paddingHorizontal
:
20
},
cons_sub_list
:
{
backgroundColor
:
'#FFF'
,
marginVertical
:
10
,
padding
:
10
},
cont_tit
:
{
fontSize
:
second_text_size
,
color
:
promary_text_color
,
fontFamily
:
font_family_regular
},
cont_ser
:
{
fontSize
:
14
,
color
:
'#A3A3A3'
,
fontFamily
:
font_family_regular
},
cont_pri
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
},
pri_icon
:
{
color
:
'#EC3A2E'
,
fontSize
:
16
,
fontFamily
:
font_family_medium
},
pri_inner
:
{
fontFamily
:
font_family_medium
,
fontSize
:
second_text_size
,
color
:
promary_text_color
},
cont_pri_box
:
{
flex
:
1
,
paddingRight
:
20
},
pri_txt
:
{
fontFamily
:
font_family_medium
,
fontSize
:
second_text_size
,
color
:
promary_text_color
},
fot_btn
:
{
width
:
'100%'
,
borderRadius
:
10
}
})
const
mapStateToProps
=
(
state
)
=>
{
return
{}
}
const
mapDispatchToProps
=
(
dispatch
)
=>
{
return
{
getSubdetailOption
:
(
data
)
=>
{
dispatch
(
getSubdetailOption
(
data
))
}
}
}
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
ShowDetailPage
);
\ No newline at end of file
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