import { request } from 'umi';


/**
 * 添加做法
 */

export async function addPracticeType(data) {
    return request(`/kitchen/api/goodspracticetype/add`, {
      method: 'POST',
      data: data,
    });
}



/**
 * 获取做法分页
 */

export async function getPracticeType(data) {
    return request(`/kitchen/api/goodspracticetype/get`, {
      method: 'POST',
      data: data,
    });
}



/**
 * 修改做法
 */

export async function editPracticeType(data) {
    return request(`/kitchen/api/goodspracticetype/edit`, {
      method: 'POST',
      data: data,
    });
}


/**
* 修改做法档案
*/

export async function editPracticeRecord(data) {
    return request(`/kitchen/api/goodspractice/edit`, {
      method: 'POST',
      data: data,
    });
}

/**
* 添加做法档案
*/

export async function addPracticeRecord(data) {
    return request(`/kitchen/api/goodspractice/add`, {
      method: 'POST',
      data: data,
    });
}


/**
* 获取做法档案
*/

export async function getPracticeRecord(data) {
    return request(`/kitchen/api/goodspractice/get`, {
      method: 'POST',
      data: data,
    });
}





/**
* 获取做法商品关联
*/

export async function getPracticeRelevance(data) {
  return request(`/kitchen/api/goodspracticerelevance/get`, {
    method: 'POST',
    data: data,
  });
}

export async function addPracticeRelevance(data) {
  return request(`/kitchen/api/goodspracticerelevance/add`, {
    method: 'POST',
    data: data,
  });
}

export async function editPracticeRelevance(data) {
  return request(`/kitchen/api/goodspracticerelevance/edit`, {
    method: 'POST',
    data: data,
  });
}



/**
 * 支撑数据
 */

export async function GetAllSmallType(data) {
  return request(`/kitchen/api/goods-type/goods-types`, {
    method: 'POST',
    data: data,
  });
}

export async function GetAllType(data) {
  return request(`/kitchen/api/goodspracticetype/get`, {
    method: 'POST',
    data: data,
  });
}

export async function GetAllGoods(data) {
  return request(`/kitchen/api/goods/goodss`, {
    method: 'Post',
    data: data,
  });
}

export async function GetAllPractice(data) {
  return request(`/kitchen/api/goodspractice/get`, {
    method: 'POST',
    data: data,
  });
}