修改基础信息启用停用内容,进行修复
This commit is contained in:
@ -19,9 +19,10 @@ export function addMaterialBase(data: any) {
|
||||
}
|
||||
|
||||
// 3. 修改基础信息 (包含状态启用/禁用)
|
||||
// 【修复点】: 必须在 URL 中拼接 data.id,否则后端会报 405 Method Not Allowed
|
||||
export function updateMaterialBase(data: any) {
|
||||
return request({
|
||||
url: '/inbound/base/',
|
||||
url: `/inbound/base/${data.id}`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
@ -30,7 +31,7 @@ export function updateMaterialBase(data: any) {
|
||||
// 4. 删除基础信息
|
||||
export function delMaterialBase(id: number) {
|
||||
return request({
|
||||
url: `/inbound/base/${id}`, // 注意这里是反引号,用于拼接 URL
|
||||
url: `/inbound/base/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user