Commit d94573d6 authored by krysent's avatar krysent

new

parent ff14b7fe
......@@ -50,7 +50,7 @@ function DrawInitForm(props) {
style={{ position: "absolute", transform: "translateX(0)",maxWidth:"100%" }}
width={props.val == "detail" ? 1000 : props.width}
{...props}
destroyOnClose={false}
destroyOnClose={true}
>
{props.val == "only" && props.children}
{props.val == "only" ? null : props.val == "detail" ? <Details {...detailprops}></Details> : <InitForm {...newProps}></InitForm>}
......
......@@ -49,14 +49,14 @@ const EditUpload = ({ record, fid, storeId }) => {
});
const { initialState, setInitialState } = useModel("@@initialState");
const [kcList, setkcList] = useState([]);
const fetchRequest = async (params) => {
console.log(5555);
let newParams = JSON.parse(JSON.stringify(params));
let res = await doFetch({
url: "/ngic-auth/sysStorePosition/queryUseAbleSelection",
params: { storeId: newParams.storeId },
});
return res?.data?.dataList;
setkcList(res?.data?.dataList);
};
useEffect(() => {
......@@ -102,7 +102,7 @@ const EditUpload = ({ record, fid, storeId }) => {
fetchRequest({
storeId,
});
}, [storeId]);
}, []);
return (
<EditableProTable
......@@ -120,10 +120,17 @@ const EditUpload = ({ record, fid, storeId }) => {
key: "storePositionId",
search: false,
valueType: "select",
request: async (params) => {
console.log(params);
const res = await fetchRequest(params);
return res;
// params: {},
// request: async (params) => {
// let newParams = JSON.parse(JSON.stringify(params));
// let res = await doFetch({
// url: "/ngic-auth/sysStorePosition/queryUseAbleSelection",
// params: { storeId: newParams.storeId },
// });
// return res?.data?.dataList;
// },
fieldProps: {
options: kcList,
},
editable: (text, record, index) => {
return !record.materieOutstoreDetailId;
......@@ -245,17 +252,17 @@ function Instore(props) {
content: () => mutiPrintRef.current.dom.current,
});
const [PchList, setPchList] = useState();
useEffect(() => {
if (drawprops?.visible) {
doFetch({
url: "/ngic-workmanship/wmsMaterieLabel/selectionByStatus",
params: { status: "1" },
}).then((res) => {
setPchList(res?.data?.dataList);
});
}
}, [drawprops?.visible]);
// const [PchList, setPchList] = useState();
// useEffect(() => {
// if (drawprops?.visible) {
// doFetch({
// url: "/ngic-workmanship/wmsMaterieLabel/selectionByStatus",
// params: { status: "1" },
// }).then((res) => {
// setPchList(res?.data?.dataList);
// });
// }
// }, [drawprops?.visible]);
const defaultFields = useMemo(() => {
// let option = {
......@@ -342,7 +349,6 @@ function Instore(props) {
width: 180,
params: {},
request: async (params) => {
let res = await doFetch({
url: "/ngic-workmanship/wmsMaterieLabel/selectionByStatus",
params: { status: "1" },
......@@ -838,7 +844,7 @@ function Instore(props) {
],
}),
};
}, [PchList]);
}, [drawprops?.visible]);
// const defaultFields = useMemo(() => {
// console.log(PchList);
......
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