/*
 * @Author: xiachao 958053195@qq.com
 * @Date: 2023-09-05 10:00:34
 * @LastEditors: xiachao 958053195@qq.com
 * @LastEditTime: 2023-12-06 16:28:02
 * @FilePath: \ruoyi-ui\src\api\procure\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import newRequest from '@/utils/newRequest';

// 查询品牌列表
export function getBrandNameList() {
  return newRequest({
    url: '/brand/list',
    method: 'get'
  })
}

// 查询列表
export function getList(data) {
  return newRequest({
    url: '/sku/manageList',
    method: 'post',
    data,
  })
}

// 查询价格趋势
export function getGoodsDetail(params) {
  return newRequest({
    url: '/procure/goods/detail',
    method: 'get',
    params,
  })
}

// 查询价格趋势
export function bindSku(data) {
  return newRequest({
    url: '/procure/bind/sku',
    method: 'post',
    data,
  })
}

// 查询价格趋势
export function skuList(params) {
  return newRequest({
    url: '/sku/list',
    method: 'get',
    params,
  })
}

export function getSpuList(data) {
  return newRequest({
    url: '/spu/spuDropDown',
    method: 'post',
    data,
  })
}

// 查询价格趋势
export function getPrice() {
  return newRequest({
    url: '/procure/new/price',
    method: 'get'
  })
}

export function skuInfo(data) {
  return newRequest({
    url: '/sku/info',
    method: 'put',
    data,
  })
}

export function spuAttr(params) {
  return newRequest({
    url: '/spu/spuAttr',
    method: 'get',
    params,
  })
}


export function spuList(params) {
  return newRequest({
    url: '/spu/list',
    method: 'get',
    params,
  })
}


export function spuAdd(data) {
  return newRequest({
    url: '/spu/add',
    method: 'post',
    data,
  })
}

export function spuUpdate(data) {
  return newRequest({
    url: '/spu/update',
    method: 'post',
    data,
  })
}

export function spuImport(data){
  return newRequest({
    url: '/spu/import',
    method: 'post',
    data,
  })
}

export function goodsList(data){
  return newRequest({
    url: '/whole_goods/list',
    method: 'post',
    data,
  })
}

export function channelList(){
  return newRequest({
    url: '/whole_goods/channelList',
    method: 'get',
  })
}

export function goodsUpdata(data){
  return newRequest({
    url: '/whole_goods/update',
    method: 'post',
    data
  })
}

export function saleList(data){
  return newRequest({
    url: '/whole_goods/sale/list',
    method: 'post',
    data
  })
}



export function relationList(data){
  return newRequest({
    url: '/sku/relation/list',
    method: 'post',
    data
  })
}


export function relationPlatformList(data){
  return newRequest({
    url: '/sku/relation/platform/list',
    method: 'post',
    data
  })
}

export function relationDetail(params){
  return newRequest({
    url: '/sku/relation/detail',
    method: 'get',
    params
  })
}

export function relationDelete(params){
  return newRequest({
    url: '/sku/relation/delete',
    method: 'get',
    params
  })
}

export function relationBatchDelete(data){
  return newRequest({
    url: '/sku/relation/batch/delete',
    method: 'post',
    data
  })
}

export function relationAdd(data){
  return newRequest({
    url: '/sku/relation/add',
    method: 'post',
    data
  })
}

export function relationUpdate(data){
  return newRequest({
    url: '/sku/relation/update',
    method: 'post',
    data
  })
}

export function weightCostList(data){
  return newRequest({
    url: '/weightCost/list',
    method: 'post',
    data
  })
}

export function warehouseList(){
  return newRequest({
    url: '/weightCost/warehouse/list',
    method: 'get'
  })
}
