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

export default class LossService {
	updateStatusById(data) {
		return request({
			url: prefix + "/psi/loss/updateStatusById",
			method: "post",
			data,
		});
	}

	remove(id) {
		return request({
			url: prefix + "/psi/loss/remove",
			method: "get",
			params: { id },
		});
	}

	save(data) {
		return request({
			url: prefix + "/psi/loss/save",
			method: "post",
			data,
		});
	}

	findById(id) {
		return request({
			url: prefix + "/psi/loss/findById",
			method: "get",
			params: { id },
		});
	}

	list(params) {
		return request({
			url: prefix + "/psi/loss/list",
			method: "get",
			params,
		});
	}

	getLossByTradeName(params) {
		return request({
			url: prefix + "/psi/loss/getLossByTradeName",
			method: "get",
			params,
		});
	}

	exportFile(params) {
		return request({
			url: prefix + "/psi/loss/exportFile",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}
}
