import request from '@/utils/request'

// 获取物料分工列表
export function getDivisionList(data) {
  return request({
    url: `/material/division/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
    method: 'post',
    data: data
  })
}
// 物料分工新增
export function addDivision(data) {
  return request({
    url: `/material/division/add`,
    method: 'post',
    data: data
  })
}
// 物料分工编辑保存
export function editDivision(data) {
  return request({
    url: `/material/division/edit`,
    method: 'put',
    data: data
  })
}
// 物料分工详情
export function getDivisions(id) {
  return request({
    url: `/material/division/detail/${id}`,
    method: 'get',
  })
}
// 物料分工删除
export function delDivision(ids) {
  return request({
    url: `/material/division/delete/${ids}`,
    method: 'DELETE',
  })
}
// 参照统一接口
export function getRefer(data) {
  return request({
    url: `/refer/query?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
    method: 'post',
    data: data
  })
}
// 查询批次号参照
export function getBatchRefer(data) {
  return request({
    url: `/pu/allot/queryPatchCode?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
    method: 'post',
    data: data
  })
}