Commit d94573d6 authored by krysent's avatar krysent

new

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