import request from '@/utils/request';




//保存收款记录
export async function finReceivableSaveAPI(data) {
  const res = await request.post(`/eom/finreceivable/saveDetail`, data);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

// 信息
export async function getFinReceivableInfoAPI(id) {
  const res = await request.get(`/eom/finreceivable/getById/${id}`);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

// 删除收款记录
export async function finReceivableRemoveAPI(data) {
  const res = await request.delete('/eom/finreceivable/deleteDetail', {data});
  if (res.data.code == 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.message));
}
export async function finReceivableUpdateAPI(data) {
  const res = await request.put('/eom/finreceivable/update', data);
  if (res.data.code == 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.message));
}

