import request from '@/utils/request'

//装备列表
export function getDevList(data) {
    return request({
        url: '/material-mall/dev/devList',
        method: 'post',
        data: data,
    })
  }

//装备详细信息
export function getDevDetail(maId) {
    return request({
      url: '/material-mall/dev/getInfo/' + maId,
      method: 'get',
    })
}

//装备新增
export function addDevice(data) {
    return request({
        url: '/material-mall/dev',
        method: 'post',
        data: data,
    })
  }
 //装备新增
export function  updateDevice(data) {
    return request({
        url: '/material-mall/dev',
        method: 'put',
        data: data,
    })
  }
  
  //保存草稿
  export function insertDraft(data) {
    return request({
        url: '/material-mall/dev/insertDraft',
        method: 'post',
        data: data,
    })
  }

//装备装备类目树结构数据
export function getEquipmentType(query) {
    return request({
      url: '/material-mall/maType/getEquipmentType',
      method: 'get',
      params: query
    })
}

//装备删除
export function removeDevice(data) {
    return request({
        url: '/material-mall/dev/remove',
        method: 'post',
        data: data,
    })
  }

//上下架（批量）
export function updateUpDown(data) {
    return request({
        url: '/material-mall/dev/updateUpDown',
        method: 'post',
        data: data,
    })
  }

  //上下架（批量）
export function companyList(query) {
  return request({
      url: '/material-mall/dev/companyList',
      method: 'get',
      params: query
  })
} 






