feat: 添加产品与原材料BOM信息展示功能
- 新增listProductWithBom和listRawMaterialWithBom接口 - 在ProductSelect和RawMaterialSelect组件中展示BOM属性信息 - 优化物料状态显示条件及仓库过滤逻辑 - 更新统计组件查询参数
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { listCategory } from '@/api/wms/category';
|
||||
import { listProduct } from '@/api/wms/product';
|
||||
import { listRawMaterial } from '@/api/wms/rawMaterial';
|
||||
import { listProductWithBom } from '@/api/wms/product';
|
||||
import { listRawMaterialWithBom } from '@/api/wms/rawMaterial';
|
||||
import { listBomItem } from '@/api/wms/bomItem';
|
||||
|
||||
// 目前存在一个问题,当新增或删除,修改分类、产品、物料时,需要刷新整个页面,才能看到最新的数据
|
||||
@@ -51,7 +51,7 @@ const actions = {
|
||||
if (Object.keys(state.productMap).length > 0) {
|
||||
return Promise.resolve(state.productMap);
|
||||
}
|
||||
return listProduct({ pageNum: 1, pageSize: 10000 }).then(res => {
|
||||
return listProductWithBom({ pageNum: 1, pageSize: 10000 }).then(res => {
|
||||
const map = {};
|
||||
res.rows.forEach(item => {
|
||||
map[item.productId] = item;
|
||||
@@ -65,7 +65,7 @@ const actions = {
|
||||
if (Object.keys(state.rawMaterialMap).length > 0) {
|
||||
return Promise.resolve(state.rawMaterialMap);
|
||||
}
|
||||
return listRawMaterial({ pageNum: 1, pageSize: 10000 }).then(res => {
|
||||
return listRawMaterialWithBom({ pageNum: 1, pageSize: 10000 }).then(res => {
|
||||
const map = {};
|
||||
res.rows.forEach(item => {
|
||||
map[item.rawMaterialId] = item;
|
||||
|
||||
Reference in New Issue
Block a user