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
黄庭坚
jinfa-platform
Commits
77c93b5c
Commit
77c93b5c
authored
Sep 09, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fibux、对接批量审核接口
parent
86121090
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
166 additions
and
107 deletions
+166
-107
CustomAddArray.tsx
src/components/NiceForm/components/CustomAddArray.tsx
+14
-9
reset.less
src/global/styles/reset.less
+5
-0
addMember.tsx
src/pages/member/memberImport/addMember.tsx
+0
-0
index.tsx
src/pages/member/memberImport/schema/index.tsx
+1
-4
index.tsx
src/pages/member/memberMaintain/detailed/index.tsx
+1
-1
index.tsx
src/pages/member/memberPr1/index.tsx
+36
-23
index.tsx
src/pages/member/memberPr2/index.tsx
+36
-23
index.tsx
src/pages/member/memberPrConfirm/index.tsx
+36
-23
index.tsx
src/pages/member/memberPrSubmit/index.tsx
+37
-24
No files found.
src/components/NiceForm/components/CustomAddArray.tsx
View file @
77c93b5c
...
...
@@ -33,15 +33,20 @@ const CustomAddArray = (props) => {
const
onAdd
=
()
=>
mutators
.
push
(
schema
.
items
.
getEmptyValue
())
const
onRemove
=
index
=>
mutators
.
remove
(
index
)
return
<
div
>
{
toArr
(
value
).
map
((
item
,
index
,
arr
)
=>
{
return
<
RowStyleLayout
{
...
componentProps
}
key=
{
index
}
>
<
SchemaField
path=
{
FormPath
.
parse
(
path
).
concat
(
index
)
}
onlyRenderProperties
/>
<
Button
onClick=
{
onAdd
.
bind
(
null
,
index
)
}
type=
'primary'
>
+
</
Button
>
{
index
!==
0
&&
<
Button
onClick=
{
onRemove
.
bind
(
null
,
index
)
}
>
-
</
Button
>
}
</
RowStyleLayout
>
})
}
</
div
>
return
(
<
div
>
{
toArr
(
value
).
map
((
item
,
index
,
arr
)
=>
(
<
RowStyleLayout
{
...
componentProps
}
key=
{
index
}
>
<
SchemaField
path=
{
FormPath
.
parse
(
path
).
concat
(
index
)
}
onlyRenderProperties
/>
<
Button
onClick=
{
onAdd
.
bind
(
null
,
index
)
}
type=
'primary'
>
+
</
Button
>
<
Button
onClick=
{
onRemove
.
bind
(
null
,
index
)
}
>
-
</
Button
>
</
RowStyleLayout
>
))
}
{
(
!
value
||
!
value
.
length
)
&&
(
<
Button
onClick=
{
onAdd
}
type=
'primary'
>
+
</
Button
>
)
}
</
div
>
)
}
CustomAddArray
.
isFieldComponent
=
true
...
...
src/global/styles/reset.less
View file @
77c93b5c
...
...
@@ -191,4 +191,8 @@
}
}
.ant-badge-count {
z-index: 1;
}
}
\ No newline at end of file
src/pages/member/memberImport/addMember.tsx
View file @
77c93b5c
This diff is collapsed.
Click to expand it.
src/pages/member/memberImport/schema/index.tsx
View file @
77c93b5c
...
...
@@ -322,11 +322,8 @@ export const initDetailSchema = (props: any) => {
areas
:
{
type
:
'array'
,
title
:
'代理城市'
,
required
:
true
,
'x-component'
:
'CustomAddArray'
,
default
:
[
{
pcode
:
undefined
,
ccode
:
undefined
},
],
default
:
[],
items
:
{
type
:
'object'
,
properties
:
{
...
...
src/pages/member/memberMaintain/detailed/index.tsx
View file @
77c93b5c
...
...
@@ -35,7 +35,7 @@ interface QueryProps {
}
const
MemberQueryDetailed
:
React
.
FC
<
QueryProps
>
=
props
=>
{
const
{
MemberStore
,
children
}
=
props
;
const
{
MemberStore
,
location
,
children
}
=
props
;
const
{
id
,
validateId
}
=
usePageStatus
();
const
[
basicInfo
,
setBasicInfo
]
=
useState
<
GetMemberAbilityMaintenanceDetailBasicResponse
>
(
null
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
...
...
src/pages/member/memberPr1/index.tsx
View file @
77c93b5c
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Card
,
Space
,
Button
,
Badge
,
Popconfirm
}
from
'antd'
;
import
{
ClockCircleOutlined
}
from
'@ant-design/icons'
;
import
{
Card
,
Space
,
Button
,
Badge
,
Modal
,
message
}
from
'antd'
;
import
{
ClockCircleOutlined
,
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
createFormActions
}
from
'@formily/antd'
;
...
...
@@ -20,12 +20,12 @@ import {
import
{
coverColFiltersItem
}
from
'../utils'
;
import
StatusTag
from
'../components/StatusTag'
;
const
{
confirm
}
=
Modal
;
const
formActions
=
createFormActions
();
const
MemberPr1
:
React
.
FC
<
{}
>
=
props
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
searchItems
,
setSearchItems
]
=
useState
<
any
>
({});
const
[
filteredInfo
,
setFilteredInfo
]
=
useState
<
any
>
({});
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([]);
const
[
selectedList
,
setSelectList
]
=
useState
<
any
>
([]);
...
...
@@ -122,13 +122,9 @@ const MemberPr1: React.FC<{}> = props => {
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
const
rowSelection
=
{
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
let
result
=
selectedRows
.
map
(
v
=>
({
memberId
:
v
.
memberId
,
validateId
:
v
.
validateId
,
}));
setSelectedRowKeys
(
selectedRowKeys
);
setSelectList
(
result
);
onChange
:
(
keys
:
any
,
rows
:
{}[])
=>
{
setSelectedRowKeys
(
keys
);
setSelectList
(
rows
);
},
selectedRowKeys
:
selectedRowKeys
,
};
...
...
@@ -139,7 +135,32 @@ const MemberPr1: React.FC<{}> = props => {
};
const
handleBatch
=
()
=>
{
console
.
log
(
'批量'
)
if
(
!
selectedList
.
length
)
{
message
.
warning
(
'未选择任何会员'
);
return
;
}
confirm
({
title
:
'提示'
,
icon
:
<
QuestionCircleOutlined
/>,
content
:
'确定要审核通过选中的会员吗?'
,
onOk
()
{
const
members
=
selectedList
.
map
(
item
=>
({
memberId
:
item
.
memberId
,
validateId
:
item
.
validateId
}));
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
postMemberAbilityValidateStep1Batch
(
members
)
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setSelectedRowKeys
([]);
resolve
();
}
reject
();
})
.
catch
(()
=>
{
reject
();
});
});
},
});
};
// 初始化高级筛选选项
...
...
@@ -192,17 +213,9 @@ const MemberPr1: React.FC<{}> = props => {
const
controllerBtns
=
(
<
Space
>
<
Popconfirm
title=
"是否继续操作 ?"
placement=
"bottom"
onConfirm=
{
handleBatch
}
okText=
"是"
cancelText=
"否"
>
<
Button
>
批量提交审核
</
Button
>
</
Popconfirm
>
<
Button
onClick=
{
handleBatch
}
>
批量审核通过
</
Button
>
</
Space
>
);
...
...
src/pages/member/memberPr2/index.tsx
View file @
77c93b5c
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Card
,
Space
,
Button
,
Badge
,
Popconfirm
}
from
'antd'
;
import
{
ClockCircleOutlined
}
from
'@ant-design/icons'
;
import
{
Card
,
Space
,
Button
,
Badge
,
Modal
,
message
}
from
'antd'
;
import
{
ClockCircleOutlined
,
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
createFormActions
}
from
'@formily/antd'
;
...
...
@@ -20,12 +20,12 @@ import {
import
{
coverColFiltersItem
}
from
'../utils'
;
import
StatusTag
from
'../components/StatusTag'
;
const
{
confirm
}
=
Modal
;
const
formActions
=
createFormActions
();
const
MemberPr2
:
React
.
FC
<
{}
>
=
props
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
searchItems
,
setSearchItems
]
=
useState
<
any
>
({});
const
[
filteredInfo
,
setFilteredInfo
]
=
useState
<
any
>
({});
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([]);
const
[
selectedList
,
setSelectList
]
=
useState
<
any
>
([]);
...
...
@@ -122,13 +122,9 @@ const MemberPr2: React.FC<{}> = props => {
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
const
rowSelection
=
{
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
let
result
=
selectedRows
.
map
(
v
=>
({
memberId
:
v
.
memberId
,
validateId
:
v
.
validateId
,
}));
setSelectedRowKeys
(
selectedRowKeys
);
setSelectList
(
result
);
onChange
:
(
keys
:
any
,
rows
:
{}[])
=>
{
setSelectedRowKeys
(
keys
);
setSelectList
(
rows
);
},
selectedRowKeys
:
selectedRowKeys
,
};
...
...
@@ -139,7 +135,32 @@ const MemberPr2: React.FC<{}> = props => {
};
const
handleBatch
=
()
=>
{
console
.
log
(
'批量'
)
if
(
!
selectedList
.
length
)
{
message
.
warning
(
'未选择任何会员'
);
return
;
}
confirm
({
title
:
'提示'
,
icon
:
<
QuestionCircleOutlined
/>,
content
:
'确定要审核通过选中的会员吗?'
,
onOk
()
{
const
members
=
selectedList
.
map
(
item
=>
({
memberId
:
item
.
memberId
,
validateId
:
item
.
validateId
}));
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
postMemberAbilityValidateStep2Batch
(
members
)
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setSelectedRowKeys
([]);
resolve
();
}
reject
();
})
.
catch
(()
=>
{
reject
();
});
});
},
});
};
// 初始化高级筛选选项
...
...
@@ -192,17 +213,9 @@ const MemberPr2: React.FC<{}> = props => {
const
controllerBtns
=
(
<
Space
>
<
Popconfirm
title=
"是否继续操作 ?"
placement=
"bottom"
onConfirm=
{
handleBatch
}
okText=
"是"
cancelText=
"否"
>
<
Button
>
批量提交审核
</
Button
>
</
Popconfirm
>
<
Button
onClick=
{
handleBatch
}
>
批量审核通过
</
Button
>
</
Space
>
);
...
...
src/pages/member/memberPrConfirm/index.tsx
View file @
77c93b5c
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Card
,
Space
,
Button
,
Badge
,
Popconfirm
}
from
'antd'
;
import
{
ClockCircleOutlined
}
from
'@ant-design/icons'
;
import
{
Card
,
Space
,
Button
,
Badge
,
Modal
,
message
}
from
'antd'
;
import
{
ClockCircleOutlined
,
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
createFormActions
}
from
'@formily/antd'
;
...
...
@@ -20,12 +20,12 @@ import {
import
{
coverColFiltersItem
}
from
'../utils'
;
import
StatusTag
from
'../components/StatusTag'
;
const
{
confirm
}
=
Modal
;
const
formActions
=
createFormActions
();
const
MemberPrConfirm
:
React
.
FC
<
{}
>
=
props
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
searchItems
,
setSearchItems
]
=
useState
<
any
>
({});
const
[
filteredInfo
,
setFilteredInfo
]
=
useState
<
any
>
({});
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([]);
const
[
selectedList
,
setSelectList
]
=
useState
<
any
>
([]);
...
...
@@ -122,13 +122,9 @@ const MemberPrConfirm: React.FC<{}> = props => {
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
const
rowSelection
=
{
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
let
result
=
selectedRows
.
map
(
v
=>
({
memberId
:
v
.
memberId
,
validateId
:
v
.
validateId
,
}));
setSelectedRowKeys
(
selectedRowKeys
);
setSelectList
(
result
);
onChange
:
(
keys
:
any
,
rows
:
{}[])
=>
{
setSelectedRowKeys
(
keys
);
setSelectList
(
rows
);
},
selectedRowKeys
:
selectedRowKeys
,
};
...
...
@@ -139,7 +135,32 @@ const MemberPrConfirm: React.FC<{}> = props => {
};
const
handleBatch
=
()
=>
{
console
.
log
(
'批量'
)
if
(
!
selectedList
.
length
)
{
message
.
warning
(
'未选择任何会员'
);
return
;
}
confirm
({
title
:
'提示'
,
icon
:
<
QuestionCircleOutlined
/>,
content
:
'确定要审核通过选中的会员吗?'
,
onOk
()
{
const
members
=
selectedList
.
map
(
item
=>
({
memberId
:
item
.
memberId
,
validateId
:
item
.
validateId
}));
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
postMemberAbilityValidateConfirmBatch
(
members
)
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setSelectedRowKeys
([]);
resolve
();
}
reject
();
})
.
catch
(()
=>
{
reject
();
});
});
},
});
};
// 初始化高级筛选选项
...
...
@@ -192,17 +213,9 @@ const MemberPrConfirm: React.FC<{}> = props => {
const
controllerBtns
=
(
<
Space
>
<
Popconfirm
title=
"是否继续操作 ?"
placement=
"bottom"
onConfirm=
{
handleBatch
}
okText=
"是"
cancelText=
"否"
>
<
Button
>
批量提交审核
</
Button
>
</
Popconfirm
>
<
Button
onClick=
{
handleBatch
}
>
批量确认审核通过
</
Button
>
</
Space
>
);
...
...
src/pages/member/memberPrSubmit/index.tsx
View file @
77c93b5c
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Card
,
Space
,
Button
,
Badge
,
Popconfirm
}
from
'antd'
;
import
{
ClockCircleOutlined
}
from
'@ant-design/icons'
;
import
{
Card
,
Space
,
Button
,
Badge
,
Modal
,
message
}
from
'antd'
;
import
{
ClockCircleOutlined
,
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
createFormActions
}
from
'@formily/antd'
;
...
...
@@ -20,12 +20,12 @@ import {
import
{
coverColFiltersItem
}
from
'../utils'
;
import
StatusTag
from
'../components/StatusTag'
;
const
{
confirm
}
=
Modal
;
const
formActions
=
createFormActions
();
const
MemberPrSubmit
:
React
.
FC
<
{}
>
=
props
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
searchItems
,
setSearchItems
]
=
useState
<
any
>
({});
const
[
filteredInfo
,
setFilteredInfo
]
=
useState
<
any
>
({});
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([]);
const
[
selectedList
,
setSelectList
]
=
useState
<
any
>
([]);
...
...
@@ -122,13 +122,9 @@ const MemberPrSubmit: React.FC<{}> = props => {
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
const
rowSelection
=
{
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
let
result
=
selectedRows
.
map
(
v
=>
({
memberId
:
v
.
memberId
,
validateId
:
v
.
validateId
,
}));
setSelectedRowKeys
(
selectedRowKeys
);
setSelectList
(
result
);
onChange
:
(
keys
:
any
,
rows
:
{}[])
=>
{
setSelectedRowKeys
(
keys
);
setSelectList
(
rows
);
},
selectedRowKeys
:
selectedRowKeys
,
};
...
...
@@ -139,7 +135,32 @@ const MemberPrSubmit: React.FC<{}> = props => {
};
const
handleBatch
=
()
=>
{
console
.
log
(
'批量'
)
if
(
!
selectedList
.
length
)
{
message
.
warning
(
'未选择任何会员'
);
return
;
}
confirm
({
title
:
'提示'
,
icon
:
<
QuestionCircleOutlined
/>,
content
:
'确定要审核通过选中的会员吗?'
,
onOk
()
{
const
members
=
selectedList
.
map
(
item
=>
({
memberId
:
item
.
memberId
,
validateId
:
item
.
validateId
}));
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
postMemberAbilityValidateCommitBatch
(
members
)
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
setSelectedRowKeys
([]);
resolve
();
}
reject
();
})
.
catch
(()
=>
{
reject
();
});
});
},
});
};
// 初始化高级筛选选项
...
...
@@ -192,17 +213,9 @@ const MemberPrSubmit: React.FC<{}> = props => {
const
controllerBtns
=
(
<
Space
>
<
Popconfirm
title=
"是否继续操作 ?"
placement=
"bottom"
onConfirm=
{
handleBatch
}
okText=
"是"
cancelText=
"否"
>
<
Button
>
批量提交审核
</
Button
>
</
Popconfirm
>
<
Button
onClick=
{
handleBatch
}
>
批量审核通过
</
Button
>
</
Space
>
);
...
...
@@ -210,7 +223,7 @@ const MemberPrSubmit: React.FC<{}> = props => {
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'memberId'
,
rowKey
:
'memberId'
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
...
...
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