import request from '@/utils/request'

// 查询衣服重洗原因列表
export function listReason(query) {
  return request({
    url: '/mapi/cloth/reason/list',
    method: 'get',
    params: query
  })
}

// 查询衣服重洗原因详细
export function getReason(id) {
  return request({
    url: '/mapi/cloth/reason/' + id,
    method: 'get'
  })
}

// 新增衣服重洗原因
export function addReason(data) {
  return request({
    url: '/mapi/cloth/reason',
    method: 'post',
    data: data
  })
}

// 修改衣服重洗原因
export function updateReason(data) {
  return request({
    url: '/mapi/cloth/reason',
    method: 'put',
    data: data
  })
}

// 删除衣服重洗原因
export function delReason(id) {
  return request({
    url: '/mapi/cloth/reason/' + id,
    method: 'delete'
  })
}


// 修改衣服重洗原因状态
export function updateReasonStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/cloth/reason/updateStatus',
    method: 'post',
    data: data
  })
}
