import request from '@/utils/httpRequest'

export default class ManHourManagementService {
  list (params) {
    return request({
      url: '/manHourManagement/list',
      method: 'get',
      params: params
    })
  }
  queryById (id) {
    return request({
      url: '/manHourManagement/queryById',
      method: 'get',
      params: {id: id}
    })
  }
  updateStatus (id) {
    return request({
      url: '/manHourManagement/updateStatus',
      method: 'get',
      params: {id: id}
    })
  }
  save (inputForm) {
    return request({
      url: `/manHourManagement/save`,
      method: 'post',
      data: inputForm
    })
  }
  delete (ids) {
    return request({
      url: '/manHourManagement/delete',
      method: 'delete',
      params: {ids: ids}
    })
  }
  getByClientId (id, projectForm) {
    return request({
      url: '/cwProjectRecords/getByClientId',
      method: 'get',
      params: {clientId: id, ...projectForm}
    })
  }
  getByContractId (id, projectForm) {
    return request({
      url: '/cwProjectRecords/getByContractId',
      method: 'get',
      params: {contractId: id, ...projectForm}
    })
  }
}
