Compare commits
No commits in common. "fc9af4faf889a32bf0d232ed05d786d93be3f9b6" and "e9114b8dc36ae8d5558b93d44f06b6b1a5f83eec" have entirely different histories.
fc9af4faf8
...
e9114b8dc3
|
|
@ -16,7 +16,7 @@ import useDeleteFile from "zy-react-library/hooks/useDeleteFile";
|
|||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||
import { getLabelName, validatorEndTime, validatorTimeGTCurrentDay } from "zy-react-library/utils";
|
||||
import { getLabelName,validatorEndTime, validatorTimeGTCurrentDay } from "zy-react-library/utils";
|
||||
import { NS_QUALIFICATION_APPLY, NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
|
|
@ -233,26 +233,13 @@ const StepTwoComponent = (props) => {
|
|||
await getTypeGroup(data.details)
|
||||
setSpecialList(data.details || []);
|
||||
} else {
|
||||
const { data } = await props["qualificationMaintenanceInfo"]({ id: props.formValues.qualificationsId });
|
||||
const newSpecialList = data.details.map(item => {
|
||||
const existsItem = specialList.find(specialItem => specialItem.qualificationsDetailId === item.id);
|
||||
if (existsItem) {
|
||||
return { ...item, ...existsItem };
|
||||
}
|
||||
return item;
|
||||
})
|
||||
|
||||
await getTypeGroup(newSpecialList)
|
||||
for (let i = 0; i < newSpecialList.length; i++) {
|
||||
if (newSpecialList[i].applyDetailId) {
|
||||
newSpecialList[i].files = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
||||
eqForeignKey: newSpecialList[i].applyDetailId
|
||||
});
|
||||
}
|
||||
await getTypeGroup(specialList)
|
||||
for (let i = 0; i < specialList.length; i++) {
|
||||
specialList[i].files = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
||||
eqForeignKey: specialList[i].applyDetailId
|
||||
});
|
||||
}
|
||||
|
||||
setSpecialList(newSpecialList);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue