verou
2025-03-19 f9a1b57d35529f8b8162e6dc7956d7b78375edd4
rsf-admin/src/page/components/ImportModal.jsx
@@ -79,6 +79,19 @@
        reset();
    };
    const downloadTemplate = async (type) => {
        const res = await request.post(`/${value}/template/download`, {})
        const url = window.URL.createObjectURL(
            new Blob([res.data], { type: res.headers["content-type"] }),
        );
        const link = document.createElement("a");
        link.href = url;
        link.setAttribute("download", `${value}.xlsx`);
        document.body.appendChild(link);
        link.click();
        link.remove();
    }
    return (
        <Dialog open={open} maxWidth="md" fullWidth>
            <DialogCloseButton onClose={handleClose} />
@@ -230,14 +243,7 @@
    );
}
{/**下载打印模板,传入type类型,调用下载模板接口 */ }
const downloadTemplate = (type) => {
    // 下载物料模板
    if (type != undefined && type == 'matnr') {
    }
    console.log('======>');
    console.log(type);
}
function millisecondsToTime(ms) {
    var seconds = Math.floor((ms / 1000) % 60);