fix(inbound/buy): 采购入库表单批号续号改用精准接口

- checkHistoryAndSetMode 改调 /inbound/buy/latest-record 续号,不再依赖 getBuyList 前1000条
- 采购单导入“仅有 base_id”分支也自动续批号并带历史库位
This commit is contained in:
yueli
2026-09-08 18:16:08 +08:00
parent 2b0e335790
commit 00dde3a896
2 changed files with 23 additions and 10 deletions

View File

@ -54,6 +54,15 @@ export function searchMaterialBase(keyword: string, page: number = 1, company?:
})
}
// 6.1 按物料精准取“最近一次采购入库记录”(批号自增用;不再全局拉前 N 条再前端过滤)
export function getBuyLatestRecord(baseId: number) {
return request({
url: '/inbound/buy/latest-record',
method: 'get',
params: { base_id: baseId }
})
}
// 7. 文件上传
export function uploadFile(data: FormData) {
return request({