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
project
jinfa-admin
Commits
c71bb4d3
Commit
c71bb4d3
authored
Dec 17, 2020
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
fc63fc0b
ecab126e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
114 additions
and
139 deletions
+114
-139
index.tsx
src/pages/pageCustomized/mallEdit/index.tsx
+34
-46
index.tsx
src/pages/pageCustomized/preview/mallPreview/index.tsx
+34
-46
index.tsx
...leSettingManage/platformSettlementStrategy/info/index.tsx
+43
-43
schema.tsx
...eSettingManage/platformSettlementStrategy/info/schema.tsx
+3
-4
No files found.
src/pages/pageCustomized/mallEdit/index.tsx
View file @
c71bb4d3
...
...
@@ -27,7 +27,7 @@ interface MallEditPropsType {
}
}
le
t
TemplateList
=
[
'science'
]
cons
t
TemplateList
=
[
'science'
]
const
MallEdit
:
React
.
FC
<
MallEditPropsType
>
=
(
props
)
=>
{
const
{
query
:
{
id
,
template
}
}
=
props
.
location
...
...
@@ -46,11 +46,11 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
const
findFirstAdvertsByType
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
let
params
=
{
const
params
:
any
=
{
templateId
:
id
,
type
:
1
}
//@ts-ignore
PublicApi
.
getTemplatePlatformFindAdvertsByType
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
...
...
@@ -63,11 +63,11 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
const
findSecondAdvertsByType
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
let
params
=
{
const
params
:
any
=
{
templateId
:
id
,
type
:
2
}
//@ts-ignore
PublicApi
.
getTemplatePlatformFindAdvertsByType
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
...
...
@@ -83,7 +83,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
*/
const
fetchFirstCategory
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
PublicApi
.
getTemplate
Platform
FindAllFirstCategory
().
then
(
res
=>
{
PublicApi
.
getTemplate
WebCategoryWeb
FindAllFirstCategory
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
else
{
...
...
@@ -98,25 +98,12 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
*/
const
fetchCategoryById
=
(
categoryId
)
=>
{
return
new
Promise
((
resolve
)
=>
{
let
param
=
{
const
param
:
any
=
{
templateId
:
id
,
categoryId
}
// @ts-ignore
PublicApi
.
getTemplatePlatformFindFirstCategoryDetail
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
})
}
const
fetchTmeplateInfo
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
//@ts-ignore
PublicApi
.
getTemplatePlatformFindMallHome
({
templateId
:
id
}).
then
(
res
=>
{
PublicApi
.
getTemplateAdornWebEnterpriseCategoryAdorn
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
...
...
@@ -129,13 +116,15 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
*/
const
fetchLeadNews
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
//@ts-ignore
PublicApi
.
getManageContentInformationFindAllByRecommendLabel
({
recommendLabel
:
1
}).
then
(
res
=>
{
const
param
:
any
=
{
recommendLabel
:
1
}
PublicApi
.
getManageContentInformationFindAllByRecommendLabel
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
le
t
leadNewsList
:
any
=
res
.
data
||
[]
cons
t
leadNewsList
:
any
=
res
.
data
||
[]
if
(
leadNewsList
.
length
>=
2
)
{
le
t
leftList
=
leadNewsList
.
slice
(
0
,
Math
.
round
(
leadNewsList
.
length
/
2
))
le
t
rightList
=
leadNewsList
.
slice
(
Math
.
round
(
leadNewsList
.
length
/
2
),
leadNewsList
.
length
)
cons
t
leftList
=
leadNewsList
.
slice
(
0
,
Math
.
round
(
leadNewsList
.
length
/
2
))
cons
t
rightList
=
leadNewsList
.
slice
(
Math
.
round
(
leadNewsList
.
length
/
2
),
leadNewsList
.
length
)
resolve
({
leadLeftNews
:
leftList
,
leadRightNews
:
rightList
...
...
@@ -160,10 +149,10 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
PublicApi
.
getManageContentColumnAll
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
result
=
""
le
t
allColumn
=
res
.
data
cons
t
allColumn
=
res
.
data
if
(
allColumn
&&
allColumn
.
length
>
0
)
{
let
labelList
=
allColumn
.
map
((
item
:
any
)
=>
item
.
name
)
le
t
showCount
=
4
cons
t
showCount
=
4
if
(
labelList
.
length
<=
showCount
)
{
result
=
labelList
.
join
(
' | '
)
}
else
{
...
...
@@ -190,7 +179,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
interactAdvertConfig
[
interactAdvertConfig
.
key
].
props
.
advertList
=
await
findSecondAdvertsByType
()
const
shopList
=
GlobalConfig
.
web
.
shopInfo
le
t
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
environment
===
1
&&
item
.
type
===
1
)[
0
]
cons
t
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
environment
===
1
&&
item
.
type
===
1
)[
0
]
headerConfig
[
headerConfig
.
key
].
props
.
logoUrl
=
webMallInfo
.
logoUrl
topBarConfig
[
topBarConfig
.
key
].
props
.
shopname
=
webMallInfo
.
name
...
...
@@ -200,17 +189,17 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
let
initIndex
=
100
let
floorLineConfig
:
any
=
{}
le
t
floorLineKeys
:
any
=
[]
cons
t
floorLineKeys
:
any
=
[]
le
t
firstCategory
:
any
=
await
fetchFirstCategory
()
cons
t
firstCategory
:
any
=
await
fetchFirstCategory
()
for
(
le
t
item
of
firstCategory
)
{
le
t
categoryDetail
:
any
=
await
fetchCategoryById
(
item
.
id
)
for
(
cons
t
item
of
firstCategory
)
{
cons
t
categoryDetail
:
any
=
await
fetchCategoryById
(
item
.
id
)
let
floorLineConfigItem
=
{}
floorLineKeys
.
push
(
String
(
initIndex
+
1
))
le
t
FloorLine
=
{
cons
t
FloorLine
=
{
[
String
(
initIndex
+
1
)]:
{
"componentName"
:
"FloorLine"
,
"props"
:
{
...
...
@@ -219,7 +208,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
"childNodes"
:
[
String
(
initIndex
+
2
),
String
(
initIndex
+
3
)]
}
}
le
t
Horizontal1
=
{
cons
t
Horizontal1
=
{
[
String
(
initIndex
+
2
)]:
{
"componentName"
:
"FloorLine.Horizontal"
,
"props"
:
{},
...
...
@@ -227,7 +216,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
},
}
le
t
Brand
=
{
cons
t
Brand
=
{
[
String
(
initIndex
+
3
)]:
{
"componentName"
:
"FloorLine.Brand"
,
"props"
:
{
...
...
@@ -238,7 +227,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
},
}
le
t
Category
=
{
cons
t
Category
=
{
[
String
(
initIndex
+
4
)]:
{
"componentName"
:
"FloorLine.Category"
,
"props"
:
{
...
...
@@ -250,7 +239,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
},
}
le
t
Vertical1
=
{
cons
t
Vertical1
=
{
[
String
(
initIndex
+
5
)]:
{
"componentName"
:
"FloorLine.Vertical"
,
"props"
:
{},
...
...
@@ -258,7 +247,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
},
}
le
t
FloorHeader
=
{
cons
t
FloorHeader
=
{
[
String
(
initIndex
+
6
)]:
{
"componentName"
:
"FloorLine.FloorHeader"
,
"props"
:
{
...
...
@@ -270,7 +259,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
},
}
le
t
Banner
=
{
cons
t
Banner
=
{
[
String
(
initIndex
+
7
)]:
{
"componentName"
:
"FloorLine.Banner"
,
"props"
:
{
...
...
@@ -282,14 +271,14 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
},
}
le
t
Horizontal2
=
{
cons
t
Horizontal2
=
{
[
String
(
initIndex
+
8
)]:
{
"componentName"
:
"FloorLine.Horizontal"
,
"props"
:
{},
"childNodes"
:
[
String
(
initIndex
+
9
),
String
(
initIndex
+
10
)]
},
}
le
t
Goods
=
{
cons
t
Goods
=
{
[
String
(
initIndex
+
9
)]:
{
"componentName"
:
"FloorLine.Goods"
,
"props"
:
{
...
...
@@ -300,7 +289,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
},
}
le
t
Shops
=
{
cons
t
Shops
=
{
[
String
(
initIndex
+
10
)]:
{
"componentName"
:
"FloorLine.Shops"
,
"props"
:
{
...
...
@@ -317,7 +306,7 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
}
mallLayoutConfig
[
"0"
].
childNodes
=
[...
mallLayoutConfig
[
"0"
].
childNodes
,
...
floorLineKeys
,
FindMoreConfig
.
key
,
InformationConfig
.
key
,
FooterConfig
.
key
]
le
t
config
=
{
cons
t
config
=
{
...
mallLayoutConfig
,
...
topBarConfig
,
...
topAdvertConfig
,
...
...
@@ -349,4 +338,4 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
)
:
<
Loading
/>
}
export
default
MallEdit
\ No newline at end of file
export
default
MallEdit
src/pages/pageCustomized/preview/mallPreview/index.tsx
View file @
c71bb4d3
...
...
@@ -26,7 +26,7 @@ interface MallPreviewPropsType {
}
}
le
t
TemplateList
=
[
'science'
]
cons
t
TemplateList
=
[
'science'
]
const
MallPreview
:
React
.
FC
<
MallPreviewPropsType
>
=
(
props
)
=>
{
const
{
query
:
{
id
,
template
}
}
=
props
.
location
...
...
@@ -45,11 +45,11 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
const
findFirstAdvertsByType
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
let
params
=
{
const
params
:
any
=
{
templateId
:
id
,
type
:
1
}
//@ts-ignore
PublicApi
.
getTemplatePlatformFindAdvertsByType
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
...
...
@@ -62,11 +62,11 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
const
findSecondAdvertsByType
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
let
params
=
{
const
params
:
any
=
{
templateId
:
id
,
type
:
2
}
//@ts-ignore
PublicApi
.
getTemplatePlatformFindAdvertsByType
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
...
...
@@ -82,7 +82,7 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
*/
const
fetchFirstCategory
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
PublicApi
.
getTemplate
Platform
FindAllFirstCategory
().
then
(
res
=>
{
PublicApi
.
getTemplate
WebCategoryWeb
FindAllFirstCategory
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
else
{
...
...
@@ -99,25 +99,12 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
*/
const
fetchCategoryById
=
(
categoryId
)
=>
{
return
new
Promise
((
resolve
)
=>
{
let
param
=
{
const
param
:
any
=
{
templateId
:
id
,
categoryId
}
// @ts-ignore
PublicApi
.
getTemplatePlatformFindFirstCategoryDetail
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
})
}
const
fetchTmeplateInfo
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
//@ts-ignore
PublicApi
.
getTemplatePlatformFindMallHome
({
templateId
:
id
}).
then
(
res
=>
{
PublicApi
.
getTemplateAdornWebEnterpriseCategoryAdorn
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
...
...
@@ -130,13 +117,15 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
*/
const
fetchLeadNews
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
//@ts-ignore
PublicApi
.
getManageContentInformationFindAllByRecommendLabel
({
recommendLabel
:
1
}).
then
(
res
=>
{
const
param
:
any
=
{
recommendLabel
:
id
}
PublicApi
.
getManageContentInformationFindAllByRecommendLabel
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
le
t
leadNewsList
:
any
=
res
.
data
||
[]
cons
t
leadNewsList
:
any
=
res
.
data
||
[]
if
(
leadNewsList
.
length
>=
2
)
{
le
t
leftList
=
leadNewsList
.
slice
(
0
,
Math
.
round
(
leadNewsList
.
length
/
2
))
le
t
rightList
=
leadNewsList
.
slice
(
Math
.
round
(
leadNewsList
.
length
/
2
),
leadNewsList
.
length
)
cons
t
leftList
=
leadNewsList
.
slice
(
0
,
Math
.
round
(
leadNewsList
.
length
/
2
))
cons
t
rightList
=
leadNewsList
.
slice
(
Math
.
round
(
leadNewsList
.
length
/
2
),
leadNewsList
.
length
)
resolve
({
leadLeftNews
:
leftList
,
leadRightNews
:
rightList
...
...
@@ -161,10 +150,10 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
PublicApi
.
getManageContentColumnAll
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
result
=
""
le
t
allColumn
=
res
.
data
cons
t
allColumn
=
res
.
data
if
(
allColumn
&&
allColumn
.
length
>
0
)
{
let
labelList
=
allColumn
.
map
((
item
:
any
)
=>
item
.
name
)
le
t
showCount
=
4
cons
t
showCount
=
4
if
(
labelList
.
length
<=
showCount
)
{
result
=
labelList
.
join
(
' | '
)
}
else
{
...
...
@@ -191,7 +180,7 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
interactAdvertConfig
[
interactAdvertConfig
.
key
].
props
.
advertList
=
await
findSecondAdvertsByType
()
const
shopList
=
GlobalConfig
.
web
.
shopInfo
le
t
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
environment
===
1
&&
item
.
type
===
1
)[
0
]
cons
t
webMallInfo
=
shopList
.
filter
(
item
=>
item
.
environment
===
1
&&
item
.
type
===
1
)[
0
]
headerConfig
[
headerConfig
.
key
].
props
.
logoUrl
=
webMallInfo
.
logoUrl
topBarConfig
[
topBarConfig
.
key
].
props
.
shopname
=
webMallInfo
.
name
...
...
@@ -201,17 +190,17 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
let
initIndex
=
100
let
floorLineConfig
:
any
=
{}
le
t
floorLineKeys
:
any
=
[]
cons
t
floorLineKeys
:
any
=
[]
le
t
firstCategory
:
any
=
await
fetchFirstCategory
()
cons
t
firstCategory
:
any
=
await
fetchFirstCategory
()
for
(
le
t
item
of
firstCategory
)
{
le
t
categoryDetail
:
any
=
await
fetchCategoryById
(
item
.
id
)
for
(
cons
t
item
of
firstCategory
)
{
cons
t
categoryDetail
:
any
=
await
fetchCategoryById
(
item
.
id
)
let
floorLineConfigItem
=
{}
floorLineKeys
.
push
(
String
(
initIndex
+
1
))
le
t
FloorLine
=
{
cons
t
FloorLine
=
{
[
String
(
initIndex
+
1
)]:
{
"componentName"
:
"FloorLine"
,
"props"
:
{
...
...
@@ -220,7 +209,7 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
"childNodes"
:
[
String
(
initIndex
+
2
),
String
(
initIndex
+
3
)]
}
}
le
t
Horizontal1
=
{
cons
t
Horizontal1
=
{
[
String
(
initIndex
+
2
)]:
{
"componentName"
:
"FloorLine.Horizontal"
,
"props"
:
{},
...
...
@@ -228,7 +217,7 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
},
}
le
t
Brand
=
{
cons
t
Brand
=
{
[
String
(
initIndex
+
3
)]:
{
"componentName"
:
"FloorLine.Brand"
,
"props"
:
{
...
...
@@ -239,7 +228,7 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
},
}
le
t
Category
=
{
cons
t
Category
=
{
[
String
(
initIndex
+
4
)]:
{
"componentName"
:
"FloorLine.Category"
,
"props"
:
{
...
...
@@ -251,7 +240,7 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
},
}
le
t
Vertical1
=
{
cons
t
Vertical1
=
{
[
String
(
initIndex
+
5
)]:
{
"componentName"
:
"FloorLine.Vertical"
,
"props"
:
{},
...
...
@@ -259,7 +248,7 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
},
}
le
t
FloorHeader
=
{
cons
t
FloorHeader
=
{
[
String
(
initIndex
+
6
)]:
{
"componentName"
:
"FloorLine.FloorHeader"
,
"props"
:
{
...
...
@@ -271,7 +260,7 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
},
}
le
t
Banner
=
{
cons
t
Banner
=
{
[
String
(
initIndex
+
7
)]:
{
"componentName"
:
"FloorLine.Banner"
,
"props"
:
{
...
...
@@ -283,14 +272,14 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
},
}
le
t
Horizontal2
=
{
cons
t
Horizontal2
=
{
[
String
(
initIndex
+
8
)]:
{
"componentName"
:
"FloorLine.Horizontal"
,
"props"
:
{},
"childNodes"
:
[
String
(
initIndex
+
9
),
String
(
initIndex
+
10
)]
},
}
le
t
Goods
=
{
cons
t
Goods
=
{
[
String
(
initIndex
+
9
)]:
{
"componentName"
:
"FloorLine.Goods"
,
"props"
:
{
...
...
@@ -301,7 +290,7 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
},
}
le
t
Shops
=
{
cons
t
Shops
=
{
[
String
(
initIndex
+
10
)]:
{
"componentName"
:
"FloorLine.Shops"
,
"props"
:
{
...
...
@@ -318,7 +307,7 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
}
mallLayoutConfig
[
"0"
].
childNodes
=
[...
mallLayoutConfig
[
"0"
].
childNodes
,
...
floorLineKeys
,
FindMoreConfig
.
key
,
InformationConfig
.
key
,
FooterConfig
.
key
]
le
t
config
=
{
cons
t
config
=
{
...
mallLayoutConfig
,
...
topBarConfig
,
...
topAdvertConfig
,
...
...
@@ -349,4 +338,4 @@ const MallPreview: React.FC<MallPreviewPropsType> = (props) => {
)
:
<
Loading
/>
}
export
default
MallPreview
\ No newline at end of file
export
default
MallPreview
src/pages/ruleSettingManage/platformSettlementStrategy/info/index.tsx
View file @
c71bb4d3
...
...
@@ -40,26 +40,26 @@ const formActions = createFormActions();
const
common_columns
:
any
=
[
{
title
:
'ID'
,
dataIndex
:
'memberId'
},
{
title
:
'会员名称'
,
dataIndex
:
'name'
,
{
title
:
'会员名称'
,
dataIndex
:
'name'
,
render
:
(
text
:
string
,
record
:
any
)
=>
{
return
record
.
name
||
record
.
memberName
}
},
{
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
},
{
title
:
'会员角色'
,
dataIndex
:
'roleName'
},
{
title
:
'会员等级'
,
dataIndex
:
'levelTag'
,
{
title
:
'会员等级'
,
dataIndex
:
'levelTag'
,
render
:
(
text
:
string
,
record
:
any
)
=>
{
return
record
.
levelTag
||
record
.
levelName
}
}
},
]
const
MemberSettleAdd
:
React
.
FC
=
()
=>
{
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
[
memberRowSelection
,
memberRowCtl
]
=
useRowSelectionTable
({
customKey
:
'
member
Id'
});
const
[
memberRowSelection
,
memberRowCtl
]
=
useRowSelectionTable
({
customKey
:
'
unique
Id'
});
const
[
initialValue
,
setInitialValue
]
=
useState
({});
const
[
cacheMember
,
setCacheMember
]
=
useState
([]);
const
{
id
,
preview
}
=
usePageStatus
();
...
...
@@ -69,28 +69,28 @@ const MemberSettleAdd: React.FC = () => {
const
tableAddButton
=
()
=>
{
return
(
<
div
>
<
Button
onClick=
{
()
=>
setVisible
(
true
)
}
style=
{
{
marginBottom
:
16
}
}
block
icon=
{
<
PlusOutlined
/>
}
<
Button
onClick=
{
()
=>
setVisible
(
true
)
}
style=
{
{
marginBottom
:
16
}
}
block
icon=
{
<
PlusOutlined
/>
}
type=
'dashed'
>
选择适用会员
</
Button
>
</
Button
>
</
div
>
)
}
const
columns
=
common_columns
.
concat
(
[
{
title
:
'操作'
,
{
title
:
'操作'
,
render
:
(
text
,
record
)
=>
{
return
(
<
a
onClick=
{
()
=>
handleRemove
(
record
.
member
Id
)
}
>
删除
</
a
>
<
a
onClick=
{
()
=>
handleRemove
(
record
.
unique
Id
)
}
>
删除
</
a
>
)
}
}
}
]
);
...
...
@@ -102,17 +102,19 @@ const MemberSettleAdd: React.FC = () => {
// 获取适用会员
const
fetchMemberData
=
async
(
params
:
any
)
=>
{
///member/manage/all/provider/page
const
{
data
,
code
}
=
await
PublicApi
.
getMemberManageAllProviderPage
(
params
);
if
(
code
===
1000
)
{
return
data
const
{
data
}
=
await
PublicApi
.
getMemberManageAllProviderPage
(
params
);
console
.
log
(
data
);
return
{
...
data
,
data
:
data
.
data
.
map
((
v
)
=>
({...
v
,
uniqueId
:
v
.
memberId
+
"_"
+
v
.
roleId
})),
totalCount
:
data
.
totalCount
}
return
[];
}
// 获取适用会员下拉搜索框
const
fetchMemberSearchFilter
=
()
=>
{
const
linkage
=
useLinkageUtils
();
onFormInit$
().
subscribe
(()
=>
{
PublicApi
.
getMemberManagePageitems
({
roleTypeEnum
:
'1'
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -135,8 +137,8 @@ const MemberSettleAdd: React.FC = () => {
// 提交
const
handleSubmit
=
(
value
)
=>
{
const
memberList
=
value
.
someLists
.
map
((
item
)
=>
(
{
memberId
:
item
.
memberId
,
{
memberId
:
item
.
memberId
,
roleId
:
item
.
roleId
,
}
)
...
...
@@ -153,8 +155,8 @@ const MemberSettleAdd: React.FC = () => {
const
serviceActions
=
isAdd
?
PublicApi
.
postSettleAccountsPlatformConfigAddPlatformSettlementStrategy
:
PublicApi
.
postSettleAccountsPlatformConfigUpdatePlatformSettlementStrategy
const
postData
=
{...
tempData
,
id
:
id
||
0
}
const
postData
=
{...
tempData
,
id
:
id
||
0
}
console
.
log
(
postData
)
setSubmitLoading
(
true
);
setUnsaved
(
false
);
...
...
@@ -175,14 +177,14 @@ const MemberSettleAdd: React.FC = () => {
const
handleRemove
=
(
id
:
number
)
=>
{
const
string
=
'Tabs.memberTab.someLists'
;
const
chooseList
=
formActions
.
getFieldValue
(
string
);
const
res
=
chooseList
.
filter
((
item
)
=>
item
.
member
Id
!==
id
);
const
res
=
chooseList
.
filter
((
item
)
=>
item
.
unique
Id
!==
id
);
formActions
.
setFieldValue
(
string
,
res
);
// 必须设置key
memberRowCtl
.
setSelectRow
(
res
);
memberRowCtl
.
setSelectedRowKeys
(
res
.
map
((
item
)
=>
item
.
member
Id
))
memberRowCtl
.
setSelectedRowKeys
(
res
.
map
((
item
)
=>
item
.
unique
Id
))
}
// 从PAAS平台--规则配置--平台规则配置取已勾选的结算方式决定是否显示结算方式
const
fetchBalancedMethods
=
async
()
=>
{
const
{
data
}
=
await
PublicApi
.
getManageRuleConfigurationList
({
platformType
:
'5'
});
...
...
@@ -218,18 +220,17 @@ const MemberSettleAdd: React.FC = () => {
active
:
res
.
data
.
settlementWay
,
otherValues
:
[
res
.
data
.
settlementDays
,
res
.
data
.
settlementDate
],
},
})
formActions
.
setFieldValue
(
'Tabs.memberTab.layout.isDefault'
,
res
.
data
.
isDefault
)
formActions
.
setFieldValue
(
'Tabs.memberTab.someLists'
,
res
.
data
.
memberList
);
const
list
=
res
.
data
.
memberList
.
map
((
item
)
=>
({...
item
,
uniqueId
:
item
.
memberId
+
"_"
+
item
.
roleId
}))
formActions
.
setFieldValue
(
'Tabs.memberTab.someLists'
,
list
);
// 必须设置key
memberRowCtl
.
setSelectRow
(
res
.
data
.
memberL
ist
);
memberRowCtl
.
setSelectedRowKeys
(
res
.
data
.
memberList
.
map
((
item
)
=>
item
.
memberId
))
memberRowCtl
.
setSelectRow
(
l
ist
);
memberRowCtl
.
setSelectedRowKeys
(
res
.
data
.
memberList
.
map
((
item
)
=>
item
.
memberId
+
"_"
+
item
.
roleId
))
}
else
{
message
.
error
({
content
:
res
.
message
})
}
}
getInfo
();
}
...
...
@@ -256,13 +257,13 @@ const MemberSettleAdd: React.FC = () => {
schema=
{
addSchema
}
effects=
{
()
=>
{
// 获取单据类型
useAsyncSelect
(
"settlementOrderType"
,
useAsyncSelect
(
"settlementOrderType"
,
fetchOptions
(
PublicApi
.
getSettleAccountsCommonGetPlatformStrategySettlementOrderType
)
)
}
}
/>
<
ModalTable
modalTitle=
'选择适用会员'
confirm=
{
handleOkAddMember
}
...
...
@@ -272,12 +273,12 @@ const MemberSettleAdd: React.FC = () => {
rowSelection=
{
memberRowSelection
}
fetchTableData=
{
params
=>
fetchMemberData
(
params
)
}
tableProps=
{
{
rowKey
:
'
member
Id'
,
rowKey
:
'
unique
Id'
,
}
}
width=
{
1000
}
formilyProps=
{
{
ctx
:
{
ctx
:
{
schema
:
memberSchema
,
actions
:
formActions
,
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
}
,
...
...
@@ -300,4 +301,4 @@ const MemberSettleAdd: React.FC = () => {
)
}
export
default
MemberSettleAdd
\ No newline at end of file
export
default
MemberSettleAdd
src/pages/ruleSettingManage/platformSettlementStrategy/info/schema.tsx
View file @
c71bb4d3
...
...
@@ -2,7 +2,7 @@ import { ISchema } from '@formily/antd'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
/**
* 新增会员结算策略schema
*
*
*/
export
const
addSchema
:
ISchema
=
{
...
...
@@ -114,7 +114,7 @@ export const addSchema: ISchema = {
},
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
rowKey
:
'
member
Id'
,
rowKey
:
'
unique
Id'
,
prefix
:
"{{tableAddButton}}"
,
columns
:
"{{tableColumns}}"
// columns: "{{tableColumns}}",
...
...
@@ -192,4 +192,4 @@ export const memberSchema: ISchema = {
}
}
}
}
\ 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