import request from '@/utils/request'
export function fetchList(params) {
  return request({
    url:'/product/list',
    method:'get',
    params:params
  })
}

export function fetchSimpleList(params) {
  return request({
    url:'/product/simpleList',
    method:'get',
    params:params
  })
}

export function updateDeleteStatus(params) {
  return request({
    url:'/product/update/deleteStatus',
    method:'post',
    params:params
  })
}

export function updateNewStatus(params) {
  return request({
    url:'/product/update/newStatus',
    method:'post',
    params:params
  })
}

export function updateRecommendStatus(params) {
  return request({
    url:'/product/update/recommendStatus',
    method:'post',
    params:params,
    data:params,
    params
  })
}

export function updatePublishStatus(params) {
  return request({
    url:'/product/update/publishStatus',
    method:'post',
    data:params,
    params
  })
}

export function createProduct(data) {
  return request({
    url:'/product/create',
    method:'post',
    data:data
  })
}

export function updateProduct(id,data) {
  return request({
    url:'/product/update/'+id,
    method:'post',
    data:data
  })
}

export function getProduct(id) {
  return request({
    url:'/product/updateInfo/'+id,
    method:'get',
  })
}

/** 进货清单列表 */
export function getProductSkuStockRecord(params) {
  return request({
    url:'/PmsProductSkuStockRecord/list',
    method:'post',
    data:params
  })
}

/** 新增商品库存入库记录 */
export function getProductSkuStockRecordCreate(params) {
  return request({
    url:'/PmsProductSkuStockRecord/create',
    method:'post',
    data:params
  })
}
/** 修改商品库存入库记录 */
export function getProductSkuStockRecordUpdate(params) {
  return request({
    url:'/PmsProductSkuStockRecord/update',
    method:'post',
    data:params
  })
}

