修改基础信息启用停用内容,进行修复

This commit is contained in:
dxc
2026-01-30 11:21:10 +08:00
parent 06ba2d7563
commit 482c5a2cb2
4 changed files with 509 additions and 285 deletions

View File

@ -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'
})
}