Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms
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
wms
Commits
9dbb5e30
Commit
9dbb5e30
authored
Jul 26, 2023
by
krysent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
仓库刷新
parent
76e4563b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
9 deletions
+26
-9
mtable.jsx
src/components/AutoTable/mtable.jsx
+8
-2
index.jsx
src/pages/system/Reservoir/index.jsx
+18
-7
No files found.
src/components/AutoTable/mtable.jsx
View file @
9dbb5e30
...
...
@@ -23,6 +23,9 @@ const Mtable = (props) => {
getDefaultSelected
,
//存在默认选中向上返回选中值
}
=
props
;
console
.
log
(
'额外参数'
,
extraparams
);
const
actionRefs
=
actionRef
??
useRef
(),
formRefs
=
formRef
??
useRef
(),
ifspagination
=
pagination
==
"false"
||
pagination
===
false
,
...
...
@@ -32,6 +35,7 @@ const Mtable = (props) => {
//调用接口
const
request
=
async
(
params
,
sort
,
filter
)
=>
{
console
.
log
(
'request'
,
extraparams
);
if
(
!
path
)
return
;
let
newparams
=
{
...
params
,
...
...
@@ -63,6 +67,8 @@ const Mtable = (props) => {
total
,
};
};
//更新 columns
useEffect
(()
=>
{
setcolumnes
((
s
)
=>
{
...
...
@@ -187,8 +193,8 @@ const Mtable = (props) => {
useEffect
(
async
()
=>
{
// console.log(history?.location?.pathname);
await
initDrage
();
},
[]);
//
columns, extraparams, path, activeTabKey, refreshDep
},
[
columns
,
extraparams
,
path
,
activeTabKey
,
refreshDep
]);
//
//缩放表格
const
handleResize
=
(
index
)
=>
...
...
src/pages/system/Reservoir/index.jsx
View file @
9dbb5e30
...
...
@@ -485,10 +485,6 @@ const Materiel = (props) => {
// if (i == "issueType")
{
// defaultFields[i].value = 1;
//
}
if
(
i
==
"materieTypeId"
)
{
defaultFields
[
i
].
value
=
materieTypeId
==
"00000000"
?
null
:
materieTypeId
;
}
}
dispatch
({
type
:
"add"
,
...
...
@@ -543,6 +539,9 @@ const Materiel = (props) => {
data
,
};
}
useEffect
(()
=>
{
console
.
log
(
"123"
,
materieTypeId
);
},
[
materieTypeId
]);
return
(
<
div
>
<
AutoTable
...
...
@@ -553,7 +552,7 @@ const Materiel = (props) => {
actionRef=
{
actionRef
}
onRef=
{
(
node
)
=>
(
ChildRef
=
node
)
}
childposition=
"left"
extraparams=
{
{
factoryId
:
materieTypeId
}
}
extraparams=
{
{
...
materieTypeId
}
}
x=
{
600
}
>
<
div
...
...
@@ -570,8 +569,20 @@ const Materiel = (props) => {
url=
"/ngic-auth/sysFactory/queryFactoryStoreTree"
// deleteurl="/ngic-auth/sysFactory/deleteById"
// saveurl="/ngic-auth/sysFactory/save"
onselected=
{
(
vals
)
=>
{
setmaterieTypeId
(
vals
[
0
]
??
""
);
onselected=
{
(
vals
,
e
,
alldata
)
=>
{
console
.
log
(
e
?.
node
);
const
valType
=
e
?.
node
?.
level
;
let
obj
=
{};
if
(
valType
==
1
)
{
// 工厂
obj
.
factoryId
=
vals
[
0
]
??
""
;
}
else
if
(
valType
==
2
)
{
obj
.
storeId
=
vals
[
0
]
??
""
;
}
else
if
(
valType
==
3
)
{
obj
.
storeAreaId
=
vals
[
0
]
??
""
;
}
console
.
log
(
obj
);
setmaterieTypeId
(
obj
);
}
}
/>
</
div
>
...
...
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