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
781e11a4
authored
Aug 12, 2020
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整获取手术类型的方式,从本地配置改为接口获取
parent
8784c5cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
40 deletions
app/action/QuickAction.js
app/containers/quickOrder/QuickOrderPage.js
app/action/QuickAction.js
View file @
781e11a4
...
@@ -97,7 +97,7 @@ export function requestQuickOrderType(params) {
...
@@ -97,7 +97,7 @@ export function requestQuickOrderType(params) {
}
}
}
}
// 获取配台模
版
params={access_token:'', org_code:'', seller_code: 'shi.ming', customer_code: '', surgery_type: '', doctor_name: ''}
// 获取配台模
板
params={access_token:'', org_code:'', seller_code: 'shi.ming', customer_code: '', surgery_type: '', doctor_name: ''}
export
function
requestQuickTemplateCollect
(
params
)
{
export
function
requestQuickTemplateCollect
(
params
)
{
return
(
dispatch
,
getState
)
=>
{
return
(
dispatch
,
getState
)
=>
{
dispatch
(
requestListDataing
());
dispatch
(
requestListDataing
());
...
@@ -124,6 +124,37 @@ export function requestQuickTemplateCollect(params) {
...
@@ -124,6 +124,37 @@ export function requestQuickTemplateCollect(params) {
}
}
}
}
// 获取手术类型 params={access_token:'', value_set_code:'ORTHOPEDICS_PRODUCT_CLASS'}
export
function
requestQuickSurgeryType
(
params
)
{
return
(
dispatch
,
getState
)
=>
{
dispatch
(
requestListDataing
());
let
{
global_domain_config
}
=
getState
().
login
GetRequest
(
global_domain_config
,
getUrlParams
(
'/system/value_set/search'
,
params
))
.
then
(
res
=>
{
if
(
res
.
error_code
==
0
)
{
let
typeOption
=
[]
let
{
data
:
{
value_set_code
,
sys_values
}
}
=
res
if
(
value_set_code
===
'ORTHOPEDICS_PRODUCT_CLASS'
&&
sys_values
&&
sys_values
.
length
)
{
typeOption
=
sys_values
}
dispatch
(
requestListDataSuccess
(
typeOption
));
}
else
if
(
res
.
error_code
===
41006
)
{
show
(
'登录过期,请重新登录'
);
dispatch
(
exitLoginStatus
());
}
else
{
let
error_msg
=
res
.
error_msg
||
res
.
message
show
(
error_msg
);
dispatch
(
requestListDataFail
());
}
})
.
catch
(
err
=>
{
console
.
log
(
'------err--====requestQuickSurgeryType----'
,
Object
.
keys
(
err
),
err
)
show
(
err
.
error
);
dispatch
(
requestListDataFail
());
})
}
}
function
requestListDataing
()
{
function
requestListDataing
()
{
return
{
return
{
type
:
QUICK_ORDER_LIST_DOING
type
:
QUICK_ORDER_LIST_DOING
...
...
app/containers/quickOrder/QuickOrderPage.js
View file @
781e11a4
...
@@ -49,7 +49,8 @@ import {
...
@@ -49,7 +49,8 @@ import {
requestQuickSumbit
,
requestQuickSumbit
,
setQuickInitData
,
setQuickInitData
,
reqQuickSurgeryHospital
,
reqQuickSurgeryHospital
,
requestListDataSuccess
requestListDataSuccess
,
requestQuickSurgeryType
}
from
'../../action/QuickAction'
;
}
from
'../../action/QuickAction'
;
import
{
exitLoginStatus
}
from
'../../action/LoginAction'
;
import
{
exitLoginStatus
}
from
'../../action/LoginAction'
;
import
{
import
{
...
@@ -114,7 +115,7 @@ class EquipConsuPage extends Component {
...
@@ -114,7 +115,7 @@ class EquipConsuPage extends Component {
},
},
{
{
"id"
:
"7"
,
"id"
:
"7"
,
title
:
'配台模
版
'
,
title
:
'配台模
板
'
,
name
:
'请选择'
,
name
:
'请选择'
,
value
:
''
value
:
''
},
},
...
@@ -156,7 +157,7 @@ class EquipConsuPage extends Component {
...
@@ -156,7 +157,7 @@ class EquipConsuPage extends Component {
// surgery_name: '', // 手术名称
// surgery_name: '', // 手术名称
surgery_date
:
''
,
// 手术时间
surgery_date
:
''
,
// 手术时间
// surgery_type_code: '', // 手术类型
// surgery_type_code: '', // 手术类型
template_collect_number
:
''
,
// 配台模
版
template_collect_number
:
''
,
// 配台模
板
order_type_code
:
''
,
// 订单类型
order_type_code
:
''
,
// 订单类型
surgery_desc
:
''
,
// 备注信息
surgery_desc
:
''
,
// 备注信息
voice_url
:
''
,
// 录音地址
voice_url
:
''
,
// 录音地址
...
@@ -184,9 +185,7 @@ class EquipConsuPage extends Component {
...
@@ -184,9 +185,7 @@ class EquipConsuPage extends Component {
],
],
dateModelPop
:
false
,
// 日期选择器
dateModelPop
:
false
,
// 日期选择器
hasPermission
:
undefined
,
//录音 授权状态
hasPermission
:
undefined
,
//录音 授权状态
// audioPath: AudioUtils.DocumentDirectoryPath + `/quickAudio${Math.floor(Math.random() * (1000))+1}.aac`, // 文件路径
audioPath
:
AudioUtils
.
DocumentDirectoryPath
+
`/quick_audio_
${
new
Date
().
getTime
()}
.aac`
,
// 文件路径
audioPath
:
AudioUtils
.
DocumentDirectoryPath
+
`/quick_audio_
${
new
Date
().
getTime
()}
.aac`
,
// 文件路径
// recording: false, //是否录音
stop
:
false
,
//录音是否停止
stop
:
false
,
//录音是否停止
currentTime
:
0
,
//录音时长
currentTime
:
0
,
//录音时长
localCustomersOption
:
[],
// 当前医院信息:客户名称、收单地点、收货地点、主治医生
localCustomersOption
:
[],
// 当前医院信息:客户名称、收单地点、收货地点、主治医生
...
@@ -587,7 +586,7 @@ class EquipConsuPage extends Component {
...
@@ -587,7 +586,7 @@ class EquipConsuPage extends Component {
if
(
itemTitle
===
'手术类型'
)
{
if
(
itemTitle
===
'手术类型'
)
{
self
.
clearInitNameAndValue
(
6
)
self
.
clearInitNameAndValue
(
6
)
}
}
if
(
itemTitle
===
'配台模
版
'
)
{
if
(
itemTitle
===
'配台模
板
'
)
{
listOptionData
[
10
].
value
=
item
.
desc
listOptionData
[
10
].
value
=
item
.
desc
}
}
}
}
...
@@ -633,8 +632,16 @@ class EquipConsuPage extends Component {
...
@@ -633,8 +632,16 @@ class EquipConsuPage extends Component {
})
})
}
}
tempOption
=
this
.
changeNameAndValue
(
currentArr
,
'customer_name'
,
'customer_code'
)
tempOption
=
this
.
changeNameAndValue
(
currentArr
,
'customer_name'
,
'customer_code'
)
}
else
if
(
currentTitle
===
'手术类型'
)
{
}
else
if
(
currentTitle
===
'配台模版'
)
{
let
resultArr
=
[]
quickOrderOption
.
forEach
(
item
=>
{
let
obj
=
{}
obj
.
name
=
item
.
value_name
obj
.
value
=
item
.
value_code
resultArr
.
push
(
obj
)
})
tempOption
=
[...
resultArr
]
}
else
if
(
currentTitle
===
'配台模板'
)
{
let
resultArr
=
[]
let
resultArr
=
[]
quickOrderOption
.
forEach
(
item
=>
{
quickOrderOption
.
forEach
(
item
=>
{
let
obj
=
{}
let
obj
=
{}
...
@@ -642,8 +649,8 @@ class EquipConsuPage extends Component {
...
@@ -642,8 +649,8 @@ class EquipConsuPage extends Component {
if
(
item
.
doctor_name
)
{
if
(
item
.
doctor_name
)
{
tempName
+=
`——
${
item
.
doctor_name
}
`
tempName
+=
`——
${
item
.
doctor_name
}
`
}
}
obj
.
name
=
tempName
,
obj
.
name
=
tempName
obj
.
value
=
item
.
template_number
,
obj
.
value
=
item
.
template_number
obj
.
desc
=
item
.
template_desc
obj
.
desc
=
item
.
template_desc
resultArr
.
push
(
obj
)
resultArr
.
push
(
obj
)
})
})
...
@@ -852,21 +859,11 @@ class EquipConsuPage extends Component {
...
@@ -852,21 +859,11 @@ class EquipConsuPage extends Component {
})
})
}
}
}
}
// 主治医生 点击
/输入
// 主治医生 点击
handleDoctorCheck
(
text
)
{
handleDoctorCheck
()
{
let
{
localCustomersOption
,
listOptionData
}
=
this
.
state
let
{
localCustomersOption
,
listOptionData
}
=
this
.
state
let
self
=
this
let
self
=
this
if
(
text
)
{
if
(
this
.
judgeOrgIsNull
()
&&
this
.
judgeCustomerIsNull
())
{
// 输入
self
.
setState
({
listOptionData
:
listOptionData
.
map
(
item
=>
{
if
(
item
.
title
===
'主治医生'
)
{
item
.
inputValue
=
text
}
return
item
})
})
}
else
if
(
this
.
judgeOrgIsNull
()
&&
this
.
judgeCustomerIsNull
())
{
// 点击
// 点击
self
.
setState
({
self
.
setState
({
currentTitle
:
'主治医生'
,
currentTitle
:
'主治医生'
,
...
@@ -900,9 +897,22 @@ class EquipConsuPage extends Component {
...
@@ -900,9 +897,22 @@ class EquipConsuPage extends Component {
})
})
}
}
}
}
// 主治医生 输入
handleDoctorInput
(
text
)
{
let
{
listOptionData
}
=
this
.
state
this
.
setState
({
listOptionData
:
listOptionData
.
map
(
item
=>
{
if
(
item
.
title
===
'主治医生'
)
{
item
.
inputValue
=
text
}
return
item
})
})
}
// 手术类型 点击
// 手术类型 点击
handleSurTypeCheck
()
{
handleSurTypeCheck
()
{
let
{
listOptionData
,
surgeryTypeOption
}
=
this
.
state
let
{
listOptionData
,
surgeryTypeOption
}
=
this
.
state
let
{
props
}
=
this
let
self
=
this
let
self
=
this
if
(
this
.
judgeOrgIsNull
()
&&
this
.
judgeCustomerIsNull
())
{
if
(
this
.
judgeOrgIsNull
()
&&
this
.
judgeCustomerIsNull
())
{
self
.
setState
({
self
.
setState
({
...
@@ -912,19 +922,20 @@ class EquipConsuPage extends Component {
...
@@ -912,19 +922,20 @@ class EquipConsuPage extends Component {
value
:
listOptionData
[
6
].
value
value
:
listOptionData
[
6
].
value
}
}
},
()
=>
{
},
()
=>
{
self
.
setState
({
let
params
=
{
showTypePop
:
true
,
access_token
:
props
.
token
,
listCurrentOption
:
[...
surgeryTypeOption
]
value_set_code
:
'ORTHOPEDICS_PRODUCT_CLASS'
})
}
props
.
requestQuickSurgeryType
(
params
)
})
})
}
}
}
}
// 配台模
版
点击
// 配台模
板
点击
handleMatchTempCheck
()
{
handleMatchTempCheck
()
{
let
{
state
,
props
}
=
this
let
{
state
,
props
}
=
this
if
(
this
.
judgeOrgIsNull
()
&&
this
.
judgeCustomerIsNull
())
{
if
(
this
.
judgeOrgIsNull
()
&&
this
.
judgeCustomerIsNull
())
{
this
.
setState
({
this
.
setState
({
currentTitle
:
'配台模
版
'
,
currentTitle
:
'配台模
板
'
,
currentItem
:
{
currentItem
:
{
name
:
state
.
listOptionData
[
7
].
name
,
name
:
state
.
listOptionData
[
7
].
name
,
value
:
state
.
listOptionData
[
7
].
value
value
:
state
.
listOptionData
[
7
].
value
...
@@ -1244,11 +1255,10 @@ class EquipConsuPage extends Component {
...
@@ -1244,11 +1255,10 @@ class EquipConsuPage extends Component {
<
ContInputTextStyle
<
ContInputTextStyle
style
=
{
styles
.
cell_input
}
style
=
{
styles
.
cell_input
}
placeholder
=
{
`请输入主治医生`
}
placeholder
=
{
`请输入主治医生`
}
onChangeText
=
{(
text
)
=>
this
.
handleDoctor
Check
(
text
)}
onChangeText
=
{(
text
)
=>
this
.
handleDoctor
Input
(
text
)}
><
/ContInputTextStyle
>
><
/ContInputTextStyle
>
<
/CellTextStyle> : nul
l
<
/CellTextStyle> : nul
l
}
}
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
item_container
}
>
<
View
style
=
{
styles
.
item_container
}
>
<
TouchableOpacity
<
TouchableOpacity
...
@@ -1269,7 +1279,7 @@ class EquipConsuPage extends Component {
...
@@ -1269,7 +1279,7 @@ class EquipConsuPage extends Component {
>
>
<
CellTextStyle
>
<
CellTextStyle
>
<
AsteriskTextStyle
>*<
/AsteriskTextStyle
>
<
AsteriskTextStyle
>*<
/AsteriskTextStyle
>
<
TitleTextStyle
>
{
'配台模
版
'
}
<
/TitleTextStyle
>
<
TitleTextStyle
>
{
'配台模
板
'
}
<
/TitleTextStyle
>
<
ContTextStyle
>
{
listOptionData
[
7
].
name
}
<
/ContTextStyle
>
<
ContTextStyle
>
{
listOptionData
[
7
].
name
}
<
/ContTextStyle
>
{
this
.
renderRightArrowItem
()
}
{
this
.
renderRightArrowItem
()
}
<
/CellTextStyle
>
<
/CellTextStyle
>
...
@@ -1285,15 +1295,13 @@ class EquipConsuPage extends Component {
...
@@ -1285,15 +1295,13 @@ class EquipConsuPage extends Component {
<
ContTextStyle
>
{
listOptionData
[
8
].
name
}
<
/ContTextStyle
>
<
ContTextStyle
>
{
listOptionData
[
8
].
name
}
<
/ContTextStyle
>
{
this
.
renderRightArrowItem
()
}
{
this
.
renderRightArrowItem
()
}
<
/CellTextStyle
>
<
/CellTextStyle
>
<
/TouchableOpacity
>
<
/TouchableOpacity>
<
DateModel
<
DateModel
date
=
{
listOptionData
[
8
].
dateValue
}
date
=
{
listOptionData
[
8
].
dateValue
}
closeModal
=
{(
show
)
=>
this
.
closeDateModal
(
show
)}
closeModal
=
{(
show
)
=>
this
.
closeDateModal
(
show
)}
show
=
{
dateModelPop
}
show
=
{
dateModelPop
}
callback
=
{(
date
)
=>
this
.
dateModalCallback
(
date
)}
callback
=
{(
date
)
=>
this
.
dateModalCallback
(
date
)}
/
>
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
item_container
}
>
<
View
style
=
{
styles
.
item_container
}
>
<
TouchableOpacity
<
TouchableOpacity
...
@@ -1307,10 +1315,8 @@ class EquipConsuPage extends Component {
...
@@ -1307,10 +1315,8 @@ class EquipConsuPage extends Component {
{
this
.
renderRightArrowItem
()
}
{
this
.
renderRightArrowItem
()
}
<
/CellTextStyle
>
<
/CellTextStyle
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View>
{
this
.
renderPickerModel
()
}
{
this
.
renderPickerModel
()
}
<
/View
>
<
/View
>
)
)
}
}
...
@@ -1544,6 +1550,9 @@ const mapDispatchToProps = (dispatch) => {
...
@@ -1544,6 +1550,9 @@ const mapDispatchToProps = (dispatch) => {
},
},
requestListDataSuccess
:
(
data
)
=>
{
requestListDataSuccess
:
(
data
)
=>
{
dispatch
(
requestListDataSuccess
(
data
))
dispatch
(
requestListDataSuccess
(
data
))
},
requestQuickSurgeryType
:
(
params
)
=>
{
dispatch
(
requestQuickSurgeryType
(
params
))
}
}
}
}
}
}
...
...
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