// @ts-ignore

/* eslint-disable */
import { request } from 'umi';

/** 获取分账方案列表  post /kitchen/api/rule */
export async function getPlanList(data) {
  return request(`/kitchen/api/split-plan/split-plan-page`, {
    method: 'Post',
    data: data,
  });
}

/** 新建分账方案 POST /kitchen/api/rule */

export async function addPlan(data) {
  // http://localhost:7002
  return request('/kitchen/api/split-plan/split-plan', {
    method: 'POST',
    // type:'json',
    data: data,
    // ...(options || {}),
  });
}
/** 修改分账方案 PUT /kitchen/api/rule */

export async function updatePlan(data) {
  return request('/kitchen/api/split-plan/split-plan', {
    method: 'PUT',
    data: data,
  });
}

/** 批量删除分账方案 DELETE /kitchen/api/rule */

export async function removePlan(data) {
  console.log(data);
  return request(`/kitchen/api/split-plan/split-plan`, {
    method: 'DELETE',
    data: data,
    // ...(options || {}),
  });
}

/** 删除单个账户 DELETE /kitchen/api/rule */

// export async function removeSingleAccount(id) {
//   return request(`/kitchen/api/unit/${id}`, {
//     method: 'DELETE',
//   });
// }
