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
陈智峰
jinfa-platform
Commits
18d124c0
Commit
18d124c0
authored
Dec 14, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:处理订单支付方式(到付)切换问题
parent
09899393
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
7 deletions
+26
-7
index.tsx
src/pages/transaction/components/orderPayModal/index.tsx
+19
-4
index.tsx
src/pages/transaction/components/orderSaleRecord/index.tsx
+5
-1
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+2
-2
No files found.
src/pages/transaction/components/orderPayModal/index.tsx
View file @
18d124c0
...
...
@@ -88,6 +88,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
const
[
isSpin
,
setIsSpin
]
=
useState
<
boolean
>
(
false
)
const
[
creditInfo
,
setCreditInfo
]
=
useState
<
any
>
()
const
[
balanceInfo
,
setBalanceInfo
]
=
useState
<
any
>
()
const
[
payOnReceived
,
setPayOnReceived
]
=
useState
<
boolean
>
(
false
)
// 是否要禁用到付方式
useEffect
(()
=>
{
if
(
currentRef
)
{
...
...
@@ -103,6 +104,16 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
setCurrent
(
0
)
setPayStep
(
0
)
setChecked
(
null
)
}
else
{
// 过滤出当前支付信息 到付 channel7 payType4
if
(
data
?.
paymentInformationResponses
?.
length
)
{
let
currentPayment
=
data
.
paymentInformationResponses
.
filter
(
item
=>
item
.
id
===
currentPayInfoId
)
if
(
currentPayment
.
length
&&
currentPayment
[
0
].
channel
===
7
)
{
setPayOnReceived
(
false
)
}
else
{
setPayOnReceived
(
true
)
}
}
}
},
[
visible
])
...
...
@@ -336,13 +347,17 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
>
{
current
===
0
&&
transformPayList
&&
Object
.
entries
(
transformPayList
).
map
(([
key
,
value
])
=>
<
Row
key=
{
key
}
style=
{
{
marginBottom
:
24
}
}
>
<
Col
span=
{
6
}
style=
{
{
color
:
'#909399'
,
fontSize
:
12
}
}
>
{
payTextList
[
key
]
}
</
Col
>
<
Col
span=
{
6
}
style=
{
{
color
:
'#909399'
,
fontSize
:
12
,
display
:
payOnReceived
&&
Number
(
key
)
===
4
?
'none'
:
'block'
}
}
>
{
payTextList
[
key
]
}
</
Col
>
<
Col
style=
{
{
flex
:
1
}
}
>
<
div
className=
{
style
.
radioBox
}
>
{
(
value
as
any
[]).
map
(
v
=>
<
div
key=
{
v
.
value
}
className=
{
cx
(
style
.
payRadio
,
(
checked
&&
v
.
value
===
checked
.
id
)
?
style
.
active
:
''
)
}
onClick=
{
()
=>
setChecked
({
id
:
v
.
value
,
channel
:
v
.
channel
})
}
>
{
v
.
label
}
</
div
>
)
(
value
as
any
[]).
map
(
v
=>
{
if
(
payOnReceived
&&
v
.
value
===
7
)
{
// 到付
return
null
}
else
{
return
<
div
key=
{
v
.
value
}
className=
{
cx
(
style
.
payRadio
,
(
checked
&&
v
.
value
===
checked
.
id
)
?
style
.
active
:
''
)
}
onClick=
{
()
=>
setChecked
({
id
:
v
.
value
,
channel
:
v
.
channel
})
}
>
{
v
.
label
}
</
div
>
}
})
}
</
div
>
</
Col
>
...
...
src/pages/transaction/components/orderSaleRecord/index.tsx
View file @
18d124c0
...
...
@@ -312,7 +312,11 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
icon
:
<
ExclamationCircleOutlined
/>,
content
:
tip
,
onOk
()
{
PublicApi
.
postOrderReceiptOrderContinueShipping
({
orderId
:
data
.
id
})
PublicApi
.
postOrderReceiptOrderContinueShipping
({
orderId
:
data
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
}
})
},
});
}
...
...
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
18d124c0
...
...
@@ -233,10 +233,10 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
}
// logistics render字段字符串化
params
.
orderProductRequests
=
params
.
orderProductRequests
.
map
(
item
=>
{
let
logs
:
any
=
{
...
item
.
logistics
,
render
:
item
.
logistics
?.
render
?
JSON
.
stringify
(
item
.
logistics
.
render
)
:
''
};
let
log
istic
s
:
any
=
{
...
item
.
logistics
,
render
:
item
.
logistics
?.
render
?
JSON
.
stringify
(
item
.
logistics
.
render
)
:
''
};
return
{
...
item
,
logistics
:
logs
logistics
}
})
setBtnLoading
(
true
)
...
...
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