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
shenshaokai
jinfa-platform
Commits
c094c005
Commit
c094c005
authored
Jul 28, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat(平台营销活动报名): 列表接口接入
parent
f58bf2c4
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
473 additions
and
475 deletions
+473
-475
index.ts
config/routes/index.ts
+1
-1
app.tsx
src/app.tsx
+4
-0
index.ts
src/constants/index.ts
+2
-2
index.tsx
src/pages/handling/handlingInfo/index.tsx
+1
-1
index.tsx
src/pages/logistics/logisticsInfo/index.tsx
+1
-1
dateFormat.tsx
src/pages/transaction/common/dateFormat.tsx
+5
-0
index.tsx
src/pages/transaction/components/TableLayout/index.tsx
+5
-1
index.tsx
...n/marketingAbility/paltformSign/readyExamineOne/index.tsx
+100
-109
index.tsx
...n/marketingAbility/paltformSign/readyExamineTwo/index.tsx
+35
-23
index.tsx
...ction/marketingAbility/paltformSign/readySubmit/index.tsx
+101
-122
index.tsx
...arketingAbility/paltformSign/readySubmitExamine/index.tsx
+99
-114
index.tsx
...ransaction/marketingAbility/paltformSign/search/index.tsx
+119
-101
No files found.
config/routes/index.ts
View file @
c094c005
...
...
@@ -77,7 +77,7 @@ const memberCenterRoute = {
// AuthConfigRoute,
// MemberRoute,
// HandlingRoute,
//
marketingRoute,
marketingRoute
,
...
asyncRoutes
,
{
path
:
'/memberCenter/noAuth'
,
...
...
src/app.tsx
View file @
c094c005
...
...
@@ -158,6 +158,10 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
if
(
routeAuthUrls
.
includes
(
pathname
))
{
return
;
}
if
(
isDev
)
{
return
}
// 无权限访问时
// console.log(pathname)
console
.
log
(
'无权限访问时'
)
...
...
src/constants/index.ts
View file @
c094c005
...
...
@@ -130,13 +130,13 @@ export enum LAYOUT_TYPE {
// 本地环境跳过权限校验
//
export const isDev = process.env.NODE_ENV === "development"
export
const
isDev
=
process
.
env
.
NODE_ENV
===
"development"
// 暂时将权限访问关闭
export
const
isDev
=
false
//
export const isDev = false
export
const
Environment_Status
=
{
0
:
"所有"
,
...
...
src/pages/handling/handlingInfo/index.tsx
View file @
c094c005
...
...
@@ -370,7 +370,7 @@ const HandlingInfo: React.FC<HandlingInfoPropsType> = (props) => {
const
handleMallSelectChange
=
(
val
,
option
)
=>
{
setDoor
(
option
.
children
);
if
(
option
.
url
)
{
checkUrl
(
option
.
url
)
?
setResUrl
(
`
${
checkUrl
(
option
.
url
)}
.
${
getTopDomainByHost
(
siteUrl
,
true
)}
`
)
:
setResUrl
(
`
${
siteUrl
}
`
)
checkUrl
(
option
.
url
)
?
setResUrl
(
`
${
checkUrl
(
option
.
url
)}
.
${
getTopDomainByHost
(
siteUrl
,
true
)}
/aboutUs/
${
shopInfo
.
id
}
`
)
:
setResUrl
(
`
${
siteUrl
}
`
)
}
}
...
...
src/pages/logistics/logisticsInfo/index.tsx
View file @
c094c005
...
...
@@ -371,7 +371,7 @@ const LogisticsInfo: React.FC<LogisticsInfoPropsType> = (props) => {
const
handleMallSelectChange
=
(
val
,
option
)
=>
{
setDoor
(
option
.
children
);
if
(
option
.
url
)
{
checkUrl
(
option
.
url
)
?
setResUrl
(
`
${
checkUrl
(
option
.
url
)}
.
${
getTopDomainByHost
(
siteUrl
,
true
)}
`
)
:
setResUrl
(
`
${
siteUrl
}
`
)
checkUrl
(
option
.
url
)
?
setResUrl
(
`
${
checkUrl
(
option
.
url
)}
.
${
getTopDomainByHost
(
siteUrl
,
true
)}
/aboutUs/
${
shopInfo
.
id
}
`
)
:
setResUrl
(
`
${
siteUrl
}
`
)
}
}
...
...
src/pages/transaction/common/dateFormat.tsx
0 → 100644
View file @
c094c005
import
moment
from
'moment'
;
export
const
format
=
(
text
,
fmt
?:
string
)
=>
{
return
<>
{
moment
(
text
).
format
(
fmt
||
"YYYY-MM-DD HH:mm"
)
}
</>
}
src/pages/transaction/components/TableLayout/index.tsx
View file @
c094c005
...
...
@@ -33,6 +33,8 @@ interface Iprops {
externalStatusFetch
?:
Promise
<
unknown
>
,
/** 内部状态接口 */
interiorStatusFetch
?:
Promise
<
unknown
>
,
/** 状态选择接口 */
useStateEffects
?:
()
=>
void
,
}
const
formActions
=
createFormActions
();
const
Table
:
React
.
FC
<
Iprops
>
=
(
props
:
any
)
=>
{
...
...
@@ -46,7 +48,8 @@ const Table: React.FC<Iprops> = (props: any) => {
reload
,
fetchRowkeys
,
externalStatusFetch
,
interiorStatusFetch
interiorStatusFetch
,
useStateEffects
,
}
=
props
;
const
tableRef
=
useRef
<
any
>
({});
...
...
@@ -132,6 +135,7 @@ const Table: React.FC<Iprops> = (props: any) => {
searchSelectGetSelectCategoryOptionEffect
(
actions
,
'category'
)
})
useBusinessEffects
();
useStateEffects
&&
useStateEffects
();
}
}
schema=
{
schema
}
>
...
...
src/pages/transaction/marketingAbility/paltformSign/readyExamineOne/index.tsx
View file @
c094c005
...
...
@@ -5,98 +5,83 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
Button
,
Space
}
from
'antd'
import
EyePreview
from
'@/components/EyePreview'
;
import
{
format
}
from
'@/pages/transaction/common/dateFormat'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
onFormMount$
}
=
FormEffectHooks
;
const
ReadyExamineOne
=
()
=>
{
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'ID'
,
dataIndex
:
'id'
,
align
:
'left'
,
},
{
title
:
'活动名称'
,
dataIndex
:
'activityName'
,
align
:
'left'
,
render
:
(
text
)
=>
<
span
style=
{
{
color
:
'#00B37A'
}
}
>
{
text
}
</
span
>
},
{
title
:
'活动类型'
,
dataIndex
:
'activityType'
,
align
:
'left'
,
},
{
title
:
'活动开始时间'
,
dataIndex
:
'startTime'
,
align
:
'left'
,
},
{
title
:
'活动结束时间'
,
dataIndex
:
'endTime'
,
align
:
'left'
,
},
{
title
:
'报名开始时间'
,
dataIndex
:
'startTime'
,
align
:
'left'
,
},
{
title
:
'报名结束时间'
,
dataIndex
:
'endTime'
,
align
:
'left'
,
},
{
title
:
'外部状态'
,
dataIndex
:
'outerStatus'
,
align
:
'left'
,
render
:
(
text
)
=>
(
<
StatusTag
type=
"danger"
title=
{
text
}
/>
)
},
{
title
:
'内部状态'
,
dataIndex
:
'innerStatus'
,
align
:
'left'
,
},
{
title
:
'操作'
,
dataIndex
:
'state'
,
align
:
'left'
,
render
:
(
_
,
record
)
=>
{
return
(
<
div
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
>
提交
</
span
>
</
div
>
)
}
}
]
const
mokiData
=
[
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'活动ID'
,
key
:
'activityId'
,
dataIndex
:
'activityId'
,
},
{
title
:
'活动名称'
,
key
:
'activityName'
,
dataIndex
:
'activityName'
,
render
:
(
text
)
=>
<
EyePreview
>
{
text
}
</
EyePreview
>
},
{
title
:
'活动类型'
,
key
:
'activityType'
,
dataIndex
:
'activityType'
,
render
:
(
_text
,
record
)
=>
<>
{
record
.
activityTypeName
}
</>,
},
{
title
:
'活动开始时间'
,
key
:
'startTime'
,
dataIndex
:
'startTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'活动结束时间'
,
key
:
'endTime'
,
dataIndex
:
'endTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'报名开始时间'
,
key
:
'signUpStartTime'
,
dataIndex
:
'signUpStartTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'报名结束时间'
,
key
:
'signUpEndTime'
,
dataIndex
:
'signUpEndTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
id
:
'1'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
title
:
'外部状态'
,
key
:
'outerStatus'
,
dataIndex
:
'outerStatus'
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"danger"
title=
{
record
.
outerStatusName
}
/>
)
},
{
id
:
'2'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
title
:
'内部状态'
,
key
:
'innerStatus'
,
dataIndex
:
'innerStatus'
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"danger"
title=
{
record
.
innerStatusName
}
/>
)
},
{
id
:
'3'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
}
title
:
'操作'
,
key
:
'state'
,
dataIndex
:
'state'
,
render
:
(
text
,
record
)
=>
(
<>
<
Button
type=
'link'
>
提交审核
</
Button
>
<
Button
type=
'link'
>
填写报名资料
</
Button
>
</>
)
},
]
/* 多选返回的 */
const
fetchRowkeys
=
(
row
)
=>
{
...
...
@@ -105,14 +90,28 @@ const ReadyExamineOne = () => {
/* 操作按钮 */
const
controllerBtns
=
(
<
Space
>
<
Button
type=
"ghost"
>
批量
提交审核
</
Button
>
<
Button
type=
"ghost"
>
批量
审核通过
</
Button
>
</
Space
>
)
const
useStateEffects
=
()
=>
{
const
linkage
=
useLinkageUtils
();
onFormMount$
().
subscribe
(()
=>
{
/** 活动类型 */
PublicApi
.
getMarketingPlatformActivitySignupGetActivityTypeList
().
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
status
}
});
linkage
.
enum
(
'activityType'
,
_enum
);
}).
catch
(
err
=>
{
console
.
warn
(
err
)
})
})
}
return
(
<
TableLayout
columns=
{
columns
}
effects=
"
name
"
fetch=
{
mokiData
}
effects=
"
id
"
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPageTobeExamineStep1
}
selectedRow=
{
true
}
fetchRowkeys=
{
fetchRowkeys
}
controllerBtns=
{
controllerBtns
}
...
...
@@ -130,16 +129,11 @@ const ReadyExamineOne = () => {
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'controllerBtns'
,
},
name
:
{
id
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
tip
:
'输入 会员名称 进行搜索'
,
placeholder
:
'活动ID'
,
},
},
},
...
...
@@ -153,39 +147,35 @@ const ReadyExamineOne = () => {
},
},
properties
:
{
subject
:
{
activityName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'考评主题'
,
allowClear
:
true
,
placeholder
:
'活动名称'
,
style
:
{
width
:
160
,
},
},
},
'[appraisalDayStart,appraisalDayEnd]'
:
{
type
:
'daterange'
,
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
'x-component-props'
:
{
placeholder
:
[
'考评开始时间'
,
'考评完成时间'
],
allowClear
:
true
,
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
width
:
240
,
},
},
},
status
:
{
activityType
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
placeholder
:
'活动类型'
,
style
:
{
width
:
160
,
},
},
enum
:
[],
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
...
...
@@ -201,6 +191,7 @@ const ReadyExamineOne = () => {
},
},
}
}
useStateEffects=
{
useStateEffects
}
/>
);
}
...
...
src/pages/transaction/marketingAbility/paltformSign/readyExamineTwo/index.tsx
View file @
c094c005
...
...
@@ -8,6 +8,12 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
Button
,
Space
}
from
'antd'
import
{
format
}
from
'@/pages/transaction/common/dateFormat'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
onFormMount$
}
=
FormEffectHooks
;
const
ReadyExamineTwo
=
()
=>
{
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'ID'
,
...
...
@@ -108,14 +114,28 @@ const ReadyExamineTwo = () => {
/* 操作按钮 */
const
controllerBtns
=
(
<
Space
>
<
Button
type=
"ghost"
>
批量
提交审核
</
Button
>
<
Button
type=
"ghost"
>
批量
审核通过
</
Button
>
</
Space
>
)
const
useStateEffects
=
()
=>
{
const
linkage
=
useLinkageUtils
();
onFormMount$
().
subscribe
(()
=>
{
/** 活动类型 */
PublicApi
.
getMarketingPlatformActivitySignupGetActivityTypeList
().
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
status
}
});
linkage
.
enum
(
'activityType'
,
_enum
);
}).
catch
(
err
=>
{
console
.
warn
(
err
)
})
})
}
return
(
<
TableLayout
columns=
{
columns
}
effects=
"
name
"
fetch=
{
mokiData
}
effects=
"
id
"
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPageTobeExamineStep2
}
selectedRow=
{
true
}
fetchRowkeys=
{
fetchRowkeys
}
controllerBtns=
{
controllerBtns
}
...
...
@@ -133,16 +153,11 @@ const ReadyExamineTwo = () => {
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'controllerBtns'
,
},
name
:
{
id
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
tip
:
'输入 会员名称 进行搜索'
,
placeholder
:
'活动ID'
,
},
},
},
...
...
@@ -156,39 +171,35 @@ const ReadyExamineTwo = () => {
},
},
properties
:
{
subject
:
{
activityName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'考评主题'
,
allowClear
:
true
,
placeholder
:
'活动名称'
,
style
:
{
width
:
160
,
},
},
},
'[appraisalDayStart,appraisalDayEnd]'
:
{
type
:
'daterange'
,
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
'x-component-props'
:
{
placeholder
:
[
'考评开始时间'
,
'考评完成时间'
],
allowClear
:
true
,
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
width
:
240
,
},
},
},
status
:
{
activityType
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
placeholder
:
'活动类型'
,
style
:
{
width
:
160
,
},
},
enum
:
[],
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
...
...
@@ -204,6 +215,7 @@ const ReadyExamineTwo = () => {
},
},
}
}
useStateEffects=
{
useStateEffects
}
/>
);
}
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmit/index.tsx
View file @
c094c005
...
...
@@ -4,111 +4,84 @@ import TableLayout from '../../../components/TableLayout';
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
Button
,
Space
}
from
'antd'
const
ReadySubmit
=
()
=>
{
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'ID'
,
dataIndex
:
'id'
,
align
:
'left'
,
},
{
title
:
'活动名称'
,
dataIndex
:
'activityName'
,
align
:
'left'
,
render
:
(
text
)
=>
<
span
style=
{
{
color
:
'#00B37A'
}
}
>
{
text
}
</
span
>
},
{
title
:
'活动类型'
,
dataIndex
:
'activityType'
,
align
:
'left'
,
},
{
title
:
'活动开始时间'
,
dataIndex
:
'startTime'
,
align
:
'left'
,
},
{
title
:
'活动结束时间'
,
dataIndex
:
'endTime'
,
align
:
'left'
,
},
{
title
:
'报名开始时间'
,
dataIndex
:
'startTime'
,
align
:
'left'
,
},
{
title
:
'报名结束时间'
,
dataIndex
:
'endTime'
,
align
:
'left'
,
},
{
title
:
'报名时间'
,
dataIndex
:
'startTime'
,
align
:
'left'
,
},
{
title
:
'外部状态'
,
dataIndex
:
'outerStatus'
,
align
:
'left'
,
render
:
(
text
)
=>
(
<
StatusTag
type=
"danger"
title=
{
text
}
/>
)
},
{
title
:
'内部状态'
,
dataIndex
:
'innerStatus'
,
align
:
'left'
,
render
:
(
text
)
=>
(
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
span
style=
{
{
backgroundColor
:
'#C8CACD'
,
width
:
8
,
height
:
8
,
display
:
'inline-block'
,
borderRadius
:
50
,
marginRight
:
10
,
}
}
></
span
>
<
span
>
{
text
}
</
span
>
</
div
>
)
import
{
Button
,
Space
}
from
'antd'
;
import
{
format
}
from
'@/pages/transaction/common/dateFormat'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
EyePreview
from
'@/components/EyePreview'
;
const
{
onFormMount$
}
=
FormEffectHooks
;
},
{
title
:
'操作'
,
dataIndex
:
'state'
,
align
:
'left'
,
render
:
(
_
,
record
)
=>
{
return
(
<
div
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
>
提交
</
span
>
</
div
>
)
}
}
]
const
mokiData
=
[
const
ReadySubmit
=
()
=>
{
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'活动ID'
,
key
:
'activityId'
,
dataIndex
:
'activityId'
,
},
{
title
:
'活动名称'
,
key
:
'activityName'
,
dataIndex
:
'activityName'
,
render
:
(
text
)
=>
<
EyePreview
>
{
text
}
</
EyePreview
>
},
{
title
:
'活动类型'
,
key
:
'activityType'
,
dataIndex
:
'activityType'
,
render
:
(
_text
,
record
)
=>
<>
{
record
.
activityTypeName
}
</>,
},
{
title
:
'活动开始时间'
,
key
:
'startTime'
,
dataIndex
:
'startTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'活动结束时间'
,
key
:
'endTime'
,
dataIndex
:
'endTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
id
:
'1'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
title
:
'报名开始时间'
,
key
:
'signUpStartTime'
,
dataIndex
:
'signUpStartTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
id
:
'2'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
title
:
'报名结束时间'
,
key
:
'signUpEndTime'
,
dataIndex
:
'signUpEndTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
id
:
'3'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
}
title
:
'外部状态'
,
key
:
'outerStatus'
,
dataIndex
:
'outerStatus'
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"danger"
title=
{
record
.
outerStatusName
}
/>
)
},
{
title
:
'内部状态'
,
key
:
'innerStatus'
,
dataIndex
:
'innerStatus'
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"danger"
title=
{
record
.
innerStatusName
}
/>
)
},
{
title
:
'操作'
,
key
:
'state'
,
dataIndex
:
'state'
,
render
:
(
text
,
record
)
=>
(
<>
<
Button
type=
'link'
>
提交审核
</
Button
>
<
Button
type=
'link'
>
填写报名资料
</
Button
>
</>
)
},
]
/* 多选返回的 */
const
fetchRowkeys
=
(
row
)
=>
{
...
...
@@ -117,14 +90,28 @@ const ReadySubmit = () => {
/* 操作按钮 */
const
controllerBtns
=
(
<
Space
>
<
Button
type=
"ghost"
>
批量提交
</
Button
>
<
Button
type=
"ghost"
>
批量提交
审核
</
Button
>
</
Space
>
)
const
useStateEffects
=
()
=>
{
const
linkage
=
useLinkageUtils
();
onFormMount$
().
subscribe
(()
=>
{
/** 活动类型 */
PublicApi
.
getMarketingPlatformActivitySignupGetActivityTypeList
().
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
status
}
});
linkage
.
enum
(
'activityType'
,
_enum
);
}).
catch
(
err
=>
{
console
.
warn
(
err
)
})
})
}
return
(
<
TableLayout
columns=
{
columns
}
effects=
"
name
"
fetch=
{
mokiData
}
effects=
"
id
"
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPageTobeSubmitSignUp
}
selectedRow=
{
true
}
fetchRowkeys=
{
fetchRowkeys
}
controllerBtns=
{
controllerBtns
}
...
...
@@ -142,16 +129,11 @@ const ReadySubmit = () => {
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'controllerBtns'
,
},
name
:
{
id
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
tip
:
'输入 会员名称 进行搜索'
,
placeholder
:
'活动ID'
,
},
},
},
...
...
@@ -165,39 +147,35 @@ const ReadySubmit = () => {
},
},
properties
:
{
subject
:
{
activityName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'考评主题'
,
allowClear
:
true
,
placeholder
:
'活动名称'
,
style
:
{
width
:
160
,
},
},
},
'[appraisalDayStart,appraisalDayEnd]'
:
{
type
:
'daterange'
,
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
'x-component-props'
:
{
placeholder
:
[
'考评开始时间'
,
'考评完成时间'
],
allowClear
:
true
,
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
width
:
240
,
},
},
},
status
:
{
activityType
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
placeholder
:
'活动类型'
,
style
:
{
width
:
160
,
},
},
enum
:
[],
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
...
...
@@ -213,6 +191,7 @@ const ReadySubmit = () => {
},
},
}
}
useStateEffects=
{
useStateEffects
}
/>
);
}
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/index.tsx
View file @
c094c005
...
...
@@ -5,104 +5,83 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
Button
,
Space
}
from
'antd'
import
EyePreview
from
'@/components/EyePreview'
;
import
{
format
}
from
'@/pages/transaction/common/dateFormat'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
onFormMount$
}
=
FormEffectHooks
;
const
ReadySubmitExamine
=
()
=>
{
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'ID'
,
dataIndex
:
'id'
,
align
:
'left'
,
},
{
title
:
'活动名称'
,
dataIndex
:
'activityName'
,
align
:
'left'
,
render
:
(
text
)
=>
<
span
style=
{
{
color
:
'#00B37A'
}
}
>
{
text
}
</
span
>
},
{
title
:
'活动类型'
,
dataIndex
:
'activityType'
,
align
:
'left'
,
},
{
title
:
'活动开始时间'
,
dataIndex
:
'startTime'
,
align
:
'left'
,
},
{
title
:
'活动结束时间'
,
dataIndex
:
'endTime'
,
align
:
'left'
,
},
{
title
:
'报名开始时间'
,
dataIndex
:
'startTime'
,
align
:
'left'
,
},
{
title
:
'报名结束时间'
,
dataIndex
:
'endTime'
,
align
:
'left'
,
},
{
title
:
'报名时间'
,
dataIndex
:
'startTime'
,
align
:
'left'
,
},
{
title
:
'外部状态'
,
dataIndex
:
'outerStatus'
,
align
:
'left'
,
render
:
(
text
)
=>
(
<
StatusTag
type=
"danger"
title=
{
text
}
/>
)
},
{
title
:
'内部状态'
,
dataIndex
:
'innerStatus'
,
align
:
'left'
,
},
{
title
:
'操作'
,
dataIndex
:
'state'
,
align
:
'left'
,
render
:
(
_
,
record
)
=>
{
return
(
<
div
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
>
提交
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
>
修改
</
span
>
</
div
>
)
}
}
]
const
mokiData
=
[
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'活动ID'
,
key
:
'activityId'
,
dataIndex
:
'activityId'
,
},
{
title
:
'活动名称'
,
key
:
'activityName'
,
dataIndex
:
'activityName'
,
render
:
(
text
)
=>
<
EyePreview
>
{
text
}
</
EyePreview
>
},
{
title
:
'活动类型'
,
key
:
'activityType'
,
dataIndex
:
'activityType'
,
render
:
(
_text
,
record
)
=>
<>
{
record
.
activityTypeName
}
</>,
},
{
title
:
'活动开始时间'
,
key
:
'startTime'
,
dataIndex
:
'startTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'活动结束时间'
,
key
:
'endTime'
,
dataIndex
:
'endTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'报名开始时间'
,
key
:
'signUpStartTime'
,
dataIndex
:
'signUpStartTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'报名结束时间'
,
key
:
'signUpEndTime'
,
dataIndex
:
'signUpEndTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
id
:
'1'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
title
:
'外部状态'
,
key
:
'outerStatus'
,
dataIndex
:
'outerStatus'
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"danger"
title=
{
record
.
outerStatusName
}
/>
)
},
{
id
:
'2'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
title
:
'内部状态'
,
key
:
'innerStatus'
,
dataIndex
:
'innerStatus'
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"danger"
title=
{
record
.
innerStatusName
}
/>
)
},
{
id
:
'3'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
}
title
:
'操作'
,
key
:
'state'
,
dataIndex
:
'state'
,
render
:
(
text
,
record
)
=>
(
<>
<
Button
type=
'link'
>
提交审核
</
Button
>
<
Button
type=
'link'
>
填写报名资料
</
Button
>
</>
)
},
]
/* 多选返回的 */
const
fetchRowkeys
=
(
row
)
=>
{
...
...
@@ -114,11 +93,25 @@ const ReadySubmitExamine = () => {
<
Button
type=
"ghost"
>
批量提交审核
</
Button
>
</
Space
>
)
const
useStateEffects
=
()
=>
{
const
linkage
=
useLinkageUtils
();
onFormMount$
().
subscribe
(()
=>
{
/** 活动类型 */
PublicApi
.
getMarketingPlatformActivitySignupGetActivityTypeList
().
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
status
}
});
linkage
.
enum
(
'activityType'
,
_enum
);
}).
catch
(
err
=>
{
console
.
warn
(
err
)
})
})
}
return
(
<
TableLayout
columns=
{
columns
}
effects=
"
name
"
fetch=
{
mokiData
}
effects=
"
id
"
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPageTobeSubmit
}
selectedRow=
{
true
}
fetchRowkeys=
{
fetchRowkeys
}
controllerBtns=
{
controllerBtns
}
...
...
@@ -136,16 +129,11 @@ const ReadySubmitExamine = () => {
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'controllerBtns'
,
},
name
:
{
id
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
tip
:
'输入 会员名称 进行搜索'
,
placeholder
:
'活动ID'
,
},
},
},
...
...
@@ -159,39 +147,35 @@ const ReadySubmitExamine = () => {
},
},
properties
:
{
subject
:
{
activityName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'考评主题'
,
allowClear
:
true
,
placeholder
:
'活动名称'
,
style
:
{
width
:
160
,
},
},
},
'[appraisalDayStart,appraisalDayEnd]'
:
{
type
:
'daterange'
,
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
'x-component-props'
:
{
placeholder
:
[
'考评开始时间'
,
'考评完成时间'
],
allowClear
:
true
,
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
width
:
240
,
},
},
},
status
:
{
activityType
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
placeholder
:
'活动类型'
,
style
:
{
width
:
160
,
},
},
enum
:
[],
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
...
...
@@ -207,6 +191,7 @@ const ReadySubmitExamine = () => {
},
},
}
}
useStateEffects=
{
useStateEffects
}
/>
);
}
...
...
src/pages/transaction/marketingAbility/paltformSign/search/index.tsx
View file @
c094c005
...
...
@@ -4,102 +4,106 @@ import TableLayout from '../../../components/TableLayout';
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
format
}
from
'@/pages/transaction/common/dateFormat'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
FormEffectHooks
}
from
'@formily/antd'
;
const
{
onFormMount$
}
=
FormEffectHooks
;
const
Search
=
()
=>
{
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'ID'
,
dataIndex
:
'id'
,
align
:
'left'
,
},
{
title
:
'活动名称'
,
dataIndex
:
'activityName'
,
align
:
'left'
,
render
:
(
text
)
=>
<
span
style=
{
{
color
:
'#00B37A'
}
}
>
{
text
}
</
span
>
},
{
title
:
'活动类型'
,
dataIndex
:
'activityType'
,
align
:
'left'
,
},
{
title
:
'活动开始时间'
,
dataIndex
:
'startTime'
,
align
:
'left'
,
},
{
title
:
'活动结束时间'
,
dataIndex
:
'endTime'
,
align
:
'left'
,
},
{
title
:
'报名开始时间'
,
dataIndex
:
'startTime'
,
align
:
'left'
,
},
{
title
:
'报名结束时间'
,
dataIndex
:
'endTime'
,
align
:
'left'
,
},
{
title
:
'报名时间'
,
dataIndex
:
'startTime'
,
align
:
'left'
,
},
{
title
:
'外部状态'
,
dataIndex
:
'outerStatus'
,
align
:
'left'
,
render
:
(
text
)
=>
(
<
StatusTag
type=
"danger"
title=
{
text
}
/>
)
},
{
title
:
'内部状态'
,
dataIndex
:
'innerStatus'
,
align
:
'left'
,
}]
const
mokiData
=
[
const
columns
:
ColumnType
<
any
>
[]
=
[
{
id
:
'1'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
title
:
'活动ID'
,
key
:
'activityId'
,
dataIndex
:
'activityId'
,
},
{
id
:
'2'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
title
:
'活动名称'
,
key
:
'activityName'
,
dataIndex
:
'activityName'
,
render
:
(
text
)
=>
<
EyePreview
>
{
text
}
</
EyePreview
>
},
{
id
:
'3'
,
activityName
:
'tony'
,
activityType
:
'秒杀'
,
startTime
:
'2020-05-12 08:08'
,
endTime
:
'还剩 59 秒'
,
outerStatus
:
"待提交报平台审核"
,
innerStatus
:
'待提交审核'
,
}
title
:
'活动类型'
,
key
:
'activityType'
,
dataIndex
:
'activityType'
,
render
:
(
_text
,
record
)
=>
<>
{
record
.
activityTypeName
}
</>,
},
{
title
:
'活动开始时间'
,
key
:
'startTime'
,
dataIndex
:
'startTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'活动结束时间'
,
key
:
'endTime'
,
dataIndex
:
'endTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'报名开始时间'
,
key
:
'signUpStartTime'
,
dataIndex
:
'signUpStartTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'报名结束时间'
,
key
:
'signUpEndTime'
,
dataIndex
:
'signUpEndTime'
,
render
:
(
text
)
=>
format
(
text
)
},
{
title
:
'外部状态'
,
key
:
'outerStatus'
,
dataIndex
:
'outerStatus'
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"danger"
title=
{
record
.
outerStatusName
}
/>
)
},
{
title
:
'内部状态'
,
key
:
'innerStatus'
,
dataIndex
:
'innerStatus'
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"danger"
title=
{
record
.
innerStatusName
}
/>
)
},
]
/* 多选返回的 */
const
fetchRowkeys
=
(
row
)
=>
{
console
.
log
(
row
);
const
useStateEffects
=
()
=>
{
const
linkage
=
useLinkageUtils
();
onFormMount$
().
subscribe
(()
=>
{
/** 活动类型 */
PublicApi
.
getMarketingPlatformActivitySignupGetActivityTypeList
().
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
status
}
});
linkage
.
enum
(
'activityType'
,
_enum
);
}).
catch
(
err
=>
{
console
.
warn
(
err
)
})
/** 外部状态 */
PublicApi
.
getMarketingPlatformActivitySignupGetOuterStatusList
().
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
status
}
});
linkage
.
enum
(
'outerStatus'
,
_enum
);
}).
catch
(
err
=>
{
console
.
warn
(
err
)
})
/** 内部状态 */
PublicApi
.
getMarketingPlatformActivitySignupGetInnerStatusList
().
then
(
res
=>
{
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
,
value
:
item
.
status
}
})
linkage
.
enum
(
'innerStatus'
,
_enum
);
}).
catch
(
err
=>
{
console
.
warn
(
err
)
})
})
}
return
(
<
TableLayout
columns=
{
columns
}
effects=
"name"
fetch=
{
mokiData
}
selectedRow=
{
true
}
fetchRowkeys=
{
fetchRowkeys
}
effects=
"id"
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPage
}
useStateEffects=
{
useStateEffects
}
schema=
{
{
type
:
'object'
,
properties
:
{
...
...
@@ -114,13 +118,11 @@ const Search = () => {
grid
:
true
,
},
properties
:
{
name
:
{
id
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
tip
:
'输入 会员名称 进行搜索'
,
placeholder
:
'活动ID'
,
},
},
},
...
...
@@ -134,39 +136,55 @@ const Search = () => {
},
},
properties
:
{
subject
:
{
activityName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'考评主题'
,
allowClear
:
true
,
placeholder
:
'活动名称'
,
style
:
{
width
:
160
,
},
},
},
'[appraisalDayStart,appraisalDayEnd]'
:
{
type
:
'daterange'
,
'[startTime,endTime]'
:
{
type
:
'string'
,
"x-component"
:
"DateRangePickerUnix"
,
'x-component-props'
:
{
placeholder
:
[
'考评开始时间'
,
'考评完成时间'
],
allowClear
:
true
,
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
width
:
240
,
},
},
},
status
:
{
activityType
:
{
type
:
'string'
,
default
:
undefined
,
'x-component-props'
:
{
placeholder
:
'活动类型'
,
style
:
{
width
:
160
,
},
},
enum
:
[],
},
outerStatus
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
placeholder
:
'外部状态'
,
style
:
{
width
:
160
,
},
},
enum
:
[],
},
innerStatus
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'内部状态'
,
style
:
{
width
:
160
,
},
},
enum
:
[],
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-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