import request from '@/utils/request'

export function allClothAdjunct() {
  return request({
    url: '/mapi/cloth/adjunct/all',
    method: 'get',
  })
}

// 查询衣服附件列表
export function listAdjunct(query) {
  return request({
    url: '/mapi/cloth/adjunct/list',
    method: 'get',
    params: query
  })
}

// 查询衣服附件详细
export function getAdjunct(id) {
  return request({
    url: '/mapi/cloth/adjunct/' + id,
    method: 'get'
  })
}

// 新增衣服附件
export function addAdjunct(data) {
  return request({
    url: '/mapi/cloth/adjunct',
    method: 'post',
    data: data
  })
}

// 修改衣服附件
export function updateAdjunct(data) {
  return request({
    url: '/mapi/cloth/adjunct',
    method: 'put',
    data: data
  })
}

// 删除衣服附件
export function delAdjunct(id) {
  return request({
    url: '/mapi/cloth/adjunct/' + id,
    method: 'delete'
  })
}


// 修改衣服附件状态
export function updateAdjunctStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/cloth/adjunct/updateStatus',
    method: 'post',
    data: data
  })
}
