feat(@vben/web-antd): erp-移除重复接口

-移除了 stock API 中的 getStockCountByProductId 函数
-将 getStockCount 函数的使用范围从 product 模块扩展到 purchase 模块
- 更新了 PurchaseOrderItemForm 组件中的库存查询逻辑
pull/181/head
nehc 2025-07-28 14:45:47 +08:00
parent b3a2d29a3b
commit b3942bb8ff
2 changed files with 2 additions and 11 deletions

View File

@ -60,15 +60,6 @@ export function getStockCount(productId: number) {
});
}
/**
* ID
*/
export function getStockCountByProductId(productId: number) {
return requestClient.get<number>('/erp/stock/get-count', {
params: { productId },
});
}
/**
* Excel
*/

View File

@ -9,7 +9,7 @@ import { Input, InputNumber, Select } from 'ant-design-vue';
import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { getProductSimpleList } from '#/api/erp/product/product';
import { getStockCountByProductId } from '#/api/erp/stock/stock';
import { getStockCount } from '#/api/erp/stock/stock';
import { usePurchaseOrderItemTableColumns } from '../data';
@ -142,7 +142,7 @@ async function handleProductChange(productId: any, row: any) {
return;
}
const stockCount = await getStockCountByProductId(productId);
const stockCount = await getStockCount(productId);
row.productId = productId;
row.productUnitId = product.unitId;