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
bbda74a1
Commit
bbda74a1
authored
Dec 03, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into dev
parents
a8a4333b
9adf6169
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
index.tsx
...stem/orderDetail/components/orderPayResultModal/index.tsx
+9
-6
index.tsx
...System/orderDetail/components/orderProductTable/index.tsx
+9
-10
No files found.
src/pages/orderSystem/orderDetail/components/orderPayResultModal/index.tsx
View file @
bbda74a1
...
...
@@ -6,6 +6,7 @@ import { PayOutWorkState } from '@/constants'
import
{
PublicApi
}
from
'@/services/api'
import
{
history
,
Link
}
from
'umi'
import
OverflowText
from
'@/components/OverflowText'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
export
interface
OrderPayResultModalProps
{
type
:
'default'
|
'preview'
,
...
...
@@ -16,7 +17,9 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
const
{
data
}
=
useContext
(
OrderDetailContext
)
const
{
id
}
=
usePageStatus
()
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
[
isReady
,
setIsReady
]
=
useState
()
const
canCtlData
=
data
.
paymentInformationResponses
.
find
(
v
=>
v
.
externalState
===
PayOutWorkState
.
READY_CONFIRM_RESULT
)
||
{}
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderPlatformConfirmedPaymentResultsOrder
)
const
transData
=
canCtlData
.
payOrderUrls
?.
split
(
','
)
||
[]
useEffect
(()
=>
{
...
...
@@ -33,14 +36,15 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
}
const
handleConfirm
=
async
(
isReady
)
=>
{
setIsReady
(
isReady
)
const
params
=
{
state
:
isReady
,
id
:
Number
(
id
),
paymentInformationId
:
canCtlData
.
id
}
const
{
code
}
=
await
PublicApi
.
postOrderPlatformConfirmedPaymentResultsOrder
(
params
)
if
(
code
===
1000
)
{
const
res
=
await
run
(
params
)
if
(
res
&&
res
.
code
===
1000
)
{
history
.
goBack
()
}
}
...
...
@@ -52,8 +56,8 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
onCancel=
{
handleCancel
}
footer=
{
(
type
===
'default'
&&
transData
)
?
<
Space
>
<
Button
onClick=
{
handleCancel
}
>
取消
</
Button
>
<
Button
onClick=
{
()
=>
handleConfirm
(
0
)
}
type=
'dashed'
>
确认未到账
</
Button
>
<
Button
onClick=
{
()
=>
handleConfirm
(
1
)
}
type=
'primary'
>
确认到账
</
Button
>
<
Button
loading=
{
isReady
===
0
&&
loading
}
onClick=
{
()
=>
handleConfirm
(
0
)
}
type=
'dashed'
>
确认未到账
</
Button
>
<
Button
loading=
{
isReady
===
1
&&
loading
}
onClick=
{
()
=>
handleConfirm
(
1
)
}
type=
'primary'
>
确认到账
</
Button
>
</
Space
>
:
null
}
>
<
List
...
...
@@ -73,4 +77,4 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
OrderPayResultModal
.
defaultProps
=
{}
export
default
OrderPayResultModal
\ No newline at end of file
export
default
OrderPayResultModal
src/pages/orderSystem/orderDetail/components/orderProductTable/index.tsx
View file @
bbda74a1
...
...
@@ -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