Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
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
wuhao
ems3.3
Commits
b824a20f
Commit
b824a20f
authored
Feb 03, 2023
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch
parent
4b5ff344
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
columns.js
src/pages/device/supplier/columns.js
+6
-2
index.jsx
src/pages/device/supplier/index.jsx
+1
-1
No files found.
src/pages/device/supplier/columns.js
View file @
b824a20f
...
...
@@ -2,7 +2,7 @@ import { doFetch } from '@/utils/doFetch';
import
{
Switch
}
from
'antd'
;
import
fieldsDetail
from
'@/utils/fieldsDetail'
;
function
getcolumns
(
ifs
)
{
function
getcolumns
(
ifs
,
actionRef
)
{
return
[
{
title
:
'供应商编号'
,
...
...
@@ -130,7 +130,7 @@ function getcolumns(ifs) {
<
Switch
checkedChildren
=
"启用"
unCheckedChildren
=
"禁用"
defaultChecked
=
{
row
.
status
==
1
}
checked
=
{
row
?
.
status
==
1
}
disabled
=
{
row
?.
statusChangeable
==
1
?
false
:
true
}
onChange
=
{(
flag
)
=>
{
// //console.log(e);
...
...
@@ -138,11 +138,15 @@ function getcolumns(ifs) {
doFetch
({
url
:
'/asset/equipmentSupplier/update/status'
,
params
:
{
id
:
row
.
id
,
status
:
'1'
},
}).
then
(()
=>
{
actionRef
.
current
.
reload
();
});
}
else
{
doFetch
({
url
:
'/asset/equipmentSupplier/update/status'
,
params
:
{
id
:
row
.
id
,
status
:
'2'
},
}).
then
(()
=>
{
actionRef
.
current
.
reload
();
});
}
}}
...
...
src/pages/device/supplier/index.jsx
View file @
b824a20f
...
...
@@ -293,7 +293,7 @@ function Supplier(props) {
);
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
false
);
let
defcolumn
=
getcolumns
(
false
,
actionRef
);
defcolumn
[
1
].
render
=
(
text
,
row
)
=>
{
return
(
<
a
...
...
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