import { fetch } from '@/utils'
// 获取客户列表
export function getCustomerList(params) {
  return fetch({
    url: '/customer/queryCustomer_PS',
    method: 'post',
    data: params,
    loading: true
  })
}
// 获取采购商品列表
export function getCgGoodsList(params) {
  return fetch({
    url: '/purchaseCommon/queryAllGoods',
    method: 'post',
    data: params,
    loading: true
  })
}
// 获取商品列表
export function getGoodsList(params) {
  return fetch({
    url: '/product/queryGoods_PS',
    method: 'post',
    data: params,
    loading: true
  })
}
// 获取供应商列表
export function getCgSupplyList(params) {
  return fetch({
    url: '/purchaseCommon/querySupply',
    method: 'post',
    data: params,
    loading: true
  })
}
// 获取订单来源列表
export function getOrderOrigin(params) {
  return fetch({
    url: '/orders/queryOrderSource',
    // url: '/newErp/queryOrderSource',
    method: 'post',
    data: params,
    loading: true
  })
}
// 获取订单状态列表
export function getOrderState(params) {
  return fetch({
    url: '/orders/queryOrderStatus',
    method: 'post',
    data: params,
    loading: true
  })
}
// ====================采购api====================

// 获取生产厂家列表
export function getFactoryList(params) {
  return fetch({
    url: '/purchaseCommon/queryFactory',
    method: 'post',
    data: params,
    loading: true
  })
}
// 获取商品集合列表
export function getGoodsSetList(params) {
  return fetch({
    url: '/purchaseCommon/queryGoodsSet',
    method: 'post',
    data: params,
    loading: true
  })
}
// ====================高级搜索====================
// 获取货主列表
// export function getConsignorSetList(params) {
//   return fetch({
//     url: '/RoleCompanyName/EmployeeOrgQuery',
//     method: 'post',
//     data: params,
//     loading: true
//   })
// }
export function getConsignorSetList(params) {
  return fetch({
    url: '/CompanyOrderLife/EmployeeOrgQuery',
    method: 'post',
    data: params,
    loading: true
  })
}
// 获取供应商
export function getEmployeeOrgQueryList(params) {
  return fetch({
    url: '/CompanyOrderLife/checkCompanyNum',
    method: 'post',
    data: params,
    loading: true
  })
}
// 获取商品集合列表
export function getOrderGoodsSetList(params) {
  return fetch({
    url: '/CompanyOrderLife/queryGoods_PS',
    method: 'post',
    data: params,
    loading: true
  })
}
// 获取客户集合列表
export function getOrderCustomerSetList(params) {
  return fetch({
    url: '/CompanyOrderLife/queryCustomer_PS',
    method: 'post',
    data: params,
    loading: true
  })
}
// 获取王老板供应商
export function getQuerySalesRefList(params) {
  return fetch({
    url: '/OrderLife/querySalesRef',
    method: 'post',
    data: params,
    loading: true
  })
}