import request from '@/utils/request'

// 查询工序信息列表
export function listProcessInfo(query) {
  return request({
    url: '/mes/processInfo/list',
    method: 'get',
    params: query
  })
}

// 查询工序下拉框列表
export function findProcessList(query) {
  return request({
    url: '/mes/processInfo/findProcessList',
    method: 'get',
    params: query
  })
}

// 查询工序信息详细
export function getProcessInfo(processId) {
  return request({
    url: '/mes/processInfo/' + processId,
    method: 'get'
  })
}

// 查询工序管理用户信息详细
export function getProcessInfoUser(processId) {
  return request({
    url: '/mes/processInfo/user/' + processId,
    method: 'get'
  })
}

// 新增工序信息
export function addProcessInfo(data) {
  return request({
    url: '/mes/processInfo',
    method: 'post',
    data: data
  })
}

// 修改工序信息
export function updateProcessInfo(data) {
  return request({
    url: '/mes/processInfo',
    method: 'put',
    data: data
  })
}

// 修改工序关联人员信息
export function updateProcessInfoUser(data) {
  return request({
    url: '/mes/processInfo/user',
    method: 'put',
    data: data
  })
}

// 删除工序信息
export function delProcessInfo(processId) {
  return request({
    url: '/mes/processInfo/' + processId,
    method: 'delete'
  })
}
