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
dd130d86
authored
Jul 15, 2020
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加【转单】历史订单查询功能,还未对接后端接口
parent
31a18c1f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
18 deletions
app/action/HistorAction.js
app/containers/common/DateModel.js
app/containers/common/HeadBackItem.js
app/containers/historicalOrder/HistoricalOrderPage.js
app/containers/historicalOrder/module/FilterModel.js
app/containers/historicalOrder/module/LineOrderPage.js
app/action/HistorAction.js
View file @
dd130d86
...
...
@@ -22,6 +22,11 @@ export const requestHistorOrderType = async (global_domain_config, params) => {
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/system/value_set/search'
,
params
))
}
// 获取来源借货订单号 parmas={access_token: '', org_code: '', seller_code: '', customer_code: '', collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED'}
export
const
requestHistorSourBorOrdNum
=
async
(
global_domain_config
,
params
)
=>
{
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/surgery/collect_order/search'
,
params
))
}
// 借货订单查询 params: {access_token: '', ...}
export
function
requestGetAllBorrow
(
params
)
{
return
(
dispatch
,
getState
)
=>
{
...
...
@@ -64,7 +69,6 @@ export function requestGetAllConsume(params) {
if
(
res
.
error_code
==
0
)
{
let
{
data
:
{
sur_consume_headers
}
}
=
res
dispatch
(
requestSearchSuccess
(
sur_consume_headers
));
}
else
if
(
res
.
error_code
===
41006
)
{
show
(
'登录过期,请重新登录'
);
dispatch
(
exitLoginStatus
());
...
...
@@ -75,7 +79,7 @@ export function requestGetAllConsume(params) {
}
})
.
catch
(
err
=>
{
console
.
log
(
'------err--====requestGetAll
Borrow
----'
,
Object
.
keys
(
err
),
err
)
console
.
log
(
'------err--====requestGetAll
Consume
----'
,
Object
.
keys
(
err
),
err
)
show
(
err
.
error
);
dispatch
(
requestSearchFail
());
})
...
...
@@ -87,8 +91,39 @@ export const requestGetLineFormConsume = async (global_domain_config, params) =>
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'/surgery/consume_line/search'
,
params
))
}
// 转单订单查询
// 转单订单查询 params: {access_token: '', ...} ----- 待定
export
function
requestGetAllTrans
(
params
)
{
return
(
dispatch
,
getState
)
=>
{
dispatch
(
requestSearching
())
let
{
global_domain_config
}
=
getState
().
login
GetRequest
(
global_domain_config
,
getUrlParams
(
'xxxx'
,
params
))
.
then
(
res
=>
{
if
(
res
.
error_code
==
0
)
{
// let { data: { sur_consume_headers } } = res
// dispatch(requestSearchSuccess(sur_consume_headers));
}
else
if
(
res
.
error_code
===
41006
)
{
show
(
'登录过期,请重新登录'
);
dispatch
(
exitLoginStatus
());
}
else
{
let
error_msg
=
res
.
error_msg
||
res
.
message
show
(
error_msg
);
dispatch
(
requestSearchFail
());
}
})
.
catch
(
err
=>
{
console
.
log
(
'------err--====requestGetAllTrans----'
,
Object
.
keys
(
err
),
err
)
show
(
err
.
error
);
dispatch
(
requestSearchFail
());
})
}
}
// 转单订单-行表查询 params: {access_token: '', xxx: ''} ----- 待定
export
const
requestGetLineFormTrans
=
async
(
global_domain_config
,
params
)
=>
{
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
'xxx'
,
params
))
}
function
requestSearching
()
{
return
{
...
...
app/containers/common/DateModel.js
View file @
dd130d86
...
...
@@ -4,7 +4,6 @@ import {
Text
,
StyleSheet
,
Modal
,
ScrollView
,
TouchableOpacity
,
SafeAreaView
}
from
'react-native'
;
...
...
app/containers/common/HeadBackItem.js
View file @
dd130d86
...
...
@@ -38,12 +38,17 @@ class HeadBackItem extends Component {
}
goLogin
()
{
let
{
navigation
}
=
this
.
props
let
{
callback
,
navigation
}
=
this
.
props
this
.
props
.
exitLoginStatus
()
show
(
'退出登录'
)
setTimeout
(()
=>
{
if
(
callback
&&
callback
instanceof
Function
)
{
callback
()
setTimeout
(()
=>
{
navigation
.
navigate
(
'LoginPage'
)
},
500
)
}
else
{
navigation
.
navigate
(
'LoginPage'
)
}
,
300
)
}
}
render
()
{
...
...
app/containers/historicalOrder/HistoricalOrderPage.js
View file @
dd130d86
...
...
@@ -34,7 +34,8 @@ import {
}
from
'../../base/ActionTypes'
;
import
{
requestGetAllBorrow
,
requestGetAllConsume
requestGetAllConsume
,
requestGetAllTrans
}
from
'../../action/HistorAction'
;
import
{
show
,
cloneObject
}
from
'../../utils/Utils'
;
import
moment
from
'moment'
;
...
...
@@ -56,9 +57,10 @@ class HistoricalOrderPage extends Component {
title
:
'消耗订单'
,
selIsAct
:
false
},
// {
// title: '转单订单'
// }
{
title
:
'转单订单'
,
selIsAct
:
false
}
],
topActiveIndex
:
0
,
contOptionData
:
[
...
...
@@ -89,11 +91,14 @@ class HistoricalOrderPage extends Component {
"COLLECTED,RETURNING_WAITING_CONFIRM"
,
"RETURNED,CLOSED,REJECTED,CANCELED,CONSUMED"
],
searchComsumeStatus
:
[
// 【借货】对应的状态值
searchComsumeStatus
:
[
// 【消耗】对应的状态值
"N"
,
"Y"
],
searchTransStatus
:
[
// 【转单】对应的状态值
"N"
,
"Y"
],
searchTransStatus
:
[],
// 【转单】对应的状态值
whetherCallClick
:
false
,
// 是否调用筛选弹窗的查询
wheShowNoData
:
false
,
// 是否展示无数据提示
...
...
@@ -240,6 +245,7 @@ class HistoricalOrderPage extends Component {
props
.
requestGetAllConsume
(
params
)
break
;
case
2
:
props
.
requestGetAllTrans
(
params
)
break
;
default
:
break
;
...
...
@@ -442,7 +448,7 @@ class HistoricalOrderPage extends Component {
<
Text
style
=
{[
styles
.
cont_rig_status
,
item
.
local_his_status
==
'待审核'
?
styles
.
status_audit
:
''
,
(
item
.
local_his_status
==
'待审核'
||
item
.
local_his_status
==
'已提交'
)
?
styles
.
status_audit
:
''
,
item
.
local_his_status
==
'待还货'
?
styles
.
status_return
:
''
,
item
.
local_his_status
==
'其他'
?
styles
.
status_other
:
''
]}
>
...
...
@@ -502,8 +508,8 @@ const styles = StyleSheet.create({
borderBottomWidth
:
1
},
top_touch_cont
:
{
//
width: '33.33333%'
width
:
'50%'
width
:
'33.33333%'
//
width: '50%'
},
top_inner
:
{
justifyContent
:
'center'
,
...
...
@@ -634,6 +640,9 @@ const mapDispatchToProps = (dispatch) => {
},
requestGetAllConsume
:
(
params
)
=>
{
dispatch
(
requestGetAllConsume
(
params
))
},
requestGetAllTrans
:
(
params
)
=>
{
dispatch
(
requestGetAllTrans
(
params
))
}
}
}
...
...
app/containers/historicalOrder/module/FilterModel.js
View file @
dd130d86
This diff is collapsed.
Click to expand it.
app/containers/historicalOrder/module/LineOrderPage.js
View file @
dd130d86
...
...
@@ -29,7 +29,8 @@ import { CellTextStyle } from '../../common/CellTextStyle';
import
LodingModel
from
'../../common/LodingModel'
;
import
{
requestGetLineFormBorrow
,
requestGetLineFormConsume
requestGetLineFormConsume
,
requestGetLineFormTrans
}
from
'../../../action/HistorAction'
;
import
{
connect
}
from
'react-redux'
;
import
{
show
}
from
'../../../utils/Utils'
;
...
...
@@ -125,6 +126,7 @@ class LineOrderPage extends Component {
break
;
case
2
:
// 转单
this
.
getReqTransLineData
(
data
)
break
;
default
:
break
;
...
...
@@ -210,6 +212,48 @@ class LineOrderPage extends Component {
}
}
// 获取转单订单行数据 -- 待定
async
getReqTransLineData
(
supData
)
{
// let that = this
// let {consumaData} = that.state
// let {props} = this
// that.changeSubLoding(true)
// let params = {
// access_token: props.token,
// consume_order_number: supData.local_his_number
// }
// let conResult = await requestGetLineFormTrans(props.global_domain_config, params)
// if(conResult.error_code == 0) {
// that.changeSubLoding(false)
// // 成功
// let {sur_consume_lines} = conResult.data
// let tempSum = 0
// let tempConQuanSum = 0
// sur_consume_lines.length && sur_consume_lines.forEach(item => {
// if(item.sale_price) {
// tempSum += Number(item.sale_price)
// }
// if(item.consumed_quantity) {
// tempConQuanSum += Number(item.consumed_quantity)
// }
// })
// consumaData.subOption = [...sur_consume_lines]
// consumaData.allOptSum = tempSum
// consumaData.allConmQuanSum = tempConQuanSum
// that.setState({
// consumaData
// })
// } else if(conResult.error_code == 41006) {
// that.changeSubLoding(false)
// show('登录过期,请重新登录');
// props.exitLoginStatus();
// } else {
// that.changeSubLoding(false)
// let error_msg = conResult.error_msg || conResult.message
// show(error_msg);
// }
}
// 耗材明细 隐藏/显示子项
handleDetailBtmCheck
(
flagType
)
{
let
{
consumaData
}
=
this
.
state
...
...
@@ -403,7 +447,7 @@ class LineOrderPage extends Component {
<
View
style
=
{
styles
.
fo_sta_inner
}
>
<
Text
style
=
{[
styles
.
fo_sta_txt
,
orderSupOptions
.
local_his_status
==
'待审核'
?
styles
.
status_audit
:
''
,
(
orderSupOptions
.
local_his_status
==
'待审核'
||
orderSupOptions
.
local_his_status
==
'已提交'
)
?
styles
.
status_audit
:
''
,
orderSupOptions
.
local_his_status
==
'待还货'
?
styles
.
status_return
:
''
,
orderSupOptions
.
local_his_status
==
'其他'
?
styles
.
status_other
:
''
]}
>
...
...
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