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

@@ -58,8 +58,8 @@
<!-- 物料ID/名称列仅物料统计时有效 -->
<el-table-column label="物料信息" align="center" min-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>
@@ -113,9 +113,9 @@
</el-table-column>
<el-table-column label="产品类型" align="center" min-width="250">
<template slot-scope="scope">
<ProductInfo v-if="scope.row.itemType === 'product'" :product="scope.row.product" />
<ProductInfo v-if="scope.row.itemType === 'product'" :product="scope.row" />
<RawMaterialInfo v-else-if="scope.row.itemType === 'raw_material'"
:material="scope.row.rawMaterial" />
:material="scope.row" />
</template>
</el-table-column>
<el-table-column label="更新时间" align="center" prop="updateTime" />
@@ -293,11 +293,11 @@ export default {
if (item.itemType === 'product') {
summary.productTotalGrossWeight += grossWeight;
summary.productTotalNetWeight += netWeight;
itemName = item.product.productName;
itemName = item.itemName || '';
} else if (item.itemType === 'raw_material') {
summary.rawMaterialTotalGrossWeight += grossWeight;
summary.rawMaterialTotalNetWeight += netWeight;
itemName = item.rawMaterial.rawMaterialName;
itemName = item.itemName || '';
}
if (itemName == '冷轧卷') {
summary.coldRollCoilCount += item.coilCount || 0;

View File

@@ -64,8 +64,8 @@
min-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>

View File

@@ -64,8 +64,8 @@
min-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>