refactor(wms): 重构物料信息展示逻辑,移除冗余组件

重构物料信息展示逻辑,统一使用itemName等字段替代原有的product和rawMaterial嵌套结构
删除不再使用的BomInfo、CategoryRenderer等冗余组件
新增report模块配置集中管理
优化代码结构,提升可维护性
This commit is contained in:
砂糖
2026-03-24 13:55:10 +08:00
parent 9738a32d9d
commit ae68b40ee6
65 changed files with 363 additions and 3479 deletions

View File

@@ -106,8 +106,8 @@
<!-- <el-table-column label="物料类型" align="center" prop="materialType" /> -->
<el-table-column label="产品类型" align="center" width="250">
<template slot-scope="scope">
<ProductInfo v-if="scope.row.itemType == 'product'" :product="scope.row.product" />
<RawMaterialInfo v-else-if="scope.row.itemType === 'raw_material'" :material="scope.row.rawMaterial" />
<ProductInfo v-if="scope.row.itemType == 'product'" :product="scope.row" />
<RawMaterialInfo v-else-if="scope.row.itemType === 'raw_material'" :material="scope.row" />
</template>
</el-table-column>
<el-table-column v-if="showAbnormal" label="异常数量" align="center" prop="abnormalCount"></el-table-column>
@@ -1039,9 +1039,8 @@ export default {
/** 预览标签 */
handlePreviewLabel(row) {
this.labelRender.visible = true;
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
const itemName = row.itemName || '';
this.labelRender.type = row.itemType === 'product' ? '3' : '2';
this.labelRender.data = {
...row,
@@ -1367,8 +1366,7 @@ export default {
const selectedData = this.materialCoilList
.filter(item => this.ids.includes(item.coilId))
.map(row => {
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
const itemName = row.itemName || '';
return {
...row,