| | |
| | | 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} /> |
| | |
| | | ); |
| | | } |
| | | {/**下载打印模板,传入type类型,调用下载模板接口 */ } |
| | | const downloadTemplate = (type) => { |
| | | // 下载物料模板 |
| | | if (type != undefined && type == 'matnr') { |
| | | |
| | | } |
| | | console.log('======>'); |
| | | console.log(type); |
| | | } |
| | | |
| | | function millisecondsToTime(ms) { |
| | | var seconds = Math.floor((ms / 1000) % 60); |