Commit 9dbb5e30 authored by krysent's avatar krysent

仓库刷新

parent 76e4563b
......@@ -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) =>
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment