import request from '@/utils/request'
const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API

// 查询外协发出单历史记录列表
export function listOutsourcedRecords(query) {
  return request({
    url:baseUrl +  '/business/outsourcedRecords/list',
    method: 'get',
    params: query
  })
}
export function listInnerOutsourcedRecords(query) {
  return request({
    url:baseUrl +  '/business/outsourcedRecords/innerList',
    method: 'get',
    params: query
  })
}

// 查询外协发出单历史记录详细
export function getOutsourcedRecords(id) {
  return request({
    url: baseUrl + '/business/outsourcedRecords/' + id,
    method: 'get'
  })
}

// 新增外协发出单历史记录
export function addOutsourcedRecords(data) {
  return request({
    url:baseUrl +  '/business/outsourcedRecords',
    method: 'post',
    data: data
  })
}

// 修改外协发出单历史记录
export function updateOutsourcedRecords(data) {
  return request({
    url: baseUrl + '/business/outsourcedRecords',
    method: 'put',
    data: data
  })
}

// 删除外协发出单历史记录
export function delOutsourcedRecords(id) {
  return request({
    url:baseUrl +  '/business/outsourcedRecords/' + id,
    method: 'delete'
  })
}
