import request from "@/utils/httpRequest";
import { FINANCE_PATH as prefix } from "../../AppPath";

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