Commit 9461003b by Denglingling

增加【消耗明细】的【确认单价】页面布局

parent 38bd3325
......@@ -14,6 +14,7 @@ import EditStencilPage from './containers/selfOrder/module/EditStencilPage';
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 QuickOrderPage from './containers/quickOrder/QuickOrderPage';
import TransOrderPage from './containers/transOrder/TransOrderPage';
import TransSearchPage from './containers/transOrder/module/TransSearchPage';
......@@ -28,6 +29,7 @@ const Router = createAppContainer(createStackNavigator({
SubSuccessPage: {screen: SubSuccessPage},
EquipConsuPage: {screen: EquipConsuPage},
ConsumDetailsPage: {screen: ConsumDetailsPage},
FillUnitPricePage: {screen: FillUnitPricePage},
QuickOrderPage: {screen: QuickOrderPage},
TransOrderPage: {screen: TransOrderPage},
TransSearchPage: {screen: TransSearchPage},
......
......@@ -125,8 +125,9 @@ class EquipConsuPage extends Component {
"id": "10",
title: '是否结单',
value: '',
isPicker: false, // 单选
select: false
isPicker: false,
select: false,
isRedio: false // 单选
},
{
"id": "11",
......@@ -147,20 +148,35 @@ class EquipConsuPage extends Component {
isShowSub: true, // 是否展示子项
subOption: [
{
title: '人工髋关节假体-JS-HB ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
"id": "0",
title: '人工髋关节假体-JS-HB ||| T',
tip1: '2001202001001774',
price: '36668',
select: true
},{
title: '人工髋关节假体-JS-22 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
"id": "1",
title: '人工髋关节假体-JS-HB ||| T2',
tip1: '2001202001001774',
price: '36668',
select: true
},{
title: '人工髋关节假体-JS-33 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
"id": "2",
title: '人工髋关节假体-JS-HB ||| T3',
tip1: '2001202001001774',
price: '36668',
select: true
},{
title: '人工髋关节假体-JS-44 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
"id": "3",
title: '人工髋关节假体-JS-HB ||| T4',
tip1: '2001202001001774',
price: '36668',
select: true
},{
title: '人工髋关节假体-JS-5 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
"id": "4",
title: '人工髋关节假体-JS-HB ||| T5',
tip1: '2001202001001774',
price: '36668',
select: true
}
]
},
......@@ -289,9 +305,72 @@ class EquipConsuPage extends Component {
// }
}
// 订单信息 点击
handleOrderInfoCheck() {
console.warn('订单信息------check')
}
// 消耗时间 点击
handleEquipDateCheck() {
console.warn('消耗时间------check')
}
// 患者姓名 输入
handlePatNameInput(text) {
console.warn('患者姓名------input:', text)
}
// 性别 点击
handleGenderCheck() {
console.warn('性别------check:')
}
// 年龄 输入
handleAgeInput(text) {
console.warn('年龄------input:', text)
}
// 床位 输入
handleBedInput(text) {
console.warn('床位------input:', text)
}
// 病历号 输入
handleRecordNumInput(text) {
console.warn('病历号------input:', text)
}
// 结单 是
handleRadioYesClick() {
let {listOptionData} = this.state
listOptionData[10].isRedio = true
this.setState({
listOptionData
})
}
// 结单 否
handleRadioNoClick() {
let {listOptionData} = this.state
listOptionData[10].isRedio = false
this.setState({
listOptionData
})
}
// 备注 输入
handleRemarkInput(text) {
console.warn('备注---',text)
let { listOptionData } = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '备注') {
item.value = text
}
return item
})
})
}
// 耗材明细 隐藏子项
handleDetailBtmCheck() {
......@@ -387,7 +466,7 @@ class EquipConsuPage extends Component {
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleOrderInfo()}
onPress={() => this.handleOrderInfoCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
......@@ -400,7 +479,7 @@ class EquipConsuPage extends Component {
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleConsumDateCheck()}
onPress={() => this.handleEquipDateCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
......@@ -428,7 +507,7 @@ class EquipConsuPage extends Component {
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handlePatNameInput(text)}
onChangeText={(text) => this.handlePatNameInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
......@@ -436,7 +515,7 @@ class EquipConsuPage extends Component {
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleGenderCheck()}
onPress={() => this.handleGenderCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
......@@ -456,7 +535,7 @@ class EquipConsuPage extends Component {
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handleAgeInput(text)}
onChangeText={(text) => this.handleAgeInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
......@@ -471,7 +550,7 @@ class EquipConsuPage extends Component {
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handleBedInput(text)}
onChangeText={(text) => this.handleBedInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
......@@ -486,7 +565,7 @@ class EquipConsuPage extends Component {
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handleRecordNumInput(text)}
onChangeText={(text) => this.handleRecordNumInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
......@@ -494,7 +573,6 @@ class EquipConsuPage extends Component {
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleBillCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
......@@ -503,29 +581,32 @@ class EquipConsuPage extends Component {
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_yes}
onPress={() => console.log('是')}
onPress={() => this.handleRadioYesClick()}
>
<View style={styles.radio_icon}>
{
listOptionData[10].isRedio ?
<Image style={icon_style} source={require('../../images/radio_yes.png')} />
: <Image style={icon_style} source={require('../../images/radio_no.png')} />
}
</View>
<Text style={styles.radio_txt}></Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_no}
onPress={() => console.log('否')}
onPress={() => this.handleRadioNoClick()}
>
<View style={styles.radio_icon}>
{
listOptionData[10].isRedio ?
<Image style={icon_style} source={require('../../images/radio_no.png')} />
: <Image style={icon_style} source={require('../../images/radio_yes.png')} />
}
</View>
<Text style={styles.radio_txt}></Text>
</TouchableOpacity>
</View>
{/* <ContInputTextStyle
style={styles.cell_input}
placeholder={`是 否`}
// onChangeText={(text) => this.handleDoctorCheck(text)}
/> */}
</CellTextStyle>
</TouchableOpacity>
</View>
......@@ -559,11 +640,11 @@ class EquipConsuPage extends Component {
<SafeAreaView style={styles.item_container}>
<DialogModel
entityList={listCurrentOption}
// callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
show={showTypePop}
itemValue={currentItem.value}
itemTitle={currentTitle}
// closeModal={(show) => this.handleCloseModal(show)}
closeModal={(show) => this.handleCloseModal(show)}
/>
</SafeAreaView>
)
......@@ -587,7 +668,7 @@ class EquipConsuPage extends Component {
numberOfLines = {8}
style={list_common_item.rema_Input}
maxLength={140}
// onChangeText={(text) => this.handleRemarkInput(text)}
onChangeText={(text) => this.handleRemarkInput(text)}
defaultValue={state.listOptionData[10].value}
/>
</TouchableOpacity>
......@@ -680,7 +761,10 @@ class EquipConsuPage extends Component {
{index+1}{ item.title }
</Text>
<Text style={list_common_item.de_tip}>
{ item.orderNumber }
序列号:{ item.tip1 }
</Text>
<Text style={list_common_item.de_tip}>
单价(¥){ item.price }
</Text>
</View>
)
......
......@@ -163,7 +163,12 @@ class ConsumDetailsPage extends Component {
handleSubmit(show) {
console.warn('确定耗材', this.props.navigation.navigate)
this.handleCloseSelectModal(false)
console.warn('携带数据,返回到自助下单') // 可存储于store中
console.warn('携带数据,填写单价') // 可存储于store中!!!
this.props.navigation.navigate('FillUnitPricePage', {
title: '器械消耗 - 填写单价'
})
}
// 返回搜索元素
......
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';
class FillUnitPricePage extends Component {
constructor(props) {
super(props);
this.state = {
unitPriceOption: [
{
"id": "2",
title: '人工髋关节假体-JS-HB ||| T3',
tip1: '2001202001001774',
select: true
},{
"id": "3",
title: '人工髋关节假体-JS-HB ||| T4',
tip1: '2001202001001774',
select: true
},{
"id": "4",
title: '人工髋关节假体-JS-HB ||| T5',
tip1: '2001202001001774',
select: true
},{
"id": "5",
title: '人工髋关节假体-JS-HB ||| T6',
tip1: '2001202001001774',
select: true
}
]
}
}
// 每一个元素输入单价
handleItemPriceInput(text, index) {
console.warn('单价------input:', text, index)
}
// 确定单价 点击
handleSubmit() {
console.warn('确定单价------check:')
}
// 返回主要元素
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) {
console.log('item, index---',item, index)
return(
<View style={styles.cons_sub_list}>
<Text style={styles.cont_tit}>
{item.title}
</Text>
<Text style={styles.cont_ser}>
序列号:{item.tip1}
</Text>
<View style={styles.cont_pri}>
<Text style={styles.pri_icon}>*</Text>
<Text style={styles.pri_inner}>单价:</Text>
<TouchableOpacity
activeOpacity={1}
style={styles.cont_pri_box}
onPress = {() => this.TextInput.focus()}>
<TextInput
style={styles.pri_txt}
placeholder = {'请输入单价'}
placeholderTextColor = {placehold_text_color}
underlineColorAndroid = {'transparent'}
ref = {textInput => this.TextInput = textInput}
onChangeText={(text) => this.handleItemPriceInput(text, index)}
defaultValue={item.price}
/>
</TouchableOpacity>
</View>
</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: {},
pri_txt: {
fontFamily: font_family_medium,
fontSize: second_text_size,
color: promary_text_color
},
fot_btn: {
width: '100%',
borderRadius: 10
}
})
export default FillUnitPricePage;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment