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
7a156482
authored
Nov 04, 2022
by
peii
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat
parent
55ab9255
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
31 deletions
src/pages/order/self.tsx
src/pages/order/self.tsx
View file @
7a156482
...
...
@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/pages/order/self.tsx
* @Author: peii
* @Date: 2021-07-13 22:40:12
* @LastEditTime: 2022-11-0
2 19:41:00
* @LastEditTime: 2022-11-0
4 15:16:13
* @LastEditors: PEII
* @Vision: 1.0
* @Description: 自助下单
...
...
@@ -35,6 +35,7 @@ type IProps = {
type
IState
=
{
data
:
{
[
key
:
string
]:
any
[]
}
formItems
:
IFormField
[]
doctorNames
:
[]
}
class
SelfOrder
extends
Component
<
IProps
,
IState
>
{
...
...
@@ -282,13 +283,17 @@ class SelfOrder extends Component<IProps, IState> {
* @return {*}
*/
setBillToSitesCallback
()
{
const
{
formItems
,
data
}
=
this
.
state
const
{
formItems
,
data
,
doctorNames
}
=
this
.
state
const
{
billToSiteCode
}
=
data
const
item
=
getFormItem
(
formItems
,
'shipToSiteCode'
)
const
billItem
=
getFormItem
(
formItems
,
'billToSiteCode'
)
const
billToSiteItem
=
R
.
find
(
R
.
propEq
(
'value'
,
billToSiteCode
))(
billItem
.
options
||
[])
doctorNames
=
R
.
compose
(
R
.
uniq
,
R
.
pluck
(
'customer_name'
))(
billToSiteItem
.
shipToSites
)
const
doctorItem
=
getFormItem
(
formItems
,
'doctorName'
)
doctorItem
.
options
=
R
.
map
(
R
.
applySpec
({
label
:
R
.
identity
,
value
:
R
.
identity
}))(
doctorNames
)
item
.
options
=
R
.
compose
(
R
.
map
(
R
.
applySpec
({
...
...
@@ -299,7 +304,7 @@ class SelfOrder extends Component<IProps, IState> {
),
)(
billToSiteItem
.
shipToSites
||
[])
this
.
setState
({
formItems
})
this
.
setState
({
formItems
,
doctorNames
})
}
/**
...
...
@@ -308,36 +313,12 @@ class SelfOrder extends Component<IProps, IState> {
* @return {*}
*/
setShipToSiteCallback
()
{
const
{
formItems
,
data
}
=
this
.
state
const
{
sellerCode
,
orgCode
,
customerCode
,
billToSiteCode
,
shipToSiteCode
}
=
data
const
{
formItems
,
data
}
=
this
.
state
const
{
billToSiteCode
}
=
data
const
item
=
getFormItem
(
formItems
,
'doctorName'
)
const
shipItem
=
getFormItem
(
formItems
,
'shipToSiteCode'
)
const
billToSiteItem
=
R
.
find
(
R
.
propEq
(
'value'
,
billToSiteCode
))(
billItem
.
options
||
[])
item
.
options
=
R
.
map
(
R
.
applySpec
({
label
:
R
.
prop
(
'ship_to_site_name'
),
value
:
R
.
prop
(
'ship_to_site_code'
),
doctorName
:
R
.
prop
(
'customer_doctor'
),
}),
)(
billToSiteItem
.
shipToSites
||
[])
this
.
setState
({
formItems
})
// const doctors = this.props.orgStore.doctors(sellerCode, orgCode, customerCode, billToSiteCode)
// const item = getFormItem(formItems, 'doctorName')
// item.options = doctors
// this.setState({ formItems })
const
{
shipToSiteCode
}
=
this
.
state
.
data
// 借货仓库依赖收货地址
//
if (isNotBlank(shipToSiteCode)) {
//
this.getInventories()
//
}
if
(
isNotBlank
(
shipToSiteCode
))
{
this
.
getInventories
()
}
}
/**
...
...
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