import request from '@/utils/request'

// 查询保养工单列表
export function listDmsBillsMaintInstance(query) {
  return request({
    url: '/dms/dmsBillsMaintInstance/list',
    method: 'get',
    params: query
  })
}

// 查询保养工单详细
export function getDmsBillsMaintInstance(maintInstanceId) {
  return request({
    url: '/dms/dmsBillsMaintInstance/' + maintInstanceId,
    method: 'get'
  })
}

// //根据计划id查询润滑计划明细

export function selectPlanMaintDetailByPlanMaintId(planMaintId) {
  // alert(planLubeId)
  return request({
    url:`/dms/maintDetail/getDmsPlanMaintDetail/${planMaintId}`,
    method:'get'
  })
}
// 新增保养工单
export function addDmsBillsMaintInstance(data) {
  return request({
    url: '/dms/dmsBillsMaintInstance',
    method: 'post',
    data: data
  })
}

// 修改保养工单
export function updateDmsBillsMaintInstance(data) {
  return request({
    url: '/dms/dmsBillsMaintInstance',
    method: 'put',
    data: data
  })
}

// 删除保养工单
export function delDmsBillsMaintInstance(maintInstanceId) {
  return request({
    url: '/dms/dmsBillsMaintInstance/' + maintInstanceId,
    method: 'delete'
  })
}
