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
83544e8c
Commit
83544e8c
authored
Mar 31, 2022
by
wuting
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2-220418' of…
Merge branch 'v2-220418' of
https://gitlab.shushangyun.com/linkseeks-design/pro-platform
into v2-220418
parents
f9388903
2e907e69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
add.tsx
src/pages/systemSetting/salesmanManage/salesmanBind/add.tsx
+7
-13
No files found.
src/pages/systemSetting/salesmanManage/salesmanBind/add.tsx
View file @
83544e8c
...
...
@@ -28,7 +28,6 @@ const fetchMemberAbilitySelect = async (params) => {
}
const
SalesmanBindAdded
=
(
props
)
=>
{
const
ref
=
useRef
<
any
>
({})
const
staticData
=
useRef
<
any
>
([])
const
[
rowSelection
,
rowCtl
]
=
useRowSelectionTable
({
customKey
:
'relationId'
})
const
[
realRowSelection
,
realRowCtl
]
=
useRowSelectionTable
({
customKey
:
'relationId'
})
...
...
@@ -38,8 +37,6 @@ const SalesmanBindAdded = (props) => {
const
[
keywordName
,
setKeywordName
]
=
useState
<
string
>
(
''
)
const
intl
=
useIntl
()
console
.
log
(
rowSelection
,
rowCtl
,
'测试'
)
const
fliterTableData
=
useMemo
(()
=>
{
if
(
!
keywordName
)
{
return
tableData
...
...
@@ -63,6 +60,7 @@ const SalesmanBindAdded = (props) => {
if
(
res
.
code
===
1000
)
{
formAction
.
setFieldValue
(
'userId'
,
[
res
.
data
])
// 添加一个remote标识, 带有此标识的 将会调用接口解绑
console
.
log
(
res
.
data
.
data
.
map
(
v
=>
({
...
v
,
isRemote
:
true
})))
setTableData
(
res
.
data
.
data
.
map
(
v
=>
({
...
v
,
isRemote
:
true
})))
}
})
...
...
@@ -76,7 +74,6 @@ const SalesmanBindAdded = (props) => {
},
[
realRowCtl
.
selectedRowKeys
])
useEffect
(()
=>
{
console
.
log
(
tableData
,
'tableData'
)
rowCtl
.
setSelectedRowKeys
(
tableData
.
map
(
v
=>
v
.
relationId
))
rowCtl
.
setSelectRow
([...
tableData
])
...
...
@@ -308,10 +305,12 @@ const SalesmanBindAdded = (props) => {
userId
,
...
params
})
if
(
code
===
1000
)
{
setTableData
(
data
.
data
)
if
(
code
!==
1000
)
{
message
.
error
(
intl
.
formatMessage
({
id
:
code
}))
setTableData
([])
return
}
return
code
===
1000
?
data
:
[]
setTableData
([...
data
.
data
.
map
(
v
=>
({
...
v
,
isRemote
:
true
}))])
}
else
{
return
[]
}
...
...
@@ -344,11 +343,6 @@ const SalesmanBindAdded = (props) => {
actions=
{
formAction
}
editable=
{
pageStatus
!==
PageStatus
.
PREVIEW
}
previewPlaceholder=
" "
effects=
{
(
$
,
ctx
)
=>
{
$
(
'onFieldChange'
,
'userId'
).
subscribe
(
async
state
=>
{
fetchMemberSaleChannel
({
current
:
1
,
pageSize
:
10
})
})
}
}
schema=
{
{
type
:
'object'
,
properties
:
{
...
...
@@ -358,9 +352,9 @@ const SalesmanBindAdded = (props) => {
'x-component'
:
'CustomRelevance'
,
'x-component-props'
:
{
title
:
intl
.
formatMessage
({
id
:
'common.text.select'
}),
disabled
:
(
pageStatus
===
PageStatus
.
EDIT
),
modalProps
:
{
title
:
intl
.
formatMessage
({
id
:
'channel.form.modal.salesman.title'
}),
},
columns
:
abilityColumns
,
fetchTableData
:
fetchMemberAbilitySelect
,
...
...
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