Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
linweijiong
jinfa-platform
Commits
b36a56e5
Commit
b36a56e5
authored
Dec 15, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改结算支付支付完成后无法更新状态bug
parent
1d0a1a32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
index.tsx
.../balance/accountsPayable/components/QrcodeModal/index.tsx
+9
-2
index.tsx
src/pages/balance/accountsPayable/settlementList/index.tsx
+12
-3
No files found.
src/pages/balance/accountsPayable/components/QrcodeModal/index.tsx
View file @
b36a56e5
...
...
@@ -8,7 +8,8 @@ interface Iprops {
mode
:
'wechat'
|
'alipay'
visible
:
boolean
,
qrcode
:
string
,
onClose
:
()
=>
void
onClose
:
()
=>
void
,
onOk
:
()
=>
void
}
const
MODE_TEXT
=
{
...
...
@@ -16,17 +17,23 @@ const MODE_TEXT = {
alipay
:
'支付宝'
}
const
QrcodeModal
:
React
.
FC
<
Iprops
>
=
(
props
:
Iprops
)
=>
{
const
{
mode
,
visible
,
qrcode
,
onClose
}
=
props
;
const
{
mode
,
visible
,
qrcode
,
onClose
,
onOk
}
=
props
;
const
currentImage
=
mode
===
'wechat'
?
wechat
:
alipay
;
const
handleClose
=
()
=>
{
onClose
?.()
}
const
handleOk
=
()
=>
{
onOk
?.();
}
return
(
<
Modal
visible=
{
visible
}
title=
{
`请用${MODE_TEXT[mode]}支付`
}
onCancel=
{
handleClose
}
okText=
"我已付款"
onOk=
{
handleOk
}
>
<
div
className=
{
styles
.
container
}
>
<
div
className=
{
styles
.
tips
}
>
...
...
src/pages/balance/accountsPayable/settlementList/index.tsx
View file @
b36a56e5
...
...
@@ -152,7 +152,7 @@ const SettlementList = () => {
/** 通联支付,短信验证码支付 */
const
handleCompleteSmsCode
=
async
(
codeString
:
string
)
=>
{
const
{
code
,
data
,
message
:
msg
}
=
await
postPayEAccountAllInPayConfirmPay
({
tradeCode
:
itemInfo
.
settlementNo
,
tradeCode
:
`
${
itemInfo
.
settlementNo
}
-
${
randomCode
}
`
,
verificationCode
:
codeString
})
if
(
code
!==
1000
)
{
...
...
@@ -168,16 +168,19 @@ const SettlementList = () => {
const
channel
=
params
.
payChannel
;
try
{
setUniversalPayLoading
(
true
)
const
randomCodeDate
=
""
+
new
Date
().
valueOf
()
setRandomCode
(
randomCodeDate
);
// TODO 加一个随机数
const
{
data
,
code
,
message
:
msg
}
=
await
postSettleAccountsMemberSettlementCommunicationPay
({
id
:
itemInfo
.
id
,
payChannelType
:
params
.
payChannel
,
settlementNo
:
`
${
itemInfo
.
settlementNo
}
-
${
randomCodeDate
}
`
,
},
{
ctlType
:
'none'
})
if
(
code
!==
1000
)
{
message
.
error
(
msg
);
return
;
}
setRandomCode
(
""
+
new
Date
().
valueOf
());
setCurrentUniversalPay
(
channel
as
UniversalPay
);
if
([
UNIVERSAL_PAY_WECHAT
,
UNIVERSAL_PAY_ALIPAY
].
includes
(
channel
))
{
message
.
loading
({
...
...
@@ -208,7 +211,7 @@ const SettlementList = () => {
/** 轮询接口 */
useEffect
(()
=>
{
if
(
modals
.
qrcodeModal
)
{
cycleStart
(
postSettleAccountsMemberSettlementCommunicationPayResult
,
{
settlementNo
:
`
${
itemInfo
.
settlementNo
}
-
${
randomCode
}
`
});
cycleStart
(
postSettleAccountsMemberSettlementCommunicationPayResult
,
{
settlementNo
:
itemInfo
.
settlementNo
});
}
},
[
modals
])
...
...
@@ -231,6 +234,11 @@ const SettlementList = () => {
ref
.
current
.
reload
({
...
values
,
startTime
,
endTime
});
}
const
handleIhadPay
=
()
=>
{
handleClose
(
'qrcodeModal'
);
formActions
.
submit
();
}
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -303,6 +311,7 @@ const SettlementList = () => {
<
QrcodeModal
visible=
{
modals
.
qrcodeModal
}
mode=
{
currentUniversalPay
===
UNIVERSAL_PAY_WECHAT
?
'wechat'
:
'alipay'
}
onOk=
{
handleIhadPay
}
// mode={'wechat'}
qrcode=
{
qrcodeUrl
}
onClose=
{
()
=>
handleClose
(
'qrcodeModal'
)
}
...
...
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