针对于采购页面进行优化逻辑

This commit is contained in:
dxc
2026-01-28 11:22:08 +08:00
parent 87864a1c4f
commit 6f4917f57e
6 changed files with 1325 additions and 534 deletions

View File

@ -1,19 +1,45 @@
import request from '@/utils/request'
// 1. 获取列表
export function getBuyList(params: any) {
return request({ url: '/inbound/buy/list', method: 'get', params })
return request({
url: '/inbound/buy/list',
method: 'get',
params
})
}
// 2. 新增入库
export function createBuyInbound(data: any) {
return request({ url: '/inbound/buy/submit', method: 'post', data })
return request({
url: '/inbound/buy/submit',
method: 'post',
data
})
}
// 新增:更新接口
// 3. 更新入库
export function updateBuyInbound(id: number, data: any) {
return request({ url: `/inbound/buy/${id}`, method: 'put', data })
return request({
url: `/inbound/buy/${id}`,
method: 'put',
data
})
}
// 新增:删除接口
// 4. 删除入库
export function deleteBuyInbound(id: number) {
return request({ url: `/inbound/buy/${id}`, method: 'delete' })
return request({
url: `/inbound/buy/${id}`,
method: 'delete'
})
}
// 5. 搜索基础物料
export function searchMaterialBase(keyword: string) {
return request({
url: '/inbound/buy/search-base',
method: 'get',
params: { keyword }
})
}