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
6c064d41
authored
Jan 29, 2021
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加注释说明,以及优化自助下单
parent
485480a2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
222 additions
and
116 deletions
app/containers/common/listDataComponent/PageListArrow.js
app/containers/equipConsu/EquipConsuPage.js
app/containers/selfOrder/SelfOrderPage.js
app/containers/common/listDataComponent/PageListArrow.js
View file @
6c064d41
...
...
@@ -10,25 +10,26 @@ const PropTypes = require('prop-types');
class
PageListArrow
extends
Component
{
static
propTypres
=
{
listActOpa
:
PropTypes
.
number
,
listCallBack
:
PropTypes
.
func
,
// 点击后的回调函数
listHasAster
:
PropTypes
.
bool
,
// 是否必填
listEditAble
:
PropTypes
.
bool
,
listDefaValue
:
PropTypes
.
string
,
listItem
:
PropTypes
.
object
,
listTitle
:
PropTypes
.
string
,
listName
:
PropTypes
.
string
,
listValue
:
PropTypes
.
string
,
listHasArrow
:
PropTypes
.
bool
,
listOtherInput
:
PropTypes
.
string
,
otherInput
:
PropTypes
.
string
,
otherInputCallBack
:
PropTypes
.
func
,
listInputPlace
:
PropTypes
.
string
,
inputCallBack
:
PropTypes
.
func
,
isTitInputStyle
:
PropTypes
.
bool
,
listMaxLines
:
PropTypes
.
number
,
// 文本最大行数
listIsAudio
:
PropTypes
.
bool
,
listCellStyle
:
PropTypes
.
object
listActOpa
:
PropTypes
.
number
,
// 透明度显示(0 到 1 之间)
listCallBack
:
PropTypes
.
func
,
// 组件点击后的回调函数
listHasAster
:
PropTypes
.
bool
,
// 必填✳️号显示
listEditAble
:
PropTypes
.
bool
,
// 文本框可编辑的。默认值为 true
listDefaValue
:
PropTypes
.
string
,
// 文本框中的初始值
listItem
:
PropTypes
.
object
,
// 当前组件的数据
listTitle
:
PropTypes
.
string
,
// 标题属性名
listName
:
PropTypes
.
string
,
// 展示字段属性名
listValue
:
PropTypes
.
string
,
// 值字段属性名
listHasArrow
:
PropTypes
.
bool
,
// 右侧箭头图标显示
listOtherInput
:
PropTypes
.
string
,
// 特定输入框显示(如‘医生’)
otherInput
:
PropTypes
.
string
,
// 特定输入框属性名
otherInputCallBack
:
PropTypes
.
func
,
// 特定输入框回调函数
listInputPlace
:
PropTypes
.
string
,
// 输入框默认显示内容
inputCallBack
:
PropTypes
.
func
,
// 输入框默认显示内容
isTitInputStyle
:
PropTypes
.
bool
,
// 输入框回调函数
listMaxLines
:
PropTypes
.
number
,
// 限制输入框的行数
listIsAudio
:
PropTypes
.
bool
,
// 特定单选按钮显示
listCellStyle
:
PropTypes
.
object
,
// 组件另外样式
inputKeyboardType
:
PropTypes
.
string
,
// 弹出何种软键盘类型
}
constructor
(
props
)
{
...
...
@@ -47,7 +48,7 @@ class PageListArrow extends Component {
render
()
{
let
{
listActOpa
,
listCallBack
,
listHasAster
,
listEditAble
,
listDefaValue
,
listItem
,
listTitle
,
listName
,
listValue
,
listHasArrow
,
listOtherInput
,
otherInput
,
otherInputCallBack
,
listInputPlace
,
inputCallBack
,
isTitInputStyle
,
listMaxLines
,
listIsAudio
,
listCellStyle
}
=
this
.
props
inputCallBack
,
isTitInputStyle
,
listMaxLines
,
listIsAudio
,
listCellStyle
,
inputKeyboardType
}
=
this
.
props
if
(
!
listMaxLines
){
listMaxLines
=
2
// 默认
}
...
...
@@ -65,6 +66,7 @@ class PageListArrow extends Component {
editable
=
{
!
listEditAble
}
defaultValue
=
{
listItem
[
listDefaValue
]}
placeholder
=
{
listInputPlace
}
keyboardType
=
{
inputKeyboardType
?
inputKeyboardType
:
'default'
}
onChangeText
=
{(
text
)
=>
{
return
inputCallBack
?
inputCallBack
(
text
)
:
''
}}
/> : <ContTextStyle numberOfLines={listMaxLines}>{listItem
[
listName
]
}</
ContTextStyle
>
}
...
...
app/containers/equipConsu/EquipConsuPage.js
View file @
6c064d41
...
...
@@ -16,6 +16,7 @@ import ImagePicker from 'react-native-image-picker';
import
{
exitLoginStatus
}
from
'../../action/LoginAction'
;
import
LodingModel
from
'../common/LodingModel'
;
import
{
OBS_MOBILE_EQU_CON_DISPLAY_PRICE
}
from
'../../base/BaseConstants'
;
import
PageListArrow
from
'../common/listDataComponent/PageListArrow'
;
class
EquipConsuPage
extends
Component
{
constructor
(
props
)
{
...
...
@@ -450,13 +451,13 @@ class EquipConsuPage extends Component {
}
// 组织 点击
handleOrganizationCheck
()
{
let
{
state
,
props
}
=
this
handleOrganizationCheck
(
curData
)
{
let
{
props
}
=
this
this
.
setState
({
currentTitle
:
'组织'
,
currentTitle
:
curData
.
title
,
currentItem
:
{
name
:
state
.
listOptionData
[
1
]
.
name
,
value
:
state
.
listOptionData
[
1
]
.
value
name
:
curData
.
name
,
value
:
curData
.
value
}
},
()
=>
{
let
params
=
{
...
...
@@ -501,15 +502,14 @@ class EquipConsuPage extends Component {
}
// 客户名称 点击
handleCustomerCheck
()
{
let
{
state
}
=
this
handleCustomerCheck
(
curData
)
{
let
that
=
this
if
(
this
.
judgeOrgIsNull
())
{
that
.
setState
({
currentTitle
:
'客户名称'
,
currentTitle
:
curData
.
title
,
currentItem
:
{
name
:
state
.
listOptionData
[
2
]
.
name
,
value
:
state
.
listOptionData
[
2
]
.
value
name
:
curData
.
name
,
value
:
curData
.
value
}
},
()
=>
{
that
.
getCustomerData
()
...
...
@@ -567,15 +567,15 @@ class EquipConsuPage extends Component {
}
// 订单信息 点击
handleOrderInfoCheck
()
{
handleOrderInfoCheck
(
curData
)
{
let
{
state
,
props
}
=
this
let
that
=
this
if
(
this
.
judgeOrgIsNull
()
&&
this
.
judgeCustomerIsNull
())
{
that
.
setState
({
currentTitle
:
'订单信息'
,
currentTitle
:
curData
.
title
,
currentItem
:
{
name
:
state
.
listOptionData
[
3
]
.
name
,
value
:
state
.
listOptionData
[
3
]
.
value
name
:
curData
.
name
,
value
:
curData
.
value
}
},
()
=>
{
let
params
=
{
...
...
@@ -664,17 +664,17 @@ class EquipConsuPage extends Component {
}
// 消耗时间 点击
handleEquipDateCheck
()
{
handleEquipDateCheck
(
curData
)
{
let
{
listOptionData
}
=
this
.
state
let
date
=
listOptionData
[
4
]
.
value
let
date
=
curData
.
value
if
(
date
)
{
this
.
setState
({
listOptionData
:
listOptionData
.
map
((
item
,
index
)
=>
{
if
(
item
.
title
===
'消耗时间'
)
{
listOptionData
.
map
(
function
(
item
)
{
if
(
item
.
title
===
curData
.
title
)
{
item
.
dateValue
=
formatStrForDate
(
date
)
}
return
item
})
this
.
setState
({
listOptionData
:
listOptionData
})
}
this
.
closeDateModal
(
true
)
...
...
@@ -706,31 +706,31 @@ class EquipConsuPage extends Component {
}
// 患者姓名 输入
handlePatNameInput
(
text
)
{
handlePatNameInput
(
text
,
curData
)
{
let
{
listOptionData
}
=
this
.
state
let
that
=
this
this
.
setState
({
listOptionData
:
listOptionData
.
map
((
item
,
index
)
=>
{
if
(
item
.
title
===
'患者姓名'
)
{
listOptionData
.
map
(
function
(
item
)
{
if
(
item
.
title
===
curData
.
title
)
{
item
.
value
=
text
}
return
item
})
that
.
setState
({
listOptionData
:
listOptionData
},()
=>
{
that
.
changeCanSub
()
})
}
// 性别 点击
handleGenderCheck
()
{
let
{
listOptionData
,
sexTypeOption
}
=
this
.
state
handleGenderCheck
(
curData
)
{
let
{
sexTypeOption
}
=
this
.
state
let
that
=
this
if
(
this
.
judgeOrgIsNull
()
&&
this
.
judgeCustomerIsNull
())
{
that
.
setState
({
currentTitle
:
'性别'
,
currentTitle
:
curData
.
title
,
currentItem
:
{
name
:
listOptionData
[
6
]
.
name
,
value
:
listOptionData
[
6
]
.
value
name
:
curData
.
name
,
value
:
curData
.
value
}
},
()
=>
{
that
.
setState
({
...
...
@@ -742,48 +742,48 @@ class EquipConsuPage extends Component {
}
// 年龄 输入
handleAgeInput
(
text
)
{
handleAgeInput
(
text
,
curData
)
{
let
{
listOptionData
}
=
this
.
state
let
that
=
this
this
.
setState
({
listOptionData
:
listOptionData
.
map
((
item
,
index
)
=>
{
if
(
item
.
title
===
'年龄'
)
{
listOptionData
.
map
(
function
(
item
)
{
if
(
item
.
title
===
curData
.
title
)
{
item
.
value
=
text
}
return
item
})
that
.
setState
({
listOptionData
:
listOptionData
},()
=>
{
that
.
changeCanSub
()
})
}
// 床位 输入
handleBedInput
(
text
)
{
handleBedInput
(
text
,
curData
)
{
let
{
listOptionData
}
=
this
.
state
let
that
=
this
this
.
setState
({
listOptionData
:
listOptionData
.
map
((
item
,
index
)
=>
{
if
(
item
.
title
===
'床位'
)
{
listOptionData
.
map
(
function
(
item
)
{
if
(
item
.
title
===
curData
.
title
)
{
item
.
value
=
text
}
return
item
})
that
.
setState
({
listOptionData
:
listOptionData
},()
=>
{
that
.
changeCanSub
()
})
}
// 病历号 输入
handleRecordNumInput
(
text
)
{
handleRecordNumInput
(
text
,
curData
)
{
let
{
listOptionData
}
=
this
.
state
let
that
=
this
this
.
setState
({
listOptionData
:
listOptionData
.
map
((
item
,
index
)
=>
{
if
(
item
.
title
===
'病历号'
)
{
listOptionData
.
map
(
function
(
item
)
{
if
(
item
.
title
===
curData
.
title
)
{
item
.
value
=
text
}
return
item
})
that
.
setState
({
listOptionData
:
listOptionData
},()
=>
{
that
.
changeCanSub
()
})
...
...
@@ -808,42 +808,42 @@ class EquipConsuPage extends Component {
}
// 备注 输入
handleRemarkInput
(
text
)
{
handleRemarkInput
(
text
,
curData
)
{
let
{
listOptionData
}
=
this
.
state
this
.
setState
({
listOptionData
:
listOptionData
.
map
((
item
,
index
)
=>
{
if
(
item
.
title
===
'备注'
)
{
listOptionData
.
map
(
function
(
item
)
{
if
(
item
.
title
===
curData
.
title
)
{
item
.
value
=
text
}
return
item
})
that
.
setState
({
listOptionData
:
listOptionData
})
}
// 耗材明细 隐藏子项
handleDetailBtmCheck
()
{
let
{
listOptionData
}
=
this
.
state
this
.
setState
({
listOptionData
:
listOptionData
.
map
((
item
,
index
)
=>
{
if
(
index
==
12
)
{
item
.
isShowSub
=
false
}
return
item
})
})
//
let { listOptionData } = this.state
//
this.setState({
//
listOptionData: listOptionData.map((item, index) => {
//
if(index == 12) {
//
item.isShowSub = false
//
}
//
return item
//
})
//
})
}
// 耗材明细 显示子项
handleDetailRigCheck
()
{
let
{
listOptionData
}
=
this
.
state
this
.
setState
({
listOptionData
:
listOptionData
.
map
((
item
,
index
)
=>
{
if
(
index
==
12
)
{
item
.
isShowSub
=
true
}
return
item
})
})
//
let { listOptionData } = this.state
//
this.setState({
//
listOptionData: listOptionData.map((item, index) => {
//
if(index == 12) {
//
item.isShowSub = true
//
}
//
return item
//
})
//
})
}
// 耗材明细 点击
...
...
@@ -860,11 +860,7 @@ class EquipConsuPage extends Component {
// 费用明细 点击
handleChargeDetailsCheck
()
{
let
{
listOptionData
}
=
this
.
state
this
.
props
.
navigation
.
navigate
(
'ChargeDetailsPage'
,
{
title
:
'器械消耗 - 添加明细'
,
// orderId: listOptionData[3].value
})
this
.
props
.
navigation
.
navigate
(
'ChargeDetailsPage'
,
{
title
:
'器械消耗 - 添加明细'
})
}
// 添加图片 点击
...
...
@@ -1100,10 +1096,17 @@ class EquipConsuPage extends Component {
// 返回备注以上的元素
renderListItem
()
{
let
{
listOptionData
,
dateModelPop
}
=
this
.
state
return
(
<
View
style
=
{
styles
.
list_cont
}
>
<
View
style
=
{
styles
.
item_container
}
>
<
PageListArrow
listActOpa
=
{
1
}
listEditAble
=
{
true
}
listHasAster
=
{
true
}
listItem
=
{
listOptionData
[
0
]}
listDefaValue
=
{
'name'
}
listTitle
=
{
'title'
}
/
>
{
/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
...
...
@@ -1113,8 +1116,17 @@ class EquipConsuPage extends Component {
<ContInputTextStyle editable={false} defaultValue={listOptionData[0].name}></ContInputTextStyle>
</CellTextStyle>
</TouchableOpacity>
<
/View
>
<
View
style
=
{
styles
.
item_container
}
>
</View> */
}
<
PageListArrow
listActOpa
=
{.
8
}
listHasAster
=
{
true
}
listItem
=
{
listOptionData
[
1
]}
listName
=
{
'name'
}
listTitle
=
{
'title'
}
listCallBack
=
{()
=>
this
.
handleOrganizationCheck
(
listOptionData
[
1
])}
listHasArrow
=
{
true
}
/
>
{
/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrganizationCheck()}
...
...
@@ -1126,8 +1138,17 @@ class EquipConsuPage extends Component {
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
<
/View
>
<
View
style
=
{
styles
.
item_container
}
>
</View> */
}
<
PageListArrow
listActOpa
=
{.
8
}
listHasAster
=
{
true
}
listItem
=
{
listOptionData
[
2
]}
listName
=
{
'name'
}
listTitle
=
{
'title'
}
listCallBack
=
{()
=>
this
.
handleCustomerCheck
(
listOptionData
[
2
])}
listHasArrow
=
{
true
}
/
>
{
/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleCustomerCheck()}
...
...
@@ -1139,8 +1160,17 @@ class EquipConsuPage extends Component {
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
<
/View
>
<
View
style
=
{
styles
.
item_container
}
>
</View> */
}
<
PageListArrow
listActOpa
=
{.
8
}
listHasAster
=
{
true
}
listItem
=
{
listOptionData
[
3
]}
listName
=
{
'name'
}
listTitle
=
{
'title'
}
listCallBack
=
{()
=>
this
.
handleOrderInfoCheck
(
listOptionData
[
3
])}
listHasArrow
=
{
true
}
/
>
{
/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrderInfoCheck()}
...
...
@@ -1152,8 +1182,17 @@ class EquipConsuPage extends Component {
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
<
/View
>
<
View
style
=
{
styles
.
item_container
}
>
</View> */
}
<
PageListArrow
listActOpa
=
{.
8
}
listHasAster
=
{
true
}
listItem
=
{
listOptionData
[
4
]}
listName
=
{
'name'
}
listTitle
=
{
'title'
}
listCallBack
=
{()
=>
this
.
handleEquipDateCheck
(
listOptionData
[
4
])}
listHasArrow
=
{
true
}
/
>
{
/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleEquipDateCheck()}
...
...
@@ -1173,8 +1212,19 @@ class EquipConsuPage extends Component {
callback={(date) => this.dateModalCallback(date)}
/>
<
/View
>
<
View
style
=
{
styles
.
item_container
}
>
</View> */
}
<
PageListArrow
listActOpa
=
{.
8
}
listHasAster
=
{
true
}
listItem
=
{
listOptionData
[
5
]}
listDefaValue
=
{
'value'
}
listTitle
=
{
'title'
}
listInputPlace
=
{
`请输入
${
listOptionData
[
5
].
title
}
`
}
inputCallBack
=
{(
text
)
=>
this
.
handlePatNameInput
(
text
,
listOptionData
[
5
])}
isTitInputStyle
=
{
true
}
listCellStyle
=
{
styles
.
list_cell_box
}
/
>
{
/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
...
...
@@ -1189,8 +1239,17 @@ class EquipConsuPage extends Component {
/>
</CellTextStyle>
</TouchableOpacity>
<
/View
>
<
View
style
=
{
styles
.
item_container
}
>
</View> */
}
<
PageListArrow
listActOpa
=
{.
8
}
listHasAster
=
{
true
}
listItem
=
{
listOptionData
[
6
]}
listName
=
{
'name'
}
listTitle
=
{
'title'
}
listCallBack
=
{()
=>
this
.
handleGenderCheck
(
listOptionData
[
6
])}
listHasArrow
=
{
true
}
/
>
{
/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleGenderCheck()}
...
...
@@ -1202,8 +1261,22 @@ class EquipConsuPage extends Component {
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
<
/View
>
<
View
style
=
{
styles
.
item_container
}
>
</View> */
}
<
PageListArrow
listActOpa
=
{.
8
}
listHasAster
=
{
true
}
listItem
=
{
listOptionData
[
7
]}
listDefaValue
=
{
'value'
}
listTitle
=
{
'title'
}
listInputPlace
=
{
`请输入
${
listOptionData
[
7
].
title
}
`
}
inputCallBack
=
{(
text
)
=>
this
.
handleAgeInput
(
text
,
listOptionData
[
7
])}
isTitInputStyle
=
{
true
}
listCellStyle
=
{
styles
.
list_cell_box
}
inputKeyboardType
=
{
'numeric'
}
/
>
{
/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
...
...
@@ -1219,8 +1292,21 @@ class EquipConsuPage extends Component {
/>
</CellTextStyle>
</TouchableOpacity>
<
/View
>
<
View
style
=
{
styles
.
item_container
}
>
</View> */
}
<
PageListArrow
listActOpa
=
{.
8
}
listHasAster
=
{
true
}
listItem
=
{
listOptionData
[
8
]}
listDefaValue
=
{
'value'
}
listTitle
=
{
'title'
}
listInputPlace
=
{
`请输入
${
listOptionData
[
8
].
title
}
`
}
inputCallBack
=
{(
text
)
=>
this
.
handleBedInput
(
text
,
listOptionData
[
8
])}
isTitInputStyle
=
{
true
}
listCellStyle
=
{
styles
.
list_cell_box
}
inputKeyboardType
=
{
'numeric'
}
/
>
{
/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
...
...
@@ -1236,8 +1322,21 @@ class EquipConsuPage extends Component {
/>
</CellTextStyle>
</TouchableOpacity>
<
/View
>
<
View
style
=
{
styles
.
item_container
}
>
</View> */
}
<
PageListArrow
listActOpa
=
{.
8
}
listHasAster
=
{
true
}
listItem
=
{
listOptionData
[
9
]}
listDefaValue
=
{
'value'
}
listTitle
=
{
'title'
}
listInputPlace
=
{
`请输入
${
listOptionData
[
9
].
title
}
`
}
inputCallBack
=
{(
text
)
=>
this
.
handleRecordNumInput
(
text
,
listOptionData
[
9
])}
isTitInputStyle
=
{
true
}
listCellStyle
=
{
styles
.
list_cell_box
}
inputKeyboardType
=
{
'numeric'
}
/
>
{
/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
...
...
@@ -1253,7 +1352,7 @@ class EquipConsuPage extends Component {
/>
</CellTextStyle>
</TouchableOpacity>
<
/View
>
</View>
*/
}
{
/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
...
...
@@ -1294,6 +1393,12 @@ class EquipConsuPage extends Component {
</CellTextStyle>
</TouchableOpacity>
</View> */
}
<
DateModel
date
=
{
listOptionData
[
4
].
dateValue
}
closeModal
=
{(
show
)
=>
this
.
closeDateModal
(
show
)}
show
=
{
dateModelPop
}
callback
=
{(
date
)
=>
this
.
dateModalCallback
(
date
,
listOptionData
[
4
])}
/
>
{
this
.
renderPickerModel
()
}
<
/View
>
)
...
...
@@ -1350,7 +1455,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
,
state
.
listOptionData
[
11
]
)}
defaultValue
=
{
state
.
listOptionData
[
11
].
value
}
/
>
<
/TouchableOpacity
>
...
...
app/containers/selfOrder/SelfOrderPage.js
View file @
6c064d41
...
...
@@ -592,7 +592,6 @@ class SelfOrderPage extends Component {
// 组织 点击
handleOrganizationCheck
(
curData
)
{
console
.
log
(
curData
)
let
{
props
}
=
this
this
.
setState
({
currentTitle
:
curData
.
title
,
...
...
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