import upload from '@/utils/upload'
import request from '@/utils/request'

// 查询分页
export function getPage() {
  return request({
    url: '/admin-api/mes/feeding-record/page',
    method: 'get'
  })
}
// 查询列表
export function getRecordList(recordStatus) {
  return request({
    url: '/admin-api/mes/feeding-record/getRecordList?recordStatus='+recordStatus,
    method: 'get'
  })
}
// 查询详情
export function getById(id) {
  return request({
    url: '/admin-api/mes/feeding-record/get?id='+id,
    method: 'get'
  })
}
// 创建
export function create(data) {
  return request({
    url: '/admin-api/mes/feeding-record/create',
    method: 'post',
    data: data
  })
}
// 更新
export function update(data) {
  return request({
    url: '/admin-api/mes/feeding-record/update',
    method: 'put',
    params: data
  })
}
// 查询详情
export function deleteById(id) {
  return request({
    url: '/admin-api/mes/feeding-record/delete?id='+id,
    method: 'delete'
  })
}
// 查询明细列表
export function getDetailByRecordId(id) {
  return request({
    url: '/admin-api/mes/feeding-record/feeding-record-detail/list-by-record-id?recordId='+id,
    method: 'get'
  })
}
// 更新状态
export function updateStatus(id,status) {
  return request({
    url: '/admin-api/mes/feeding-record/update-status?id='+id+'&status='+status,
    method: 'put'
  })
}
