import service from '@/utils/request'

/*
* 计件工计时单维护
*/

// 计件工计时单侧边栏
export const getSide = (data) => {
  return service({
    url: '/mes_server/piece_work_schedule/getTab',
    method: 'get',
    data
  })
}

// 计件工计时单列表
export const getTable = (params) => {
  return service({
    url: '/mes_server/piece_work_schedule/getList',
    method: 'get',
    params
  })
}

// 定位
export const getLocate = (params) => {
  return service({
    url: '/mes_server/piece_work_schedule/search',
    method: 'get',
    params
  })
}

// 详情
export const getDetail = (params) => {
  return service({
    url: '/mes_server/piece_work_schedule/detail',
    method: 'get',
    params
  })
}

// 修改
export const updateData = (data) => {
  return service({
    url: '/mes_server/piece_work_schedule/edit',
    method: 'post',
    data
  })
}

// 新增
export const createData = (data) => {
  return service({
    url: '/mes_server/piece_work_schedule/add',
    method: 'post',
    data
  })
}

// 删除
export const deleteData = (params) => {
  return service({
    url: '/mes_server/piece_work_schedule/del',
    method: 'get',
    params
  })
}

// 查询员工名称
export const getYg = (params) => {
  return service({
    url: '/mes_server/packaging_count_document/getYg',
    method: 'get',
    params
  })
}
