feat(wms): 新增报表导出文件管理功能
新增报表导出文件管理模块,包含后端接口和前端页面 在各类报表页面添加保存报表功能 优化CoilSelector和CoilCard组件显示 调整分页大小和表格高度 统一各产线报表配置 修复文件预览组件高度问题
This commit is contained in:
@@ -39,6 +39,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>
|
||||
@@ -122,6 +124,7 @@ import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
||||
import { calcSummary, calcMSummary } from "@/views/wms/report/js/calc";
|
||||
import CoilTable from "@/views/wms/report/components/coilTable";
|
||||
import ColumnsSetting from "@/views/wms/report/components/setting/columns";
|
||||
import { saveReportFile } from "@/views/wms/report/js/reportFile";
|
||||
|
||||
export default {
|
||||
name: 'MergeTemplate',
|
||||
@@ -129,7 +132,11 @@ export default {
|
||||
actionType: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
productionLine: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: {
|
||||
MemoInput,
|
||||
@@ -209,7 +216,7 @@ export default {
|
||||
pageNum: 1,
|
||||
},
|
||||
lossColumns: [],
|
||||
outColumns: []
|
||||
outputColumns: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -288,6 +295,48 @@ export default {
|
||||
coilIds: this.lossList.map(item => item.coilId).join(',')
|
||||
}, `materialCoil_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
// 保存产出报表
|
||||
saveOutputReport() {
|
||||
this.loading = true
|
||||
saveReportFile(this.outList.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
|
||||
})
|
||||
},
|
||||
// 加载列设置
|
||||
loadColumns() {
|
||||
this.lossColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-loss') || '[]') || []
|
||||
|
||||
Reference in New Issue
Block a user