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
linweijiong
jinfa-admin
Commits
c4f535f0
Commit
c4f535f0
authored
Dec 01, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改商户支付参数配置BUG
parent
6c103fe5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
11 deletions
+52
-11
systemManageRoute.ts
config/routes/refactorRoutes/systemManageRoute.ts
+7
-0
index.tsx
src/components/LevelBrand/index.tsx
+5
-6
add.tsx
...es/systemManage/ruleSettingManage/merchantPayType/add.tsx
+26
-4
index.tsx
.../systemManage/ruleSettingManage/merchantPayType/index.tsx
+14
-1
No files found.
config/routes/refactorRoutes/systemManageRoute.ts
View file @
c4f535f0
...
...
@@ -70,6 +70,13 @@ const router = {
component
:
'@/pages/systemManage/ruleSettingManage/merchantPayType/add'
,
hideInMenu
:
true
},
// 编辑参数配置
{
path
:
'/system/ruleSettingManager/merchantPayType/edit'
,
name
:
'编辑参数配置'
,
component
:
'@/pages/systemManage/ruleSettingManage/merchantPayType/add'
,
hideInMenu
:
true
},
{
path
:
'/system/ruleSettingManager/transactionRules'
,
name
:
'平台交易规则'
,
...
...
src/components/LevelBrand/index.tsx
View file @
c4f535f0
...
...
@@ -26,10 +26,10 @@ export interface LevelBrandProps {
};
const
PIC_MAP
=
{
1
:
IMG_LEVEL1
,
2
:
IMG_LEVEL2
,
3
:
IMG_LEVEL3
,
4
:
IMG_LEVEL4
,
1
:
IMG_LEVEL1
,
2
:
IMG_LEVEL2
,
3
:
IMG_LEVEL3
,
4
:
IMG_LEVEL4
,
};
const
LevelBrand
:
React
.
FC
<
LevelBrandProps
>
=
({
level
})
=>
{
...
...
@@ -42,4 +42,4 @@ const LevelBrand: React.FC<LevelBrandProps> = ({ level }) => {
);
};
export
default
LevelBrand
;
\ No newline at end of file
export
default
LevelBrand
;
src/pages/systemManage/ruleSettingManage/merchantPayType/add.tsx
View file @
c4f535f0
...
...
@@ -34,6 +34,21 @@ const TAB_LINK = [
{
id
:
'typeLayout'
,
title
:
'参数配置'
},
]
const
Level
=
(
type
)
=>
{
switch
(
type
)
{
case
'青铜会员'
:
return
1
case
'白银会员'
:
return
2
case
'黄金会员'
:
return
3
case
'钻石会员'
:
return
4
default
:
return
10086
}
}
const
MerchantPayTypeAdded
=
(
props
)
=>
{
const
{
state
,
pathname
}
=
history
.
location
;
const
[
path
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
...
...
@@ -124,7 +139,13 @@ const MerchantPayTypeAdded = (props) => {
const
handleSubmit
=
(
_
:
string
[]
|
number
[],
selectRowRecord
:
any
)
=>
{
form
.
setFieldsValue
({
'name'
:
selectRowRecord
[
0
].
name
})
setMenberInfo
(
selectRowRecord
[
0
])
const
param
=
{
...
selectRowRecord
[
0
],
fundModeName
:
'会员直接到账'
,
payTypeName
:
'线上支付'
,
payChannelName
:
'支付宝'
,
}
setMenberInfo
(
param
)
toggle
(
false
)
}
...
...
@@ -178,6 +199,7 @@ const MerchantPayTypeAdded = (props) => {
useEffect
(()
=>
{
if
(
!
isEmpty
(
state
?.
record
)
&&
!
isEmpty
(
channel
))
{
form
.
setFieldsValue
({
...
state
?.
record
})
setMenberInfo
(
state
?.
record
)
setDataSource
([
{
...
...
@@ -222,8 +244,8 @@ const MerchantPayTypeAdded = (props) => {
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
'会员等级'
>
{
path
!==
'detail'
&&
<
LevelBrand
level=
{
menberInfo
.
level
}
/>
}
{
path
===
'detail'
&&
<
Typography
.
Text
>
{
menberInfo
.
levelTag
}
</
Typography
.
Text
>
}
{
path
!==
'detail'
&&
<
LevelBrand
level=
{
menberInfo
.
level
Tag
?
Level
(
menberInfo
.
levelTag
)
:
menberInfo
.
level
}
/>
}
{
path
===
'detail'
&&
<
LevelBrand
level=
{
Level
(
menberInfo
.
levelTag
)
}
/
>
}
</
Form
.
Item
>
<
Form
.
Item
label=
'资金归集模式'
>
<
Typography
.
Text
>
{
menberInfo
.
fundModeName
}
</
Typography
.
Text
>
...
...
@@ -249,7 +271,7 @@ const MerchantPayTypeAdded = (props) => {
pagination=
{
false
}
/>
{
path
!==
'detail'
&&
<
Button
disabled=
{
dataSource
.
length
>
1
}
disabled=
{
dataSource
.
length
>
=
1
}
type=
'dashed'
block
icon=
{
<
PlusOutlined
/>
}
...
...
src/pages/systemManage/ruleSettingManage/merchantPayType/index.tsx
View file @
c4f535f0
...
...
@@ -72,6 +72,11 @@ const MerchantPayTypeLayout = () => {
// render: (_text, record: any) => <LevelBrand level={record.level} />
},
{
title
:
'资金归集模式'
,
key
:
'fundModeName'
,
dataIndex
:
'fundModeName'
,
},
{
title
:
'支付方式'
,
key
:
'payTypeName'
,
dataIndex
:
'payTypeName'
,
...
...
@@ -106,6 +111,14 @@ const MerchantPayTypeLayout = () => {
删除
</
Button
>
</
Popconfirm
>
<
Link
to=
{
{
pathname
:
'/system/ruleSettingManager/merchantPayType/edit'
,
state
:
{
record
},
}
}
>
编辑
</
Link
>
</>
)
}
...
...
@@ -134,7 +147,7 @@ const MerchantPayTypeLayout = () => {
type
:
"object"
,
"x-component"
:
"controllerBtns"
,
},
search
:
{
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
...
...
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