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

const api = '/api'




// 1、工作组/分页查询
export function workgroup_page(params) {
  return request({
    url: upcloud_base_wh_control + '/workgroup/page',
    method: 'get',
    params: params,
    headers: {
      'Content-Type': 'x-www-form-urlencoded;'
    }
  })
}

// 1、/工作组/新增
export function workgroup_add(params) {
  params.businesstype= '3011'
  return request({
    url: upcloud_base_wh_control + '/workgroup/add',
    method: 'post',
    data: params,
    headers: {
      'Content-Type': 'application/json;'
    }
  })
}


// 1、/工作组/修改
export function workgroup_update(params) {
  params.businesstype= '3011'
  return request({
    url: upcloud_base_wh_control + '/workgroup/update',
    method: 'post',
    data: params,
    headers: {
      'Content-Type': 'application/json;'
    }
  })
}


// 1、工作组/批量删除
export function workgroup_delete(params) {
  return request({
    url: upcloud_base_wh_control + '/workgroup/delete',
    method: 'post',
    params: params,
    headers: {
      'Content-Type': 'x-www-form-urlencoded;'
    }
  })
}
// 仓库/分页查询
export function warehouse_page(params) { 
  return request({
    url: upcloud_base_wh+'/warehouse/page',
    method: 'get',
    params: params,
  })
}

// 数据字典_通用数据字典/根据字典类型集合查询列表
export function dict_listbytype(params) { 
  return request({
    url: upcloud_base_common + '/dict/listbytype',
    method: 'post',
    params: params,
  })
}

// /2、库区管理/条件分页2
export function baseWmsWarehouseArea_page2(params) {
  return request({
    url: upcloud_base_wh+'/baseWmsWarehouseArea/page2',
    method: 'get',
    params: params,
    headers: {
      'Content-Type': 'x-www-form-urlencoded;'
    }
  })
}
