import { axios } from '@/utils/request'

//  卫星仓库存  列表  有分页
export const satelliteWHStockList = (params) => {
  const url = `/satelliteWHStock/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  卫星仓库存  补货清单  列表
export const satelliteWHSupplyList = (params) => {
  const url = `/satelliteWHSupply/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  卫星仓库存  补货清单  新增
export const satelliteWHSupplyInsert = (params) => {
  return axios({
    url: `/satelliteWHSupply/insert/${params.sn}`,
    data: params.satelliteWarehouseSupply,
    method: 'post'
  })
}
//  卫星仓库存  补货清单  更新产品数量
export const satelliteWHSupplyUpdate = (params) => {
  return axios({
    url: '/satelliteWHSupply/updateQty',
    data: params,
    method: 'post'
  })
}
//  卫星仓库存  补货清单  移除产品
export const satelliteWHSupplyDel = (params) => {
  const url = `/satelliteWHSupply/deleteBySn/${params.sn}`
  return axios({
    url: url,
    method: 'get'
  })
}
//  卫星仓库存  补货清单  校验库存
export const satelliteWHSupplyValidateStock = (params) => {
  const url = `/satelliteWHSupply/validateStock/${params.sn}`
  return axios({
    url: url,
    method: 'get'
  })
}
//  卫星仓库存  补货清单  创建销售单
export const satelliteWHSupplyAddSales = (params) => {
  const url = `/satelliteWHSupply/createSalesBill/${params.sn}`
  return axios({
    url: url,
    method: 'get'
  })
}
//  提现  列表  有分页
export const satelliteWHWithdrawalList = (params) => {
  const url = `/satelliteWHWithdrawal/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  提现  账户信息
export const satelliteWHWithdrawalAccount = (params) => {
  return axios({
    url: '/satelliteWHWithdrawal/queryAccount',
    method: 'get'
  })
}
//  提现  申请提现
export const satelliteWHWithdrawalApply = (params) => {
  return axios({
    url: '/satelliteWHWithdrawal/applyWithdrawal',
    data: params,
    method: 'post'
  })
}

//  分账  列表  有分页
export const satelliteWHSeparateList = (params) => {
  const url = `/satelliteWHSeparate/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  分账  列表  合计
export const satelliteWHSeparateTotal = (params) => {
  return axios({
    url: '/satelliteWHSeparate/findTotalSeparate',
    data: params,
    method: 'post'
  })
}
