From 34418f14ca98e9ed99a8cf7c29318b8270190ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Thu, 7 May 2026 11:24:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD):?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=87=BA=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增导出全部数据功能,包括当前页和所有数据 - 区分导出当前和导出全部按钮样式 - 重置查询时清空仓库ID参数 --- klp-ui/src/views/wms/coil/panels/base.vue | 38 +++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue index 1b5a436e..c37e979b 100644 --- a/klp-ui/src/views/wms/coil/panels/base.vue +++ b/klp-ui/src/views/wms/coil/panels/base.vue @@ -96,7 +96,8 @@ 搜索 重置 - 导出 + 导出当前 + 导出全部 - 导出 + 导出当前 + + + 导出全部 @@ -1454,6 +1458,7 @@ export default { /** 重置按钮操作 */ resetQuery() { this.resetForm("queryForm"); + this.queryParams.warehouseId = ''; this.handleQuery(); }, // 多选框选中数据 @@ -1544,6 +1549,31 @@ export default { }, 'coil.xlsx') } }, + async handleNewExportProps(row) { + this.loading = true + let coilIds = '' + const query = { + ...this.querys, + selectType: 'product', + pageSize: 9999, + pageNum: 1, + } + if (this.showWaybill) { + const res = await listBoundCoil(query) + coilIds = res.rows.map(item => item.coilId).join(',') + this.loading = false + this.download('/wms/materialCoil/exportDelivery', { + coilIds, + }, 'coil.xlsx') + } else { + const { rows: coils } = await listMaterialCoil(query) + coilIds = coils.map(item => item.coilId).join(',') + this.loading = false + this.download('wms/materialCoil/exportAll', { + coilIds, + }, 'coil.xlsx') + } + }, handleCheck(row) { this.isCheck = true; this.loading = true; @@ -1717,6 +1747,10 @@ export default { const { orderBy, ...query } = this.queryParams; this.download('wms/materialCoil/export', query, `materialCoil_${new Date().getTime()}.xlsx`) }, + handleExportAllProps() { + const query = this.querys; + this.download('wms/materialCoil/export', query, `materialCoil_${new Date().getTime()}.xlsx`) + }, /** 批量打印标签按钮 */ handleBatchPrintLabel() { if (!this.ids || this.ids.length === 0) { From 3511a8541657f23a20d823b2969c0b55e1d17492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Thu, 7 May 2026 11:35:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(wms=E6=8A=A5=E8=A1=A8):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BB=93=E5=BA=93=E9=80=89=E9=A1=B9=E5=8F=98=E5=8C=96?= =?UTF-8?q?=E6=97=B6=E6=9C=AA=E6=9B=B4=E6=96=B0=E4=BB=93=E5=BA=93ID?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 取消watch中handleQuery的调用并添加immediate选项,确保仓库ID能正确同步 --- klp-ui/src/views/wms/report/template/out.vue | 21 ++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/klp-ui/src/views/wms/report/template/out.vue b/klp-ui/src/views/wms/report/template/out.vue index a90f18c0..ba029829 100644 --- a/klp-ui/src/views/wms/report/template/out.vue +++ b/klp-ui/src/views/wms/report/template/out.vue @@ -165,16 +165,17 @@ export default { outputColumns: [], } }, - // watch: { - // warehouseOptions: { - // handler(newVal, oldVal) { - // if (newVal !== oldVal) { - // this.warehouseIds = newVal.map(item => item.value) - // this.handleQuery() - // } - // }, - // } - // }, + watch: { + warehouseOptions: { + handler(newVal, oldVal) { + if (newVal !== oldVal) { + this.warehouseIds = newVal.map(item => item.value) + // this.handleQuery() + } + }, + immediate: true, + } + }, computed: { summary() { // 总钢卷数量、总重、均重