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
f4f9d9c0
Commit
f4f9d9c0
authored
Aug 20, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug
parent
bcd90b9f
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
244 additions
and
212 deletions
+244
-212
memberRoute.ts
config/routes/memberRoute.ts
+1
-1
useAsyncInitSelect.ts
src/formSchema/effects/useAsyncInitSelect.ts
+28
-17
usePageStatus.ts
src/hooks/usePageStatus.ts
+4
-2
BasicLayout.tsx
src/layouts/BasicLayout.tsx
+1
-0
authDetail.tsx
src/pages/member/components/memberDetail/authDetail.tsx
+1
-1
index.tsx
src/pages/member/components/memberDetail/index.tsx
+3
-3
index.tsx
src/pages/member/memberImport/index.tsx
+1
-1
index.tsx
src/pages/member/memberImport/schema/index.tsx
+4
-4
addEquity.less
src/pages/member/memberLevel/addEquity.less
+168
-0
addEquity.tsx
src/pages/member/memberLevel/addEquity.tsx
+30
-24
index.less
src/pages/member/memberLevel/index.less
+0
-156
index.tsx
src/pages/member/memberLevel/index.tsx
+2
-2
index.tsx
src/pages/member/memberMaintain/index.tsx
+1
-1
No files found.
config/routes/memberRoute.ts
View file @
f4f9d9c0
...
...
@@ -120,7 +120,7 @@ const MemberRoute = {
key
:
'addEquity'
,
hideInMenu
:
true
,
component
:
'@/pages/member/memberLevel/addEquity'
,
}
}
,
]
}
]
...
...
src/formSchema/effects/useAsyncInitSelect.ts
View file @
f4f9d9c0
...
...
@@ -4,30 +4,40 @@ const { onFormInit$ } = FormEffectHooks
/**
* @description 处理异步请求的下拉选择
* @param name 待处理的表单路径
* @param
service 触发的异步函数, 需返回一个{label: any, value: any
}形式的数组
* @param
{sting[]}
name 待处理的表单路径
* @param
{func} service 触发的异步函数, 需返回一个 { label: any, value: any
}形式的数组
*/
export
const
useAsyncInitSelect
=
(
name
:
string
[],
service
?:
()
=>
Promise
<
any
>
)
=>
{
const
{
dispatch
,
setFieldState
}
=
createFormActions
()
const
linkage
=
useLinkageUtils
()
const
{
dispatch
,
setFieldState
}
=
createFormActions
();
const
linkage
=
useLinkageUtils
();
onFormInit$
().
subscribe
(()
=>
{
setFieldState
(
name
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.x-props.hasFeedback'
,
true
)
})
name
.
forEach
(
v
=>
linkage
.
loaded
(
v
))
const
nameStr
:
string
=
name
.
toString
();
const
formPath
:
string
=
`*(
${
nameStr
}
)`
;
setFieldState
(
formPath
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.x-props.hasFeedback'
,
true
);
});
linkage
.
loading
(
formPath
);
service
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
linkage
.
loaded
(
formPath
);
name
.
forEach
(
v
=>
{
linkage
.
loaded
(
v
)
linkage
.
enum
(
v
,
res
[
v
])
})
//请求结束可以dispatch一个自定义事件收尾,方便后续针对该事件做联动
linkage
.
enum
(
v
,
res
[
v
]);
});
// 请求结束可以dispatch一个自定义事件收尾,方便后续针对该事件做联动
dispatch
(
'requestAsyncSelect'
,
{
name
,
payload
:
res
})
payload
:
res
,
});
return
;
}
linkage
.
loaded
(
formPath
);
}).
catch
(
err
=>
{
// linkage.loaded(name)
// linkage.enum(name, [])
})
linkage
.
loaded
(
formPath
);
});
})
}
\ No newline at end of file
src/hooks/usePageStatus.ts
View file @
f4f9d9c0
...
...
@@ -8,7 +8,7 @@ export enum PageStatus {
}
export
const
usePageStatus
=
()
=>
{
const
{
preview
,
id
=
''
}
=
history
.
location
.
query
const
{
preview
,
id
=
''
,
...
rest
}
=
history
.
location
.
query
// 默认预览状态
let
pageStatus
=
PageStatus
.
PREVIEW
if
(
preview
===
'1'
)
{
...
...
@@ -24,6 +24,7 @@ export const usePageStatus = () => {
return
{
pageStatus
,
id
,
preview
preview
,
...
rest
,
}
}
\ No newline at end of file
src/layouts/BasicLayout.tsx
View file @
f4f9d9c0
...
...
@@ -112,6 +112,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
{
titleDom
}
</
Link
>
)
}
collapsed=
{
collapsed
}
onCollapse=
{
handleMenuCollapse
}
breadcrumbRender=
{
(
routers
=
[])
=>
[
...
...
src/pages/member/components/memberDetail/authDetail.tsx
View file @
f4f9d9c0
...
...
@@ -87,7 +87,7 @@ const AuthDetail: React.FC<PageProps> = (props: any) => {
customKey=
"id"
checkable
actions=
{
treeActions
}
treeData=
{
treeData
}
treeData=
{
[]
}
handleSelect=
{
handleSelect
}
disabled=
{
pageStatus
===
PageStatus
.
PREVIEW
}
/>
...
...
src/pages/member/components/memberDetail/index.tsx
View file @
f4f9d9c0
...
...
@@ -17,15 +17,15 @@ const { TabPane } = Tabs;
const
{
Step
}
=
Steps
;
const
MemberDetail
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
pageStatus
,
id
}
=
usePageStatus
();
const
{
pageStatus
,
id
,
validateId
}
=
usePageStatus
();
const
[
hActived
,
setHActived
]
=
useState
(
'3'
);
const
[
detailData
,
setDetailData
]
=
useState
<
any
>
({});
useEffect
(()
=>
{
const
fetchDetailData
=
async
()
=>
{
const
{
data
}
=
await
PublicApi
.
getMemberValidateCommitDetail
({
memberId
:
'2'
,
validateId
:
'63'
,
memberId
:
id
,
validateId
:
validateId
,
});
setDetailData
(
data
);
};
...
...
src/pages/member/memberImport/index.tsx
View file @
f4f9d9c0
...
...
@@ -57,7 +57,7 @@ const memberMaintain: React.FC<[]> = () => {
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/memberCenter/memberAbility/manage/importDetail?id=${record.
i
d}&preview=1`
}
url=
{
`/memberCenter/memberAbility/manage/importDetail?id=${record.
memberId}&validateId=${record.validateI
d}&preview=1`
}
>
{
text
}
</
EyePreview
>
...
...
src/pages/member/memberImport/schema/index.tsx
View file @
f4f9d9c0
...
...
@@ -46,25 +46,25 @@ export const importSchema: ISchema = {
properties
:
{
memberType
:
{
type
:
'string'
,
default
:
0
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{},
},
roleId
:
{
type
:
'string'
,
default
:
0
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{},
},
level
:
{
type
:
'string'
,
default
:
0
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{},
},
source
:
{
type
:
'string'
,
default
:
0
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{},
},
...
...
src/pages/member/memberLevel/addEquity.less
0 → 100644
View file @
f4f9d9c0
.headerTop {
display: flex;
align-items: center;
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
&-icon {
width: 48px;
height: 48px;
line-height: 48px;
border-radius: 4px;
border: 1px solid #DFE1E6;
color: #fff;
text-align: center;
background-color: #8777D9;
}
&-level {
color: #172B4D;
margin: 0 8px 0 12px;
}
&-identity {
width: 72px;
height: 24px;
line-height: 24px;
background-color: #FFEBE6;
border-radius: 4px;
color: #E63F3B;
font-size: 14px;
font-weight: 400;
text-align: center;
}
}
.headerMain {
display: flex;
&-left {
flex: 6;
display: flex;
flex-wrap: wrap;
padding-left: 90px;
&-option {
display: flex;
width: calc(100% / 3);
margin-bottom: 17px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6B778C;
padding-right: 20px;
&:nth-of-type(n + 4) {
margin: 0;
}
div {
flex: 1;
&:nth-last-of-type(1) {
flex: 2;
}
}
}
}
&-right {
flex: 1;
text-align: right;
.saveBtn {
color: #fff;
background: @main-color
}
}
}
.extra {
margin-bottom: 48px;
&-main {
display: flex;
&-content {
position: relative;
flex: 1;
height: 104px;
&:nth-last-of-type(1) {
flex: 2.5;
}
}
.left {
display: flex;
justify-content: center;
align-items: center;
.icon {
position: absolute;
left: 0;
top: 0;
width: 72px;
height: 24px;
color: #fff;
background-color: #42526E;
border-radius: 4px 0px 4px 0px;
text-align: center;
}
.input {
display: flex;
justify-content: center;
&-main {
position: relative;
width: 128px;
height: 38px;
padding-bottom: 8px;
&::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 1px;
background-color: #DFE1E6;
}
// :global {
// .ant-input {
// border: none;
// box-shadow: none;
// background-color: transparent;
// }
// }
&-com {
width: 100%;
height: 100%;
border: 0;
outline: none;
background-color: rgba(0, 0, 0, 0);
font-size: 32px;
font-weight: 500;
color: #172B4D;
&:focus {
border: none;
box-shadow: none;
background-color: transparent;
}
}
}
}
}
.right {
padding: 27px 40px;
}
}
}
src/pages/member/memberLevel/addEquity.tsx
View file @
f4f9d9c0
import
React
,
{
ReactNode
,
useState
,
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
{
Button
,
Popconfirm
,
Card
,
Input
,
Slider
}
from
'antd'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
classNames
from
'classnames'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PlayCircleOutlined
,
ContainerOutlined
}
from
'@ant-design/icons'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
'./index.less'
import
styles
from
'./addEquity.less'
const
data
=
[
{
...
...
@@ -143,69 +144,74 @@ const addEquity: React.FC<[]> = () => {
onBack=
{
()
=>
window
.
history
.
back
()
}
title=
{
<>
<
div
className=
'headerTop'
>
<
div
className=
'headerTop-icon'
>
钻
</
div
>
<
div
className=
'headerTop-level'
>
钻石会员
</
div
>
<
div
className=
'headerTop-identity'
>
商户会员
</
div
>
<
div
className=
{
styles
.
headerTop
}
>
<
div
className=
{
styles
[
'headerTop-icon'
]
}
>
钻
</
div
>
<
div
className=
{
styles
[
'headerTop-level'
]
}
>
钻石会员
</
div
>
<
div
className=
{
styles
[
'headerTop-identity'
]
}
>
商户会员
</
div
>
</
div
>
</>
}
content=
{
<
div
className=
'headerMain'
>
<
div
className=
'headerMain-left'
>
<
div
className=
'headerMain-left-option'
>
<
div
className=
{
styles
.
headerMain
}
>
<
div
className=
{
styles
[
'headerMain-left'
]
}
>
<
div
className=
{
styles
[
'headerMain-left-option'
]
}
>
<
div
>
会员等级:
</
div
>
<
div
>
1
</
div
>
</
div
>
<
div
className=
'headerMain-left-option'
>
<
div
className=
{
styles
[
'headerMain-left-option'
]
}
>
<
div
>
升级分值标签:
</
div
>
<
div
>
交易分
</
div
>
</
div
>
<
div
className=
'headerMain-left-option'
>
<
div
className=
{
styles
[
'headerMain-left-option'
]
}
>
<
div
>
角色类型:
</
div
>
<
div
>
服务消费
</
div
>
</
div
>
<
div
className=
'headerMain-left-option'
>
<
div
className=
{
styles
[
'headerMain-left-option'
]
}
>
<
div
>
会员等级说明:
</
div
>
<
div
>
商户所属钻石会员
</
div
>
</
div
>
<
div
className=
'headerMain-left-option'
>
<
div
className=
{
styles
[
'headerMain-left-option'
]
}
>
<
div
>
会员角色名称:
</
div
>
<
div
>
采购商
</
div
>
</
div
>
<
div
className=
'headerMain-left-option'
>
<
div
className=
{
styles
[
'headerMain-left-option'
]
}
>
<
div
>
会员类型:
</
div
>
<
div
>
企业会员
</
div
>
</
div
>
</
div
>
<
div
className=
'headerMain-right'
>
<
Button
className=
'saveBtn'
icon=
{
<
ContainerOutlined
/>
}
>
保存
</
Button
>
<
div
className=
{
styles
[
'headerMain-right'
]
}
>
<
Button
className=
{
styles
.
saveBtn
}
icon=
{
<
ContainerOutlined
/>
}
>
保存
</
Button
>
</
div
>
</
div
>
}
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
pagination
:
false
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<>
<
div
className=
'extra'
>
<
div
className=
{
styles
.
extra
}
>
<
h3
>
升级阀值
</
h3
>
<
div
className=
'extra-main'
>
<
div
className=
'extra-main-content left'
>
<
div
className=
'icon'
>
当前阀值
</
div
>
<
div
className=
'input'
>
<
div
className=
'input-main'
>
<
Input
className=
'input-main-com'
<
div
className=
{
styles
[
'extra-main'
]
}
>
<
div
className=
{
classNames
(
styles
[
'extra-main-content'
],
styles
.
left
)
}
>
<
div
className=
{
styles
.
icon
}
>
当前阀值
</
div
>
<
div
className=
{
styles
.
input
}
>
<
div
className=
{
styles
[
'input-main'
]
}
>
<
Input
className=
{
styles
[
'input-main-com'
]
}
value=
{
thresholdValue
}
onChange=
{
(
e
:
any
)
=>
{
e
.
persist
();
setThresholdValue
(
e
.
target
.
value
)
}
}
/>
</
div
>
</
div
>
</
div
>
<
div
className=
'extra-main-content right'
>
<
div
className=
{
classNames
(
styles
[
'extra-main-content'
],
styles
.
right
)
}
>
<
Slider
marks=
{
marks
}
max=
{
50000
}
...
...
src/pages/member/memberLevel/index.less
View file @
f4f9d9c0
...
...
@@ -7,51 +7,6 @@
margin-left: 16px;
}
.headerMain {
display: flex;
&-left {
flex : 6;
display : flex;
flex-wrap : wrap;
padding-left: 90px;
&-option {
display : flex;
width : calc(100% / 3);
margin-bottom: 17px;
font-size : 14px;
font-family : PingFangSC-Regular, PingFang SC;
font-weight : 400;
color : #6B778C;
padding-right: 20px;
&:nth-of-type(n + 4) {
margin: 0;
}
div {
flex: 1;
&:nth-last-of-type(1) {
flex: 2;
}
}
}
}
&-right {
flex : 1;
text-align: right;
.saveBtn {
color : #fff;
background: @main-color
}
}
}
.nameCellTitle {
color : @main-color;
cursor: pointer;
...
...
@@ -85,116 +40,7 @@
background-size: 24px 20px;
}
.headerTop {
display : flex;
align-items: center;
font-size : 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
&-icon {
width : 48px;
height : 48px;
line-height : 48px;
border-radius : 4px;
border : 1px solid #DFE1E6;
color : #fff;
text-align : center;
background-color: #8777D9;
}
&-level {
color : #172B4D;
margin: 0 8px 0 12px;
}
&-identity {
width : 72px;
height : 24px;
line-height : 24px;
background-color: #FFEBE6;
border-radius : 4px;
color : #E63F3B;
font-size : 14px;
font-weight : 400;
text-align : center;
}
}
h3 {
margin-bottom: 20px;
}
\ No newline at end of file
.extra {
margin-bottom: 48px;
&-main {
display: flex;
&-content {
position: relative;
flex : 1;
height : 104px;
&:nth-last-of-type(1) {
flex: 2.5;
}
}
.left {
display : flex;
justify-content: center;
align-items : center;
.icon {
position : absolute;
left : 0;
top : 0;
width : 72px;
height : 24px;
color : #fff;
background-color: #42526E;
border-radius : 4px 0px 4px 0px;
text-align : center;
}
.input {
display : flex;
justify-content: center;
&-main {
position : relative;
width : 128px;
height : 38px;
padding-bottom: 8px;
&::after {
content : '';
position : absolute;
left : 0;
bottom : 0;
width : 100%;
height : 1px;
background-color: #DFE1E6;
}
&-com {
width : 100%;
height : 100%;
border : 0;
outline : none;
background-color: rgba(0, 0, 0, 0);
font-size : 32px;
font-family : PingFangSC-Medium, PingFang SC;
font-weight : 500;
color : #172B4D;
}
}
}
}
.right {
padding: 27px 40px;
}
}
}
\ No newline at end of file
src/pages/member/memberLevel/index.tsx
View file @
f4f9d9c0
...
...
@@ -46,7 +46,7 @@ const MemberLevel: React.FC<[]> = () => {
key
:
'levelTag'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/memberCenter/memberAbility/manage/addEquity?id=${record.id}&preview=1`
}
url=
{
`/memberCenter/memberAbility/manage/
level/
addEquity?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
...
...
@@ -109,7 +109,7 @@ const MemberLevel: React.FC<[]> = () => {
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/memberAbility/manage/addEquity?id=${record.id}`
)
history
.
push
(
`/memberCenter/memberAbility/manage/
level/
addEquity?id=${record.id}`
)
}
>
设置
...
...
src/pages/member/memberMaintain/index.tsx
View file @
f4f9d9c0
...
...
@@ -57,7 +57,7 @@ const memberMaintain: React.FC<[]> = () => {
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/memberCenter/memberAbility/manage/maintainDetail?id=${record.i
d}&preview=1`
}
url=
{
`/memberCenter/memberAbility/manage/importDetail?id=${record.memberId}&validateId=${record.validateI
d}&preview=1`
}
>
{
text
}
</
EyePreview
>
...
...
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