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
240d87f1
authored
Dec 20, 2021
by
peii
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'develop' into product
parents
cdea7214
2b776527
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
221 additions
and
96 deletions
app/action/LoginAction.js
app/action/SelfAction.js
app/containers/equipConsu/module/OrdersPage.js
app/containers/historicalOrder/HistoricalOrderPage.js
app/containers/home/HomePage.js
app/containers/quickOrder/QuickOrderPage.js
app/containers/selfOrder/SelfOrderPage.js
app/containers/transOrder/TransOrderPage.js
app/containers/transOrder/module/TransSearchPage.js
app/reducers/module/login.js
yarn.lock
app/action/LoginAction.js
View file @
240d87f1
...
@@ -12,7 +12,8 @@ import {
...
@@ -12,7 +12,8 @@ import {
SET_SYSPROFILE
SET_SYSPROFILE
}
from
'../base/ActionTypes'
;
}
from
'../base/ActionTypes'
;
import
{
GetRequest
,
PostRequest
}
from
'../network/RequestUtils'
;
import
{
GetRequest
,
PostRequest
}
from
'../network/RequestUtils'
;
import
{
getUrlParams
,
show
,
showWarnErrorMessage
,
showErrorMessage
}
from
'../utils/Utils'
;
import
{
getUrlParams
,
show
,
showWarnErrorMessage
,
showErrorMessage
,
isNotBlank
}
from
'../utils/Utils'
;
import
{
originSysProfiles
}
from
'../reducers/module/login'
;
export
function
requestLogin
(
params
)
{
export
function
requestLogin
(
params
)
{
return
(
dispatch
,
getState
)
=>
{
return
(
dispatch
,
getState
)
=>
{
...
@@ -167,7 +168,7 @@ export function setVersionApk(versionApk) {
...
@@ -167,7 +168,7 @@ export function setVersionApk(versionApk) {
*/
*/
export
function
getSysProfiles
()
{
export
function
getSysProfiles
()
{
return
(
dispatch
,
getState
)
=>
{
return
(
dispatch
,
getState
)
=>
{
let
{
global_domain_config
,
token
,
originSysProfiles
}
=
getState
().
login
let
{
global_domain_config
,
token
}
=
getState
().
login
function
getSysProfile
(
profile_code
)
{
function
getSysProfile
(
profile_code
)
{
const
params
=
{
const
params
=
{
...
@@ -175,9 +176,10 @@ export function getSysProfiles() {
...
@@ -175,9 +176,10 @@ export function getSysProfiles() {
profile_code
profile_code
}
}
requestSysProfile
(
global_domain_config
,
params
).
then
(
res
=>
{
requestSysProfile
(
global_domain_config
,
params
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
profile_code
,
res
)
if
(
res
.
error_code
===
0
)
{
if
(
res
.
error_code
===
0
)
{
const
value
=
R
.
pathOr
(
originSysProfiles
[
profile_code
],
[
'data'
,
'profile_value'
])(
res
)
let
value
=
R
.
pathOr
(
originSysProfiles
[
profile_code
],
[
'data'
,
'profile_value'
])(
res
)
if
(
isNotBlank
(
value
)
&&
!
isNaN
(
value
))
value
=
parseInt
(
value
)
dispatch
(
setSysProfiles
(
profile_code
,
value
))
dispatch
(
setSysProfiles
(
profile_code
,
value
))
}
}
})
})
...
...
app/action/SelfAction.js
View file @
240d87f1
...
@@ -407,3 +407,12 @@ export function setSelectProductOpts(data) {
...
@@ -407,3 +407,12 @@ export function setSelectProductOpts(data) {
rawData
:
data
rawData
:
data
}
}
}
}
/**
* @description: 请求手术类型
* @param {*}
* @return {*}
*/
export
async
function
requestSurgeryType
(
global_domain_config
,
params
)
{
return
await
GetRequest
(
global_domain_config
,
getUrlParams
(
`/inventory/category/search`
,
params
))
}
\ No newline at end of file
app/containers/equipConsu/module/OrdersPage.js
View file @
240d87f1
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/app/containers/equipConsu/module/OrdersPage.js
* @FilePath: /BoneHouse_Business_APP/app/containers/equipConsu/module/OrdersPage.js
* @Author: peii
* @Author: peii
* @Date: 2021-07-06 15:29:45
* @Date: 2021-07-06 15:29:45
* @LastEditTime: 2021-
07-08 15:58:39
* @LastEditTime: 2021-
12-16 14:49:55
* @LastEditors: peii
* @LastEditors: peii
* @Vision: 1.0
* @Vision: 1.0
* @Description: 消耗时选择借货单
* @Description: 消耗时选择借货单
...
@@ -78,7 +78,7 @@ export default class CollectOrder extends Component {
...
@@ -78,7 +78,7 @@ export default class CollectOrder extends Component {
return
this
.
setState
({
orders
:
ords
})
return
this
.
setState
({
orders
:
ords
})
}
}
const
match
=
R
.
test
(
new
RegExp
(
text
,
'g'
))
const
match
=
R
.
test
(
new
RegExp
(
text
,
'g'
))
const
keys
=
[
'collect_number'
,
'seller_name'
,
'
doctor_name'
,
'surgery_desc'
,
'
remark'
]
const
keys
=
[
'collect_number'
,
'seller_name'
,
'remark'
]
ords
=
R
.
filter
(
R
.
anyPass
(
R
.
map
(
k
=>
R
.
compose
(
match
,
R
.
prop
(
k
)),
keys
)))(
ords
)
ords
=
R
.
filter
(
R
.
anyPass
(
R
.
map
(
k
=>
R
.
compose
(
match
,
R
.
prop
(
k
)),
keys
)))(
ords
)
this
.
setState
({
orders
:
ords
})
this
.
setState
({
orders
:
ords
})
}
}
...
@@ -94,16 +94,12 @@ export default class CollectOrder extends Component {
...
@@ -94,16 +94,12 @@ export default class CollectOrder extends Component {
<
TouchableOpacity
style
=
{
styles
.
item
}
activeOpacity
=
{
0.8
}
onPress
=
{()
=>
this
.
selectHandler
(
item
)}
>
<
TouchableOpacity
style
=
{
styles
.
item
}
activeOpacity
=
{
0.8
}
onPress
=
{()
=>
this
.
selectHandler
(
item
)}
>
<
Text
style
=
{
styles
.
item_text
}
>
借货单号
:
{
item
.
collect_number
}
<
/Text
>
<
Text
style
=
{
styles
.
item_text
}
>
借货单号
:
{
item
.
collect_number
}
<
/Text
>
<
Text
style
=
{
styles
.
item_text
}
>
业
务
员
:
{
item
.
seller_name
||
'无'
}
<
/Text
>
<
Text
style
=
{
styles
.
item_text
}
>
业
务
员
:
{
item
.
seller_name
||
'无'
}
<
/Text
>
<
Text
style
=
{
styles
.
item_text
}
>
主治医生
:
{
item
.
doctor_name
||
'无'
}
<
/Text
>
<
Text
style
=
{
styles
.
item_text
}
>
<
Text
style
=
{
styles
.
item_text
}
>
手术日期
:
{(
item
.
surgery_date
&&
changeDateFormat
(
item
.
surgery_date
,
'yyyy-MM-dd'
))
||
'无'
}
手术日期
:
{(
item
.
surgery_date
&&
changeDateFormat
(
item
.
surgery_date
,
'yyyy-MM-dd'
))
||
'无'
}
<
/Text
>
<
/Text
>
<
Text
style
=
{
styles
.
item_text
}
>
手术说明
:
{
item
.
surgery_desc
||
'无'
}
<
/Text
>
<
Text
style
=
{
styles
.
item_text
}
numberOfLines
=
{
3
}
>
{
!!
item
.
remark
&&
(
备注
:
{
item
.
remark
}
<
Text
style
=
{
styles
.
item_text
}
numberOfLines
=
{
3
}
>
<
/Text
>
{
item
.
remark
}
<
/Text
>
)}
<
/TouchableOpacity
>
<
/TouchableOpacity
>
)
)
}
}
...
@@ -123,7 +119,7 @@ export default class CollectOrder extends Component {
...
@@ -123,7 +119,7 @@ export default class CollectOrder extends Component {
<
Image
source
=
{
require
(
'../../../images/search_icon.png'
)}
style
=
{
styles
.
search_icon
}
/
>
<
Image
source
=
{
require
(
'../../../images/search_icon.png'
)}
style
=
{
styles
.
search_icon
}
/
>
<
TextInput
<
TextInput
style
=
{
styles
.
search_input
}
style
=
{
styles
.
search_input
}
placeholder
=
"搜索单号、业务员、
主治、
备注"
placeholder
=
"搜索单号、业务员、备注"
onChangeText
=
{
ev
=>
{
onChangeText
=
{
ev
=>
{
this
.
changeTextHandler
(
ev
)
this
.
changeTextHandler
(
ev
)
}}
}}
...
...
app/containers/historicalOrder/HistoricalOrderPage.js
View file @
240d87f1
...
@@ -469,6 +469,9 @@ class HistoricalOrderPage extends Component {
...
@@ -469,6 +469,9 @@ class HistoricalOrderPage extends Component {
{
item
.
source_surgery_date
?
moment
(
item
.
source_surgery_date
).
format
(
'YYYY/MM/DD HH:mm'
)
:
'无'
}
{
item
.
source_surgery_date
?
moment
(
item
.
source_surgery_date
).
format
(
'YYYY/MM/DD HH:mm'
)
:
'无'
}
<
/Text> : nul
l
<
/Text> : nul
l
}
}
<
Text
style
=
{
styles
.
cont_tip
}
>
备注:
{
item
.
remark
||
'——'
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
cont_rig
}
>
<
View
style
=
{
styles
.
cont_rig
}
>
<
Text
<
Text
...
@@ -599,7 +602,8 @@ const styles = StyleSheet.create({
...
@@ -599,7 +602,8 @@ const styles = StyleSheet.create({
},
},
cont_list_box
:
{
cont_list_box
:
{
flexDirection
:
'row'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
justifyContent
:
'space-between'
,
alignItems
:
'center'
},
},
cont_lef
:
{
cont_lef
:
{
maxWidth
:
'80%'
maxWidth
:
'80%'
...
...
app/containers/home/HomePage.js
View file @
240d87f1
...
@@ -186,9 +186,10 @@ class HomePage extends Component {
...
@@ -186,9 +186,10 @@ class HomePage extends Component {
}
}
render
()
{
render
()
{
let
{
navigation
}
=
this
.
props
let
{
navigation
,
sysProfiles
}
=
this
.
props
let
{
tabNames
,
tabIconNames
,
tabSelIconNames
,
let
{
tabNames
,
tabIconNames
,
tabSelIconNames
,
initialPage
,
tabCodes
,
isRightExit
}
=
this
.
state
initialPage
,
tabCodes
,
isRightExit
}
=
this
.
state
const
title
=
sysProfiles
.
OBS_MOBILE_APP_TITLE
||
'骨科智慧仓'
return
(
return
(
<
View
style
=
{
styles
.
home_container
}
>
<
View
style
=
{
styles
.
home_container
}
>
<
StatusBarView
<
StatusBarView
...
@@ -197,7 +198,7 @@ class HomePage extends Component {
...
@@ -197,7 +198,7 @@ class HomePage extends Component {
barStyle
=
'light-content'
barStyle
=
'light-content'
/>
/>
<
SafeAreaView
style
=
{
safe_view
}
>
<
SafeAreaView
style
=
{
safe_view
}
>
<
HeadBackItem
title
=
{
'骨科智慧仓'
}
navigation
=
{
navigation
}
isRightExit
=
{
isRightExit
}
/
>
<
HeadBackItem
title
=
{
title
}
navigation
=
{
navigation
}
isRightExit
=
{
isRightExit
}
/
>
<
ScrollableTabView
<
ScrollableTabView
style
=
{
styles
.
bom_tab_box
}
style
=
{
styles
.
bom_tab_box
}
initialPage
=
{
initialPage
}
initialPage
=
{
initialPage
}
...
@@ -297,7 +298,8 @@ const mapStateToProps = (state) => ({
...
@@ -297,7 +298,8 @@ const mapStateToProps = (state) => ({
loginState
:
state
.
login
.
loginState
,
loginState
:
state
.
login
.
loginState
,
userInfo
:
state
.
login
.
userInfo
,
userInfo
:
state
.
login
.
userInfo
,
token
:
state
.
login
.
token
,
token
:
state
.
login
.
token
,
global_domain_config
:
state
.
login
.
global_domain_config
global_domain_config
:
state
.
login
.
global_domain_config
,
sysProfiles
:
state
.
login
.
sysProfiles
,
})
})
const
mapDispatchToProps
=
(
dispatch
)
=>
({
const
mapDispatchToProps
=
(
dispatch
)
=>
({
...
...
app/containers/quickOrder/QuickOrderPage.js
View file @
240d87f1
...
@@ -216,7 +216,7 @@ class EquipConsuPage extends Component {
...
@@ -216,7 +216,7 @@ class EquipConsuPage extends Component {
doctor_name
:
''
,
// 主治医生
doctor_name
:
''
,
// 主治医生
// surgery_name: '', // 手术名称
// surgery_name: '', // 手术名称
surgery_date
:
''
,
// 手术时间
surgery_date
:
''
,
// 手术时间
// surgery_type_cod
e: '', // 手术类型
surgery_typ
e
:
''
,
// 手术类型
template_collect_number
:
''
,
// 手术模板
template_collect_number
:
''
,
// 手术模板
order_type_code
:
''
,
// 订单类型
order_type_code
:
''
,
// 订单类型
surgery_desc
:
''
,
// 备注信息
surgery_desc
:
''
,
// 备注信息
...
@@ -1496,6 +1496,7 @@ class EquipConsuPage extends Component {
...
@@ -1496,6 +1496,7 @@ class EquipConsuPage extends Component {
tempSubOption
.
doctor_name
=
state
.
listOptionData
[
5
].
value
tempSubOption
.
doctor_name
=
state
.
listOptionData
[
5
].
value
}
}
tempSubOption
.
template_collect_number
=
state
.
listOptionData
[
7
].
value
tempSubOption
.
template_collect_number
=
state
.
listOptionData
[
7
].
value
// tempSubOption.surgery_type = state.listOptionData[6].value
tempSubOption
.
surgery_date
=
state
.
listOptionData
[
8
].
value
tempSubOption
.
surgery_date
=
state
.
listOptionData
[
8
].
value
tempSubOption
.
order_type_code
=
state
.
listOptionData
[
9
].
value
tempSubOption
.
order_type_code
=
state
.
listOptionData
[
9
].
value
tempSubOption
.
collect_src_inv_code
=
state
.
listOptionData
[
10
].
value
tempSubOption
.
collect_src_inv_code
=
state
.
listOptionData
[
10
].
value
...
...
app/containers/selfOrder/SelfOrderPage.js
View file @
240d87f1
...
@@ -11,7 +11,7 @@ import LodingModel from '../common/LodingModel';
...
@@ -11,7 +11,7 @@ import LodingModel from '../common/LodingModel';
import
DateModel
from
'../common/DateModel'
;
import
DateModel
from
'../common/DateModel'
;
import
{
AudioRecorder
,
AudioUtils
}
from
'react-native-audio'
;
import
{
AudioRecorder
,
AudioUtils
}
from
'react-native-audio'
;
import
Sound
from
'react-native-sound'
;
import
Sound
from
'react-native-sound'
;
import
{
requestSelfOrganizations
,
requestSelfSurgeryHospital
,
requestSelfOrderType
,
requestSelfTemplateCollect
,
requestSelfAudio
,
requestSelfSumbit
,
setSelfInitData
,
reqSelfSurgeryHospital
,
requestListDataSuccess
,
requestSelfSurgeryType
,
setSelectProductOpts
,
reqSelfOrganizations
,
reqOrgDepartments
,
requestQuickSurColSetting
}
from
'../../action/SelfAction'
;
import
{
requestSelfOrganizations
,
requestSelfSurgeryHospital
,
requestSelfOrderType
,
requestSelfTemplateCollect
,
requestSelfAudio
,
requestSelfSumbit
,
setSelfInitData
,
reqSelfSurgeryHospital
,
requestListDataSuccess
,
requestSelfSurgeryType
,
setSelectProductOpts
,
reqSelfOrganizations
,
reqOrgDepartments
,
requestQuickSurColSetting
,
requestSurgeryType
}
from
'../../action/SelfAction'
;
import
{
exitLoginStatus
,
requestSysProfile
}
from
'../../action/LoginAction'
;
import
{
exitLoginStatus
,
requestSysProfile
}
from
'../../action/LoginAction'
;
import
{
SELF_ORDER_LIST_DOING
,
SELF_ORDER_LIST_SUCCESS
,
SELF_ORDER_LIST_FAILURE
,
LOGIN_NO
,
SELF_SUBMIT_DOING
,
SELF_SUBMIT_SUCCESS
,
SELF_SUBMIT_FAILURE
}
from
'../../base/ActionTypes'
;
import
{
SELF_ORDER_LIST_DOING
,
SELF_ORDER_LIST_SUCCESS
,
SELF_ORDER_LIST_FAILURE
,
LOGIN_NO
,
SELF_SUBMIT_DOING
,
SELF_SUBMIT_SUCCESS
,
SELF_SUBMIT_FAILURE
}
from
'../../base/ActionTypes'
;
import
PageListArrow
from
'../common/listDataComponent/PageListArrow'
;
import
PageListArrow
from
'../common/listDataComponent/PageListArrow'
;
...
@@ -168,6 +168,12 @@ class SelfOrderPage extends Component {
...
@@ -168,6 +168,12 @@ class SelfOrderPage extends Component {
title
:
'借货仓库'
,
title
:
'借货仓库'
,
name
:
'请选择'
,
name
:
'请选择'
,
value
:
''
,
value
:
''
,
},
{
"id"
:
"19"
,
title
:
'手术类型'
,
name
:
'请选择'
,
value
:
''
,
}
}
],
],
subInitListOption
:
[],
// 存储最初数据
subInitListOption
:
[],
// 存储最初数据
...
@@ -180,7 +186,7 @@ class SelfOrderPage extends Component {
...
@@ -180,7 +186,7 @@ class SelfOrderPage extends Component {
doctor_name
:
''
,
// 主治医生
doctor_name
:
''
,
// 主治医生
surgery_name
:
''
,
// 手术名称
surgery_name
:
''
,
// 手术名称
surgery_date
:
''
,
// 手术时间
surgery_date
:
''
,
// 手术时间
// surgery_type_cod
e: '', // 手术类型,用来筛选手术套包
surgery_typ
e
:
''
,
// 手术类型,用来筛选手术套包
order_type_code
:
''
,
// 订单类型
order_type_code
:
''
,
// 订单类型
surgery_desc
:
''
,
// 备注信息
surgery_desc
:
''
,
// 备注信息
voice_url
:
''
,
// 录音地址
voice_url
:
''
,
// 录音地址
...
@@ -220,18 +226,24 @@ class SelfOrderPage extends Component {
...
@@ -220,18 +226,24 @@ class SelfOrderPage extends Component {
OBS_MOBILE_BM_DISPLAY
:
0
,
OBS_MOBILE_BM_DISPLAY
:
0
,
OBS_MOBILE_SUR_FOLLOWER_DISPLAY
:
0
,
OBS_MOBILE_SUR_FOLLOWER_DISPLAY
:
0
,
OBS_MOBILE_DELIVERYMAN_DISPLAY
:
0
,
OBS_MOBILE_DELIVERYMAN_DISPLAY
:
0
,
OBS_MOBILE_BOR_WARE_REQUIRED
:
0
OBS_MOBILE_BOR_WARE_REQUIRED
:
0
,
},
},
departments
:
[]
departments
:
[],
surgery_types
:
[]
}
}
}
}
componentDidMount
()
{
componentDidMount
()
{
const
{
sysProfiles
}
=
this
.
props
this
.
getSysProfileValue
()
this
.
getSysProfileValue
()
this
.
props
.
setSelectProductOpts
([])
this
.
props
.
setSelectProductOpts
([])
this
.
getSellerName
()
this
.
getSellerName
()
this
.
getAudioAuthorize
()
this
.
getAudioAuthorize
()
this
.
getOrganizationData
()
this
.
getOrganizationData
()
if
(
sysProfiles
.
SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG
>
1
)
{
this
.
getSurgeryTypes
()
}
}
}
// 赋值销售员 初始化数据
// 赋值销售员 初始化数据
...
@@ -519,6 +531,7 @@ class SelfOrderPage extends Component {
...
@@ -519,6 +531,7 @@ class SelfOrderPage extends Component {
// 判断是否都有值,修改提交按钮的颜色
// 判断是否都有值,修改提交按钮的颜色
changeCanSub
(
isSubCheck
)
{
changeCanSub
(
isSubCheck
)
{
let
{
listOptionData
,
sysValues
}
=
this
.
state
let
{
listOptionData
,
sysValues
}
=
this
.
state
let
{
sysProfiles
}
=
this
.
props
let
tempStatus
=
false
let
tempStatus
=
false
let
tempTit
=
''
let
tempTit
=
''
let
curTip
=
'未选择'
let
curTip
=
'未选择'
...
@@ -538,7 +551,8 @@ class SelfOrderPage extends Component {
...
@@ -538,7 +551,8 @@ class SelfOrderPage extends Component {
||
(
chIndex
==
15
&&
sysValues
.
OBS_MOBILE_BM_DISPLAY
>
2
)
||
(
chIndex
==
15
&&
sysValues
.
OBS_MOBILE_BM_DISPLAY
>
2
)
||
(
chIndex
==
16
&&
sysValues
.
OBS_MOBILE_SUR_FOLLOWER_DISPLAY
>
2
)
||
(
chIndex
==
16
&&
sysValues
.
OBS_MOBILE_SUR_FOLLOWER_DISPLAY
>
2
)
||
(
chIndex
==
17
&&
sysValues
.
OBS_MOBILE_DELIVERYMAN_DISPLAY
>
2
)
||
(
chIndex
==
17
&&
sysValues
.
OBS_MOBILE_DELIVERYMAN_DISPLAY
>
2
)
||
(
chIndex
==
18
&&
sysValues
.
OBS_MOBILE_BOR_WARE_REQUIRED
>
2
))
||
(
chIndex
==
18
&&
sysValues
.
OBS_MOBILE_BOR_WARE_REQUIRED
>
2
)
||
(
chIndex
==
19
&&
sysProfiles
.
SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG
>
2
))
&&
!
listOptionData
[
chIndex
].
value
)
{
&&
!
listOptionData
[
chIndex
].
value
)
{
tempTit
=
listOptionData
[
chIndex
].
title
tempTit
=
listOptionData
[
chIndex
].
title
tempStatus
=
true
tempStatus
=
true
...
@@ -1208,25 +1222,52 @@ class SelfOrderPage extends Component {
...
@@ -1208,25 +1222,52 @@ class SelfOrderPage extends Component {
})
})
}
}
/**
* @description: 请求手术类型
* @param {*}
* @return {*}
*/
async
getSurgeryTypes
()
{
let
{
token
,
global_domain_config
}
=
this
.
props
let
params
=
{
access_token
:
token
,
category_set
:
'PRODUCT_LINE_CATEGORY'
}
const
res
=
await
requestSurgeryType
(
global_domain_config
,
params
).
catch
(
err
=>
{
return
{}})
if
(
res
.
error_code
!==
0
)
return
let
surgery_types
=
R
.
compose
(
R
.
map
(
R
.
applySpec
({
name
:
R
.
prop
(
'category_name'
),
value
:
R
.
prop
(
'category_code'
),
})),
R
.
propOr
([],
'data'
)
)(
res
)
this
.
setState
({
surgery_types
})
}
// 手术类型 点击
// 手术类型 点击
handleSurTypeCheck
(
curData
)
{
async
handleSurTypeCheck
(
curData
)
{
// let { props } = this
let
{
surgery_types
}
=
this
.
state
// let that = this
if
(
!
this
.
judgeOrgIsNull
()
||
!
this
.
judgeCustomerIsNull
())
{
// if (this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
return
// that.setState({
}
// currentTitle: curData.title,
// currentItem: {
if
(
isBlank
(
surgery_types
))
{
return
show
(
'手术类型为空'
)
}
// name: curData.name,
// value: curData.value
this
.
setState
({
// }
currentTitle
:
curData
.
title
,
// }, () => {
currentItem
:
{
// let params = {
name
:
curData
.
name
,
// access_token: props.token,
value
:
curData
.
value
// value_set_code: 'ORTHOPEDICS_PRODUCT_CLASS'
},
// }
listCurrentOption
:
surgery_types
,
// props.requestSelfSurgeryType(params)
surgery_types
// })
},
()
=>
{
// }
setTimeout
(()
=>
{
this
.
handleCloseModal
(
true
)
},
100
)
})
}
}
// 订单类型 点击
// 订单类型 点击
...
@@ -1577,7 +1618,7 @@ class SelfOrderPage extends Component {
...
@@ -1577,7 +1618,7 @@ class SelfOrderPage extends Component {
tempSubOption
.
surgery_date
=
state
.
listOptionData
[
6
].
value
tempSubOption
.
surgery_date
=
state
.
listOptionData
[
6
].
value
// tempSubOption.surgery_type_code = state.listOptionData[8
].value
tempSubOption
.
surgery_type
=
state
.
listOptionData
[
19
].
value
tempSubOption
.
order_type_code
=
state
.
listOptionData
[
7
].
value
tempSubOption
.
order_type_code
=
state
.
listOptionData
[
7
].
value
tempSubOption
.
lines
=
state
.
listOptionData
[
8
].
sub_lines
tempSubOption
.
lines
=
state
.
listOptionData
[
8
].
sub_lines
...
@@ -1870,7 +1911,8 @@ class SelfOrderPage extends Component {
...
@@ -1870,7 +1911,8 @@ class SelfOrderPage extends Component {
// 返回备注以上的元素
// 返回备注以上的元素
renderListItem
()
{
renderListItem
()
{
let
{
listOptionData
,
dateModelPop
,
sysValues
}
=
this
.
state
let
{
listOptionData
,
dateModelPop
,
sysValues
}
=
this
.
state
const
isShowOrg
=
R
.
compose
(
R
.
equals
(
'Y'
),
R
.
prop
(
'OBS_SHOW_ORG_FLAG'
))(
this
.
props
.
sysProfiles
)
const
{
sysProfiles
}
=
this
.
props
const
isShowOrg
=
R
.
compose
(
R
.
equals
(
'Y'
),
R
.
prop
(
'OBS_SHOW_ORG_FLAG'
))(
sysProfiles
)
return
(
return
(
<
View
style
=
{
styles
.
list_cont
}
>
<
View
style
=
{
styles
.
list_cont
}
>
...
@@ -2005,15 +2047,18 @@ class SelfOrderPage extends Component {
...
@@ -2005,15 +2047,18 @@ class SelfOrderPage extends Component {
listCallBack
=
{()
=>
this
.
handleSurDateCheck
(
listOptionData
[
6
])}
listCallBack
=
{()
=>
this
.
handleSurDateCheck
(
listOptionData
[
6
])}
listHasArrow
=
{
true
}
listHasArrow
=
{
true
}
/
>
/
>
{
/* <PageListArrow
{
listActOpa={.8}
sysProfiles
.
SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG
>
1
&&
listHasAster={true}
<
PageListArrow
listItem={listOptionData[8]}
listActOpa
=
{.
8
}
listName={'name'}
listItem
=
{
listOptionData
[
19
]}
listTitle={'title'}
listHasAster
=
{
sysProfiles
.
SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG
>
2
}
listCallBack={() => this.handleSurTypeCheck(listOptionData[8])}
listName
=
{
'name'
}
listHasArrow={true}
listTitle
=
{
'title'
}
/> */
}
listCallBack
=
{()
=>
this
.
handleSurTypeCheck
(
listOptionData
[
19
])}
listHasArrow
=
{
true
}
/
>
}
<
PageListArrow
<
PageListArrow
listActOpa
=
{.
8
}
listActOpa
=
{.
8
}
listHasAster
=
{
true
}
listHasAster
=
{
true
}
...
...
app/containers/transOrder/TransOrderPage.js
View file @
240d87f1
...
@@ -65,6 +65,7 @@ import {
...
@@ -65,6 +65,7 @@ import {
}
from
'../../base/ActionTypes'
;
}
from
'../../base/ActionTypes'
;
import
ImagePicker
from
'react-native-image-picker'
;
import
ImagePicker
from
'react-native-image-picker'
;
import
{
exitLoginStatus
,
requestSysProfile
}
from
'../../action/LoginAction'
;
import
{
exitLoginStatus
,
requestSysProfile
}
from
'../../action/LoginAction'
;
import
{
isNotBlank
,
isBlank
}
from
"../../utils/Utils"
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
PageListArrow
from
'../common/listDataComponent/PageListArrow'
;
import
PageListArrow
from
'../common/listDataComponent/PageListArrow'
;
import
*
as
R
from
'ramda'
;
import
*
as
R
from
'ramda'
;
...
@@ -185,7 +186,8 @@ class TransOrderPage extends Component {
...
@@ -185,7 +186,8 @@ class TransOrderPage extends Component {
OBS_MOBILE_BOR_WARE_REQUIRED
:
0
,
// APP目标仓库显示及必填权限
OBS_MOBILE_BOR_WARE_REQUIRED
:
0
,
// APP目标仓库显示及必填权限
OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY
:
0
OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY
:
0
},
},
departments
:
[]
departments
:
[],
orders
:
{}
}
}
}
}
...
@@ -599,7 +601,7 @@ class TransOrderPage extends Component {
...
@@ -599,7 +601,7 @@ class TransOrderPage extends Component {
// 修改当前选择器数据
// 修改当前选择器数据
changeCurrentOption
()
{
changeCurrentOption
()
{
let
{
currentTitle
,
listOptionData
}
=
this
.
state
let
{
currentTitle
,
listOptionData
,
orders
}
=
this
.
state
let
{
transOrderOption
}
=
this
.
props
let
{
transOrderOption
}
=
this
.
props
let
tempOption
=
[]
let
tempOption
=
[]
let
that
=
this
let
that
=
this
...
@@ -637,6 +639,12 @@ class TransOrderPage extends Component {
...
@@ -637,6 +639,12 @@ class TransOrderPage extends Component {
resultArr
.
push
(
obj
)
resultArr
.
push
(
obj
)
})
})
tempOption
=
[...
resultArr
]
tempOption
=
[...
resultArr
]
const
key
=
`
${
listOptionData
[
1
].
value
}
_
${
listOptionData
[
2
].
value
}
`
orders
[
key
]
=
tempOption
orders
[
`
${
key
}
_source`
]
=
transOrderOption
this
.
props
.
navigation
.
navigate
(
'OrdersPage'
,
{
orders
:
transOrderOption
,
title
:
'选择借货订单'
,
selectCallback
:
this
.
selectOrderCallback
.
bind
(
this
)})
return
}
}
this
.
setState
({
this
.
setState
({
...
@@ -711,7 +719,7 @@ class TransOrderPage extends Component {
...
@@ -711,7 +719,7 @@ class TransOrderPage extends Component {
})
})
}
}
// 贵州需要不显示组织, 所以
只能每个用户只能授权1个组织
// 贵州需要不显示组织, 所以只能每个用户只能授权1个组织
const
isShowOrg
=
R
.
compose
(
R
.
equals
(
'Y'
),
R
.
prop
(
'OBS_SHOW_ORG_FLAG'
))(
this
.
props
.
sysProfiles
)
const
isShowOrg
=
R
.
compose
(
R
.
equals
(
'Y'
),
R
.
prop
(
'OBS_SHOW_ORG_FLAG'
))(
this
.
props
.
sysProfiles
)
if
(
!
isShowOrg
&&
filterOpt
.
length
>
1
)
{
if
(
!
isShowOrg
&&
filterOpt
.
length
>
1
)
{
show
(
`请先选择组织`
)
show
(
`请先选择组织`
)
...
@@ -867,6 +875,16 @@ class TransOrderPage extends Component {
...
@@ -867,6 +875,16 @@ class TransOrderPage extends Component {
value
:
curData
.
value
value
:
curData
.
value
}
}
},
()
=>
{
},
()
=>
{
const
{
listOptionData
,
orders
}
=
this
.
state
const
key
=
listOptionData
[
1
].
value
+
'_'
+
listOptionData
[
2
].
value
if
(
isNotBlank
(
orders
[
key
]))
{
const
orderes
=
orders
[
key
+
'_source'
]
this
.
props
.
navigation
.
navigate
(
'OrdersPage'
,
{
orders
:
orderes
,
title
:
'选择借货订单'
,
selectCallback
:
this
.
selectOrderCallback
.
bind
(
this
)})
return
}
// 在此修改接口
// 在此修改接口
let
params
=
{
let
params
=
{
access_token
:
props
.
token
,
access_token
:
props
.
token
,
...
@@ -885,6 +903,19 @@ class TransOrderPage extends Component {
...
@@ -885,6 +903,19 @@ class TransOrderPage extends Component {
})
})
}
}
}
}
/**
* @description: 订单选择回调
* @param {*} order
* @return {*}
*/
selectOrderCallback
(
order
)
{
const
{
listOptionData
}
=
this
.
state
listOptionData
[
3
].
value
=
order
.
collect_number
listOptionData
[
3
].
name
=
order
.
collect_number
this
.
setState
({
listOptionData
})
}
// 客户名称选择后,判断目标订单信息是否只有一条数据
// 客户名称选择后,判断目标订单信息是否只有一条数据
async
customerGetTargetOrder
()
{
async
customerGetTargetOrder
()
{
let
{
state
,
props
}
=
this
let
{
state
,
props
}
=
this
...
...
app/containers/transOrder/module/TransSearchPage.js
View file @
240d87f1
...
@@ -42,7 +42,7 @@ import {
...
@@ -42,7 +42,7 @@ import {
import
HeadBackItem
from
'../../common/HeadBackItem'
;
import
HeadBackItem
from
'../../common/HeadBackItem'
;
import
LodingModel
from
'../../common/LodingModel'
;
import
LodingModel
from
'../../common/LodingModel'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
show
}
from
'../../../utils/Utils'
;
import
{
show
,
isBlank
,
isNotBlank
}
from
'../../../utils/Utils'
;
import
{
import
{
requestTransDetails
,
requestTransDetails
,
requestSubSourBorOrdNum
,
requestSubSourBorOrdNum
,
...
@@ -114,6 +114,7 @@ class TransSearchPage extends Component {
...
@@ -114,6 +114,7 @@ class TransSearchPage extends Component {
listCurrentOption
:
[],
// 当前选择器数据
listCurrentOption
:
[],
// 当前选择器数据
dateModelPop
:
false
,
// 日期选择器
dateModelPop
:
false
,
// 日期选择器
currentDateVal
:
new
Date
()
,
// 当前日期值
currentDateVal
:
new
Date
()
,
// 当前日期值
orders
:
[]
}
}
}
}
...
@@ -221,6 +222,7 @@ class TransSearchPage extends Component {
...
@@ -221,6 +222,7 @@ class TransSearchPage extends Component {
let
{
state
,
props
}
=
this
let
{
state
,
props
}
=
this
let
{
subTransObj
}
=
props
.
navigation
.
state
.
params
let
{
subTransObj
}
=
props
.
navigation
.
state
.
params
let
that
=
this
let
that
=
this
// 这个setState其实没用了
this
.
setState
({
this
.
setState
({
currentTitle
:
'来源借货订单号'
,
currentTitle
:
'来源借货订单号'
,
currentItem
:
{
currentItem
:
{
...
@@ -228,6 +230,15 @@ class TransSearchPage extends Component {
...
@@ -228,6 +230,15 @@ class TransSearchPage extends Component {
value
:
state
.
listOptionData
[
0
].
value
value
:
state
.
listOptionData
[
0
].
value
}
}
},
async
()
=>
{
},
async
()
=>
{
const
{
orders
}
=
this
.
state
if
(
isNotBlank
(
orders
))
{
this
.
props
.
navigation
.
navigate
(
'OrdersPage'
,
{
orders
,
title
:
'选择借货订单'
,
selectCallback
:
this
.
selectOrderCallback
.
bind
(
this
)})
return
}
let
params
=
{
let
params
=
{
access_token
:
props
.
token
,
access_token
:
props
.
token
,
org_code
:
subTransObj
.
org_code
,
org_code
:
subTransObj
.
org_code
,
...
@@ -254,28 +265,37 @@ class TransSearchPage extends Component {
...
@@ -254,28 +265,37 @@ class TransSearchPage extends Component {
show
(
'当前来源借货订单为空'
)
show
(
'当前来源借货订单为空'
)
return
return
}
}
let
resultArr
=
[]
surgery_collect_headers
.
forEach
(
item
=>
{
this
.
setState
({
orders
:
surgery_collect_headers
})
let
obj
=
{}
this
.
props
.
navigation
.
navigate
(
'OrdersPage'
,
{
let
collect_number
=
item
.
collect_number
?
item
.
collect_number
:
'空'
orders
:
surgery_collect_headers
,
let
surgery_name
=
item
.
surgery_name
?
item
.
surgery_name
:
'空'
title
:
'选择借货订单'
,
let
create_time
=
item
.
create_time
?
moment
(
item
.
create_time
).
format
(
"YYYY-MM-DD"
)
:
'空'
selectCallback
:
this
.
selectOrderCallback
.
bind
(
this
)
let
tempName
=
`
${
collect_number
}
-
${
surgery_name
}
-
${
create_time
}
`
obj
.
name
=
tempName
,
obj
.
value
=
item
.
collect_number
resultArr
.
push
(
obj
)
})
let
tempOption
=
[...
resultArr
]
that
.
setState
({
listCurrentOption
:
[...
tempOption
]
},
()
=>
{
// 解决 IOS 弹窗显示问题
setTimeout
(()
=>
{
that
.
setState
({
showTypePop
:
true
})
},
500
)
})
})
return
// let resultArr = []
// surgery_collect_headers.forEach(item => {
// let obj = {}
// let collect_number = item.collect_number ? item.collect_number : '空'
// let surgery_name = item.surgery_name ? item.surgery_name : '空'
// let create_time = item.create_time ? moment(item.create_time).format("YYYY-MM-DD") : '空'
// let tempName = `${collect_number}-${surgery_name}-${create_time}`
// obj.name = tempName,
// obj.value = item.collect_number
// resultArr.push(obj)
// })
// let tempOption = [...resultArr]
// that.setState({
// listCurrentOption: [...tempOption]
// }, () => {
// // 解决 IOS 弹窗显示问题
// setTimeout(() => {
// that.setState({
// showTypePop: true
// })
// }, 500)
// })
}
else
if
(
sourResult
.
error_code
===
41006
)
{
}
else
if
(
sourResult
.
error_code
===
41006
)
{
that
.
changeLodingFlag
(
false
)
that
.
changeLodingFlag
(
false
)
show
(
'登录过期,请重新登录'
)
show
(
'登录过期,请重新登录'
)
...
@@ -289,6 +309,20 @@ class TransSearchPage extends Component {
...
@@ -289,6 +309,20 @@ class TransSearchPage extends Component {
})
})
}
}
/**
* @description: 订单选择回调
* @param {*} order
* @return {*}
*/
selectOrderCallback
(
order
)
{
const
{
listOptionData
}
=
this
.
state
listOptionData
[
0
].
value
=
order
.
collect_number
listOptionData
[
0
].
name
=
order
.
collect_number
this
.
setState
({
listOptionData
},
()
=>
{
this
.
handleSearchData
()
})
}
// 来源借货订单号 扫一扫
// 来源借货订单号 扫一扫
handleSourScanCheck
()
{
handleSourScanCheck
()
{
this
.
props
.
navigation
.
navigate
(
'BarCodePage'
,
{
this
.
props
.
navigation
.
navigate
(
'BarCodePage'
,
{
...
...
app/reducers/module/login.js
View file @
240d87f1
...
@@ -22,16 +22,22 @@ const defaultState = {
...
@@ -22,16 +22,22 @@ const defaultState = {
global_domain_config
:
'https://obs.uat.guke.tech'
,
global_domain_config
:
'https://obs.uat.guke.tech'
,
hasSetDomainFromOrigin
:
false
,
hasSetDomainFromOrigin
:
false
,
local_version_apk
:
''
,
local_version_apk
:
''
,
originSysProfiles
:
{
OBS_SHOW_ORG_FLAG
:
'Y'
,
SUR_MOBILE_HISTORY_SALE_PRICE_SHOW_FLAG
:
'Y'
},
sysProfiles
:
{
sysProfiles
:
{
OBS_SHOW_ORG_FLAG
:
'Y'
,
OBS_SHOW_ORG_FLAG
:
'Y'
,
SUR_MOBILE_HISTORY_SALE_PRICE_SHOW_FLAG
:
'Y'
SUR_MOBILE_HISTORY_SALE_PRICE_SHOW_FLAG
:
'Y'
,
SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG
:
0
,
OBS_MOBILE_APP_TITLE
:
'骨科智慧仓'
}
}
}
}
// 默认sysProfile,放state里时,会被持久化影响后面更新不了
export
const
originSysProfiles
=
{
OBS_SHOW_ORG_FLAG
:
'Y'
,
SUR_MOBILE_HISTORY_SALE_PRICE_SHOW_FLAG
:
'Y'
,
SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG
:
0
,
OBS_MOBILE_APP_TITLE
:
'骨科智慧仓'
}
export
default
login
=
(
state
=
defaultState
,
action
)
=>
{
export
default
login
=
(
state
=
defaultState
,
action
)
=>
{
switch
(
action
.
type
)
{
switch
(
action
.
type
)
{
case
LOGIN_DOING
:
case
LOGIN_DOING
:
...
...
yarn.lock
View file @
240d87f1
...
@@ -903,11 +903,6 @@
...
@@ -903,11 +903,6 @@
resolved "https://registry.yarnpkg.com/@react-native-community/slider/-/slider-3.0.3.tgz#830167fd757ba70ac638747ba3169b2dbae60330"
resolved "https://registry.yarnpkg.com/@react-native-community/slider/-/slider-3.0.3.tgz#830167fd757ba70ac638747ba3169b2dbae60330"
integrity sha512-8IeHfDwJ9/CTUwFs6x90VlobV3BfuPgNLjTgC6dRZovfCWigaZwVNIFFJnHBakK3pW2xErAPwhdvNR4JeNoYbw==
integrity sha512-8IeHfDwJ9/CTUwFs6x90VlobV3BfuPgNLjTgC6dRZovfCWigaZwVNIFFJnHBakK3pW2xErAPwhdvNR4JeNoYbw==
"@react-native-community/viewpager@^2.0.1":
version "2.0.2"
resolved "https://r.cnpmjs.org/@react-native-community/viewpager/download/@react-native-community/viewpager-2.0.2.tgz#622b190294b1310c4825c98daeaee1c8443f7124"
integrity sha1-YisZApSxMQxIJcmNrq7hyEQ/cSQ=
"@react-navigation/core@~3.4.1":
"@react-navigation/core@~3.4.1":
version "3.4.2"
version "3.4.2"
resolved "https://registry.npm.taobao.org/@react-navigation/core/download/@react-navigation/core-3.4.2.tgz#bec563e94fde40fbab3730cdc97f22afbb2a1498"
resolved "https://registry.npm.taobao.org/@react-navigation/core/download/@react-navigation/core-3.4.2.tgz#bec563e94fde40fbab3730cdc97f22afbb2a1498"
...
@@ -5396,10 +5391,10 @@ react-native-modal-popover@^2.0.1:
...
@@ -5396,10 +5391,10 @@ react-native-modal-popover@^2.0.1:
lodash "^4.17.20"
lodash "^4.17.20"
prop-types "^15.7.2"
prop-types "^15.7.2"
react-native-pager-view@
^
5.2.1:
react-native-pager-view@5.2.1:
version "5.2.1"
version "5.2.1"
resolved "https://r
egistry.yarnpkg.com/react-native-pager-view/-
/react-native-pager-view-5.2.1.tgz#ad69a6035edd998771daf302830f73602e5204a9"
resolved "https://r
g.cnpmjs.org/react-native-pager-view/download
/react-native-pager-view-5.2.1.tgz#ad69a6035edd998771daf302830f73602e5204a9"
integrity sha
512-6aqsVr6Z4MjYP57lMwNEurlOPah0Lw34L6x+/nI6SxY+wyqZI+uaEB7sWS5EIcgQ9cGKMo925LnVWd6Xilu33A=
=
integrity sha
1-rWmmA17dmYdx2vMCgw9zYC5SBKk
=
react-native-root-siblings@^3.0.0:
react-native-root-siblings@^3.0.0:
version "3.2.3"
version "3.2.3"
...
@@ -5431,12 +5426,11 @@ react-native-safe-area-view@^0.14.1:
...
@@ -5431,12 +5426,11 @@ react-native-safe-area-view@^0.14.1:
dependencies:
dependencies:
debounce "^1.2.0"
debounce "^1.2.0"
react-native-scrollable-tab-view@
^1.0
.0:
react-native-scrollable-tab-view@
0.9
.0:
version "
1.0
.0"
version "
0.9
.0"
resolved "https://r
.cnpmjs.org/react-native-scrollable-tab-view/download/react-native-scrollable-tab-view-1.0.0.tgz#87319896067f7bb643ecd7fba2cba4d6d8f9e18b
"
resolved "https://r
g.cnpmjs.org/react-native-scrollable-tab-view/download/react-native-scrollable-tab-view-0.9.0.tgz#cf8c09018f1e1c88bb26db6a003c90de275a1c6f
"
integrity sha1-
hzGYlgZ/e7ZD7Nf7osuk1tj54Ys
=
integrity sha1-
z4wJAY8eHIi7JttqADyQ3idaHG8
=
dependencies:
dependencies:
"@react-native-community/viewpager" "^2.0.1"
create-react-class "^15.6.2"
create-react-class "^15.6.2"
prop-types "^15.6.0"
prop-types "^15.6.0"
react-timer-mixin "^0.13.3"
react-timer-mixin "^0.13.3"
...
...
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