import { request } from '@/api/_service'

const BASE = 'planning_production/wip/wip_management/'

function apiParams (method, data = {}) {
  return {
    method,
    platform: 'background',
    ...data
  }
}

export function getWipDataList (data) {
  return request({
    url: BASE + 'list',
    method: 'get',
    params: apiParams('planning_production_wip_wip_management_list', data)
  })
}

export function createWipData (data) {
  return request({
    url: BASE + 'create',
    method: 'post',
    data: apiParams('planning_production_wip_wip_management_create', data)
  })
}
