| | |
| | | <el-button @click="handleReset">重置</el-button> |
| | | </div> |
| | | <div class="search_right"> |
| | | <!-- <el-button type="success" @click="handleExport" icon="Download">--> |
| | | <!-- 导出报表--> |
| | | <!-- </el-button>--> |
| | | <el-button type="success" @click="handleExport" icon="Download"> |
| | | 导出报表 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <!-- <!– 统计卡片 –>--> |
| | |
| | | if (!validateSearchForm()) { |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | const params = getQueryParams(); |
| | | // const response = await exportStockReport(params) |
| | | proxy.download("/stockin/exportCopy", params, "库存报表.xlsx"); |
| | | // 创建下载链接 |
| | | // const blob = new Blob([response], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) |
| | | // const url = window.URL.createObjectURL(blob) |
| | | // const link = document.createElement('a') |
| | | // link.href = url |
| | | // link.download = `${getTableTitle()}_${new Date().getTime()}.xlsx` |
| | | // document.body.appendChild(link) |
| | | // link.click() |
| | | // document.body.removeChild(link) |
| | | // window.URL.revokeObjectURL(url) |
| | | |
| | | // ElMessage.success('导出成功') |
| | | } catch (error) { |
| | | ElMessage.error("导出失败:" + error.message); |
| | | } |
| | | proxy.download("/stockInventory/exportStockInventoryPage",{...params}, `库存报表.xlsx`) |
| | | }; |
| | | |
| | | // 初始化图表 |