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
b0ecec3d
authored
Jan 12, 2021
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
新增器械消耗费用明细相关处理
parent
64a0d720
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
57 additions
and
32 deletions
app/Router.js
app/action/EquipAction.js
app/action/LoginAction.js
app/base/ActionTypes.js
app/base/BaseConstants.js
app/containers/common/listDataComponent/PageListArrow.js
app/containers/equipConsu/EquipConsuPage.js
app/containers/equipConsu/module/ChargeDetailsPage.js
app/containers/equipConsu/module/ConsumDetailsPage.js
app/containers/equipConsu/module/FillUnitPricePage.js
app/containers/equipConsu/module/ShowDetailPage.js
app/network/RequestUtils.js
app/reducers/module/equip.js
app/Router.js
View file @
b0ecec3d
...
...
@@ -10,7 +10,8 @@ import SelfOrderPage from './containers/selfOrder/SelfOrderPage';
import
ChooseProductPage
from
'./containers/selfOrder/module/ChooseProductPage'
;
import
EditThirdLevelPage
from
'./containers/selfOrder/module/EditThirdLevelPage'
;
import
EquipConsuPage
from
'./containers/equipConsu/EquipConsuPage'
;
import
ConsumDetailsPage
from
'./containers/equipConsu//module/ConsumDetailsPage'
;
import
ConsumDetailsPage
from
'./containers/equipConsu/module/ConsumDetailsPage'
;
import
ChargeDetailsPage
from
'./containers/equipConsu/module/ChargeDetailsPage'
;
import
FillUnitPricePage
from
'./containers/equipConsu/module/FillUnitPricePage'
;
import
ShowDetailPage
from
'./containers/equipConsu/module/ShowDetailPage'
;
import
QuickOrderPage
from
'./containers/quickOrder/QuickOrderPage'
;
...
...
@@ -31,7 +32,8 @@ const Router = createAppContainer(createStackNavigator({
ChooseProductPage
:
{
screen
:
ChooseProductPage
},
EditThirdLevelPage
:
{
screen
:
EditThirdLevelPage
},
EquipConsuPage
:
{
screen
:
EquipConsuPage
},
ConsumDetailsPage
:
{
screen
:
ConsumDetailsPage
},
ConsumDetailsPage
:
{
screen
:
ConsumDetailsPage
},
ChargeDetailsPage
:
{
screen
:
ChargeDetailsPage
},
FillUnitPricePage
:
{
screen
:
FillUnitPricePage
},
ShowDetailPage
:
{
screen
:
ShowDetailPage
},
QuickOrderPage
:
{
screen
:
QuickOrderPage
},
...
...
app/action/EquipAction.js
View file @
b0ecec3d
...
...
@@ -9,6 +9,7 @@ import {
EQUIP_SUBMIT_SUCCESS
,
EQUIP_SUBMIT_FAILURE
,
GET_SUB_DETAIL_OPTION
,
GET_CHARGE_DETAILS_OPTION
,
EQUIP_INIT_DATA
}
from
'../base/ActionTypes'
;
...
...
@@ -122,7 +123,7 @@ function requestListDataFail() {
}
}
//
获取
当前临时存储的明细
//
设置
当前临时存储的明细
export
function
getSubdetailOption
(
data
)
{
return
{
type
:
GET_SUB_DETAIL_OPTION
,
...
...
@@ -130,6 +131,14 @@ export function getSubdetailOption(data) {
}
}
// 设置当前费用明细
export
function
getCharDetailsOption
(
data
)
{
return
{
type
:
GET_CHARGE_DETAILS_OPTION
,
rawData
:
data
}
}
// 获取消耗明细 params={access_token:'', surgery_collect_number:''}
export
const
requestEquipDetails
=
async
(
global_domain_config
,
params
)
=>
{
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/surgery/collected_order_line/search'
,
params
))
...
...
app/action/LoginAction.js
View file @
b0ecec3d
...
...
@@ -7,15 +7,15 @@ import {
AUTO_LOGIN_FAILURE
,
SET_DOMAIN_CONFIGURATE
}
from
'../base/ActionTypes'
;
import
{
PostRequest
}
from
'../network/RequestUtils'
;
import
{
show
}
from
'../utils/Utils'
;
import
{
GetRequest
,
PostRequest
}
from
'../network/RequestUtils'
;
import
{
getUrlParams
,
show
}
from
'../utils/Utils'
;
export
function
requestLogin
(
params
)
{
return
(
dispatch
,
getState
)
=>
{
dispatch
(
logining
());
let
{
global_domain_config
}
=
getState
().
login
PostRequest
(
global_domain_config
,
'/access_token/password/search?app_code=MOBILE'
,
params
).
then
((
res
)
=>
{
console
.
log
(
'
res-------
'
,
res
)
console
.
log
(
'
登录 res=====
'
,
res
)
if
(
res
.
error_code
===
0
){
if
(
res
.
functions
&&
res
.
functions
.
length
)
{
show
(
'登录成功'
);
...
...
@@ -38,6 +38,7 @@ export function requestLogin(params) {
let
error_msg
=
err
.
error
||
'请求接口错误,请联系管理员'
show
(
error_msg
);
dispatch
(
loginFailure
())
console
.
error
(
err
)
})
}
}
...
...
@@ -86,6 +87,7 @@ export function autoLogin(params) {
return
(
dispatch
,
getState
)
=>
{
let
{
global_domain_config
}
=
getState
().
login
PostRequest
(
global_domain_config
,
'/access_token/password/search?app_code=MOBILE'
,
params
).
then
((
res
)
=>
{
console
.
log
(
'自动登录 res====='
,
res
)
if
(
res
.
error_code
===
0
){
if
(
res
.
functions
&&
res
.
functions
.
length
)
{
dispatch
(
autoLoginSuccess
(
res
));
...
...
@@ -102,6 +104,7 @@ export function autoLogin(params) {
}).
catch
((
err
)
=>
{
show
(
err
.
error
);
dispatch
(
autoLoginFailure
())
console
.
error
(
err
)
})
}
}
...
...
@@ -111,4 +114,14 @@ export function setDomainConfigurate(domainVal) {
type
:
SET_DOMAIN_CONFIGURATE
,
global_domain_config
:
domainVal
}
}
//系统配置文件查询接口 access_token profile_code
export
const
requestSysProfile
=
async
(
global_domain_config
,
params
)
=>
{
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/system/sys_profile/search'
,
params
))
}
//系统值集查询接口 access_token value_set_code
export
const
requestSysValueSet
=
async
(
global_domain_config
,
params
)
=>
{
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/system/value_set/search'
,
params
))
}
\ No newline at end of file
app/base/ActionTypes.js
View file @
b0ecec3d
...
...
@@ -39,6 +39,7 @@ export const EQUIP_SUBMIT_SUCCESS = "EQUIP_SUBMIT_SUCCESS"
export
const
EQUIP_SUBMIT_FAILURE
=
"EQUIP_SUBMIT_FAILURE"
export
const
EQUIP_INIT_DATA
=
"EQUIP_INIT_DATA"
export
const
GET_SUB_DETAIL_OPTION
=
"GET_SUB_DETAIL_OPTION"
export
const
GET_CHARGE_DETAILS_OPTION
=
"GET_CHARGE_DETAILS_OPTION"
//-----------historical order search---------------------
export
const
HISTOR_ORDER_SEARCH_NO
=
"HISTOR_ORDER_SEARCH_NO"
export
const
HISTOR_ORDER_SEARCH_DOING
=
"HISTOR_ORDER_SEARCH_DOING"
...
...
app/base/BaseConstants.js
View file @
b0ecec3d
// export const BaseUrl = "http://192.168.10.188:8200"; // https://obs.uat.sfrx.guke.tech https://sob-os.uat.sfrx.guke.tech
// export const BaseUrlOther = "http://192.168.10.188:8200"; //http://192.168.10.188:8200/v1/dingding/upload_media
// export const VERSION = '/v1'; // /api/latest
export
const
BaseUrl
=
"https://obs.uat.sfrx.guke.tech"
;
// https://obs.uat.sfrx.guke.tech https://sob-os.uat.sfrx.guke.tech
export
const
BaseUrlOther
=
"https://sob-os.uat.sfrx.guke.tech"
;
//http://192.168.10.188:8200/v1/dingding/upload_media
export
const
VERSION
=
'/api/latest'
;
//
export
const
BaseUrl
=
"https://obs.uat.guke.tech"
;
export
const
BaseUrlOther
=
"https://sob-os.uat.guke.tech"
;
export
const
VERSION
=
'/api/latest'
;
export
const
ACCESS_TOKEN
=
'201904091445193616b5e3d3a777848dda1de1a8123d0fdf9xw7t566c1S92U88'
;
//未获取到access_token时使用
// export let
\ No newline at end of file
app/containers/common/listDataComponent/PageListArrow.js
View file @
b0ecec3d
...
...
@@ -28,6 +28,7 @@ class PageListArrow extends Component {
isTitInputStyle
:
PropTypes
.
bool
,
listMaxLines
:
PropTypes
.
number
,
// 文本最大行数
listIsAudio
:
PropTypes
.
bool
,
listCellStyle
:
PropTypes
.
object
}
constructor
(
props
)
{
...
...
@@ -46,7 +47,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
}
=
this
.
props
inputCallBack
,
isTitInputStyle
,
listMaxLines
,
listIsAudio
,
listCellStyle
}
=
this
.
props
if
(
!
listMaxLines
){
listMaxLines
=
2
// 默认
}
...
...
@@ -56,7 +57,7 @@ class PageListArrow extends Component {
activeOpacity
=
{
listActOpa
}
onPress
=
{()
=>
{
return
listCallBack
?
listCallBack
()
:
''
}}
>
<
CellTextStyle
>
<
CellTextStyle
style
=
{
listCellStyle
?
listCellStyle
:
''
}
>
{
listHasAster
?
<
AsteriskTextStyle
>*<
/AsteriskTextStyle> : null
}
<
TitleTextStyle
style
=
{
isTitInputStyle
?
styles
.
cell_title
:
''
}
>
{
listItem
[
listTitle
]}
<
/TitleTextStyle
>
{
(
listEditAble
||
inputCallBack
)
?
<
ContInputTextStyle
...
...
app/containers/equipConsu/EquipConsuPage.js
View file @
b0ecec3d
This diff is collapsed.
Click to expand it.
app/containers/equipConsu/module/ChargeDetailsPage.js
0 → 100644
View file @
b0ecec3d
This diff is collapsed.
Click to expand it.
app/containers/equipConsu/module/ConsumDetailsPage.js
View file @
b0ecec3d
...
...
@@ -34,20 +34,13 @@ import { exitLoginStatus } from '../../../action/LoginAction';
const
CONSUM_SEARCH_VALUE_BAR_CODE
=
'CONSUM_SEARCH_VALUE_BAR_CODE'
;
// 耗材明细
class
ConsumDetailsPage
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
searchValue
:
''
,
conDetaOption
:
[
// {
// "id": "0",
// item_name: '人工髋关节假体-JS-HB ||| T',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// select: false
// }
],
conDetaOption
:
[],
allConOption
:
[],
// 所有数据(未筛选过的)
selectShowPopup
:
false
,
// 共计已选弹窗
localSelectOption
:
[],
// 已选数据
...
...
app/containers/equipConsu/module/FillUnitPricePage.js
View file @
b0ecec3d
...
...
@@ -18,7 +18,7 @@ import { show } from '../../../utils/Utils';
import
{
getSubdetailOption
}
from
'../../../action/EquipAction'
;
import
{
connect
}
from
'react-redux'
;
// 可填写单价
class
FillUnitPricePage
extends
Component
{
constructor
(
props
)
{
super
(
props
);
...
...
app/containers/equipConsu/module/ShowDetailPage.js
View file @
b0ecec3d
...
...
@@ -18,7 +18,7 @@ import { show } from '../../../utils/Utils';
import
{
getSubdetailOption
}
from
'../../../action/EquipAction'
;
import
{
connect
}
from
'react-redux'
;
// 仅展示明细
class
ShowDetailPage
extends
Component
{
constructor
(
props
)
{
super
(
props
);
...
...
@@ -44,7 +44,6 @@ class ShowDetailPage extends Component {
// 获取选择的数据
getLocalSelectedData
()
{
let
{
localSelectOption
}
=
this
.
props
.
navigation
.
state
.
params
console
.
log
(
'localSelectOption----'
,
localSelectOption
)
this
.
setState
({
unitPriceOption
:
localSelectOption
})
...
...
@@ -192,9 +191,6 @@ const styles = StyleSheet.create({
fontSize
:
second_text_size
,
color
:
promary_text_color
},
fot_btn
:
{
width
:
'100%'
,
borderRadius
:
10
...
...
app/network/RequestUtils.js
View file @
b0ecec3d
// import {BaseUrl, BaseUrlOther, VERSION} from '../base/BaseConstants';
import
{
VERSION
}
from
'../base/BaseConstants'
;
//post方式请求
...
...
@@ -18,6 +17,7 @@ export const PostRequest = (BaseUrl, url, paramsObject) => {
.
then
(
response
=>
response
.
json
())
.
then
(
data
=>
data
)
.
catch
(
error
=>
{
console
.
error
(
error
)
return
{
error_code
:
-
3
,
error_msg
:
'请求异常,请重试'
}
})
}
...
...
@@ -36,6 +36,7 @@ export const GetRequest = (BaseUrl, url) => {
.
then
(
response
=>
response
.
json
())
.
then
(
data
=>
data
)
.
catch
(
error
=>
{
console
.
error
(
error
)
return
{
error_code
:
-
3
,
error_msg
:
'请求异常,请重试'
}
})
};
...
...
@@ -54,6 +55,7 @@ export const UploadRequest = (BaseUrl, url,datas) => {
.
then
(
response
=>
response
.
json
())
.
then
(
data
=>
data
)
.
catch
(
error
=>
{
console
.
error
(
error
)
return
{
error_code
:
-
3
,
error_msg
:
'请求异常,请重试'
}
})
};
\ No newline at end of file
app/reducers/module/equip.js
View file @
b0ecec3d
...
...
@@ -8,7 +8,8 @@ import {
EQUIP_SUBMIT_SUCCESS
,
EQUIP_SUBMIT_FAILURE
,
EQUIP_INIT_DATA
,
GET_SUB_DETAIL_OPTION
GET_SUB_DETAIL_OPTION
,
GET_CHARGE_DETAILS_OPTION
}
from
'../../base/ActionTypes'
;
// 器械消耗状态
...
...
@@ -17,6 +18,7 @@ const defaultState = {
submit_equip_order_status
:
EQUIP_SUBMIT_NO
,
// 提交订单状态
equipOrderOption
:
{},
// 当前选择器临时存储数据
subDetOption
:
[],
// 选择的消耗明细数据
charDetailOption
:
[],
// 选择的费用明细数据
}
export
default
equip
=
(
state
=
defaultState
,
action
)
=>
{
...
...
@@ -54,11 +56,16 @@ export default equip = (state = defaultState, action) => {
equip_list_status
:
EQUIP_CONSU_LIST_NO
,
submit_equip_order_status
:
EQUIP_SUBMIT_NO
,
equipOrderOption
:
{},
subDetOption
:
[]
subDetOption
:
[],
charDetailOption
:
[]
})
case
GET_SUB_DETAIL_OPTION
:
return
Object
.
assign
({},
state
,
{
subDetOption
:
action
.
rawData
})
case
GET_CHARGE_DETAILS_OPTION
:
return
Object
.
assign
({},
state
,
{
charDetailOption
:
action
.
rawData
})
default
:
return
state
;
...
...
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