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

export default class ReimbursementApprovalService {
	list(param) {
		return request({
			url: prefix + "/reimbursementApproval/info/list",
			method: "get",
			params: param,
		});
	}

	list2(param) {
		return request({
			url: prefix + "/reimbursementApproval/info/list2",
			method: "get",
			params: param,
		});
	}
	reportNoList(param) {
		return request({
			url: prefix + "/reimbursementApproval/info/reportNoList",
			method: "get",
			params: param,
		});
	}
	projectList(params) {
		return request({
			url: prefix + "/reimbursementApproval/info/projectList",
			method: "get",
			params: params,
		});
	}
	save(param) {
		return request({
			url: prefix + "/reimbursementApproval/info/save",
			method: "post",
			data: param,
		});
	}
	saveFile(param) {
		return request({
			url: prefix + "/reimbursementApproval/info/saveFile",
			method: "post",
			data: param,
		});
	}
	findById(id) {
		return request({
			url: prefix + "/reimbursementApproval/info/findById",
			method: "get",
			params: { id: id },
		});
	}
	findFileById(id) {
		return request({
			url: prefix + "/reimbursementApproval/info/findFileById",
			method: "get",
			params: { id: id },
		});
	}
	remove(id) {
		return request({
			url: prefix + "/reimbursementApproval/info/remove",
			method: "get",
			params: { id: id },
		});
	}
	updateStatusById(param) {
		return request({
			url: prefix + "/reimbursementApproval/info/updateStatusById",
			method: "post",
			data: param,
		});
	}
	updateFileStatusById(param) {
		return request({
			url: prefix + "/reimbursementApproval/info/updateFileStatusById",
			method: "post",
			data: param,
		});
	}
	checkNumber(number) {
		return request({
			url: prefix + "/reimbursementApproval/info/checkNumber",
			method: "get",
			params: { number: number },
		});
	}
	userTree(name) {
		return request({
			url: prefix + "/reimbursementApproval/info/userTree",
			method: "get",
			params: { name: name },
		});
	}
	userTreeByTenantId(name) {
		return request({
			url: prefix + "/reimbursementApproval/info/userTreeByTenantId",
			method: "get",
			params: { name: name },
		});
	}
	exportFile(params) {
		return request({
			url: prefix + "/reimbursementApproval/info/exportFile",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}
	exportFile2(params) {
		return request({
			url: prefix + "/reimbursementApproval/info/exportFile2",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}
	exportInvoiceReimbursementFile(params) {
		return request({
			url:
				prefix +
				"/reimbursementApproval/info/exportInvoiceReimbursementFile",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}
	exportInvoiceReimbursementFile2(params) {
		return request({
			url:
				prefix +
				"/reimbursementApproval/info/exportInvoiceReimbursementFile2",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}

	queryByProIds(ids) {
		return request({
			url: prefix + "/reimbursementApproval/info/queryByProIds",
			method: "get",
			params: { ids: ids },
		});
	}
	getEffectiveDataByInvoiceNumber(invoiceNumber, id) {
		return request({
			url:
				prefix +
				"/reimbursementApproval/info/getEffectiveDataByInvoiceNumber",
			method: "get",
			params: { invoiceNumber: invoiceNumber, id: id },
		});
	}
	getEffectiveDataByNumbers(invoiceNumber, id) {
		return request({
			url:
				prefix +
				"/reimbursementApproval/info/getEffectiveDataByNumbers",
			method: "get",
			params: { invoiceNumber: invoiceNumber, id: id },
		});
	}
	getEffectiveDataByNumbers2(invoiceNumber, id) {
		return request({
			url:
				prefix +
				"/reimbursementApproval/info/getEffectiveDataByNumbers2",
			method: "post",
			data: { financeNumber: invoiceNumber, id: id },
		});
	}
	deleteByIdAndNumber(id, invoiceNumber) {
		return request({
			url: prefix + "/reimbursementApproval/info/deleteByIdAndNumber",
			method: "post",
			params: { id: id, invoiceNumber: invoiceNumber },
		});
	}
	findHistory(id) {
		return request({
			url: prefix + "/reimbursementApproval/info/findHistory",
			method: "get",
			params: { id: id },
		});
	}
	findHiById(id) {
		return request({
			url: prefix + "/reimbursementApproval/info/findHiById",
			method: "get",
			params: { id: id },
		});
	}
	updatePaymentStatus(param) {
		return request({
			url: prefix + "/reimbursementApproval/info/updatePaymentStatus",
			method: "post",
			data: param,
		});
	}
	findFileByReimId(id) {
		return request({
			url: prefix + "/reimbursementApproval/info/findFileByReimId",
			method: "get",
			params: { id: id },
		});
	}
	computerList(param) {
		return request({
			url: prefix + "/reimbursementApproval/info/computerList",
			method: "get",
			params: param,
		});
	}
}
