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
00f24691
Commit
00f24691
authored
Sep 30, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'修改支付策略配置参数输入'
parent
4626349e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
81 deletions
+30
-81
global.d.ts
src/global/config/global.d.ts
+0
-76
detail.tsx
src/pages/ruleSettingManage/payStrategy/detail.tsx
+30
-5
No files found.
src/global/config/global.d.ts
deleted
100644 → 0
View file @
4626349e
export
interface
MemberType
{
id
:
number
;
typeName
:
string
;
}
export
interface
BusinessType
{
id
:
number
;
typeName
:
string
;
}
export
interface
UseType
{
memberType
:
MemberType
[];
businessType
:
BusinessType
[];
}
export
interface
UserRegister
{
useType
:
UseType
;
}
export
interface
RuleConfiguration
{
value
:
number
;
label
:
string
;
platformType
:
number
;
}
export
interface
PayWayResponse
{
payType
:
number
;
value
:
number
;
label
:
string
;
}
export
interface
PayInitializeConfig
{
payType
:
number
;
ruleConfigurations
:
RuleConfiguration
[];
payWayResponses
:
PayWayResponse
[];
}
export
interface
PayPlatformPayConfig
{
id
:
number
;
payType
:
number
;
way
:
string
;
isPitchOn
:
number
;
}
export
interface
PayConfig
{
payInitializeConfig
:
PayInitializeConfig
[];
payPlatformPayConfig
:
PayPlatformPayConfig
[];
}
export
interface
CountryList
{
name
:
string
;
key
:
string
;
icon
:
string
;
}
export
interface
Children
{
code
:
string
;
}
export
interface
MenuList
{
code
:
string
;
children
:
Children
[];
}
export
interface
Global
{
logo
:
string
;
countryList
:
CountryList
[];
menuList
:
MenuList
[];
}
export
interface
RootObject
{
userRegister
:
UserRegister
;
payConfig
:
PayConfig
;
global
:
Global
;
}
\ No newline at end of file
src/pages/ruleSettingManage/payStrategy/detail.tsx
View file @
00f24691
...
...
@@ -3,7 +3,7 @@
* @Date: 2020-08-06 19:07:53
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-30 1
1:49:39
* @LastEditTime: 2020-09-30 1
6:30:06
*/
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
import
{
Card
,
Button
,
Modal
}
from
'antd'
...
...
@@ -154,10 +154,13 @@ const PaySetting: React.FC<{}> = () => {
let
{
data
}
=
res
console
.
log
(
'结果'
,
res
.
data
)
payActions
.
setFieldValue
(
'paymentPolicyName'
,
data
.
paymentPolicyName
)
data
.
paymentPolicyPayWayRequests
.
forEach
((
item
,
index
)
=>
{
data
.
paymentPolicyPayWayRequests
.
forEach
((
item
:
any
,
index
)
=>
{
payActions
.
setFieldValue
(
`id-
${
index
}
`
,
item
.
id
)
payActions
.
setFieldValue
(
`ruleConfigurationId-
${
index
}
`
,
item
.
ruleConfigurationId
)
payActions
.
setFieldValue
(
`payWayIds-
${
index
}
`
,
item
.
payWayIds
)
// payActions.setFieldValue(`payWayIds-${index}`,item.payWayIds)
item
.
payWays
.
forEach
((
v
)
=>
{
payActions
.
setFieldValue
(
`payWayIds-
${
index
}
`
,
v
.
id
)
})
})
payActions
.
setFieldValue
(
'isSelected'
,
data
.
isSelected
)
}
...
...
@@ -195,10 +198,33 @@ const PaySetting: React.FC<{}> = () => {
let
list
:
any
=
[]
baseList
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
let
payWayIds
=
`payWayIds-
${
index
}
`
,
ruleConfigurationId
=
`ruleConfigurationId-
${
index
}
`
,
_id
=
`id-
${
index
}
`
let
v
=
[
values
[
payWayIds
],
item
.
payWayResponses
.
filter
((
v
=>
v
.
value
==
values
[
payWayIds
])).
map
(
v
=>
v
.
label
)]
let
_payWays
:
any
[]
=
[]
if
(
v
.
length
===
2
){
let
obj
:
any
=
{}
// if(v[0] &&v[0].length > 0){
v
[
0
].
forEach
(
item
=>
{
obj
.
id
=
item
});
// }
// if(v[1] &&v[1].length > 0 ){
v
[
1
].
forEach
(
item
=>
{
obj
.
way
=
item
});
// }
_payWays
.
push
(
obj
)
}
list
.
push
({
id
:
values
[
_id
],
payType
:
item
.
payType
,
[
'payWayIds'
]:
values
[
payWayIds
],
[
'payWays'
]:
[...
_payWays
],
// ['payWayIds']: values[payWayIds],
// ['payWays']:{
// id: values[payWayIds],
// way: item.payWayResponses.filter((v=> v.value == values[payWayIds])).map(v => v.label)
// },
[
'ruleConfigurationId'
]:
values
[
ruleConfigurationId
]
})
...
...
@@ -218,7 +244,6 @@ const PaySetting: React.FC<{}> = () => {
}))
params
.
memberIdRoleIds
=
memberIdRoleIds
}
console
.
log
(
params
)
//新增
if
(
!
usePageStatus
().
id
){
console
.
log
(
'params'
,
params
)
...
...
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