import request from '@/utils/request'

const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API

/**
 * 获取 生产批次报工 列表
 * @param {*} data
 * @returns
 */
export function listDayworkItem(query) {
  return request({
    url: baseUrl + '/business/auxiliaryDaywork/list',
    method: 'get',
    params: query
  })
}

export function getDayworkItemInfo(id) {
  return request({
    url: baseUrl + '/business/auxiliaryDaywork/getInfo/' + id,
    method: 'get'
  })
}

export function updateDayworkItemInfo(data) {
  return request({
    url: baseUrl + '/business/auxiliaryDaywork/update',
    method: 'post',
    data: data
  })
}

export function listDaywork(data) {
  return request({
    url: baseUrl + '/business/auxiliaryDaywork/listDaywork',
    method: 'get',
    params: data
  })
}

export function getRejectList(data) {
  return request({
    url: baseUrl + '/business/auxiliaryDaywork/getRejectList',
    method: 'post',
    data: data
  })
}
export function saveRejectList(data) {
  return request({
    url: baseUrl + '/business/auxiliaryDaywork/saveRejectList',
    method: 'post',
    data: data
  })
}