import request from '@/utils/request'

// 创建入库申请主
export function createInRequest(data) {
  return request({
    url: '/rtkwms/in-request/create',
    method: 'post',
    data: data
  })
}

// 更新入库申请主
export function updateInRequest(data) {
  return request({
    url: '/rtkwms/in-request/update',
    method: 'put',
    data: data
  })
}

// 删除入库申请主
export function deleteInRequest(id) {
  return request({
    url: '/rtkwms/in-request/delete?id=' + id,
    method: 'delete'
  })
}

// 获得入库申请主
export function getInRequest(id) {
  return request({
    url: '/rtkwms/in-request/get?id=' + id,
    method: 'get'
  })
}

// 获得入库申请主分页
export function getInRequestPage(params) {
  return request({
    url: '/rtkwms/in-request/page',
    method: 'get',
    params
  })
}
// 导出入库申请主 Excel
export function exportInRequestExcel(params) {
  return request({
    url: '/rtkwms/in-request/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
