import request from '@/utils/request'

// 查询分页
export function getMyList() {
  return request({
    url: '/admin-api/mes/produce-report/getMyList',
    method: 'get'
  })
}
// 查询分页
export function getOtherList(data) {
  return request({
    url: '/admin-api/mes/produce-report/getOtherList',
    method: 'get',
    params: data
  })

}
// 查询详情
export function getById(id) {
  return request({
    url: '/admin-api/mes/produce-report/get?id='+id,
    method: 'get'
  })
}
// 创建
export function create(data) {
  return request({
    url: '/admin-api/mes/produce-report/create',
    method: 'post',
    data: data
  })
}
// 更新
export function update(data) {
  return request({
    url: '/admin-api/mes/produce-report/update',
    method: 'put',
    data: data
  })
}
// 提交\审核报工单
export function updateStatus(id,status) {
  return request({
    url: '/admin-api/mes/produce-report/updateStatus?id='+id+'&status='+status,
    method: 'get'
  })
}

// 查询详情
export function getDetailByReportId(id) {
  return request({
    url: '/admin-api/mes/produce-report/produce-report-detail/list-by-report-id?reportId='+id,
    method: 'get'
  })
}
// 查询详情
export function deleteByReportId(id) {
  return request({
    url: '/admin-api/mes/produce-report/delete?id='+id,
    method: 'delete'
  })
}
