import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/api/pick/list',
    method: 'get',
    params: query
  })
}

export function OffLineOrOnLine(data) {
  console.log(data)
  return request({
    url: '/api/pick/list/update',
    method: 'post',
    data
  })
}

export function CreatePick(data) {
  return request({
    url: '/api/pick/create',
    method: 'post',
    data
  })
}

export function fetchPickDetail(id) {
  return request({
    url: '/api/pick/detail',
    method: 'get',
    params: { id }
  })
}

export function fetchPickUserList(query) {
  return request({
    url: '/api/pick/user/list',
    method: 'get',
    params: query
  })
}

export function AddFakePickNums(data) {
  return request({
    url: '/api/pick/add_fake_pick_nums',
    method: 'post',
    data
  })
}
