import request from '@/assets/js/utils/request'

// 获取所有的协议信息
export function protocolList(data) {
  return request({
    url:
      '/bidprocurement/shopmall-product/product/tBshopmallProtocl/protocolList',
    method: 'post',
    data
  })
}
// 删除协议信息
export function deleteprotocol(id) {
  return request({
    url:
      '/bidprocurement/shopmall-product/product/tBshopmallProtocl/deleteprotocol?id=' +
      id,
    method: 'get'
  })
}
// 协议启用或停用状态设置
export function protocolStatus(id, status) {
  return request({
    url:
      'bidprocurement/shopmall-product/product/tBshopmallProtocl/protocolStatus?id=' +
      id +
      '&status=' +
      status,
    method: 'get'
  })
}
// 添加协议信息
export function doAddprotocolinfo(data) {
  return request({
    url:
      '/bidprocurement/shopmall-product/product/tBshopmallProtocl/doAddprotocolinfo',
    method: 'post',
    data
  })
}
// 编辑协议信息
export function editProtocolinfo(data) {
  return request({
    url:
      '/bidprocurement/shopmall-product/product/tBshopmallProtocl/editProtocolinfo',
    method: 'post',
    data
  })
}
// 获取协议详细信息
export function getProtocodetails(id) {
  return request({
    url:
      'bidprocurement/shopmall-product/product/tBshopmallProtocl/getProtocodetails?id=' +
      id,
    method: 'get'
  })
}
// 查询分类json树
export function getgoodsclassTree(id) {
  return request({
    url: 'bidprocurement/shopmall-product/product/goodsClass/getgoodsclassTree',
    method: 'get'
  })
}
