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) { 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() { // 总钢卷数量、总重、均重