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

export function addWarehouseitem(params) { // 仓商品/新增关联关系
  // 仓配中心/分页查询
  return request({
    url: upcloud_base_wh_control + '/warehouseitem/add',
    method: 'post',
    data: params,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delWarehouseitem(params) { // 仓商品/批量删除
  // 仓配中心/分页查询
  return request({
    url: upcloud_base_wh_control + '/warehouseitem/delete',
    method: 'post',
    data: qs.stringify(params),
  })
}

export function pageWarehouseitem(params) { // 仓商品/查询已关联商品
  // 仓配中心/分页查询
  return request({
    url: upcloud_base_wh_control + '/warehouseitem/itempage',
    method: 'post',
    data: params,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function unpageWarehouseitem(params) { // 仓商品/查询未关联商品
  // 仓配中心/分页查询
  return request({
    url: upcloud_base_wh_control + '/warehouseitem/unitempage',
    method: 'post',
    data: params,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}



