import request from '@/utils/request'
import { sellerShopHeaders } from '@/utils/sellerShop'

// 可调整商品列表
export function listSellerStockAdjust(query) {
  return request({
    url: '/agri/seller/stock/adjust/list',
    method: 'get',
    params: query,
    headers: sellerShopHeaders()
  })
}

// 确认库存调整
export function confirmSellerStockAdjust(goodsId, data) {
  return request({
    url: '/agri/seller/stock/adjust/' + goodsId,
    method: 'post',
    data: data,
    headers: sellerShopHeaders()
  })
}

// 调整记录
export function listSellerStockAdjustRecords(goodsId, query) {
  return request({
    url: '/agri/seller/stock/adjust/' + goodsId + '/records',
    method: 'get',
    params: query,
    headers: sellerShopHeaders()
  })
}
