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

export default class DishMenuService {
	list(param) {
		return request({
			url: prefix + "/psi/dishMenu/list",
			method: "get",
			params: param,
		});
	}
	historyList(param) {
		return request({
			url: prefix + "/psi/dishMenu/historyList",
			method: "get",
			params: param,
		});
	}
	historyDetailList(param) {
		return request({
			url: prefix + "/psi/dishMenu/historyDetailList",
			method: "get",
			params: param,
		});
	}
	availableDishList(param) {
		return request({
			url: prefix + "/psi/dishMenu/availableDishList",
			method: "get",
			params: param,
		});
	}
	orderDishList(param) {
		return request({
			url: prefix + "/psi/dishMenu/orderDishList",
			method: "get",
			params: param,
		});
	}
	orderTypeList() {
		return request({
			url: prefix + "/psi/dishMenu/orderTypeList",
			method: "get",
		});
	}
	addDishes(dishIds) {
		return request({
			url: prefix + "/psi/dishMenu/addDishes",
			method: "post",
			data: dishIds,
		});
	}
	saveDishes(dishIds) {
		return request({
			url: prefix + "/psi/dishMenu/saveDishes",
			method: "post",
			data: dishIds,
		});
	}
	updatePrice(param) {
		return request({
			url: prefix + "/psi/dishMenu/updatePrice",
			method: "post",
			data: param,
		});
	}
	delete(ids) {
		return request({
			url: prefix + "/psi/dishMenu/delete",
			method: "delete",
			params: { ids: ids },
		});
	}
	updateMenu(dishIds) {
		return request({
			url: prefix + "/psi/dishMenu/updateMenu",
			method: "post",
			data: dishIds,
		});
	}
}
