import request from '@/utils/request'

// 查询物料出库列表
export function listMaterialPicking(query) {
  return request({
    url: '/business/materialPicking/list',
    method: 'get',
    params: query
  })
}

// 查询物料出库列表
export function listPickingAndInfoList(query) {
  return request({
    url: '/business/materialPicking/info/list',
    method: 'get',
    params: query
  })
}

// 查询物料出库详细
export function getMaterialPicking(id) {
  return request({
    url: '/business/materialPicking/' + id,
    method: 'get'
  })
}

// 新增物料出库
export function addMaterialPicking(data) {
  return request({
    url: '/business/materialPicking',
    method: 'post',
    data: data
  })
}

// 修改物料出库
export function updateMaterialPicking(data) {
  return request({
    url: '/business/materialPicking',
    method: 'put',
    data: data
  })
}

// 删除物料出库
export function delMaterialPicking(id) {
  return request({
    url: '/business/materialPicking/' + id,
    method: 'delete'
  })
}

// 确认物料出库
export function confirmMaterialPicking(id) {
  return request({
    url: '/business/materialPicking/confirm/' + id,
    method: 'put'
  })
}

// 新增物料出库退料
export function addMaterialPickingReturn(data) {
  return request({
    url: '/business/materialPicking/return',
    method: 'post',
    data: data
  })
}


// 修改物料出库退料
export function updateMaterialPickingReturn(data) {
  return request({
    url: '/business/materialPicking/return',
    method: 'put',
    data: data
  })
}
