import request from '@/utils/request'
import { downFile } from '@/utils/request'

/**
* 出库管理/出库记录表分页查询
* @param {查询条件} data
*/
export function listOutOutstoreRecord(query) {
  return request({
    url: 'business/OutOutstoreRecord/list',
    method: 'get',
    params: query,
  })
}


/**
* 新增出库管理/出库记录表
* @param data
*/
export function addOutOutstoreRecord(data) {
  return request({
    url: 'business/OutOutstoreRecord',
    method: 'post',
    data: data,
  })
}

/**
* 修改出库管理/出库记录表
* @param data
*/
export function updateOutOutstoreRecord(data) {
  return request({
    url: 'business/OutOutstoreRecord',
    method: 'PUT',
    data: data,
  })
}

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

/**
* 删除出库管理/出库记录表
* @param {主键} pid
*/
export function delOutOutstoreRecord(pid) {
  return request({
    url: 'business/OutOutstoreRecord/' + pid,
    method: 'delete'
  })
}

// 清空出库管理/出库记录表
export function clearOutOutstoreRecord() {
  return request({
    url: 'business/OutOutstoreRecord/clean',
    method: 'delete'
  })
}

// 导出出库管理/出库记录表
export async function exportOutOutstoreRecord(query) {
  await downFile('business/OutOutstoreRecord/export', { ...query })
}

