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

export default class ProjectReportArchiveService {
  list (params) {
    return request({
      url: prefix + '/cwProjectReportArchive/list',
      method: 'get',
      params: params
    })
  }
  reportList (params) {
    return request({
      url: prefix + '/cwProjectReportArchive/reportList',
      method: 'get',
      params: params
    })
  }
  queryById (id) {
    return request({
      url: prefix + '/cwProjectReportArchive/queryById',
      method: 'get',
      params: {id: id}
    })
  }
  save (inputForm) {
    return request({
      url: prefix + `/cwProjectReportArchive/save`,
      method: 'post',
      data: inputForm
    })
  }
  saveForm (inputForm) {
    return request({
      url: prefix + `/cwProjectReportArchive/saveForm`,
      method: 'post',
      data: inputForm
    })
  }
  delete (ids) {
    return request({
      url: prefix + '/cwProjectReportArchive/delete',
      method: 'delete',
      params: {ids: ids}
    })
  }
  updateStatusById (data) {
    return request({
      url: prefix + '/cwProjectReportArchive/updateStatusById',
      method: 'post',
      data: data
    })
  }
  exportFile (params) {
    return request({
      url: prefix + '/cwProjectReportArchive/export',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
  findReportUse (reportNo) {
    return request({
      url: prefix + '/cwProjectReportArchive/findReportUse',
      method: 'get',
      params: {reportNo: reportNo}
    })
  }
}
