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
d1ef5c42
authored
Jan 26, 2021
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
完善自助下单
parent
9c9fbe5d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
16 deletions
app/containers/selfOrder/SelfOrderPage.js
app/containers/selfOrder/module/ChooseProductPage.js
app/containers/selfOrder/module/ProductRightStyle.js
app/containers/selfOrder/SelfOrderPage.js
View file @
d1ef5c42
...
...
@@ -11,7 +11,7 @@ import LodingModel from '../common/LodingModel';
import
DateModel
from
'../common/DateModel'
;
import
{
AudioRecorder
,
AudioUtils
}
from
'react-native-audio'
;
import
Sound
from
'react-native-sound'
;
import
{
requestSelfOrganizations
,
requestSelfSurgeryHospital
,
requestSelfOrderType
,
requestSelfTemplateCollect
,
requestSelfAudio
,
requestSelfSumbit
,
setSelfInitData
,
reqSelfSurgeryHospital
,
requestListDataSuccess
,
requestSelfSurgeryType
,
setSelectProductOpts
}
from
'../../action/SelfAction'
;
import
{
requestSelfOrganizations
,
requestSelfSurgeryHospital
,
requestSelfOrderType
,
requestSelfTemplateCollect
,
requestSelfAudio
,
requestSelfSumbit
,
setSelfInitData
,
reqSelfSurgeryHospital
,
requestListDataSuccess
,
requestSelfSurgeryType
,
setSelectProductOpts
,
reqSelfOrganizations
}
from
'../../action/SelfAction'
;
import
{
exitLoginStatus
}
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
PageListArrow
from
'../common/listDataComponent/PageListArrow'
;
...
...
@@ -22,6 +22,7 @@ import NotEnoughModel from '../common/NotEnoughModel';
import
ImagePicker
from
'react-native-image-picker'
;
import
ZoomPictureModel
from
'../common/ZoomPictureModel'
;
import
{
uploadTransImg
}
from
'../../action/TransAction'
;
import
moment
from
'moment'
;
class
SelfOrderPage
extends
Component
{
constructor
(
props
)
{
...
...
@@ -74,9 +75,9 @@ class SelfOrderPage extends Component {
// },
{
"id"
:
"6"
,
title
:
'
手术
时间'
,
name
:
'请选择'
,
value
:
''
,
title
:
'
需求
时间'
,
name
:
moment
(
new
Date
()).
format
(
"YYYY-MM-DD HH:mm"
)
,
value
:
moment
(
new
Date
()).
format
(
"YYYY-MM-DD HH:mm"
)
,
dateValue
:
new
Date
(),
showDatePicker
:
true
},
...
...
@@ -100,11 +101,11 @@ class SelfOrderPage extends Component {
lines
:
[],
sub_lines
:
[],
replace_item_flag
:
'N'
,
// 器械包
take_cert_flag
:
'N'
//
注册
证
take_cert_flag
:
'N'
//
合格
证
},
{
"id"
:
"9"
,
title
:
'需要携带
注册
证'
,
title
:
'需要携带
合格
证'
,
// name: '',
value
:
''
,
isRedio
:
''
// 单选
...
...
@@ -188,6 +189,7 @@ class SelfOrderPage extends Component {
this
.
props
.
setSelectProductOpts
([])
this
.
getSellerName
()
this
.
getAudioAuthorize
()
this
.
getOrganizationData
()
}
// 赋值销售员 初始化数据
...
...
@@ -605,6 +607,40 @@ class SelfOrderPage extends Component {
props
.
requestSelfOrganizations
(
params
)
})
}
async
getOrganizationData
()
{
let
{
state
,
props
}
=
this
let
params
=
{
access_token
:
props
.
token
}
let
that
=
this
let
{
global_domain_config
}
=
props
let
orgResult
=
await
reqSelfOrganizations
(
global_domain_config
,
params
);
if
(
orgResult
.
error_code
==
0
)
{
let
{
data
:
{
organizations
}
}
=
orgResult
let
{
listOptionData
}
=
state
props
.
requestListDataSuccess
(
organizations
)
let
filterOpt
=
dedupQuoteArray
(
organizations
,
'org_code'
)
if
(
filterOpt
.
length
===
0
)
{
show
(
`当前
${
listOptionData
[
1
].
title
}
为空`
)
return
}
if
(
filterOpt
.
length
===
1
)
{
listOptionData
[
1
].
name
=
filterOpt
[
0
].
org_name
listOptionData
[
1
].
value
=
filterOpt
[
0
].
org_code
that
.
setState
({
listOptionData
},
()
=>
{
that
.
organizationGetCustomerData
()
})
}
}
else
if
(
orgResult
.
error_code
==
41006
)
{
show
(
'登录过期,请重新登录'
);
props
.
exitLoginStatus
();
}
else
{
let
error_msg
=
orgResult
.
error_msg
||
orgResult
.
message
show
(
error_msg
);
}
}
// 客户名称 点击
handleCustomerCheck
(
curData
)
{
...
...
@@ -644,14 +680,14 @@ class SelfOrderPage extends Component {
let
cusResult
=
await
reqSelfSurgeryHospital
(
global_domain_config
,
params
);
if
(
cusResult
.
error_code
==
0
)
{
let
{
data
:
{
customers
}
}
=
cusResult
let
{
listOptionData
}
=
state
props
.
requestListDataSuccess
(
customers
)
let
filterOpt
=
dedupQuoteArray
(
customers
,
'customer_code'
)
if
(
filterOpt
.
length
===
0
)
{
show
(
`当前
客户名称
为空`
)
show
(
`当前
${
listOptionData
[
2
].
title
}
为空`
)
return
}
if
(
filterOpt
.
length
===
1
)
{
let
{
listOptionData
}
=
state
listOptionData
[
2
].
name
=
filterOpt
[
0
].
customer_name
listOptionData
[
2
].
value
=
filterOpt
[
0
].
customer_code
that
.
setState
({
...
...
@@ -709,7 +745,7 @@ class SelfOrderPage extends Component {
let
tempLocalOption
=
localCustomersOption
.
filter
(
item
=>
item
.
customer_code
===
listOptionData
[
2
].
value
)
tempLocalOption
=
dedupQuoteArray
(
tempLocalOption
,
'bill_to_site_code'
)
if
(
tempLocalOption
.
length
===
0
)
{
show
(
`当前
收单地点
为空`
)
show
(
`当前
${
listOptionData
[
3
].
title
}
为空`
)
return
}
if
(
tempLocalOption
.
length
===
1
)
{
...
...
@@ -759,7 +795,7 @@ class SelfOrderPage extends Component {
let
tempLocalOption
=
localCustomersOption
.
filter
(
item
=>
item
.
customer_code
===
listOptionData
[
2
].
value
)
tempLocalOption
=
dedupQuoteArray
(
tempLocalOption
,
'ship_to_site_code'
)
if
(
tempLocalOption
.
length
===
0
)
{
show
(
`当前
收货地点
为空`
)
show
(
`当前
${
listOptionData
[
4
].
title
}
为空`
)
return
}
if
(
tempLocalOption
.
length
===
1
)
{
...
...
@@ -921,7 +957,7 @@ class SelfOrderPage extends Component {
}
}
// 需要携带
注册
证 / 自动更换同品不同器械包 点击
// 需要携带
合格
证 / 自动更换同品不同器械包 点击
handleCertAndItemCheck
(
curData
,
certFlag
)
{
console
.
log
(
'更新'
,
curData
,
certFlag
)
let
{
listOptionData
}
=
this
.
state
...
...
@@ -1325,7 +1361,7 @@ class SelfOrderPage extends Component {
// if (showPackageTip) {
// this.refs.PackageModel.show()
// } else {
// this.refs.CertModel.show('需要携带
注册
证?')
// this.refs.CertModel.show('需要携带
合格
证?')
// }
}
...
...
@@ -1403,7 +1439,7 @@ class SelfOrderPage extends Component {
// listOptionData: listOptionData
// })
// if (typeName === 'replace_item_flag') {
// this.refs.CertModel.show('需要携带
注册
证?')
// this.refs.CertModel.show('需要携带
合格
证?')
// } else {
// this.submitSelfOrder()
// }
...
...
app/containers/selfOrder/module/ChooseProductPage.js
View file @
d1ef5c42
...
...
@@ -103,7 +103,7 @@ class ChooseProductPage extends Component {
let
params
=
{
access_token
:
token
,
org_code
:
cur_org_code
,
supplier_type
:
'MANUFACTURER,M
&
O'
,
// 供应商
supplier_type
:
'MANUFACTURER,M
%26
O'
,
// 供应商
filter_flag
:
'Y'
,
// 过滤标识
}
console
.
log
(
'params='
,
params
)
...
...
@@ -182,6 +182,8 @@ class ChooseProductPage extends Component {
let
that
=
this
let
{
topProcOptionList
,
topActiveIndex
}
=
that
.
state
let
{
token
,
global_domain_config
,
navigation
}
=
that
.
props
that
.
handleChangeThrShow
(
false
)
if
(
leftItem
[
LocalVariable
.
SELECTED_QUQNTITY
]
!==
0
)
{
that
.
setState
({
leftActiveIndex
:
leftIndex
...
...
@@ -927,7 +929,8 @@ const styles = StyleSheet.create({
width
:
pxSize
(
14
),
height
:
pxSize
(
14
),
marginRight
:
4
,
marginLeft
:
6
marginLeft
:
6
,
marginBottom
:
5
},
cont_left_tit
:
{},
cont_left_noicon
:
{
...
...
app/containers/selfOrder/module/ProductRightStyle.js
View file @
d1ef5c42
...
...
@@ -171,6 +171,7 @@ class ProductRightStyle extends Component {
curThridObj
:
curThridObj
,
rowSingleData
:
curRowData
})
this
.
props
.
changeThrShow
(
show
)
}
else
{
// 小类点击标题
if
(
curThridObj
.
superItem
)
{
...
...
@@ -187,12 +188,14 @@ class ProductRightStyle extends Component {
that
.
setState
({
thridIsVisible
:
show
})
this
.
props
.
changeThrShow
(
show
)
}
}
}
// 计算后的回调 - 头/行
handleCalCallBack
(
item
,
index
,
dataName
,
coutFieName
)
{
let
that
=
this
// 除了耗材小类的回调
if
(
dataName
&&
this
.
state
[
dataName
])
{
let
curDataName
=
this
.
state
[
dataName
]
...
...
@@ -200,7 +203,11 @@ class ProductRightStyle extends Component {
this
.
setState
({
[
dataName
]:
curDataName
})
if
(
coutFieName
)
{
if
(
dataName
===
'rowSingleData'
){
// 小类
that
.
changeThrShow
(
true
)
}
if
(
coutFieName
)
{
// 计算==头
let
sumCount
=
0
curDataName
.
map
(
item
=>
{
...
...
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