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,8 @@
<el-button type="primary" @click="exportData">导出产出钢卷</el-button>
<el-button type="primary" @click="exportLossData">导出消耗钢卷</el-button>
<el-button type="primary" @click="settingVisible = true">列设置</el-button>
<el-button type="primary" @click="saveOutputReport">保存产出报表</el-button>
<el-button type="primary" @click="saveLossReport">保存消耗报表</el-button>
</el-form-item>
</el-form>
</el-row>
@@ -133,6 +135,7 @@ import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
import { calcSummary, calcAbSummary, calcMSummary } from "@/views/wms/report/js/calc";
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
import { saveReportFile } from "@/views/wms/report/js/reportFile";
export default {
name: 'ComprehensiveTemplate',
@@ -162,7 +165,11 @@ export default {
warehouseOptions: {
type: Array,
default: () => []
}
},
productionLine: {
type: String,
default: '',
},
},
dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
data() {
@@ -393,6 +400,48 @@ export default {
coilIds: this.lossList.map(item => item.coilId).join(',')
}, `materialCoil_${this.queryParams.startDate}_${this.queryParams.endDate}_${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
})
},
// 保存消耗报表
saveLossReport() {
this.loading = true
saveReportFile(this.lossList.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.getList()