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
linweijiong
jinfa-platform
Commits
ff616e94
Commit
ff616e94
authored
Aug 10, 2020
by
tjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整会员 待审核一二级
parent
c857db9d
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
186 additions
and
194 deletions
+186
-194
memberRoute.ts
config/routes/memberRoute.ts
+21
-8
useAsyncInitSelect.ts
src/formSchema/effects/useAsyncInitSelect.ts
+0
-1
menu.ts
src/locales/zh-CN/menu.ts
+4
-2
auditDetail.tsx
src/pages/member/components/auditDetail.tsx
+15
-1
auditList.tsx
src/pages/member/components/auditList.tsx
+36
-128
index.tsx
src/pages/member/components/schema/index.tsx
+1
-1
addMember.tsx
src/pages/member/memberImport/addMember.tsx
+44
-21
index.tsx
src/pages/member/memberImport/index.tsx
+1
-1
index.tsx
src/pages/member/memberImport/schema/index.tsx
+40
-23
index.tsx
src/pages/member/memberMaintain/index.tsx
+1
-1
index.tsx
src/pages/member/memberMaintain/schema/index.tsx
+1
-1
auditPr1.tsx
src/pages/member/memberPr1/auditPr1.tsx
+2
-2
index.less
src/pages/member/memberPr1/index.less
+0
-0
index.tsx
src/pages/member/memberPr1/index.tsx
+0
-0
auditPr2.tsx
src/pages/member/memberPr2/auditPr2.tsx
+8
-0
index.less
src/pages/member/memberPr2/index.less
+0
-0
index.tsx
src/pages/member/memberPr2/index.tsx
+8
-0
auditPrComfirm.tsx
src/pages/member/memberPrConfirm/auditPrComfirm.tsx
+2
-2
auditPrSubmit.tsx
src/pages/member/memberPrSubmit/auditPrSubmit.tsx
+2
-2
No files found.
config/routes/memberRoute.ts
View file @
ff616e94
...
@@ -50,17 +50,30 @@ const MemberRoute = {
...
@@ -50,17 +50,30 @@ const MemberRoute = {
component
:
'@/pages/member/memberPrSubmit/auditPrSubmit'
component
:
'@/pages/member/memberPrSubmit/auditPrSubmit'
},
},
{
{
path
:
'/memberCenter/memberAbility/manage/memberPr'
,
path
:
'/memberCenter/memberAbility/manage/memberPr
1
'
,
name
:
'memberPr'
,
name
:
'memberPr
1
'
,
key
:
'memberPr'
,
key
:
'memberPr
1
'
,
component
:
'@/pages/member/memberPr/index'
component
:
'@/pages/member/memberPr
1
/index'
},
},
{
{
path
:
'/memberCenter/memberAbility/manage/auditPr'
,
path
:
'/memberCenter/memberAbility/manage/auditPr
1
'
,
name
:
'auditPr'
,
name
:
'auditPr
1
'
,
key
:
'auditPr'
,
key
:
'auditPr
1
'
,
hideInMenu
:
true
,
hideInMenu
:
true
,
component
:
'@/pages/member/memberPr/auditPr'
component
:
'@/pages/member/memberPr1/auditPr1'
},
{
path
:
'/memberCenter/memberAbility/manage/memberPr2'
,
name
:
'memberPr2'
,
key
:
'memberPr2'
,
component
:
'@/pages/member/memberPr2/index'
},
{
path
:
'/memberCenter/memberAbility/manage/auditPr2'
,
name
:
'auditPr2'
,
key
:
'auditPr2'
,
hideInMenu
:
true
,
component
:
'@/pages/member/memberPr2/auditPr2'
},
},
{
{
path
:
'/memberCenter/memberAbility/manage/memberPrConfirm'
,
path
:
'/memberCenter/memberAbility/manage/memberPrConfirm'
,
...
...
src/formSchema/effects/useAsyncInitSelect.ts
View file @
ff616e94
...
@@ -16,7 +16,6 @@ export const useAsyncInitSelect = (name: string[], service?: () => Promise<any>)
...
@@ -16,7 +16,6 @@ export const useAsyncInitSelect = (name: string[], service?: () => Promise<any>)
})
})
name
.
forEach
(
v
=>
linkage
.
loaded
(
v
))
name
.
forEach
(
v
=>
linkage
.
loaded
(
v
))
service
().
then
(
res
=>
{
service
().
then
(
res
=>
{
console
.
log
(
res
)
name
.
forEach
(
v
=>
{
name
.
forEach
(
v
=>
{
linkage
.
loaded
(
v
)
linkage
.
loaded
(
v
)
linkage
.
enum
(
v
,
res
[
v
])
linkage
.
enum
(
v
,
res
[
v
])
...
...
src/locales/zh-CN/menu.ts
View file @
ff616e94
...
@@ -52,8 +52,10 @@ export default {
...
@@ -52,8 +52,10 @@ export default {
'menu.memberAbility.memberManage.memberMaintain'
:
'会员维护'
,
'menu.memberAbility.memberManage.memberMaintain'
:
'会员维护'
,
'menu.memberAbility.memberManage.memberPrSubmit'
:
'待提交审核'
,
'menu.memberAbility.memberManage.memberPrSubmit'
:
'待提交审核'
,
'menu.memberAbility.memberManage.auditPrSubmit'
:
'待提交审核详情'
,
'menu.memberAbility.memberManage.auditPrSubmit'
:
'待提交审核详情'
,
'menu.memberAbility.memberManage.memberPr'
:
'待审核'
,
'menu.memberAbility.memberManage.memberPr1'
:
'待审核(一级)'
,
'menu.memberAbility.memberManage.auditPr'
:
'待审核详情'
,
'menu.memberAbility.memberManage.auditPr2'
:
'待审核详情(一级)'
,
'menu.memberAbility.memberManage.memberPr2'
:
'待审核(二级)'
,
'menu.memberAbility.memberManage.auditPr1'
:
'待审核详情(二级)'
,
'menu.memberAbility.memberManage.memberPrConfirm'
:
'待确认审核'
,
'menu.memberAbility.memberManage.memberPrConfirm'
:
'待确认审核'
,
'menu.memberAbility.memberManage.auditPrComfirm'
:
'待确认审核详情'
,
'menu.memberAbility.memberManage.auditPrComfirm'
:
'待确认审核详情'
,
'menu.memberAbility.memberManage.memberUpgradeRule'
:
'会员升级规则'
,
'menu.memberAbility.memberManage.memberUpgradeRule'
:
'会员升级规则'
,
...
...
src/pages/member/components/auditDetail.tsx
View file @
ff616e94
import
React
,
{
ReactNode
,
useRef
,
useState
}
from
'react'
;
import
React
,
{
ReactNode
,
useRef
,
useState
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
}
from
'umi'
;
import
{
StopOutlined
,
CheckSquareOutlined
}
from
'@ant-design/icons'
;
import
{
StopOutlined
,
CheckSquareOutlined
}
from
'@ant-design/icons'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
...
@@ -17,12 +17,14 @@ import {
...
@@ -17,12 +17,14 @@ import {
import
{
StandardTable
}
from
'god'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
style
from
'./index.less'
;
import
style
from
'./index.less'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
TabPane
}
=
Tabs
;
const
{
TabPane
}
=
Tabs
;
const
{
Step
}
=
Steps
;
const
{
Step
}
=
Steps
;
interface
ItemProps
{
interface
ItemProps
{
auditType
:
string
;
auditType
:
string
;
routeParams
:
any
;
}
}
const
data
=
[
const
data
=
[
...
@@ -38,9 +40,11 @@ const data = [
...
@@ -38,9 +40,11 @@ const data = [
];
];
const
auditDetail
:
React
.
FC
<
ItemProps
>
=
props
=>
{
const
auditDetail
:
React
.
FC
<
ItemProps
>
=
props
=>
{
const
{
auditType
,
routeParams
}
=
props
;
const
ref
=
useRef
({});
const
ref
=
useRef
({});
const
[
fActived
,
setfActived
]
=
useState
(
'1'
);
const
[
fActived
,
setfActived
]
=
useState
(
'1'
);
const
[
lActived
,
setlActived
]
=
useState
(
'1'
);
const
[
lActived
,
setlActived
]
=
useState
(
'1'
);
const
[
detailData
,
setDetailData
]
=
useState
<
any
>
({
const
[
detailData
,
setDetailData
]
=
useState
<
any
>
({
step
:
{
step
:
{
current
:
0
,
current
:
0
,
...
@@ -278,6 +282,16 @@ const auditDetail: React.FC<ItemProps> = props => {
...
@@ -278,6 +282,16 @@ const auditDetail: React.FC<ItemProps> = props => {
},
},
];
];
// 获取审核详情
useEffect
(()
=>
{
if
(
auditType
===
'1'
)
{
PublicApi
.
getMemberValidateCommitDetail
({
memberId
:
routeParams
.
memberId
,
validateId
:
routeParams
.
validateId
,
}).
then
(
res
=>
{});
}
},
[]);
// 模拟请求
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
src/pages/member/components/auditList.tsx
View file @
ff616e94
import
React
,
{
ReactNode
,
useState
,
useRef
}
from
'react'
;
import
React
,
{
ReactNode
,
useState
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
}
from
'umi'
;
import
{
Space
,
Card
,
Button
}
from
'antd'
;
import
{
Space
,
Card
,
Button
,
Tag
}
from
'antd'
;
import
{
ClockCircleOutlined
}
from
'@ant-design/icons'
;
import
{
ClockCircleOutlined
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
...
@@ -44,9 +44,9 @@ const auditList: React.FC<PageProps> = props => {
...
@@ -44,9 +44,9 @@ const auditList: React.FC<PageProps> = props => {
const
columns
:
ColumnType
<
any
>
[]
=
[
const
columns
:
ColumnType
<
any
>
[]
=
[
{
{
title
:
'ID'
,
title
:
'ID'
,
dataIndex
:
'
i
d'
,
dataIndex
:
'
memberI
d'
,
align
:
'center'
,
align
:
'center'
,
key
:
'
i
d'
,
key
:
'
memberI
d'
,
},
},
{
{
title
:
'会员名称'
,
title
:
'会员名称'
,
...
@@ -71,58 +71,30 @@ const auditList: React.FC<PageProps> = props => {
...
@@ -71,58 +71,30 @@ const auditList: React.FC<PageProps> = props => {
},
},
{
{
title
:
'会员类型'
,
title
:
'会员类型'
,
dataIndex
:
'
typ
e'
,
dataIndex
:
'
memberTypeNam
e'
,
align
:
'center'
,
align
:
'center'
,
key
:
'type'
,
key
:
'memberTypeName'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
<
span
>
{
text
}
</
span
>,
<>
{
record
.
type
===
1
?
'企业会员'
:
'渠道企业会员'
}
</>
),
},
},
{
{
title
:
'会员角色'
,
title
:
'会员角色'
,
dataIndex
:
'role'
,
dataIndex
:
'role
Name
'
,
align
:
'center'
,
align
:
'center'
,
key
:
'role'
,
key
:
'roleName'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
render
:
(
text
:
any
,
record
:
any
)
=>
<
span
>
{
text
}
</
span
>,
let
component
:
ReactNode
=
null
;
component
=
(
<
div
>
{
record
.
role
===
1
?
'供应商'
:
record
.
role
===
2
?
'加工企业'
:
record
.
role
===
3
?
'物流服务商'
:
record
.
role
===
4
?
'金融服务商'
:
record
.
role
===
5
?
'采购商'
:
'渠道供应商'
}
</
div
>
);
return
component
;
},
},
},
{
{
title
:
'申请来源/时间'
,
title
:
'申请来源/时间'
,
dataIndex
:
'
apply
Time'
,
dataIndex
:
'
register
Time'
,
align
:
'center'
,
align
:
'center'
,
key
:
'
apply
Time'
,
key
:
'
register
Time'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
let
component
:
ReactNode
=
null
;
component
=
(
component
=
(
<>
<>
<
div
>
{
record
.
sourceName
}
</
div
>
<
div
>
<
div
>
{
record
.
source
===
1
<
ClockCircleOutlined
/>
{
text
}
?
'平台录入'
:
record
.
source
===
2
?
'WEB企业商城申请'
:
record
.
source
===
3
?
'商户录入'
:
'渠道录入'
}
</
div
>
<
div
>
<
ClockCircleOutlined
/>
{
record
.
applyTime
}
</
div
>
</
div
>
</>
</>
);
);
...
@@ -131,101 +103,32 @@ const auditList: React.FC<PageProps> = props => {
...
@@ -131,101 +103,32 @@ const auditList: React.FC<PageProps> = props => {
},
},
{
{
title
:
'会员状态'
,
title
:
'会员状态'
,
dataIndex
:
'status'
,
dataIndex
:
'status
Name
'
,
align
:
'center'
,
align
:
'center'
,
key
:
'status'
,
key
:
'statusName'
,
filters
:
[
filters
:
[],
{
text
:
'123'
,
value
:
'123'
},
render
:
(
text
:
any
,
record
:
any
)
=>
(
{
text
:
'456'
,
value
:
'456'
},
<
Tag
color=
{
record
.
status
===
1
?
'#41CC9E'
:
'#EF6260'
}
>
{
text
}
</
Tag
>
],
),
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
component
=
(
<
div
style=
{
record
.
status
===
1
?
{
color
:
'#00B37A'
}
:
{
color
:
'#42526E'
}
}
>
{
record
.
outSideStatus
===
1
?
'正常'
:
'冻结'
}
</
div
>
);
return
component
;
},
},
},
{
{
title
:
'外部状态'
,
title
:
'外部状态'
,
dataIndex
:
'out
SideStatus
'
,
dataIndex
:
'out
erStatusName
'
,
align
:
'center'
,
align
:
'center'
,
key
:
'outSideStatus'
,
key
:
'outerStatusName'
,
filters
:
[
filters
:
[],
{
text
:
'123'
,
value
:
'123'
},
render
:
(
text
:
any
,
record
:
any
)
=>
<
span
>
{
text
}
</
span
>,
{
text
:
'456'
,
value
:
'456'
},
],
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
component
=
(
<
div
style=
{
record
.
outSideStatus
===
1
?
{
color
:
'#FF991F'
}
:
record
.
outSideStatus
===
2
?
{
color
:
'#00B37A'
}
:
{
color
:
'#E63F3B'
}
}
>
{
record
.
outSideStatus
===
1
?
'待审核'
:
record
.
outSideStatus
===
2
?
'审核通过'
:
'审核不通过'
}
</
div
>
);
return
component
;
},
},
},
{
{
title
:
'内部状态'
,
title
:
'内部状态'
,
dataIndex
:
'in
SideStatus
'
,
dataIndex
:
'in
nerStatusName
'
,
align
:
'center'
,
align
:
'center'
,
key
:
'in
SideStatus
'
,
key
:
'in
nerStatusName
'
,
filters
:
[
filters
:
[
{
text
:
'123'
,
value
:
'123'
},
{
text
:
'123'
,
value
:
'123'
},
{
text
:
'456'
,
value
:
'456'
},
{
text
:
'456'
,
value
:
'456'
},
],
],
render
:
(
text
:
any
,
record
:
any
)
=>
{
render
:
(
text
:
any
,
record
:
any
)
=>
<
span
>
{
text
}
</
span
>,
let
component
:
ReactNode
=
null
;
component
=
(
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
}
}
>
<
span
className=
{
record
.
inSideStatus
===
1
?
'commonStatusModify'
:
record
.
inSideStatus
===
2
?
'commonStatusInvalid'
:
record
.
inSideStatus
===
3
?
'commonStatusValid'
:
'commonStatusNoPass'
}
>
<
span
className=
"commonStatus"
></
span
>
</
span
>
{
record
.
inSideStatus
===
1
?
'待提交'
:
record
.
inSideStatus
===
2
?
'待审核'
:
record
.
inSideStatus
===
3
?
'审核通过'
:
'审核不通过'
}
</
div
>
);
return
component
;
},
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
...
@@ -274,16 +177,20 @@ const auditList: React.FC<PageProps> = props => {
...
@@ -274,16 +177,20 @@ const auditList: React.FC<PageProps> = props => {
},
},
};
};
const
handleSee
=
(
record
:
any
)
=>
{};
const
handleChange
=
record
=>
{
const
handleChange
=
(
record
:
object
)
=>
{
let
path
=
let
path
=
pageType
===
'1'
pageType
===
'1'
?
'auditPrSubmit'
?
'auditPrSubmit'
:
pageType
===
'2'
:
pageType
===
'2'
?
'auditPr'
?
'auditPr'
:
'auditPrComfirm'
;
:
'auditPrComfirm'
;
history
.
push
(
`/memberCenter/memberAbility/manage/
${
path
}
`
);
history
.
push
({
pathname
:
`/memberCenter/memberAbility/manage/
${
path
}
`
,
query
:
{
memberId
:
record
.
memberId
,
validateId
:
record
.
validateId
,
},
});
};
};
const
controllerBtns
=
(
const
controllerBtns
=
(
...
@@ -301,6 +208,7 @@ const auditList: React.FC<PageProps> = props => {
...
@@ -301,6 +208,7 @@ const auditList: React.FC<PageProps> = props => {
return
(
return
(
<
Card
>
<
Card
>
<
StandardTable
<
StandardTable
tableProps=
{
{
rowKey
:
'memberId'
}
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
...
@@ -316,7 +224,7 @@ const auditList: React.FC<PageProps> = props => {
...
@@ -316,7 +224,7 @@ const auditList: React.FC<PageProps> = props => {
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
actions
,
actions
,
'
search
'
,
'
name
'
,
FORM_FILTER_PATH
,
FORM_FILTER_PATH
,
);
);
useAsyncInitSelect
(
useAsyncInitSelect
(
...
...
src/pages/member/components/schema/index.tsx
View file @
ff616e94
...
@@ -22,7 +22,7 @@ export const auditSchema: ISchema = {
...
@@ -22,7 +22,7 @@ export const auditSchema: ISchema = {
children
:
'{{controllerBtns}}'
,
children
:
'{{controllerBtns}}'
,
},
},
},
},
search
:
{
name
:
{
type
:
'string'
,
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component'
:
'Search'
,
'x-mega-props'
:
{},
'x-mega-props'
:
{},
...
...
src/pages/member/memberImport/addMember.tsx
View file @
ff616e94
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
}
from
'umi'
;
import
{
Tabs
,
Badge
,
Button
,
Card
,
Row
,
Col
,
message
,
Upload
}
from
'antd'
;
import
{
Badge
,
Button
,
Card
,
message
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
initDetailSchema
}
from
'./schema'
;
import
{
initDetailSchema
}
from
'./schema'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
TabPane
}
=
Tabs
;
const
formActions
=
createFormActions
();
const
addSchemaAction
=
createFormActions
();
const
addMember
:
React
.
FC
<
any
>
=
props
=>
{
const
addMember
:
React
.
FC
<
any
>
=
props
=>
{
const
ref
=
useRef
<
any
>
({});
const
ref
=
useRef
<
any
>
({});
/* 会员类型、会员角色、会员等级、注册手机号选项 */
const
[
memberItems
,
setMemberItems
]
=
useState
<
any
>
({});
const
[
memberItems
,
setMemberItems
]
=
useState
<
any
>
({});
const
data
=
[
const
data
=
[
...
@@ -75,6 +76,12 @@ const addMember: React.FC<any> = props => {
...
@@ -75,6 +76,12 @@ const addMember: React.FC<any> = props => {
},
},
];
];
useEffect
(()
=>
{
PublicApi
.
getMemberMaintenanceAddpageitems
().
then
(
res
=>
{
setMemberItems
(
res
.
data
);
});
},
[]);
// 模拟请求
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -93,22 +100,25 @@ const addMember: React.FC<any> = props => {
...
@@ -93,22 +100,25 @@ const addMember: React.FC<any> = props => {
console
.
log
(
values
);
console
.
log
(
values
);
};
};
// 处理数据
// 会员类型、会员角色、会员等级选项
const
processData
=
(
data
:
any
)
=>
{
const
fetchSelectOptions
=
async
()
=>
{
for
(
let
elem
of
data
)
{
const
{
data
}
=
await
PublicApi
.
getMemberMaintenanceAddpageitems
();
elem
.
label
=
elem
.
text
;
return
{
elem
.
value
=
elem
.
id
;
memberTypeId
:
fetchSomeOptions
(
data
.
memberTypes
),
}
roleId
:
fetchSomeOptions
(
data
.
memberRoles
),
level
:
fetchSomeOptions
(
data
.
memberLevels
),
};
};
};
useEffect
(()
=>
{
// 获取手机code
PublicApi
.
getMemberMaintenanceAddpageitems
().
then
(
res
=>
{
const
fetchTelCode
=
async
()
=>
{
processData
(
res
.
data
.
memberLevels
);
const
{
data
}
=
await
PublicApi
.
getManageGetTelCode
();
processData
(
res
.
data
.
memberRoles
);
return
data
;
processData
(
res
.
data
.
memberTypes
);
};
setMemberItems
(
res
.
data
);
});
const
fetchSomeOptions
=
data
=>
{
},
[
'memberItems'
]);
return
data
.
map
(
v
=>
({
label
:
v
.
text
,
value
:
v
.
id
}));
};
const
beforeUpload
=
(
file
:
any
)
=>
{
const
beforeUpload
=
(
file
:
any
)
=>
{
const
isJpgOrPng
=
const
isJpgOrPng
=
...
@@ -141,7 +151,7 @@ const addMember: React.FC<any> = props => {
...
@@ -141,7 +151,7 @@ const addMember: React.FC<any> = props => {
key=
"1"
key=
"1"
type=
"primary"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
icon=
{
<
SaveOutlined
/>
}
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
onClick=
{
()
=>
formActions
.
submit
()
}
>
>
保存
保存
</
Button
>,
</
Button
>,
...
@@ -150,7 +160,20 @@ const addMember: React.FC<any> = props => {
...
@@ -150,7 +160,20 @@ const addMember: React.FC<any> = props => {
<
Card
>
<
Card
>
<
NiceForm
<
NiceForm
onSubmit=
{
handleSubmit
}
onSubmit=
{
handleSubmit
}
actions=
{
addSchemaAction
}
actions=
{
formActions
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
[
'memberTypeId'
,
'roleId'
,
'level'
],
fetchSelectOptions
,
);
useAsyncSelect
(
'telCode'
,
fetchTelCode
);
}
}
schema=
{
initDetailSchema
(
memberItems
)
}
schema=
{
initDetailSchema
(
memberItems
)
}
/>
/>
</
Card
>
</
Card
>
...
...
src/pages/member/memberImport/index.tsx
View file @
ff616e94
...
@@ -194,7 +194,7 @@ const memberImport: React.FC<{}> = () => {
...
@@ -194,7 +194,7 @@ const memberImport: React.FC<{}> = () => {
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
actions
,
actions
,
'
search
'
,
'
name
'
,
FORM_FILTER_PATH
,
FORM_FILTER_PATH
,
);
);
useAsyncInitSelect
(
useAsyncInitSelect
(
...
...
src/pages/member/memberImport/schema/index.tsx
View file @
ff616e94
...
@@ -23,7 +23,7 @@ export const importSchema: ISchema = {
...
@@ -23,7 +23,7 @@ export const importSchema: ISchema = {
children
:
'{{controllerBtns}}'
,
children
:
'{{controllerBtns}}'
,
},
},
},
},
search
:
{
name
:
{
type
:
'string'
,
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component'
:
'Search'
,
'x-mega-props'
:
{},
'x-mega-props'
:
{},
...
@@ -122,6 +122,8 @@ const getCompnentValue = (elements: any) => {
...
@@ -122,6 +122,8 @@ const getCompnentValue = (elements: any) => {
listType
:
'card'
,
listType
:
'card'
,
action
:
'/api/file/file/upload'
,
action
:
'/api/file/file/upload'
,
data
:
{
fileType
:
2
},
data
:
{
fileType
:
2
},
fileList
:
[],
onChange
:
file
=>
console
.
log
(
file
),
};
};
components
[
item
.
fieldName
]
=
{
components
[
item
.
fieldName
]
=
{
type
:
item
.
fieldType
,
type
:
item
.
fieldType
,
...
@@ -152,54 +154,69 @@ export const initDetailSchema = (props: any) => {
...
@@ -152,54 +154,69 @@ export const initDetailSchema = (props: any) => {
labelAlign
:
'left'
,
labelAlign
:
'left'
,
},
},
properties
:
{
properties
:
{
memberType
s
:
{
memberType
Id
:
{
type
:
'string'
,
type
:
'string'
,
required
:
true
,
required
:
true
,
title
:
'会员类型'
,
title
:
'会员类型'
,
enum
:
props
.
memberTypes
,
enum
:
[]
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
},
},
},
},
memberRoles
:
{
roleId
:
{
type
:
'string'
,
type
:
'string'
,
required
:
true
,
required
:
true
,
title
:
'会员角色'
,
title
:
'会员角色'
,
enum
:
props
.
memberRoles
,
enum
:
[]
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
},
},
},
},
memberLevels
:
{
level
:
{
type
:
'string'
,
type
:
'string'
,
required
:
true
,
required
:
true
,
title
:
'会员等级'
,
title
:
'会员等级'
,
enum
:
[{
label
:
'1'
,
value
:
1
}],
enum
:
[],
// enum: props.memberLevels,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
},
},
},
},
memberPhone
:
{
MEGA_LAYOUT1_1
:
{
type
:
'object'
,
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
label
:
'注册手机'
,
wrapperCol
:
24
,
required
:
true
,
required
:
true
,
title
:
'注册手机'
,
},
'x-component'
:
'CustomRegistryPhone'
,
properties
:
{
MEGA_LAYOUT1_1_1
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
'x-component-props'
:
{
dataSource
:
[
grid
:
true
,
{
full
:
true
,
text
:
'+86'
,
},
id
:
1
,
properties
:
{
url
:
require
(
'../../../../../public/static/imgs/level1@2x.png'
),
telCode
:
{
type
:
'string'
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
required
:
true
,
},
tel
:
{
type
:
'string'
,
'x-mega-props'
:
{
span
:
2
},
'x-component-props'
:
{
placeholder
:
'请输入你的手机号码'
,
maxLength
:
11
,
},
required
:
true
,
},
},
},
{
text
:
'+126'
,
id
:
2
,
url
:
require
(
'../../../../../public/static/imgs/level2@2x.png'
),
},
},
],
selectPh
:
'请选择'
,
inputPh
:
'请输入你的手机号码'
,
},
},
},
},
memberEmail
:
{
memberEmail
:
{
...
...
src/pages/member/memberMaintain/index.tsx
View file @
ff616e94
...
@@ -276,7 +276,7 @@ const memberMaintain: React.FC<[]> = () => {
...
@@ -276,7 +276,7 @@ const memberMaintain: React.FC<[]> = () => {
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
actions
,
actions
,
'
search
'
,
'
name
'
,
FORM_FILTER_PATH
,
FORM_FILTER_PATH
,
);
);
useAsyncInitSelect
(
useAsyncInitSelect
(
...
...
src/pages/member/memberMaintain/schema/index.tsx
View file @
ff616e94
...
@@ -8,7 +8,7 @@ export const maintianSchema: ISchema = {
...
@@ -8,7 +8,7 @@ export const maintianSchema: ISchema = {
type
:
'object'
,
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component'
:
'mega-layout'
,
properties
:
{
properties
:
{
search
:
{
name
:
{
type
:
'string'
,
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
'x-component-props'
:
{
...
...
src/pages/member/memberPr
/auditPr
.tsx
→
src/pages/member/memberPr
1/auditPr1
.tsx
View file @
ff616e94
import
React
from
'react'
;
import
React
from
'react'
;
import
AuditDetail
from
'../components/auditDetail'
;
import
AuditDetail
from
'../components/auditDetail'
;
const
auditPr
=
()
=>
{
const
auditPr
=
(
props
:
any
)
=>
{
return
<
AuditDetail
auditType=
"2"
/>;
return
<
AuditDetail
auditType=
"2"
routeParams=
{
props
.
location
.
query
}
/>;
};
};
export
default
auditPr
;
export
default
auditPr
;
src/pages/member/memberPr/index.less
→
src/pages/member/memberPr
1
/index.less
View file @
ff616e94
File moved
src/pages/member/memberPr/index.tsx
→
src/pages/member/memberPr
1
/index.tsx
View file @
ff616e94
File moved
src/pages/member/memberPr2/auditPr2.tsx
0 → 100644
View file @
ff616e94
import
React
from
'react'
;
import
AuditDetail
from
'../components/auditDetail'
;
const
auditPr
=
(
props
:
any
)
=>
{
return
<
AuditDetail
auditType=
"2"
routeParams=
{
props
.
location
.
query
}
/>;
};
export
default
auditPr
;
src/pages/member/memberPr2/index.less
0 → 100644
View file @
ff616e94
src/pages/member/memberPr2/index.tsx
0 → 100644
View file @
ff616e94
import
React
from
'react'
;
import
AuditList
from
'../components/auditList'
;
const
memberPr
=
()
=>
{
return
<
AuditList
pageType=
"3"
/>;
};
export
default
memberPr
;
src/pages/member/memberPrConfirm/auditPrComfirm.tsx
View file @
ff616e94
import
React
from
'react'
;
import
React
from
'react'
;
import
AuditDetail
from
'../components/auditDetail'
;
import
AuditDetail
from
'../components/auditDetail'
;
const
auditPrConfirm
=
()
=>
{
const
auditPrConfirm
=
props
=>
{
return
<
AuditDetail
auditType=
"3"
/>;
return
<
AuditDetail
auditType=
"3"
routeParams=
{
props
.
location
.
query
}
/>;
};
};
export
default
auditPrConfirm
;
export
default
auditPrConfirm
;
src/pages/member/memberPrSubmit/auditPrSubmit.tsx
View file @
ff616e94
import
React
from
'react'
;
import
React
from
'react'
;
import
AuditDetail
from
'../components/auditDetail'
;
import
AuditDetail
from
'../components/auditDetail'
;
const
auditPrSubmit
=
()
=>
{
const
auditPrSubmit
=
props
=>
{
return
<
AuditDetail
auditType=
"1"
/>;
return
<
AuditDetail
auditType=
"1"
routeParams=
{
props
.
location
.
query
}
/>;
};
};
export
default
auditPrSubmit
;
export
default
auditPrSubmit
;
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