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
bdb925d7
authored
Aug 09, 2021
by
peii
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
自助下单实现订单类型接口
parent
170695bb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
18 deletions
app/action/SelfAction.js
app/containers/login/module/FillDomainModel.js
app/containers/selfOrder/SelfOrderPage.js
app/action/SelfAction.js
View file @
bdb925d7
...
@@ -12,6 +12,7 @@ import {
...
@@ -12,6 +12,7 @@ import {
SET_SELECT_PRODUCT_OPTS
SET_SELECT_PRODUCT_OPTS
}
from
'../base/ActionTypes'
;
}
from
'../base/ActionTypes'
;
import
local_inter_mock
from
'../containers/selfOrder/module/mock/inter_mock'
import
local_inter_mock
from
'../containers/selfOrder/module/mock/inter_mock'
import
*
as
R
from
'ramda'
// 获取组织 params={access_token:''}
// 获取组织 params={access_token:''}
export
function
requestSelfOrganizations
(
params
)
{
export
function
requestSelfOrganizations
(
params
)
{
...
@@ -126,33 +127,42 @@ export const reqSelfSurgeryHospital = async (global_domain_config, params) => {
...
@@ -126,33 +127,42 @@ export const reqSelfSurgeryHospital = async (global_domain_config, params) => {
}
}
// 获取订单类型 params={access_token:'', value_set_code:'SUR_ORDER_TYPE'}
// 获取订单类型 params={access_token:'', value_set_code:'SUR_ORDER_TYPE'}
export
function
requestSelfOrderType
(
params
)
{
export
function
requestSelfOrderType
(
params
,
url
)
{
return
(
dispatch
,
getState
)
=>
{
return
(
dispatch
,
getState
)
=>
{
dispatch
(
requestListDataing
());
dispatch
(
requestListDataing
());
let
{
global_domain_config
}
=
getState
().
login
let
{
global_domain_config
}
=
getState
().
login
GetRequest
(
global_domain_config
,
getUrlParams
(
'/system/value_set/search'
,
params
))
// GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params))
if
(
!
url
)
{
url
=
'/system/order_type/search'
}
GetRequest
(
global_domain_config
,
getUrlParams
(
url
,
params
))
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
'获取订单类型 res====='
,
res
);
console
.
log
(
'获取订单类型 res====='
,
res
);
// 兼容老的接口,有的环境没有实现获取订单类型接口
if
(
res
.
status
===
404
)
{
return
dispatch
(
requestSelfOrderType
(
params
,
'/system/value_set/search'
))
}
if
(
res
.
error_code
==
0
)
{
if
(
res
.
error_code
==
0
)
{
let
{
data
:
{
sys_values
}
}
=
res
let
data
=
[]
dispatch
(
requestListDataSuccess
(
sys_values
));
if
(
R
.
includes
(
'order_type'
,
url
))
{
data
=
R
.
map
(
R
.
applySpec
({
value_name
:
R
.
prop
(
'order_type_name'
),
value_code
:
R
.
prop
(
'order_type_code'
),
}))(
res
.
data
)
}
else
{
data
=
res
.
data
.
sys_values
}
dispatch
(
requestListDataSuccess
(
data
));
}
else
{
}
else
{
showWarnErrorMessage
(
dispatch
,
res
,
exitLoginStatus
,
requestListDataFail
)
showWarnErrorMessage
(
dispatch
,
res
,
exitLoginStatus
,
requestListDataFail
)
}
}
// 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
=>
{
.
catch
(
err
=>
{
showErrorMessage
(
dispatch
,
err
,
requestListDataFail
,
'获取订单类型'
)
if
(
!
url
)
{
// console.log('------err--====获取订单类型----', Object.keys(err), err)
requestSelfOrderType
(
params
,
'/system/value_set/search'
)
// show(err.error);
}
else
{
// dispatch(requestListDataFail());
showErrorMessage
(
dispatch
,
err
,
requestListDataFail
,
'获取订单类型'
)
}
})
})
}
}
}
}
...
...
app/containers/login/module/FillDomainModel.js
View file @
bdb925d7
...
@@ -30,7 +30,7 @@ class FillDomainModel extends Component {
...
@@ -30,7 +30,7 @@ class FillDomainModel extends Component {
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
isVisible
:
false
,
isVisible
:
false
,
defaDomainHead
:
'http://'
,
defaDomainHead
:
'http
s
://'
,
domainValue
:
''
,
domainValue
:
''
,
isNull
:
false
isNull
:
false
}
}
...
...
app/containers/selfOrder/SelfOrderPage.js
View file @
bdb925d7
...
@@ -1221,6 +1221,7 @@ class SelfOrderPage extends Component {
...
@@ -1221,6 +1221,7 @@ class SelfOrderPage extends Component {
// 订单类型 点击
// 订单类型 点击
handleOrderCheck
(
curData
)
{
handleOrderCheck
(
curData
)
{
let
{
props
}
=
this
let
{
props
}
=
this
const
{
listOptionData
}
=
this
.
state
if
(
this
.
judgeOrgIsNull
()
&&
this
.
judgeCustomerIsNull
())
{
if
(
this
.
judgeOrgIsNull
()
&&
this
.
judgeCustomerIsNull
())
{
this
.
setState
({
this
.
setState
({
currentTitle
:
curData
.
title
,
currentTitle
:
curData
.
title
,
...
@@ -1231,7 +1232,9 @@ class SelfOrderPage extends Component {
...
@@ -1231,7 +1232,9 @@ class SelfOrderPage extends Component {
},
()
=>
{
},
()
=>
{
let
params
=
{
let
params
=
{
access_token
:
props
.
token
,
access_token
:
props
.
token
,
value_set_code
:
'SUR_ORDER_TYPE'
value_set_code
:
'SUR_ORDER_TYPE'
,
org_code
:
listOptionData
[
1
].
value
,
order_type
:
'SUR_ORDER_TYPE'
}
}
props
.
requestSelfOrderType
(
params
)
props
.
requestSelfOrderType
(
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