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

export default class MaterialManagementService {
	list(param) {
		return request({
			url: prefix + "/psi/management/list",
			method: "get",
			params: param,
		});
	}
	save(param) {
		return request({
			url: prefix + "/psi/management/save",
			method: "post",
			data: param,
		});
	}
	findById(id) {
		return request({
			url: prefix + "/psi/management/findById",
			method: "get",
			params: { id: id },
		});
	}
	remove(id) {
		return request({
			url: prefix + "/psi/management/remove",
			method: "get",
			params: { id: id },
		});
	}
	updateStatusById(param) {
		return request({
			url: prefix + "/psi/management/updateStatusById",
			method: "post",
			data: param,
		});
	}
	exportFile(params) {
		return request({
			url: prefix + "/psi/management/exportFile",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}
	findTradeByTypeId(typeId) {
		return request({
			url: prefix + "/psi/management/findTradeByTypeId",
			method: "get",
			params: { typeId: typeId },
		});
	}
}
