库存资产excel文件导出
This commit is contained in:
@ -9,9 +9,7 @@ export function listMaterialBase(params: any) {
|
||||
})
|
||||
}
|
||||
|
||||
// ==========================================
|
||||
// 1.1 获取基础信息筛选选项 (所有类别/类型) [新增]
|
||||
// ==========================================
|
||||
// 1.1 获取选项
|
||||
export function getMaterialBaseOptions() {
|
||||
return request({
|
||||
url: '/inbound/base/options',
|
||||
@ -19,7 +17,17 @@ export function getMaterialBaseOptions() {
|
||||
})
|
||||
}
|
||||
|
||||
// 2. 新增基础信息
|
||||
// 1.2 [新增] 导出全口径资产统计表
|
||||
export function exportAssetStatistics(params: any) {
|
||||
return request({
|
||||
url: '/inbound/base/export',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob' // 关键:必须声明为 blob 处理文件流
|
||||
})
|
||||
}
|
||||
|
||||
// 2. 新增
|
||||
export function addMaterialBase(data: any) {
|
||||
return request({
|
||||
url: '/inbound/base/',
|
||||
@ -28,7 +36,7 @@ export function addMaterialBase(data: any) {
|
||||
})
|
||||
}
|
||||
|
||||
// 3. 修改基础信息 (包含状态启用/禁用)
|
||||
// 3. 修改
|
||||
export function updateMaterialBase(data: any) {
|
||||
return request({
|
||||
url: `/inbound/base/${data.id}`,
|
||||
@ -37,18 +45,10 @@ export function updateMaterialBase(data: any) {
|
||||
})
|
||||
}
|
||||
|
||||
// 4. 删除基础信息
|
||||
// 4. 删除
|
||||
export function delMaterialBase(id: number) {
|
||||
return request({
|
||||
url: `/inbound/base/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 5. 获取详情 (可选,用于编辑回显)
|
||||
export function getMaterialBase(id: number) {
|
||||
return request({
|
||||
url: `/inbound/base/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user