import request from '@/utils/request'

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

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

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

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

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


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