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

export default class ReimbursementService {
	list(param) {
		return request({
			url: prefix + "/reimbursement/info/list",
			method: "get",
			params: param,
		});
	}
	save(param) {
		return request({
			url: prefix + "/reimbursement/info/save",
			method: "post",
			data: param,
		});
	}
	findById(id) {
		return request({
			url: prefix + "/reimbursement/info/findById",
			method: "get",
			params: { id: id },
		});
	}
	remove(id) {
		return request({
			url: prefix + "/reimbursement/info/remove",
			method: "get",
			params: { id: id },
		});
	}
	updateStatusById(param) {
		return request({
			url: prefix + "/reimbursement/info/updateStatusById",
			method: "post",
			data: param,
		});
	}
	checkNumber(number) {
		return request({
			url: prefix + "/reimbursement/info/checkNumber",
			method: "get",
			params: { number: number },
		});
	}
	userTree(name) {
		return request({
			url: prefix + "/reimbursement/info/userTree",
			method: "get",
			params: { name: name },
		});
	}
	userTree2(name) {
		return request({
			url: prefix + "/reimbursement/info/userTree2",
			method: "get",
			params: { name: name },
		});
	}

	userTreeSelectBySignatureScribe(name) {
		return request({
			url: prefix + "/reimbursement/info/userTreeSelectBySignatureScribe",
			method: "get",
			params: { name: name },
		});
	}
	exportFile(params) {
		return request({
			url: prefix + "/reimbursement/info/exportFile",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}
	exportInvoiceReimbursementFile(params) {
		return request({
			url: prefix + "/reimbursement/info/exportInvoiceReimbursementFile",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}
	queryByProIds(ids) {
		return request({
			url: prefix + "/reimbursement/info/queryByProIds",
			method: "get",
			params: { ids: ids },
		});
	}
	getEffectiveDataByInvoiceNumber(invoiceNumber, id) {
		return request({
			url: prefix + "/reimbursement/info/getEffectiveDataByInvoiceNumber",
			method: "get",
			params: { invoiceNumber: invoiceNumber, id: id },
		});
	}
	getEffectiveDataByNumbers(invoiceNumber, id) {
		return request({
			url: prefix + "/reimbursement/info/getEffectiveDataByNumbers",
			method: "get",
			params: { invoiceNumber: invoiceNumber, id: id },
		});
	}
	getEffectiveDataByNumbers2(invoiceNumber, id) {
		return request({
			url: prefix + "/reimbursement/info/getEffectiveDataByNumbers2",
			method: "post",
			data: { financeNumber: invoiceNumber, id: id },
		});
	}
	deleteByIdAndNumber(id, invoiceNumber) {
		return request({
			url: prefix + "/reimbursement/info/deleteByIdAndNumber",
			method: "post",
			params: { id: id, invoiceNumber: invoiceNumber },
		});
	}
	findHistory(id) {
		return request({
			url: prefix + "/reimbursement/info/findHistory",
			method: "get",
			params: { id: id },
		});
	}
	findHiById(id) {
		return request({
			url: prefix + "/reimbursement/info/findHiById",
			method: "get",
			params: { id: id },
		});
	}

	updatePaymentStatus(param) {
		return request({
			url: prefix + "/reimbursement/info/updatePaymentStatus",
			method: "post",
			data: param,
		});
	}

	updateFileStatusById(param) {
		return request({
			url: prefix + "/reimbursement/info/updateFileStatusById",
			method: "post",
			data: param,
		});
	}

	findFileById(id) {
		return request({
			url: prefix + "/reimbursement/info/findFileById",
			method: "get",
			params: { id: id },
		});
	}

	saveFile(param) {
		return request({
			url: prefix + "/reimbursement/info/saveFile",
			method: "post",
			data: param,
		});
	}

	findFileByReimId(id) {
		return request({
			url: prefix + "/reimbursement/info/findFileByReimId",
			method: "get",
			params: { id: id },
		});
	}
	saveConfirmStatus(param) {
		return request({
			url: prefix + "/invoiceConfirm/confirmStatus/save",
			method: "post",
			data: param,
		});
	}

	getListByUser(id) {
		return request({
			url: prefix + "/invoiceConfirm/confirmStatus/getListByUser",
			method: "get",
			params: {
				reimbursementId: id,
			},
		});
	}
}
