From 9bd6077599a64a95e0fa5e812d9dc69409bc9405 Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Wed, 3 Jun 2026 15:01:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(wms/report):=20=E6=96=B0=E5=A2=9E=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=8A=A5=E8=A1=A8=E5=AF=BC=E5=87=BA=E5=88=97?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=BC=93=E5=AD=98=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在入库报表页面中新增导出列配置的本地缓存功能,用户自定义的列顺序将被保存至localStorage,避免重复配置。调整前,每次打开自定义导出弹窗均需重新选择列;调整后,自动读取上次保存的配置,提升用户体验。 --- klp-ui/src/views/wms/report/receive.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/klp-ui/src/views/wms/report/receive.vue b/klp-ui/src/views/wms/report/receive.vue index 0b901cd3..fc538522 100644 --- a/klp-ui/src/views/wms/report/receive.vue +++ b/klp-ui/src/views/wms/report/receive.vue @@ -391,12 +391,28 @@ export default { openCustomExport() { getExportColumns().then(res => { this.exportColumns = res.data + // 读缓存:上次保存的列顺序 + const cached = localStorage.getItem('custom-export-columns-coil-report-receive') + if (cached) { + try { + const arr = JSON.parse(cached) + if (Array.isArray(arr) && arr.length) { + this.selectedColumns = [...arr] + this.orderedColumns = [...arr] + this.customExportVisible = true + return + } + } catch (e) { /* ignore */ } + } this.selectedColumns = [] + this.orderedColumns = [] this.customExportVisible = true }) }, // 执行自定义导出(按 orderedColumns 顺序) doCustomExport() { + // 缓存当前配置 + localStorage.setItem('custom-export-columns-coil-report-receive', JSON.stringify(this.orderedColumns)) this.customExportVisible = false this.download('wms/materialCoil/exportCustomOrdered', { coilIds: this.coilIds,