feat(wms): 新增报表导出文件管理功能

新增报表导出文件管理模块,包含后端接口和前端页面
在各类报表页面添加保存报表功能
优化CoilSelector和CoilCard组件显示
调整分页大小和表格高度
统一各产线报表配置
修复文件预览组件高度问题
This commit is contained in:
砂糖
2026-04-11 15:36:50 +08:00
parent 848ad2c3cd
commit 3020a4244d
78 changed files with 1697 additions and 160 deletions

View File

@@ -43,6 +43,7 @@
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button>
<el-button type="primary" @click="settingVisible = true">列设置</el-button>
<el-button type="primary" @click="saveOutputReport">保存产出报表</el-button>
</el-form-item>
</el-form>
</el-row>
@@ -77,6 +78,7 @@ import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
import { fetchOutputList } from "@/views/wms/report/js/fetch";
import { saveReportFile } from "@/views/wms/report/js/reportFile";
export default {
@@ -99,7 +101,11 @@ export default {
warehouseOptions: {
type: Array,
default: () => []
}
},
productionLine: {
type: String,
default: '',
},
},
dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
data() {
@@ -204,6 +210,27 @@ export default {
coilIds: this.list.map(item => item.coilId).join(',')
}, `materialCoil_${new Date().getTime()}.xlsx`)
},
// 保存产出报表
saveOutputReport() {
this.loading = true
saveReportFile(this.list.map(item => item.coilId).join(','), {
reportParams: this.queryParams,
reportType: '产出报表',
productionLine: this.productionLine,
}).then(res => {
this.$message({
message: '保存成功',
type: 'success',
})
}).catch(err => {
this.$message({
message: '保存失败',
type: 'error',
})
}).finally(() => {
this.loading = false
})
},
},
mounted() {
this.handleQuery()