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
project
jinfa-admin
Commits
18560d91
Commit
18560d91
authored
Jan 06, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:处理订单详情无法查看发票的问题
parent
1397512d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
27 deletions
+44
-27
index.less
...erSystem/orderDetail/components/orderMergeInfo/index.less
+6
-5
index.tsx
...derSystem/orderDetail/components/orderMergeInfo/index.tsx
+38
-22
No files found.
src/pages/orderSystem/orderDetail/components/orderMergeInfo/index.less
View file @
18560d91
...
...
@@ -67,6 +67,8 @@
.invoice_list_item_btn {
margin: 0 10px;
color: @main-color;
cursor: pointer;
}
}
}
...
...
@@ -78,7 +80,7 @@
display: block;
width: 100%;
}
.ant-radio-wrapper {
display: flex;
width: 100%;
...
...
@@ -88,10 +90,10 @@
margin: 10px;
padding-left: 16px;
}
.ant-radio-wrapper.ant-radio-wrapper-checked {
border: 1px solid @main-color;
&::after {
content: '';
position: absolute;
...
...
@@ -105,4 +107,4 @@
}
}
}
}
\ No newline at end of file
}
src/pages/orderSystem/orderDetail/components/orderMergeInfo/index.tsx
View file @
18560d91
import
React
,
{
useContext
,
useEffect
,
useState
,
useMemo
}
from
'react'
import
{
Row
,
Col
,
Tag
}
from
'antd'
import
{
Row
,
Col
,
Tag
,
Modal
}
from
'antd'
import
MellowCard
from
'@/components/MellowCard'
import
{
OrderDetailContext
}
from
'../../context'
import
{
formatTimeString
}
from
'@/utils'
...
...
@@ -29,25 +29,6 @@ const payInfo = [
{
title
:
'运费'
,
name
:
'freight'
}
]
const
otherInfo
=
[
{
title
:
'发票'
,
name
:
'theInvoiceInfo'
,
render
:
item
=>
<
div
className=
{
style
.
invoice_list_item
}
>
<
div
className=
{
style
.
invoice_list_item_content
}
>
<
div
className=
{
cx
(
style
.
invoice_list_item_content_tag
,
item
.
kind
!==
1
?
style
.
special
:
''
)
}
>
{
item
.
kind
===
1
?
'增值税普通发票'
:
'增值税专用发票'
}
</
div
>
<
div
className=
{
style
.
invoice_list_item_content_name
}
>
<
div
>
{
item
.
invoiceTitle
}
</
div
>
<
div
>
{
item
.
taxNo
}
</
div
>
</
div
>
</
div
>
{
<
div
className=
{
style
.
invoice_list_item_btn_group
}
>
{
/* 查看功能todo */
}
{
/* <div className={style.invoice_list_item_btn}>查看</div> */
}
</
div
>
}
</
div
>,
resetCol
:
{
flex
:
'1 1 100%'
}
},
{
title
:
'包装要求'
,
name
:
'pageRequire'
},
{
title
:
'其他要求'
,
name
:
'restsRequire'
},
]
const
electronInfo
=
[
{
title
:
'电子合同'
,
name
:
'none'
},
...
...
@@ -60,11 +41,33 @@ const RenderCard = ({ infoList, dataSource }) => infoList.map(v => dataSource[v.
const
OrderMergeInfo
:
React
.
FC
<
OrderMergeInfoProps
>
=
(
props
)
=>
{
const
orderDetailCtx
=
useContext
(
OrderDetailContext
)
const
[
isModalVisible
,
setIsModalVisible
]
=
useState
(
false
)
// const address = useMemo(async () => {
// const { data } = await PublicApi.getLogisticsSelectListReceiverAddress()
// return data
// }, [])
const
{
data
,
ctl
}
=
orderDetailCtx
const
{
theInvoiceInfo
}
=
data
const
otherInfo
=
[
{
title
:
'发票'
,
name
:
'theInvoiceInfo'
,
render
:
item
=>
<
div
className=
{
style
.
invoice_list_item
}
>
<
div
className=
{
style
.
invoice_list_item_content
}
>
<
div
className=
{
cx
(
style
.
invoice_list_item_content_tag
,
item
.
kind
!==
1
?
style
.
special
:
''
)
}
>
{
item
.
kind
===
1
?
'增值税普通发票'
:
'增值税专用发票'
}
</
div
>
<
div
className=
{
style
.
invoice_list_item_content_name
}
>
<
div
>
{
item
.
invoiceTitle
}
</
div
>
<
div
>
{
item
.
taxNo
}
</
div
>
</
div
>
</
div
>
{
<
div
className=
{
style
.
invoice_list_item_btn_group
}
>
{
/* 查看功能todo */
}
<
div
className=
{
style
.
invoice_list_item_btn
}
onClick=
{
()
=>
setIsModalVisible
(
true
)
}
>
查看
>
</
div
>
</
div
>
}
</
div
>,
resetCol
:
{
flex
:
'1 1 100%'
}
},
{
title
:
'包装要求'
,
name
:
'pageRequire'
},
{
title
:
'其他要求'
,
name
:
'restsRequire'
},
]
// useEffect(() => {
// if (data.deliveryAddresId && !data.receiverName) {
...
...
@@ -82,6 +85,7 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
// }
return
(
<>
<
Row
style=
{
{
marginTop
:
24
}
}
gutter=
{
24
}
>
<
Col
span=
{
12
}
>
<
MellowCard
title=
'交易信息'
fullHeight
>
...
...
@@ -110,9 +114,22 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
</
MellowCard
>
</
Col
>
</
Row
>
<
Modal
title=
"发票信息"
visible=
{
isModalVisible
}
onOk=
{
()
=>
setIsModalVisible
(
false
)
}
onCancel=
{
()
=>
setIsModalVisible
(
false
)
}
>
<
Row
gutter=
{
[
0
,
10
]
}
style=
{
{
fontSize
:
14
}
}
>
<
Col
span=
{
4
}
>
开具类型:
</
Col
><
Col
span=
{
20
}
>
{
theInvoiceInfo
?.
type
===
1
?
"企业"
:
"个人"
}
</
Col
>
<
Col
span=
{
4
}
>
发票种类:
</
Col
><
Col
span=
{
20
}
>
{
theInvoiceInfo
?.
kind
===
1
?
"增值税普通发票"
:
"增值税专用发票"
}
</
Col
>
<
Col
span=
{
4
}
>
发票抬头:
</
Col
><
Col
span=
{
20
}
>
{
theInvoiceInfo
?.
invoiceTitle
}
</
Col
>
<
Col
span=
{
4
}
>
纳税号:
</
Col
><
Col
span=
{
20
}
>
{
theInvoiceInfo
?.
taxNo
}
</
Col
>
<
Col
span=
{
4
}
>
开户行:
</
Col
><
Col
span=
{
20
}
>
{
theInvoiceInfo
?.
bankOfDeposit
}
</
Col
>
<
Col
span=
{
4
}
>
账号:
</
Col
><
Col
span=
{
20
}
>
{
theInvoiceInfo
?.
account
}
</
Col
>
<
Col
span=
{
4
}
>
地址:
</
Col
><
Col
span=
{
20
}
>
{
theInvoiceInfo
?.
addres
}
</
Col
>
<
Col
span=
{
4
}
>
电话:
</
Col
><
Col
span=
{
20
}
>
{
theInvoiceInfo
?.
tel
}
</
Col
>
</
Row
>
</
Modal
>
</>
)
}
OrderMergeInfo
.
defaultProps
=
{}
export
default
OrderMergeInfo
\ No newline at end of file
export
default
OrderMergeInfo
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