Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
a7f1072e
Commit
a7f1072e
authored
Sep 01, 2022
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改状态刷新列表
parent
c7caca16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
index.jsx
src/pages/chainStoreManage/index.jsx
+8
-14
No files found.
src/pages/chainStoreManage/index.jsx
View file @
a7f1072e
...
@@ -14,18 +14,8 @@ export default () => {
...
@@ -14,18 +14,8 @@ export default () => {
const
[
pageNo
,
setPageNo
]
=
useState
(
1
);
const
[
pageNo
,
setPageNo
]
=
useState
(
1
);
const
[
totalNum
,
setTotalNum
]
=
useState
(
0
);
const
[
totalNum
,
setTotalNum
]
=
useState
(
0
);
const
[
pageSize
,
setPageSize
]
=
useState
(
20
);
const
[
pageSize
,
setPageSize
]
=
useState
(
20
);
const
table
=
useRef
();
const
refSearch
=
useRef
();
const
refSearch
=
useRef
();
const
divDom
=
useRef
();
const
divDom
=
useRef
();
const
onEnableState
=
async
({
id
,
state
})
=>
{
const
enable
=
+
state
===
1
?
0
:
1
;
const
res
=
await
apiEnableStore
({
id
,
state
:
enable
});
if
(
res
===
'
0000
'
)
{
notification
.
success
({
message
:
`已
${
state
?
'
禁用
'
:
'
启用
'
}
`
});
// eslint-disable-next-line no-unused-expressions
table
.
current
?.
reload
?.();
}
};
const
onCreate
=
()
=>
{
const
onCreate
=
()
=>
{
setStoreInfo
({});
setStoreInfo
({});
setVisible
(
true
);
setVisible
(
true
);
...
@@ -106,12 +96,19 @@ export default () => {
...
@@ -106,12 +96,19 @@ export default () => {
};
};
const
closeModal
=
isReload
=>
{
const
closeModal
=
isReload
=>
{
if
(
isReload
)
{
if
(
isReload
)
{
// eslint-disable-next-line no-unused-expressions
onSearch
(
refSearch
.
current
?.
getFieldValue
?.()
||
{});
onSearch
(
refSearch
.
current
?.
getFieldValue
?.()
||
{});
}
}
setStoreInfo
({});
setStoreInfo
({});
setVisible
(
false
);
setVisible
(
false
);
};
};
const
onEnableState
=
async
({
id
,
state
})
=>
{
const
enable
=
+
state
===
1
?
0
:
1
;
const
res
=
await
apiEnableStore
({
id
,
state
:
enable
});
if
(
res
===
'
0000
'
)
{
notification
.
success
({
message
:
`已
${
state
?
'
禁用
'
:
'
启用
'
}
`
});
onSearch
(
refSearch
.
current
?.
getFieldValue
?.()
||
{});
}
};
const
onReset
=
()
=>
{
const
onReset
=
()
=>
{
if
(
refSearch
.
current
&&
refSearch
.
current
.
resetFields
)
{
if
(
refSearch
.
current
&&
refSearch
.
current
.
resetFields
)
{
...
@@ -281,14 +278,11 @@ export default () => {
...
@@ -281,14 +278,11 @@ export default () => {
</
div
>
</
div
>
<
Table
<
Table
dataSource=
{
dataList
}
dataSource=
{
dataList
}
ref=
{
table
}
bordered
bordered
columns=
{
columns
}
columns=
{
columns
}
rowKey=
{
record
=>
record
.
id
}
rowKey=
{
record
=>
record
.
id
}
pagination=
{
false
}
pagination=
{
false
}
// className={styles.tabletop}
scroll=
{
{
x
:
'
100%
'
}
}
scroll=
{
{
x
:
'
100%
'
}
}
// rowSelection={rowSelection}
/>
/>
{
dataList
&&
dataList
.
length
&&
(
{
dataList
&&
dataList
.
length
&&
(
<
div
className=
{
style
.
pageBox
}
>
<
div
className=
{
style
.
pageBox
}
>
...
...
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