import request from '@/utils/request' // 1. 获取基础信息列表 export function listMaterialBase(params: any) { return request({ url: '/inbound/base/list', method: 'get', params }) } // 1.1 获取选项 export function getMaterialBaseOptions() { return request({ url: '/inbound/base/options', method: 'get' }) } // 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/', method: 'post', data }) } // 3. 修改 export function updateMaterialBase(data: any) { return request({ url: `/inbound/base/${data.id}`, method: 'put', data }) } // 4. 删除 export function delMaterialBase(id: number) { return request({ url: `/inbound/base/${id}`, method: 'delete' }) } // 5. 批量设置预警 export function batchSetWarning(data: any[]) { return request({ url: '/inbound/base/warning/batch-set', method: 'post', data }) } // 6. 批量设置强制质检 export function batchSetInspection(data: { ids: number[], isInspectionRequired: boolean }) { return request({ url: '/inbound/base/batch-inspection', method: 'post', data }) } // 7. 获取智能分组规格最大连号 export function getLatestSpecs() { return request({ url: '/inbound/base/spec-latest', method: 'get' }) }