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
207f313e
Commit
207f313e
authored
Nov 05, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
平台结算策略修改
parent
69ea0998
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
49 deletions
+90
-49
ruleSettingRoutes.ts
config/routes/ruleSettingRoutes.ts
+10
-1
app.tsx
src/app.tsx
+2
-0
menu.ts
src/locales/zh-CN/menu.ts
+1
-0
index.tsx
...pages/ruleSettingManage/components/SettleMethod/index.tsx
+0
-3
index.tsx
...leSettingManage/platformSettlementStrategy/info/index.tsx
+53
-39
schema.tsx
...eSettingManage/platformSettlementStrategy/info/schema.tsx
+20
-2
index.tsx
...leSettingManage/platformSettlementStrategy/list/index.tsx
+4
-4
No files found.
config/routes/ruleSettingRoutes.ts
View file @
207f313e
...
...
@@ -81,7 +81,16 @@ const router = {
path
:
'/ruleSettingManager/platformSettlementStrategy/add'
,
name
:
'addplatformSettlementStrategy'
,
component
:
'@/pages/ruleSettingManage/platformSettlementStrategy/info'
,
hidePageHeader
:
true
hidePageHeader
:
true
,
hideInMenu
:
true
},
// 平台结算策略配置, 平台策略配置详情页
{
path
:
'/ruleSettingManager/platformSettlementStrategy/detail'
,
name
:
'platformSettlementStrategyDetail'
,
component
:
'@/pages/ruleSettingManage/platformSettlementStrategy/info'
,
hidePageHeader
:
true
,
hideInMenu
:
true
}
]
}
...
...
src/app.tsx
View file @
207f313e
...
...
@@ -70,6 +70,8 @@ export function render(oldRender:Function) {
}
console
.
log
(
'render'
)
oldRender
()
}).
catch
(()
=>
{
oldRender
()
})
}
else
{
oldRender
()
...
...
src/locales/zh-CN/menu.ts
View file @
207f313e
...
...
@@ -109,6 +109,7 @@ export default {
'menu.ruleSettingManager.memberAuthManageDetail'
:
'会员角色权限设置'
,
'menu.ruleSettingManager.platformSettlementStrategy'
:
'平台结算策略配置'
,
'menu.ruleSettingManager.addplatformSettlementStrategy'
:
'新增平台结算策略'
,
'menu.ruleSettingManager.platformSettlementStrategyDetail'
:
'平台结算策略详情'
,
// 品类和属性
'menu.classAndProperty'
:
'平台品类及属性'
,
...
...
src/pages/ruleSettingManage/components/SettleMethod/index.tsx
View file @
207f313e
...
...
@@ -44,10 +44,8 @@ const SettleMethod = (props) => {
const
handleInputChange
=
(
value
,
type
)
=>
{
const
target
=
type
-
1
;
console
.
log
(
target
);
const
temp
=
[...
otherValues
];
temp
[
target
]
=
value
;
console
.
log
(
temp
[
target
]);
props
.
onChange
({
active
:
type
,
otherValues
:
temp
...
...
@@ -129,7 +127,6 @@ const Index = (props) => {
},
[
props
.
initialValue
,
options
])
const
onChange
=
(
value
)
=>
{
console
.
log
(
value
);
props
.
mutators
.
change
(
value
);
}
...
...
src/pages/ruleSettingManage/platformSettlementStrategy/info/index.tsx
View file @
207f313e
...
...
@@ -8,7 +8,7 @@ import React, { useEffect, useState } from 'react';
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
NiceForm
from
'@/components/NiceForm'
;
import
{
Card
,
Button
,
message
}
from
'antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
import
ModalTable
from
'@/components/ModalTable'
;
import
SearchSelect
from
'@/components/NiceForm/components/SearchSelect'
...
...
@@ -23,6 +23,8 @@ import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import
{
PublicApi
}
from
'@/services/api'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
history
,
Prompt
}
from
'umi'
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
const
{
onFormInit$
}
=
FormEffectHooks
export
const
fetchOptions
=
(
service
)
=>
{
return
async
function
()
{
...
...
@@ -35,7 +37,6 @@ export const fetchOptions = (service) => {
}
const
formActions
=
createFormActions
();
const
{
getSettleAccountsPlatformConfigGetMemberSettlementStrategyDetail
}
=
PublicApi
const
common_columns
:
any
=
[
{
title
:
'ID'
,
dataIndex
:
'memberId'
},
...
...
@@ -97,33 +98,34 @@ const MemberSettleAdd: React.FC = () => {
setVisible
(
false
);
}
// 从PAAS平台--规则配置--平台规则配置取已勾选的结算方式决定是否显示结算方式
const
fetchBalancedMethods
=
async
()
=>
{
const
{
data
}
=
await
PublicApi
.
getManageRuleConfigurationList
({
platformType
:
'5'
});
const
length
=
data
.
length
return
{
days
:
length
>
0
&&
data
[
0
].
check
,
month
:
length
>
1
&&
data
[
1
].
check
};
}
// 获取适用会员
const
fetchMemberData
=
async
(
params
:
any
)
=>
{
const
{
data
}
=
await
PublicApi
.
getMemberManageLowerPageBynamerole
(
params
);
return
data
}
// 获取适用会员下拉搜索框
const
fetchMemberSearchFilter
=
async
()
=>
{
// /member/manage/role/sub/list
const
{
data
,
code
}
=
await
PublicApi
.
postMemberManageRoleSubList
({},
{
method
:
'GET'
,
ctlType
:
"none"
});
// console.log(data);
///member/manage/all/provider/page
const
{
data
,
code
}
=
await
PublicApi
.
getMemberManageAllProviderPage
(
params
);
if
(
code
===
1000
)
{
return
data
}
return
[];
}
// 获取适用会员下拉搜索框
const
fetchMemberSearchFilter
=
()
=>
{
const
linkage
=
useLinkageUtils
();
onFormInit$
().
subscribe
(()
=>
{
PublicApi
.
getMemberManagePageitems
({
roleTypeEnum
:
'1'
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
levels
,
memberTypes
,
roles
}
=
res
.
data
;
linkage
.
enum
(
'level'
,
levels
.
map
((
item
)
=>
({
label
:
item
.
levelTag
,
value
:
item
.
level
})))
linkage
.
enum
(
'memberTypeId'
,
memberTypes
.
map
((
item
)
=>
({
label
:
item
.
memberTypeName
,
value
:
item
.
memberTypeId
})))
linkage
.
enum
(
'roleId'
,
roles
.
map
((
item
)
=>
({
label
:
item
.
roleName
,
value
:
item
.
roleId
})))
}
});
})
}
// 使用会员弹框确认
const
handleOkAddMember
=
()
=>
{
formActions
.
setFieldValue
(
'Tabs.memberTab.someLists'
,
memberRowCtl
.
selectRow
);
...
...
@@ -132,9 +134,13 @@ const MemberSettleAdd: React.FC = () => {
// 提交
const
handleSubmit
=
(
value
)
=>
{
console
.
log
(
value
);
return
;
const
memberList
=
value
.
someLists
.
map
((
item
)
=>
({
memberId
:
item
.
memberId
,
roleId
:
item
.
roleId
}));
const
memberList
=
value
.
someLists
.
map
((
item
)
=>
(
{
memberId
:
item
.
memberId
,
roleId
:
item
.
roleId
,
}
)
);
const
tempData
=
{
name
:
value
.
name
,
settlementOrderType
:
value
.
settlementOrderType
,
...
...
@@ -144,17 +150,17 @@ const MemberSettleAdd: React.FC = () => {
settlementDate
:
value
.
settlementWay
.
otherValues
[
1
],
}
const
serviceActions
=
isAdd
?
PublicApi
.
postSettleAccountsPlatformConfigAdd
Member
SettlementStrategy
:
PublicApi
.
postSettleAccountsPlatformConfigUpdate
Member
SettlementStrategy
?
PublicApi
.
postSettleAccountsPlatformConfigAdd
Platform
SettlementStrategy
:
PublicApi
.
postSettleAccountsPlatformConfigUpdate
Platform
SettlementStrategy
const
postData
=
{...
tempData
,
id
:
id
||
0
}
console
.
log
(
postData
)
setSubmitLoading
(
true
);
setUnsaved
(
false
);
serviceActions
(
postData
).
then
((
data
)
=>
{
setSubmitLoading
(
false
);
if
(
data
.
code
===
1000
)
{
history
.
push
(
'/
memberCenter/balance/settleRules/memberSettleList
'
)
history
.
push
(
'/
ruleSettingManager/platformSettlementStrategy
'
)
}
})
...
...
@@ -175,6 +181,16 @@ const MemberSettleAdd: React.FC = () => {
memberRowCtl
.
setSelectedRowKeys
(
res
.
map
((
item
)
=>
item
.
memberId
))
}
// 从PAAS平台--规则配置--平台规则配置取已勾选的结算方式决定是否显示结算方式
const
fetchBalancedMethods
=
async
()
=>
{
const
{
data
}
=
await
PublicApi
.
getManageRuleConfigurationList
({
platformType
:
'5'
});
const
length
=
data
.
length
return
{
days
:
length
>
0
&&
data
[
0
].
check
,
month
:
length
>
1
&&
data
[
1
].
check
};
}
// 从PAAS平台--规则配置--平台规则配置取已勾选的结算方式决定是否显示结算方式
useEffect
(()
=>
{
fetchBalancedMethods
().
then
(
data
=>
{
...
...
@@ -191,11 +207,11 @@ const MemberSettleAdd: React.FC = () => {
useEffect
(()
=>
{
if
(
id
)
{
async
function
getInfo
()
{
const
res
=
await
getSettleAccountsPlatformConfigGetMember
SettlementStrategyDetail
({
id
})
const
res
=
await
PublicApi
.
getSettleAccountsPlatformConfigGetPlatform
SettlementStrategyDetail
({
id
})
if
(
res
.
code
===
1000
)
{
setInitialValue
({
name
:
res
.
data
.
name
,
settlementOrderType
:
res
.
data
.
settlementOrderType
,
//
settlementOrderType: res.data.settlementOrderType,
memberList
:
res
.
data
.
memberList
,
settlementWay
:
{
active
:
res
.
data
.
settlementWay
,
...
...
@@ -236,10 +252,11 @@ const MemberSettleAdd: React.FC = () => {
onSubmit=
{
values
=>
handleSubmit
(
values
)
}
schema=
{
addSchema
}
effects=
{
()
=>
{
useAsyncSelect
(
"settlementOrderType"
,
fetchOptions
(
PublicApi
.
getSettleAccountsCommonGetStrategySettlementOrderType
)
)
// 获取单据类型
// useAsyncSelect(
// "settlementOrderType",
// fetchOptions(PublicApi.getSettleAccountsCommonGetStrategySettlementOrderType)
// )
}
}
/>
...
...
@@ -254,6 +271,7 @@ const MemberSettleAdd: React.FC = () => {
tableProps=
{
{
rowKey
:
'memberId'
,
}
}
width=
{
1000
}
formilyProps=
{
{
ctx
:
{
...
...
@@ -267,11 +285,7 @@ const MemberSettleAdd: React.FC = () => {
'name'
,
FORM_FILTER_PATH
,
)
// useAsyncSelect(
// 'roleId',
// fetchMemberSearchFilter,
// ['roleName', 'roleId']
// )
fetchMemberSearchFilter
()
}
}
}
...
...
src/pages/ruleSettingManage/platformSettlementStrategy/info/schema.tsx
View file @
207f313e
...
...
@@ -158,10 +158,28 @@ export const memberSchema: ISchema = {
enum
:
[],
"x-component-props"
:
{
placeholder
:
'选择会员角色'
,
style
:
{
width
:
'200px'
}
style
:
{
width
:
'200px'
},
allowClear
:
true
,
}
},
memberTypeId
:
{
type
:
'string'
,
enum
:
[],
"x-component-props"
:
{
placeholder
:
'选择会员角色'
,
style
:
{
width
:
'200px'
},
allowClear
:
true
,
}
},
level
:
{
type
:
'string'
,
enum
:
[],
"x-component-props"
:
{
placeholder
:
'选择会员角色'
,
style
:
{
width
:
'200px'
},
allowClear
:
true
,
}
},
submit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
...
...
src/pages/ruleSettingManage/platformSettlementStrategy/list/index.tsx
View file @
207f313e
...
...
@@ -25,12 +25,12 @@ const MemberSettle: React.FC<{}> = () => {
console
.
log
(
params
);
const
{
current
,
pageSize
,
name
}
=
params
const
postData
=
{
current
,
pageSize
,
name
:
name
||
''
}
const
{
data
}
=
await
PublicApi
.
getSettleAccountsPlatformConfigPage
Member
SettlementStrategy
(
postData
);
const
{
data
}
=
await
PublicApi
.
getSettleAccountsPlatformConfigPage
Platform
SettlementStrategy
(
postData
);
return
data
;
};
const
handleModify
=
async
(
record
)
=>
{
const
{
code
}
=
await
PublicApi
.
postSettleAccountsPlatformConfigSet
Member
SettlementStrategyStatus
({
id
:
record
.
id
,
status
:
record
.
status
?
0
:
1
})
const
{
code
}
=
await
PublicApi
.
postSettleAccountsPlatformConfigSet
Platform
SettlementStrategyStatus
({
id
:
record
.
id
,
status
:
record
.
status
?
0
:
1
})
if
(
code
==
1000
)
{
formActions
.
submit
();
}
...
...
@@ -45,7 +45,7 @@ const MemberSettle: React.FC<{}> = () => {
return
(
<
div
>
<
EyePreview
url=
{
`/
memberCenter/balance/settleRules/memberSettleList
/detail?id=${record.id}&preview=1`
}
url=
{
`/
ruleSettingManager/platformSettlementStrategy
/detail?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
...
...
@@ -71,7 +71,7 @@ const MemberSettle: React.FC<{}> = () => {
]
const
goToCreate
=
()
=>
{
history
.
push
(
'/
memberCenter/balance/settleRules/memberSettleList
/add'
);
history
.
push
(
'/
ruleSettingManager/platformSettlementStrategy
/add'
);
}
return
(
<
Card
>
...
...
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