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

//  供应商 列表  有分页
export const supplierList = (params) => {
  const url = `/supplier/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  供应商 列表  无分页
export const supplierAllList = (params) => {
  return axios({
    url: '/supplier/queryList',
    data: {},
    method: 'post'
  })
}
//  供应商 详情
export const supplierDetail = (params) => {
  return axios({
    url: `/supplier/findById/${params.id}`,
    data: params,
    method: 'get'
  })
}
//  供应商 保存
export const supplierSave = (params) => {
  return axios({
    url: '/supplier/save',
    data: params,
    method: 'post'
  })
}
//  供应商 删除
export const supplierDel = (params) => {
  return axios({
    url: `/supplier/delete/${params.id}`,
    data: params,
    method: 'post'
  })
}
