import axios from '@/libs/axios.js'

// 数据统计信息
export const bizData = (params) => {
  return axios.request({
    url: `home/queryBizData`,
    data: params,
    method: 'post'
  })
}

// 销售单列表
export const salesList = (params) => {
  const url = `sales/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios.request({
    url: url,
    data: params,
    method: 'post'
  })
}
//  销售 审核
export const salesWriteAudit = (params) => {
  return axios.request({
    url: 'sales/audit',
    data: params,
    method: 'post'
  })
}
//  销售 出库
export const salesWriteStockOut = (params) => {
  return axios.request({
    url: `sales/stockOut/${params.salesBillSn}`,
    method: 'get'
  })
}
//  销售 删除
export const salesDel = (params) => {
  return axios.request({
    url: `sales/delete/${params.id}`,
    data: params,
    method: 'post'
  })
}
//  销售详情 列表  分页
export const salesDetailList = (params) => {
  const url = `salesDetail/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios.request({
    url: url,
    data: params,
    method: 'post'
  })
}

// 产品报价列表
export const dealerProductList = (params) => {
  const url = `dealerProduct/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios.request({
    url: url,
    data: params,
    method: 'post'
  })
}
//  结算方式列表
export const settleStyleQueryAll = (params) => {
  return axios.request({
    url: 'settleStyle/findAll',
    data: params,
    method: 'post'
  })
}

// 客户列表
export const customerList = (params) => {
	const url=`cust/queryPage/${params.pageNo}/${params.pageSize}`
	delete params.pageNo
	delete params.pageSize
	return axios.request({
		url: url,
		data: params,
		method: 'post'
	})
}