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
4edf8320
Commit
4edf8320
authored
Oct 20, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:待确认支付结果
parent
f0e0d546
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
123 additions
and
8 deletions
+123
-8
lingxi.theme.config.ts
config/lingxi.theme.config.ts
+0
-1
index.less
...ges/transaction/components/orderPayResultModal/index.less
+0
-0
index.tsx
...ages/transaction/components/orderPayResultModal/index.tsx
+79
-0
index.tsx
src/pages/transaction/purchaseOrder/readyAddOrder/index.tsx
+2
-2
index.tsx
...ges/transaction/saleOrder/readyPayResult/detail/index.tsx
+42
-5
No files found.
config/lingxi.theme.config.ts
View file @
4edf8320
...
...
@@ -4,7 +4,6 @@ const MAIN_FONT_TINY_COLOR = '#909399'
export
default
{
'@primary-color'
:
MAIN_COLOR
,
// 公共padding变量
'@padding-lg'
:
'24px'
,
'@padding-sm'
:
'12px'
,
...
...
src/pages/transaction/components/orderPayResultModal/index.less
0 → 100644
View file @
4edf8320
src/pages/transaction/components/orderPayResultModal/index.tsx
0 → 100644
View file @
4edf8320
import
React
,
{
useState
,
useEffect
,
useContext
}
from
'react'
import
{
Modal
,
List
,
Avatar
,
Button
,
Space
}
from
'antd'
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
import
{
OrderDetailContext
}
from
'../../_public/order/context'
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'
,
currentRef
:
any
}
const
OrderPayResultModal
:
React
.
FC
<
OrderPayResultModalProps
>
=
({
type
,
currentRef
})
=>
{
const
{
data
}
=
useContext
(
OrderDetailContext
)
const
{
id
}
=
usePageStatus
()
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
canCtlData
=
data
?.
paymentInformationResponses
.
find
(
v
=>
v
.
externalState
===
PayOutWorkState
.
READY_CONFIRM_RESULT
)
||
{}
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderConfirmedPaymentResultsOrder
)
const
transData
=
canCtlData
.
payOrderUrls
?.
split
(
','
)
||
[]
useEffect
(()
=>
{
if
(
currentRef
)
{
currentRef
.
current
=
{
visible
,
setVisible
}
}
},
[])
const
handleCancel
=
()
=>
{
setVisible
(
false
)
}
const
handleConfirm
=
async
(
isReady
)
=>
{
const
params
=
{
state
:
isReady
,
id
:
Number
(
id
),
paymentInformationId
:
canCtlData
.
id
}
const
{
code
}
=
await
run
(
params
)
if
(
code
===
1000
)
{
history
.
goBack
()
}
}
return
(
<
Modal
title=
{
type
===
'default'
?
'确认支付结果'
:
'查看支付结果'
}
visible=
{
visible
}
onCancel=
{
handleCancel
}
confirmLoading=
{
loading
}
footer=
{
(
type
===
'default'
&&
transData
)
?
<
Space
>
<
Button
onClick=
{
handleCancel
}
>
取消
</
Button
>
<
Button
onClick=
{
()
=>
handleConfirm
(
0
)
}
type=
'dashed'
>
确认未到账
</
Button
>
<
Button
onClick=
{
()
=>
handleConfirm
(
1
)
}
type=
'primary'
>
确认到账
</
Button
>
</
Space
>
:
null
}
>
<
List
itemLayout=
"horizontal"
dataSource=
{
transData
||
[]
}
renderItem=
{
(
item
:
string
)
=>
(
<
List
.
Item
style=
{
{
fontSize
:
12
}
}
extra=
{
<
a
href=
{
item
}
target=
'_blank'
>
预览
</
a
>
}
>
<
OverflowText
style=
{
{
flex
:
'.9'
}
}
>
{
item
}
</
OverflowText
>
</
List
.
Item
>
)
}
/>
</
Modal
>
)
}
OrderPayResultModal
.
defaultProps
=
{}
export
default
OrderPayResultModal
\ No newline at end of file
src/pages/transaction/purchaseOrder/readyAddOrder/index.tsx
View file @
4edf8320
...
...
@@ -51,7 +51,7 @@ const ReadyAddOrder:React.FC<ReadyAddOrderProps> = (props) => {
await
PublicApi
.
postOrderProcurementOrderSubmitExamineAll
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
ref
.
current
.
reload
()
}
else
{
message
.
error
(
'只能
删除内部状态为未审核过
的订单'
)
message
.
error
(
'只能
提交审核待新增
的订单'
)
}
}
...
...
@@ -95,7 +95,7 @@ const ReadyAddOrder:React.FC<ReadyAddOrderProps> = (props) => {
// onClick=
{()
=
>
history.push('/memberCenter/tranactionAbility/purchaseOrder/orderDetail')}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/add'
)
}
>
新建
新建
</
Button
>
<
Button
onClick=
{
handleBitchPush
}
>
批量提交审核
</
Button
>
<
DropDeleteDown
>
...
...
src/pages/transaction/saleOrder/readyPayResult/detail/index.tsx
View file @
4edf8320
import
React
from
'react'
;
import
React
,
{
useState
,
useCallback
,
useRef
}
from
'react'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Button
}
from
'antd'
;
import
OrderDetailHeader
from
'@/pages/transaction/components/OrderDetailHeader'
;
import
OrderDetailWrapper
from
'@/pages/transaction/components/OrderDetailWrapper'
;
import
PreLoading
from
'@/components/PreLoading'
;
import
{
useOrderDetail
}
from
'../../../_public/order/effects/useOrderDetail'
;
import
ApprovedOrderModal
from
'../../../components/approvedOrderModal'
;
import
{
history
}
from
'umi'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
;
import
OrderDetailSection
from
'../../../components/orderDetailSection'
;
import
OrderPayResultModal
from
'@/pages/transaction/components/orderPayResultModal'
;
const
ReadyPayResultOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'saleOrder'
})
const
approvedRef
=
useRef
<
any
>
({})
const
handleClick
=
useCallback
(()
=>
{
approvedRef
.
current
.
setVisible
(
true
)
},
[])
const
ReadyPayResultDetail
:
React
.
FC
=
()
=>
{
return
(
<
div
>
待确认支付结果
<
OrderDetailContext
.
Provider
value=
{
formContext
}
>
<
OrderDetailHeader
detailList=
{
detailList
}
detailData=
{
formContext
.
data
}
extraRight=
{
<
Button
type=
'primary'
onClick=
{
handleClick
}
>
确认支付结果
</
Button
>
}
/>
<
OrderDetailWrapper
>
<
PreLoading
loading=
{
!
formContext
.
data
}
active
paragraph=
{
{
rows
:
6
}
}
>
<
OrderDetailSection
formContext=
{
formContext
}
type=
'saleOrder'
/>
</
PreLoading
>
</
OrderDetailWrapper
>
{
/* 提交时触发的弹窗集合 */
}
<
OrderPayResultModal
currentRef=
{
approvedRef
}
type=
'default'
/>
</
OrderDetailContext
.
Provider
>
</
div
>
);
};
export
default
ReadyPayResultDetail
;
\ No newline at end of file
export
default
ReadyPayResultOrderDetail
;
\ No newline at end of file
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