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

export default class ReimbursementService {
  list (param) {
    return request({
      url: prefix + '/zsReimbursement/info/list',
      method: 'get',
      params: param
    })
  }
  reportNoList (param) {
    return request({
      url: prefix +  '/zsReimbursement/info/reportNoList',
      method: 'get',
      params: param
    })
  }
  projectList (params) {
    return request({
      url: prefix + '/zsReimbursement/info/projectList',
      method: 'get',
      params: params
    })
  }
  save (param) {
    return request({
      url: prefix + '/zsReimbursement/info/save',
      method: 'post',
      data: param
    })
  }
  findById (id) {
    return request({
      url: prefix + '/zsReimbursement/info/findById',
      method: 'get',
      params: {id: id}
    })
  }
  remove (id) {
    return request({
      url: prefix + '/zsReimbursement/info/remove',
      method: 'get',
      params: {id: id}
    })
  }
  updateStatusById (param) {
    return request({
      url: prefix + '/zsReimbursement/info/updateStatusById',
      method: 'post',
      data: param
    })
  }
  checkNumber (number) {
    return request({
      url: prefix + '/zsReimbursement/info/checkNumber',
      method: 'get',
      params: {number: number}
    })
  }
  userTree (name) {
    return request({
      url: prefix + '/zsReimbursement/info/userTree',
      method: 'get',
      params: {name: name}
    })
  }
  exportFile (params) {
    return request({
      url: prefix + '/zsReimbursement/info/exportFile',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
	exportInvoiceReimbursementFile (params) {
		return request({
			url: prefix + '/zsReimbursement/info/exportInvoiceReimbursementFile',
			method: 'get',
			params: params,
			responseType: 'blob'
		})
	}
  getEffectiveDataByInvoiceNumber (invoiceNumber,id) {
	return request({
		url: prefix + '/zsReimbursement/info/getEffectiveDataByInvoiceNumber',
		method: 'get',
		params: {invoiceNumber: invoiceNumber,id:id}
	})
  }
}
