// @ts-ignore

/* eslint-disable */
import { request } from 'umi';
//获取加盟商
export async function GetCompany(data) {
  return request(`/kitchen/api/select/GetCompany`);
}
/** 新增 */
export async function GetPage(data) {
  return request(`/kitchen/api/SplitPlan/GetPage`, {
    method: 'Post',
    data: data,
  });
}
/** 新增 */
export async function Add(data) {
  return request(`/kitchen/api/SplitPlan/Add`, {
    method: 'Post',
    data: data,
  });
}
/** 修改 */
export async function update(data) {
  return request(`/kitchen/api/SplitPlan/Update`, {
    method: 'Post',
    data: data,
  });
}
/** 启用 */
export async function Enable(data) {
  return request(`/kitchen/api/SplitPlan/Enable?Id=${data}`);
}
/** 停用 */
export async function Disable(data) {
  return request(`/kitchen/api/SplitPlan/Stop?Id=${data}`);
}
/** 复制 */
export async function Copy(data) {
  return request(`/kitchen/api/SplitPlan/Copy?Id=${data}`);
}
/** 删除 */
export async function Stop(data) {
  return request(`/kitchen/api/SplitPlan/Stop?Id=${data}`);
}

export async function GetBusinessAsync( planId) {
  return request(`/kitchen/api/SplitPlan/BusinessList?Id=${planId}`, {
    method: 'GET',
    // params: { ...params },
    // ...(options || {}),
  });
}
