import request from '@/utils/request'
import qs from 'qs'

export const baseUrl = '/api/upcloud-base-wh-inbound';

export const api = {
  querySubList: baseUrl + '/exceptionHeaders/v1/extractRcvH',
  addItems: baseUrl + '/exceptionHeaders/v1/add',
  taskSplit: baseUrl + '/exceptionHeaders/v1/extractTask',
};

export function querySubList(parameter) {
  return request({
    method: 'get',
    url: api.querySubList,
    params: parameter,
  })
}

export function getlist(parameter) {
  return request({
    method: 'post',
    url: '/kz/check/getCheckPlan',
    data: parameter,
  })
}
export function creatPlan(parameter) {
  return request({
    method: 'post',
    url: '/kz/check/createCheckPlan',
    data: parameter,
  })
}
export function getcreatPlanlist(parameter) {
  return request({
    method: 'post',
    url: '/kz/check/getCheckDetail',
    data: parameter,
  })
}
export function getAllCheckList(parameter) {
  return request({
    method: 'post',
    url: '/kz/check/getAllCheckList',
    data: parameter,
  })
}
export function addCheckDetail(parameter) {
  return request({
    method: 'post',
    url: '/kz/check/addCheckDetail',
    data: parameter,
  })
}
export function IssueTask(parameter) {
  return request({
    method: 'post',
    url: '/kz/check/xiaFaTask',
    data: parameter,
  })
}
export function deleteCheckPlan(parameter) {
  return request({
    method: 'post',
    url: '/kz/check/deleteCheckPlan',
    data: parameter,
  })
}
export function taskSplit(parameter) {
  return request({
    method: 'get',
    url: api.taskSplit,
    params: parameter,
  })
}
// 删除盘点任务详情
export function deleteCheckDetail(parameter) {
  return request({
    method: 'post',
    url:'/kz/check/deleteCheckDetail',
    data: parameter,
  })
}
// 全部删除盘点任务详情
export function deleteWholeCheckDetail(parameter) {
  return request({
    method: 'post',
    url:'/kz/check/deleteWholeCheckDetail',
    data: parameter,
  })
}
