import request from '@/utils/request'

// 查询单次价目表列表
export function listOncePrice(query) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/oncePrice/list',
    method: 'get',
    params: query
  })
}

// 查询单次价目表详细
export function getOncePrice(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/oncePrice/' + id,
    method: 'get'
  })
}

// 新增单次价目表
export function addOncePrice(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/oncePrice',
    method: 'post',
    data: data
  })
}

// 修改单次价目表
export function updateOncePrice(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/oncePrice',
    method: 'put',
    data: data
  })
}

// 查询任务表详细
export function getTaskTypeList() {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/oncePrice/taskTypeOnceList' ,
    method: 'get'
  })
}

// 删除单次价目表
export function delOncePrice(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/oncePrice/' + id,
    method: 'delete'
  })
}

// 查询任务明细表详细
export function getTaskTypeDetailList(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/oncePrice/typeDetail/'+id ,
    method: 'get'
  })
}
