refactor(wms/report): 重构镀锌、酸轧线报表页面,统一使用通用模板组件
1. 新增了zinc_old和zha_old旧版报表备份目录,保留原有实现 2. 将所有报表页面替换为通用的ActionTemplate组件 3. 为镀锌线、酸轧线的各类报表配置了固定的生产线、仓库选项和操作类型 4. 移除了动态加载报表配置的逻辑,改为硬编码固定配置
This commit is contained in:
51
klp-ui/src/views/wms/report/zha_old/loss.vue
Normal file
51
klp-ui/src/views/wms/report/zha_old/loss.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<LossTemplate v-if="!loading" :actionTypes="actionTypes" :actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams" :warehouseOptions="warehouseOptions" :productionLine="productionLine" />
|
||||
<el-empty v-else description="正在加载报表配置..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LossTemplate from '@/views/wms/report/template/loss.vue'
|
||||
import { listReportConfig } from '@/api/wms/reportConfig.js'
|
||||
|
||||
export default {
|
||||
name: 'LossReport',
|
||||
components: {
|
||||
LossTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
actionTypes: [],
|
||||
actionQueryParams: {},
|
||||
baseQueryParams: {},
|
||||
warehouseOptions: [],
|
||||
productionLine: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReportConfig()
|
||||
},
|
||||
methods: {
|
||||
getReportConfig() {
|
||||
this.loading = true
|
||||
listReportConfig({
|
||||
reportCode: 'acid'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.rows.length == 1) {
|
||||
const config = JSON.parse(res.rows[0].configJson)
|
||||
this.actionTypes = config.actionTypes
|
||||
this.actionQueryParams = config.actionQueryParams
|
||||
this.baseQueryParams = config.baseQueryParams
|
||||
this.warehouseOptions = config.warehouseOptions
|
||||
this.productionLine = config.productionLine
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user