useEffect(() => { (async function fn() { const response = await selectReceiveMaterialRecord({ billDetailId: billDetailId, }); form.setFieldsValue({ materielId: response.data?.materialName }); setMaterielId(response.data?.materialId); setPickList(response.data?.recordList); response.data?.recordList && response.data?.recordList.map((item: any, index: number) => { formList.setFieldsValue({ [`batchCode-${item.key + 1}`]: item.batchCode, }); formList.setFieldsValue({ [`receiveQty-${item.key + 1}`]: item.receiveQty, }); }); setNumber(response.data.recordList.length - 1); })(); }, []);