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
dbfc8a71
Commit
dbfc8a71
authored
Dec 03, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:处理订单详情价格运费显示异常
parent
2df872b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
index.tsx
...System/orderDetail/components/orderProductTable/index.tsx
+9
-10
No files found.
src/pages/orderSystem/orderDetail/components/orderProductTable/index.tsx
View file @
dbfc8a71
...
...
@@ -84,10 +84,10 @@ const warehouseColumns: any[] = [
const
modalPriceActions
=
createFormActions
()
// 总计金额联动框
export
const
MoneyTotalBox
=
({
dataSource
,
isEditData
})
=>
{
const
{
orderProductRequests
=
[],
receiverAddressId
,
orderModel
}
=
dataSource
||
{}
const
{
orderProductRequests
=
[],
receiverAddressId
,
orderModel
,
sumPrice
,
amount
,
freight
}
=
dataSource
||
{}
const
creditsCommodity
=
(
orderModel
===
24
||
orderModel
===
25
)
// 积分或渠道积分下单模式
const
sum
=
orderProductRequests
.
reduce
((
prev
,
next
)
=>
prev
+
Number
((
next
.
price
||
0
)),
0
)
const
sum
=
amount
||
orderProductRequests
.
reduce
((
prev
,
next
)
=>
prev
+
Number
((
next
.
price
||
0
)),
0
)
const
modelRef
=
useRef
<
any
>
({})
const
[
freePrice
,
setFreePrice
]
=
useState
<
number
>
(
0
)
const
handleSetting
=
()
=>
{
...
...
@@ -126,11 +126,11 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
</
Col
>
<
Col
span=
{
2
}
>
<
div
>
运费
{
isEditData
&&
<
SettingOutlined
style=
{
{
marginLeft
:
8
}
}
onClick=
{
handleSetting
}
/>
}
</
div
>
<
div
>
{
freePrice
}
</
div
>
<
div
>
{
fre
ight
||
fre
ePrice
}
</
div
>
</
Col
>
<
Col
span=
{
2
}
>
<
div
>
{
creditsCommodity
?
'总计所需积分'
:
'总计金额'
}
</
div
>
<
div
>
{
sum
+
freePrice
}
</
div
>
<
div
>
{
sum
Price
||
sum
+
freePrice
}
</
div
>
</
Col
>
<
ModalForm
modalTitle=
'设置运费'
...
...
@@ -293,7 +293,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = (props) => {
}
return
v
})
ctl
.
setData
({
...
data
,
orderProductRequests
:
newData
...
...
@@ -365,7 +365,7 @@ const OrderProductTable:React.FC<OrderProductTableProps> = (props) => {
dataIndex
:
'memberPrice'
,
align
:
'center'
,
key
:
'memberPrice'
,
render
:
(
text
,
record
)
=>
record
.
isMemberPrice
?
(
text
+
'%'
)
:
null
render
:
(
text
,
record
)
=>
record
.
isMemberPrice
?
(
text
*
100
+
'%'
)
:
null
},
{
title
:
creditsCommodity
?
'兑换数量'
:
'采购数量'
,
...
...
@@ -382,9 +382,9 @@ const OrderProductTable:React.FC<OrderProductTableProps> = (props) => {
},
{
title
:
creditsCommodity
?
'所需积分小计'
:
'金额'
,
dataIndex
:
'
price
'
,
dataIndex
:
'
money
'
,
align
:
'center'
,
key
:
'
price
'
,
key
:
'
money
'
,
},
// 接口调用
{
...
...
@@ -450,4 +450,4 @@ const OrderProductTable:React.FC<OrderProductTableProps> = (props) => {
OrderProductTable
.
defaultProps
=
{}
export
default
OrderProductTable
\ No newline at end of file
export
default
OrderProductTable
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