// @ts-ignore

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

export default {
  /** 获取商品物料  sdsa GET /kitchen/api/rule */
  goodsBoms(data) {
    return request(`/kitchen/api/goods-bom/goods-boms`, {
      method: 'Post',
      data: data,
      // params: { ...params },
      // ...(options || {}),
    });
  },
  GetDicList(TypeCode) {
    return request(`/kitchen/api/dict-data/dic-list/${TypeCode}`, {
      method: 'Get',
    });
  },

  /** 更新商品物料 PUT /kitchen/api/rule */
  updateGoodsBom(data) {
    return request('/kitchen/api/goods-bom', {
      method: 'PUT',
      data: data,
      // ...(options || {}),
    });
  },

  /** 新建商品物料清单 POST /kitchen/api/rule */
  addGoodsBom(data) {
    // http://localhost:7002
    return request('/kitchen/api/goods-bom', {
      method: 'POST',
      // type:'json',
      data: data,
      // ...(options || {}),
    });
  },
  /** 删除商品物料 DELETE /kitchen/api/rule */
  removeGoodsBom(data) {
    return request(`/kitchen/api/goods-bom`, {
      method: 'DELETE',
      data: data,
      // ...(options || {}),
    });
  },
  /** 获取商品商品  sdsa GET /kitchen/api/rule */
  goodList(data) {
    return request(`/kitchen/api/goods/goodss`, {
      method: 'Post',
      data: data,
      // params: { ...params },
      // ...(options || {}),
    });
  },
  /** 获取原料信息 POST /kitchen/api/rule */
  postStockGoods() {
    return request(`/kitchen/api/frachisee-stock-adjust/product-list`, {
      method: 'Get',
      // ...(options || {}),
    });
  },
};
