import request from '@/utils/request'

// 查询供应商列表
export function getSupplierList(urlParams,data) {
  return request({
    url: '/api/v1/mp/admin/supplier/list',
    method: 'post',
    data,
    urlParams
  })
}

// 查询供应商详情
export function getSupplierDetail(id) {
  return request({
    url: `/api/v1/mp/admin/supplier/detail/${id}`,
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  })
}

// 修改供应商信息
export function setSupplierList(data) {
  return request({
    url: '/api/v1/mp/admin/supplier/update',
    method: 'post',
    data
  })
}

// 新增供应商信息
export function addSupplierList(data) {
  return request({
    url: '/api/v1/mp/admin/supplier/create',
    method: 'post',
    data
  })
}

// 删除供应商信息
export function removeSupplierList(id) {
  return request({
    url: `/api/v1/mp/admin/supplier/delete/${id}`,
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  })
}
