import request from '@/utils/request'

// 获取物料变更单列表
export function getChangeList(params) {
  return request({
    url: `/material/change/list`,
    method: 'get',
    params: params
  })
}
// 物料变更单新增
export function addChangeList(data) {
  return request({
    url: `/material/change/add`,
    method: 'post',
    data: data
  })
}
// 物料变更单修改
export function editChangeList(data) {
  return request({
    url: `/material/change/edit`,
    method: 'post',
    data: data
  })
}
// 物料变更单修改
export function deleteChangeList(data) {
  return request({
    url: `/material/change/del`,
    method: 'post',
    data: data
  })
}
// 获取物料变更单详情
export function getChangeDetails(id) {
  return request({
    url: `/material/change/query/${id}`,
    method: 'get',
  })
}
// 获取物料列表信息
export function getMaterialList(data) {
  return request({
    url: `/system/material/list?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
    method: 'post',
    data: data
  })
}
// 获取物料基本信息详细信息
export function getMaterialDetails(id) {
  return request({
    url: `/system/material/details/${id}`,
    method: 'get',
  })
}
// 获取生产厂家列表信息
export function getProductFactory(data) {
  return request({
    url: `/system/archival/queryManufacturer?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
    method: 'post',
    data: data
  })
}
