feat: BOM 库存接口支持按版本查询,修复同一编号多版本下拉回显错乱

This commit is contained in:
yueli
2026-09-02 18:39:17 +08:00
parent 85130db6ea
commit bf7b2cc6d3
3 changed files with 9 additions and 7 deletions

View File

@ -19,12 +19,13 @@ export function getBomSummary(params?: { keyword?: string }) {
}
// 获取BOM详情含库存信息
export function getBomWithStock(bomNo: string) {
export function getBomWithStock(bomNo: string, version?: string) {
const trimmed = bomNo.replace(/^\/+|\/+$/g, '');
const encoded = encodeURIComponent(trimmed);
return request({
url: `/v1/bom/stock/${encoded}`,
method: 'get'
method: 'get',
params: version ? { version } : {}
})
}