refactor(ui): 将BOM相关术语统一修改为参数

修改所有界面中的BOM、SKU等术语为"参数",包括标签、提示信息、表格列名等。涉及多个组件和视图文件,确保术语一致性。
This commit is contained in:
砂糖
2025-11-13 13:29:19 +08:00
parent 6bde071842
commit 754d6d762a
37 changed files with 812 additions and 124 deletions

View File

@@ -73,7 +73,7 @@
@pagination="getList"
/>
<!-- 添加或修改BOM 明细存放属性值对话框 -->
<!-- 添加或修改参数 明细存放属性值对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="属性名称" prop="attrKey">
@@ -119,7 +119,7 @@ export default {
showSearch: true,
// 总条数
total: 0,
// BOM 明细,存放属性–值表格数据
// 参数 明细,存放属性–值表格数据
bomItemList: [],
// 弹出层标题
title: "",
@@ -144,7 +144,7 @@ export default {
this.getList();
},
methods: {
/** 查询BOM 明细,存放属性–值列表 */
/** 查询参数 明细,存放属性–值列表 */
getList() {
this.loading = true;
listBomItem(this.queryParams).then(response => {
@@ -189,7 +189,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加BOM 明细,存放属性–值";
this.title = "添加参数 明细,存放属性–值";
},
/** 修改按钮操作 */
handleUpdate(row) {
@@ -200,7 +200,7 @@ export default {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改BOM 明细,存放属性–值";
this.title = "修改参数 明细,存放属性–值";
});
},
/** 提交按钮 */
@@ -231,7 +231,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const itemIds = row.itemId || this.ids;
this.$modal.confirm('是否确认删除BOM 明细,存放属性–值编号为"' + itemIds + '"的数据项?').then(() => {
this.$modal.confirm('是否确认删除参数 明细,存放属性–值编号为"' + itemIds + '"的数据项?').then(() => {
this.loading = true;
return delBomItem(itemIds);
}).then(() => {

View File

@@ -10,7 +10,7 @@
class="create-button"
>
<template v-if="!createLoading">
<i class="el-icon-plus"></i> 创建BOM
<i class="el-icon-plus"></i> 创建参数
</template>
<template v-else>
创建中...
@@ -32,10 +32,10 @@
<div v-if="data && !loading">
<el-form label-width="100px">
<el-form-item label="BOM名称">
<el-form-item label="参数名称">
<el-input v-model="info.bomName" @blur="handleUpdateBom"/>
</el-form-item>
<el-form-item label="BOM编码">
<el-form-item label="参数编码">
<el-input v-model="info.bomCode" @blur="handleUpdateBom"/>
</el-form-item>
</el-form>
@@ -102,7 +102,7 @@ export default {
this.info = response2.data;
} catch (err) {
this.error = err.message || '请求失败,请重试';
console.error('获取BOM详情失败:', err);
console.error('获取参数详情失败:', err);
} finally {
this.loading = false;
}
@@ -115,14 +115,14 @@ export default {
try {
this.createLoading = true;
// 添加一个semi类型
const bomName = (this.type == 'product' ? '产品BOM' : (this.type == 'raw_material' ? '原材料BOM' : '半成品BOM')) + new Date().getTime();
const bomName = (this.type == 'product' ? '产品参数' : (this.type == 'raw_material' ? '原材料参数' : '半成品参数')) + new Date().getTime();
const bomCode = (this.type == 'product' ? 'P' : (this.type == 'raw_material' ? 'R' : 'S')) + new Date().getTime();
const bomResponse = await addBom({
bomName,
bomCode
});
this.$message.success('创建BOM成功');
this.$message.success('创建参数成功');
const bomData = bomResponse.data;
// 根据类型更新产品/原材料
@@ -155,13 +155,13 @@ export default {
},
handleUpdateBom() {
this.$message.warning('正在更新BOM...');
this.$message.warning('正在更新参数...');
updateBom({
bomId: this.id,
bomName: this.info.bomName,
bomCode: this.info.bomCode
}).then(_ => {
this.$message.success('更新BOM成功');
this.$message.success('更新参数成功');
this.$store.dispatch('category/getBomMap');
})
},

View File

@@ -64,7 +64,7 @@
</ProductInfo>
</template>
</el-table-column>
<el-table-column label="SKU" align="center">
<el-table-column label="参数" align="center">
<template slot-scope="scope">
<BomInfoMini item-type="product" :item-id="scope.row.productId" />
</template>

View File

@@ -128,7 +128,7 @@
<dict-tag :options="dict.type.common_swicth" :value="scope.row.isEnabled"/>
</template>
</el-table-column> -->
<el-table-column label="SKU" align="center">
<el-table-column label="参数" align="center">
<template slot-scope="scope">
<BomInfoMini :bomId="scope.row.bomId" />
</template>
@@ -158,7 +158,7 @@
type="text"
icon="el-icon-data-analysis"
@click="handleBom(scope.row)"
>SKU</el-button>
>参数</el-button>
</template>
</el-table-column>
</KLPTable>
@@ -259,7 +259,7 @@
</div>
</el-dialog>
<el-dialog title="SKU" @close="bomDialogVisible = false" :visible.sync="bomDialogVisible" width="600px" append-to-body>
<el-dialog title="参数" @close="bomDialogVisible = false" :visible.sync="bomDialogVisible" width="600px" append-to-body>
<BomPanel :id="bomId" type="product" @addBom="handleAddBom" :itemId="itemId" />
</el-dialog>
</div>

View File

@@ -32,7 +32,7 @@
<RawMaterialSelect v-model="scope.row.rawMaterialId" placeholder="请选择原材料" />
</template>
</el-table-column>
<el-table-column label="SKU" align="center">
<el-table-column label="参数" align="center">
<template #default="scope">
<BomInfoMini item-type="raw_material" :item-id="scope.row.rawMaterialId" />
</template>

View File

@@ -26,7 +26,7 @@
<RawMaterialInfo :materialId="scope.row.rawMaterialId" />
</template>
</el-table-column>
<el-table-column label="SKU" align="center">
<el-table-column label="参数" align="center">
<template #default="scope">
<BomInfoMini item-type="raw_material" :item-id="scope.row.rawMaterialId" />
</template>
@@ -70,7 +70,7 @@
<RawMaterialInfo :materialId="scope.row.rawMaterialId" />
</template>
</el-table-column>
<el-table-column label="SKU" align="center">
<el-table-column label="参数" align="center">
<template #default="scope">
<BomInfoMini item-type="raw_material" :item-id="scope.row.rawMaterialId" />
</template>

View File

@@ -135,7 +135,7 @@
<dict-tag :options="dict.type.common_swicth" :value="scope.row.isEnabled"/>
</template>
</el-table-column> -->
<el-table-column label="SKU" align="center">
<el-table-column label="参数" align="center">
<template slot-scope="scope">
<BomInfoMini :bomId="scope.row.bomId" />
</template>
@@ -144,7 +144,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-info" @click="showParamDetail(scope.row)">参数详情</el-button> -->
<el-button size="mini" type="text" icon="el-icon-plus" @click="handleBom(scope.row)">SKU</el-button>
<el-button size="mini" type="text" icon="el-icon-plus" @click="handleBom(scope.row)">参数</el-button>
<el-button
size="mini"
type="text"
@@ -297,7 +297,7 @@
</el-descriptions>
</el-dialog>
<el-dialog title="SKU" @close="bomDialogVisible = false" :visible.sync="bomDialogVisible" width="600px" append-to-body>
<el-dialog title="参数" @close="bomDialogVisible = false" :visible.sync="bomDialogVisible" width="600px" append-to-body>
<BomPanel :id="bomId" type="raw_material" @addBom="handleAddBom" :itemId="itemId" />
</el-dialog>
</div>