import request from '@/utils/request'

import { downFile } from '@/utils/request'
/**
* 入库管理/退料记录表分页查询
* @param {查询条件} data
*/
export function listInRetreatRecord(query) {
  return request({
    url: 'business/InRetreatRecord/list',
    method: 'get',
    params: query,
  })
}


/**
* 新增入库管理/退料记录表
* @param data
*/
export function addInRetreatRecord(data) {
  return request({
    url: 'business/InRetreatRecord',
    method: 'post',
    data: data,
  })
}

/**
* 修改入库管理/退料记录表
* @param data
*/
export function updateInRetreatRecord(data) {
  return request({
    url: 'business/InRetreatRecord',
    method: 'PUT',
    data: data,
  })
}

/**
* 获取入库管理/退料记录表详情
* @param {Id}
*/
export function getInRetreatRecord(id) {
  return request({
    url: 'business/InRetreatRecord/' + id,
    method: 'get'
  })
}

/**
* 删除入库管理/退料记录表
* @param {主键} pid
*/
export function delInRetreatRecord(pid) {
  return request({
    url: 'business/InRetreatRecord/' + pid,
    method: 'delete'
  })
}

// 清空入库管理/退料记录表
export function clearInRetreatRecord() {
  return request({
    url: 'business/InRetreatRecord/clean',
    method: 'delete'
  })
}

// 导出入库管理/退料记录表
export async function exportInRetreatRecord(query) {
  await downFile('business/InRetreatRecord/export', { ...query })
}

