import { axios } from '@/utils/request'

const api = {
  repairRecord: '/RepairRecord/repairRecord'
}

export function getRepairRecordList (parameter) {
  return axios({
    url: api.repairRecord + '/list',
    method: 'get',
    params: parameter
  })
}

export function saveRepairRecord (parameter) {
  return axios({
    url: api.repairRecord + (parameter.id > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delRepairRecord (parameter) {
  return axios({
    url: api.repairRecord + '/remove',
    method: 'post',
    params: parameter
  })
}

export const repairRecordExport = api.repairRecord + '/export'
