import request from '@/utils/request'

// 获取列表
export function getList(params) {
  return request({
    url: '/requisition/list',
    method: 'get',
    params
  })
}

// 获取详情
export function getDetail(params) {
  return request({
    url: '/requisition/detail',
    method: 'get',
    params
  })
}

// 审批
export function examineData(params) {
  return request({
    url: '/requisition/approval',
    method: 'post',
    params
  })
}

// 删除
export function deleteData(params) {
  return request({
    url: '/requisition/delete',
    method: 'post',
    params
  })
}

// 编辑
export function editData(params) {
  return request({
    url: '/requisition/updateRequisition',
    method: 'post',
    data: params
  })
}

// 获取仓库列表
export function getWarehouseList(params) {
  return request({
    url: '/stock/listStock',
    method: 'get',
    params
  })
}
