Commit 1b957ba3 authored by krysent's avatar krysent

helo

parent f4cb1546
......@@ -172,6 +172,7 @@ const Station = (props) => {
// url: "/ngic-auth/sysStation/save",
// params: { ...newfields, ...difrid },
// });
reload()
};
const showConfirm = () => {
......
......@@ -371,10 +371,10 @@ const Materiel = (props) => {
formRefs
.validateFields()
.then((secondFields) => {
console.log(secondFields);
console.log("表单的fields",secondFields);
let secondFieldsKeys = Object.keys(secondFields);
console.log("defaultSpecificFileds", defaultSpecificFileds);
let materieCharList = defaultSpecificFileds.map((it) => {
let materieCharList = defaultCommonFields.map((it) => {
if (secondFieldsKeys.indexOf(it.fieldsKey) != -1) {
it.fieldRealValue = secondFields[it.fieldsKey];
}
......@@ -395,6 +395,7 @@ const Materiel = (props) => {
};
return el;
});
console.log("materieCharList:",materieCharList);
let materieProductUnitList =
firstValues?.materieProductUnitList?.map((it) => {
return {
......
......@@ -236,18 +236,6 @@ function Instore(props) {
}));
}
const getPCHlist = async () => {
let res = await doFetch({
url: "/ngic-workmanship/wmsMaterieLabel/selectionByStatus",
params: { status: "1" },
});
return res?.data?.dataList;
};
useEffect(() => {
getPCHlist();
}, [drawprops?.visible]);
const handlePrint = useReactToPrint({
content: () => printRef.current.dom.current,
});
......@@ -255,8 +243,26 @@ function Instore(props) {
const mutiPrint = useReactToPrint({
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 defaultFields = useMemo(() => {
console.log(1);
let option = {
options: PchList,
allowClear: true,
showSearch: true,
};
console.log("pchlist:", option);
return {
four: {
materieInstoreNo: {
......@@ -333,19 +339,14 @@ function Instore(props) {
key: "labelId",
valueType: "select",
width: 180,
request: async () => {
return await getPCHlist();
},
fieldProps: {
allowClear: true,
showSearch: true,
},
fieldProps: option,
formItemProps: () => {
return {
rules: [{ required: true, message: "此项为必填项" }],
};
},
},
{
title: (
<span>
......@@ -828,7 +829,13 @@ function Instore(props) {
],
}),
};
}, [drawprops.visible]);
}, [ PchList]);
// const defaultFields = useMemo(() => {
// console.log(PchList);
// return
// }, [PchList]);
const PrintButton = (
<Button
disabled={!selectKeys.length}
......
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