import request from '@/utils/request';

/*  费用申请  */


// 列表
export async function logistictraklistnotePageListAPI(data) {
  let par = new URLSearchParams(data);
  const res = await request.get(`/eom/logistictraklistnote/page?` + par, {});
  if (res.data.code == 0) {
    return res.data.data.list;
  }
  return Promise.reject(new Error(res.data.message));
}

// 报工 /完成 新增费用信息
export async function logistictraklistnoteUpdateAPI(data) {
  const res = await request.put(`/eom/logistictraklistnote/update`, data);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

//  新增工单
export async function logistictraklistnoteSaveAPI(data) {
  const res = await request.post(`/eom/logistictraklistnote/save`, data);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}


// 详情
export async function logisticlistcostGetByIdAPI(id) {
  const res = await request.get(`/eom/logistictraklistnote/getById/${id}`);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}


