import request from "@/utils/request";

export function LIST(params) {
  return request({
    url: "/pu/priceApply/list",
    method: "GET",
    params: params,
  });
}

export function ITEM(data) {
  return request({
    url: `/pu/priceApply/${data}`,
    method: "GET",
  });
}

export function ADD(data) {
  return request({
    url: "/pu/priceApply/add",
    method: "POST",
    data: data,
  });
}

export function EDIT(data) {
  return request({
    url: "/pu/priceApply/edit",
    method: "POST",
    data: data,
  });
}

export function REMOVE(data) {
  return request({
    url: `/pu/priceApply/${data}`,
    method: "delete",
  });
}

export function itemTableList(params, name) {
  let url = "";
  if (name === "priceApplyItemList") url = "/pu/priceApply/item/list";
  if (name === "priceApplyClauseList") url = "/pu/priceApply/clause/list";
  if (name === "priceApplyExpenseList") url = "/pu/priceApply/expense/list";
  if (name === "priceApplyAgreementList") url = "/pu/priceApply/agreement/list";
  if (name === "priceApplyApplyOrgList") url = "/pu/priceApply/org/list";
  return request({
    url: url,
    method: "GET",
    params: params,
  });
}
