import request from '@/utils/request'
import qs from 'qs';
import { upcloud_base_wh_control,upcloud_base_wh,upcloud_base_common } from "@/config/serviceSettings";


export function addItem(params) {
  params.businesstype= '2011' //页面类型:拣货
  return request({
    url: upcloud_base_wh_control + '/checkWorkGroup/add',
    method: 'post',
    data: params,
  })
}

export function updateItem(params) {
  params.businesstype= '2011' //页面类型:拣货
  return request({
    url: upcloud_base_wh_control + '/checkWorkGroup/update',
    method: 'post',
    data: params,
  })
}

export function delItems(params) {
  return request({
    url: upcloud_base_wh_control + '/checkWorkGroup/delete?ids=' + params.join(),
    method: 'post',
  })
}

export function queryItemCategoryList(params) {
  return request({
    url: upcloud_base_common+'/dict/listbytype?dicttypeCodes=item_health_category',
    method: 'post',
  })
}

export function queryWorkstationList(params) {
  return request({
    url: upcloud_base_wh+'/workstation/list',
    method: 'get',
  })
}