import request from '@/common/request';
import { FINANCE_PATH as prefix } from "@/api/AppPath";


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