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

//  经销商 中心店/配送店绑定 列表 有分页
export const jxsorgRelationList = (params) => {
  const url = `/jxsorg/relation/queryOrgPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  经销商 中心店/配送店绑定 列表 无分页
export const jxsorgRelationQueryList = (params) => {
  return axios({
    url: '/jxsorg/relation/queryOrg',
    data: params,
    method: 'post'
  })
}
// 经销商  中心店/配送店绑定  保存
export const jxsorgRelationSave = (params) => {
  return axios({
    url: `/jxsorg/relation/saveOrg`,
    data: params,
    method: 'post'
  })
}
// 经销商  中心店/配送店绑定  删除
export const jxsorgRelationDel = (params) => {
  return axios({
    url: `/jxsorg/relation/deleteOrg/${params.sn}`,
    method: 'get'
  })
}
// 经销商  中心店/配送店绑定  详情
export const jxsorgRelationDetail = (params) => {
  return axios({
    url: `/jxsorg/relation/findOrgBySn/${params.sn}`,
    method: 'get'
  })
}
//  经销商机构 列表 有分页
export const jsxorgList = (params) => {
  const url = `/jsxorg/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
