Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-admin
Commits
1c0bd081
Commit
1c0bd081
authored
Dec 14, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:处理订单自提方式显示自提地址
parent
b0204163
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
3 deletions
+31
-3
index.tsx
...System/orderDetail/components/orderProductTable/index.tsx
+31
-3
No files found.
src/pages/orderSystem/orderDetail/components/orderProductTable/index.tsx
View file @
1c0bd081
import
React
,
{
useContext
,
useState
,
useRef
,
useEffect
,
useCallback
}
from
'react'
import
{
StandardTable
}
from
'god'
import
{
Card
,
Table
,
Form
,
Input
,
Row
,
Col
,
Button
,
Modal
}
from
'antd'
import
{
Card
,
Table
,
Form
,
Input
,
Row
,
Col
,
Button
,
Modal
,
Space
,
Popover
}
from
'antd'
import
{
OrderDetailContext
}
from
'../../context'
import
{
EditOutlined
,
SettingOutlined
}
from
'@ant-design/icons'
import
{
EditOutlined
,
EnvironmentOutlined
,
SettingOutlined
}
from
'@ant-design/icons'
import
style
from
'./index.less'
import
{
PublicApi
}
from
'@/services/api'
import
styled
from
'styled-components'
...
...
@@ -165,6 +165,32 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
</
RowStyle
>
}
// 自提地址框
export
const
AddressPop
=
(
props
)
=>
{
const
{
pickInfo
=
null
,
children
}
=
props
let
receiveInfo
=
pickInfo
?.
render
&&
JSON
.
parse
(
pickInfo
.
render
)
return
pickInfo
&&
pickInfo
.
deliveryType
===
2
?
<
Space
>
<
EnvironmentOutlined
style=
{
{
marginRight
:
8
}
}
/>
<
Popover
content=
{
<
Row
>
<
div
>
<
h3
><
EnvironmentOutlined
/>
自提地址
</
h3
>
{
/* <p>{pickInfo.receiverName} / {pickInfo.phone}</p>
<p>{pickInfo.fullAddress}</p> */
}
{
receiveInfo
&&
<>
<
p
>
{
receiveInfo
.
shipperName
}
/
{
receiveInfo
.
phone
}
</
p
>
<
p
>
{
receiveInfo
.
provinceName
+
receiveInfo
.
cityName
+
receiveInfo
.
districtName
+
receiveInfo
.
address
}
</
p
>
</>
}
</
div
>
</
Row
>
}
>
{
children
}
</
Popover
>
</
Space
>
:
children
}
const
EditableRow
:
React
.
FC
<
EditableRowProps
>
=
({
index
,
...
props
})
=>
{
const
[
form
]
=
Form
.
useForm
();
return
(
...
...
@@ -392,7 +418,9 @@ const OrderProductTable:React.FC<OrderProductTableProps> = (props) => {
dataIndex
:
'logistics'
,
align
:
'center'
,
key
:
'logistics'
,
render
:
(
text
)
=>
text
&&
text
.
deliveryType
&&
DELIVERY_TYPE
[
text
.
deliveryType
]
// render: (text) => text && text.deliveryType && DELIVERY_TYPE[text.deliveryType]
render
:
(
text
)
=>
(
text
&&
text
.
deliveryType
&&
text
.
deliveryType
===
2
)
?
<
AddressPop
pickInfo=
{
text
}
>
{
DELIVERY_TYPE
[
text
.
deliveryType
]
}
</
AddressPop
>
:
DELIVERY_TYPE
[
text
?.
deliveryType
]
},
{
title
:
'仓位库存扣减记录'
,
...
...
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