feat(@vben/web-antd): erp-移除重复接口
-移除了 stock API 中的 getStockCountByProductId 函数 -将 getStockCount 函数的使用范围从 product 模块扩展到 purchase 模块 - 更新了 PurchaseOrderItemForm 组件中的库存查询逻辑pull/181/head
parent
b3a2d29a3b
commit
b3942bb8ff
|
|
@ -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
|
* 导出产品库存 Excel
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { Input, InputNumber, Select } from 'ant-design-vue';
|
||||||
|
|
||||||
import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { getProductSimpleList } from '#/api/erp/product/product';
|
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';
|
import { usePurchaseOrderItemTableColumns } from '../data';
|
||||||
|
|
||||||
|
|
@ -142,7 +142,7 @@ async function handleProductChange(productId: any, row: any) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const stockCount = await getStockCountByProductId(productId);
|
const stockCount = await getStockCount(productId);
|
||||||
|
|
||||||
row.productId = productId;
|
row.productId = productId;
|
||||||
row.productUnitId = product.unitId;
|
row.productUnitId = product.unitId;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue