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
bb38d1f2
Commit
bb38d1f2
authored
Aug 26, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 待确认支付结果
parent
22822b5b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
46 deletions
+31
-46
index.tsx
src/pages/orderSystem/components/StatusColors/index.tsx
+7
-6
index.tsx
...stem/orderDetail/components/orderPayResultModal/index.tsx
+8
-9
index.tsx
...orderSystem/orderDetail/components/orderPayTabs/index.tsx
+8
-17
useSelfTable.tsx
...es/orderSystem/readyConfirmPayList/model/useSelfTable.tsx
+6
-12
ruleDetails.tsx
src/pages/ruleSettingManage/transactionRules/ruleDetails.tsx
+2
-2
No files found.
src/pages/orderSystem/components/StatusColors/index.tsx
View file @
bb38d1f2
...
...
@@ -12,6 +12,7 @@ export interface IStatusColor {
// 用于标签状态控制
export
interface
StatusColorsProps
{
status
:
number
,
text
?:
string
,
type
:
'out'
|
'inside'
|
'saleInside'
|
'payOut'
|
'deliveInside'
|
'inquiry'
|
'transformInside'
|
'transformOut'
}
...
...
@@ -101,14 +102,14 @@ const typeMaps = {
// 订单内部状态显示
const
StatusColors
:
React
.
FC
<
StatusColorsProps
>
=
(
props
)
=>
{
const
{
status
,
type
}
=
props
const
{
status
,
type
,
text
=
null
}
=
props
const
statusText
=
typeMaps
[
type
]
const
statusShowColor
=
matchStatusColor
(
status
)
// 单独处理支付比例 确认到账的状态颜色
if
(
type
===
'payOut'
&&
status
===
3
)
{
return
(<
Tag
color=
"#41CC9E"
>
{
statusText
[
status
]
}
</
Tag
>)
}
return
(<
Tag
color=
{
statusShowColor
}
>
{
statusText
[
status
]
}
</
Tag
>)
//
//
单独处理支付比例 确认到账的状态颜色
//
if(type === 'payOut' && status === 3) {
//
return (<Tag color="#41CC9E">{statusText[status]}</Tag>)
//
}
return
(<
Tag
color=
{
statusShowColor
}
>
{
statusText
[
status
]
||
text
}
</
Tag
>)
}
StatusColors
.
defaultProps
=
{}
...
...
src/pages/orderSystem/orderDetail/components/orderPayResultModal/index.tsx
View file @
bb38d1f2
import
React
,
{
useState
,
useEffect
,
useContext
}
from
'react'
import
{
Modal
,
List
,
Avatar
,
Button
,
Space
}
from
'antd'
import
{
Modal
,
List
,
Button
,
Space
}
from
'antd'
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
import
{
OrderDetailContext
}
from
'../../context'
import
{
PayOutWorkState
}
from
'@/constants'
import
{
PublicApi
}
from
'@/services/api'
import
{
history
}
from
'umi'
import
OverflowText
from
'@/components/OverflowText'
...
...
@@ -17,11 +16,11 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
const
{
id
}
=
usePageStatus
()
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
[
isReady
,
setIsReady
]
=
useState
<
any
>
()
const
canCtlData
=
data
.
payment
InformationResponses
.
find
(
v
=>
v
.
externalState
===
PayOutWorkState
.
READY_CONFIRM_RESULT
)
||
{}
const
canCtlData
=
data
.
payment
s
.
find
(
v
=>
v
.
showConfirm
)
||
{}
// const transData = canCtlData.
payOrderUrl
s?.split(',') || []
// const transData = canCtlData.
voucher
s?.split(',') || []
const
transData
=
canCtlData
.
payOrderUrl
s
||
[]
const
transData
=
canCtlData
.
voucher
s
||
[]
useEffect
(()
=>
{
if
(
currentRef
)
{
...
...
@@ -39,12 +38,12 @@ const OrderPayResultModal:React.FC<OrderPayResultModalProps> = ({type, currentRe
const
handleConfirm
=
(
isReady
)
=>
{
setIsReady
(
isReady
)
const
params
=
{
stat
e
:
isReady
,
i
d
:
Number
(
id
),
paymentInformationId
:
canCtlData
.
id
agre
e
:
isReady
,
orderI
d
:
Number
(
id
),
batchNo
:
canCtlData
.
batchNo
}
PublicApi
.
postOrderPlatform
ConfirmedPaymentResultsOrder
(
params
).
then
(
res
=>
{
PublicApi
.
postOrderPlatform
ManagePayConfirm
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
()
...
...
src/pages/orderSystem/orderDetail/components/orderPayTabs/index.tsx
View file @
bb38d1f2
...
...
@@ -19,16 +19,16 @@ const TabHeader = ({dataSource}) => {
<
Row
justify=
'space-between'
style=
{
{
minWidth
:
216
}
}
>
<
Col
>
<
div
className=
{
style
.
fontGray
}
>
支付比例
</
div
>
<
div
className=
{
style
.
bignumber
}
>
{
dataSource
.
payRatio
}
%
</
div
>
<
div
className=
{
style
.
bignumber
}
>
{
dataSource
.
payRate
}
%
</
div
>
</
Col
>
<
Col
>
<
StatusColors
status=
{
dataSource
.
externalStat
e
}
type=
'payOut'
/>
<
StatusColors
status=
{
dataSource
.
outerStatusName
}
text=
{
dataSource
.
outerStatusNam
e
}
type=
'payOut'
/>
</
Col
>
</
Row
>
<
Row
justify=
'space-between'
align=
'middle'
style=
{
{
width
:
'100%'
}
}
>
<
Col
className=
{
style
.
smallnumber
}
>
¥
{
dataSource
.
pay
Price
||
0
}
</
Col
>
<
Col
className=
{
style
.
smallnumber
}
>
¥
{
dataSource
.
pay
Amount
||
0
}
</
Col
>
<
Col
>
{
dataSource
.
externalState
===
PayOutWorkState
.
READY_CONFIRM_RESULT
&&
<
a
onClick=
{
()
=>
{
{
dataSource
.
showView
&&
<
a
onClick=
{
()
=>
{
setPayResultType
(
'preview'
)
payResultVisible
.
current
.
setVisible
(
true
)
}
}
>
查看
</
a
>
}
...
...
@@ -79,30 +79,21 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
<
MellowCard
bordered=
{
false
}
fullHeight
>
{
/* <Row gutter={24}> */
}
<
Tabs
defaultActiveKey=
'1'
>
{
data
.
payments
&&
data
.
payments
.
map
(
v
=>
<
TabPane
key=
{
v
.
i
d
}
tab=
{
<
TabHeader
dataSource=
{
v
}
/>
}
>
{
data
.
payments
&&
data
.
payments
.
map
(
v
=>
<
TabPane
key=
{
v
.
paymentI
d
}
tab=
{
<
TabHeader
dataSource=
{
v
}
/>
}
>
<
Row
>
<
Col
className=
{
style
.
fontGray
}
span=
{
4
}
>
支付环节:
</
Col
>
<
Col
>
{
v
.
payNode
}
</
Col
>
</
Row
>
{
v
.
payWay
===
-
1
?
<
Row
>
<
Col
className=
{
style
.
fontGray
}
span=
{
4
}
>
支付方式:
</
Col
>
<
Col
>
{
v
.
channel
===
100
?
'账期'
:
'月结'
}
</
Col
>
</
Row
>
:
<>
<
Row
>
<
Col
className=
{
style
.
fontGray
}
span=
{
4
}
>
支付方式:
</
Col
>
<
Col
>
{
payTextList
[
v
.
payWay
]
}
</
Col
>
<
Col
>
{
v
.
payTypeName
}
</
Col
>
</
Row
>
<
Row
>
<
Col
className=
{
style
.
fontGray
}
span=
{
4
}
>
支付渠道:
</
Col
>
<
Col
>
{
payChannel
[
v
.
channel
]
}
</
Col
>
<
Col
>
{
v
.
payChannelName
}
</
Col
>
</
Row
>
</>
</
TabPane
>)
}
</
TabPane
>)
}
</
Tabs
>
{
/* </Row> */
}
</
MellowCard
>
...
...
src/pages/orderSystem/readyConfirmPayList/model/useSelfTable.tsx
View file @
bb38d1f2
...
...
@@ -4,18 +4,13 @@ import { Button, Row, Col } from 'antd'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
{
ORDER_TYPE
}
from
'@/constants'
import
StatusColors
from
'../../components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
Chart
,
Interval
,
Axis
,
Tooltip
,
Coordinate
,
Legend
,
View
,
Annotation
,
}
from
'bizcharts'
;
import
DataSet
from
"@antv/data-set"
;
...
...
@@ -23,11 +18,10 @@ import DataSet from "@antv/data-set";
const
CircleChart
=
props
=>
{
const
{
sumPrice
=
100
,
alreadyPay
=
10
}
=
props
const
{
DataView
}
=
DataSet
;
const
dv
=
new
DataView
();
const
amount
=
Number
(
sumPrice
)
-
Number
(
alreadyPay
)
const
userData
=
[
{
type
:
'总金额'
,
value
:
sumPrice
-
alreadyPay
},
{
type
:
'已支付'
,
value
:
alreadyPay
}
{
type
:
'总金额'
,
value
:
amount
},
{
type
:
'已支付'
,
value
:
Number
(
alreadyPay
)
}
];
const
userDv
=
new
DataView
();
...
...
@@ -63,7 +57,7 @@ export const useSelfTable = () => {
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
render
:
(
text
,
record
)
=>
{
return
<
EyePreview
url=
{
`/orderSystem/detail?id=${record.
i
d}`
}
>
return
<
EyePreview
url=
{
`/orderSystem/detail?id=${record.
orderI
d}`
}
>
{
text
}
</
EyePreview
>
}
...
...
@@ -96,7 +90,7 @@ export const useSelfTable = () => {
<
div
><
span
>
已支付:
</
span
><
span
>
{
record
.
paidAmount
||
0
}
</
span
></
div
>
</
Col
>
<
Col
style=
{
{
width
:
40
}
}
>
<
CircleChart
sumPrice=
{
record
.
amoun
t
}
alreadyPay=
{
record
.
paidAmount
}
/>
<
CircleChart
sumPrice=
{
tex
t
}
alreadyPay=
{
record
.
paidAmount
}
/>
</
Col
>
</
Row
>,
width
:
200
...
...
@@ -127,7 +121,7 @@ export const useSelfTable = () => {
]
const
handleConfirm
=
async
(
record
)
=>
{
history
.
push
(
`/orderSystem/readyConfirmPayList/detail?id=
${
record
.
i
d
}
`
)
history
.
push
(
`/orderSystem/readyConfirmPayList/detail?id=
${
record
.
orderI
d
}
`
)
}
const
handleCancel
=
async
(
id
)
=>
{
...
...
src/pages/ruleSettingManage/transactionRules/ruleDetails.tsx
View file @
bb38d1f2
...
...
@@ -81,7 +81,7 @@ const AddRule:React.FC<{}> = (props) => {
<
p
>
状态:
</
p
>
</
Col
>
<
Col
span=
{
21
}
>
<
p
>
{
ruleDetails
?.
stat
e
?
'有效'
:
'无效'
}
</
p
>
<
p
>
{
ruleDetails
?.
stat
us
?
'有效'
:
'无效'
}
</
p
>
</
Col
>
{
/* <Col span={3}>
<p>交易流程名称:</p>
...
...
@@ -103,7 +103,7 @@ const AddRule:React.FC<{}> = (props) => {
<
p
>
是否所有会员共用:
</
p
>
</
Col
>
<
Col
span=
{
21
}
>
<
p
>
{
ruleDetails
?.
isTacitlyApprove
===
1
?
'是'
:
'否'
}
</
p
>
<
p
>
{
ruleDetails
?.
allMembers
?
'是'
:
'否'
}
</
p
>
</
Col
>
</
Row
>
<
StandardTable
...
...
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