import request, { postBlob } from "@/utils/request";

export function newGetList(data) {
  return request({
    url: `/worker/goods/list?moduleId=${data.moduleId}`,
    method: "post",
    data
  });
}

export function newGetListExport(data, name) {
  return postBlob({
    url: "/worker/goods/list/export",
    data,
    name
  });
}

// 获取辅材信息
export function getDetail(params) {
  return request({
    url: "/worker/goods/detail",
    method: "post",
    params
  });
}

// 新增辅材
export function addMaterial(params) {
  return request({
    url: "/worker/goods/add",
    method: "post",
    data: params
  });
}

// 编辑辅材
export function editMaterial(params) {
  return request({
    url: "/worker/goods/edit",
    method: "post",
    data: params
  });
}