import request from '@/utils/request'

/**
* 接口管理/SAP关键件清单记录表分页查询
* @param {查询条件} data
*/
export function listSapBomRecord(query) {
  return request({
    url: 'business/SapBomRecord/list',
    method: 'get',
    params: query,
  })
}


/**
* 新增接口管理/SAP关键件清单记录表
* @param data
*/
export function addSapBomRecord(data) {
  return request({
    url: 'business/SapBomRecord',
    method: 'post',
    data: data,
  })
}

/**
* 修改接口管理/SAP关键件清单记录表
* @param data
*/
export function updateSapBomRecord(data) {
  return request({
    url: 'business/SapBomRecord',
    method: 'PUT',
    data: data,
  })
}

/**
* 获取接口管理/SAP关键件清单记录表详情
* @param {Id}
*/
export function getSapBomRecord(id) {
  return request({
    url: 'business/SapBomRecord/' + id,
    method: 'get'
  })
}

/**
* 删除接口管理/SAP关键件清单记录表
* @param {主键} pid
*/
export function delSapBomRecord(pid) {
  return request({
    url: 'business/SapBomRecord/' + pid,
    method: 'delete'
  })
}

// 清空接口管理/SAP关键件清单记录表
export function clearSapBomRecord() {
  return request({
    url: 'business/SapBomRecord/clean',
    method: 'delete'
  })
}

// 导出接口管理/SAP关键件清单记录表
export async function exportSapBomRecord(query) {
  await downFile('business/SapBomRecord/export', { ...query })
}

