import request from '@/utils/request';

// 获取列表
export const getInvoiceDetailList = (params) =>
  request(`/invoice/${params.invoiceId}/detail-tpl`, { params });

// 生成明细
export const saveInvoiceDetail = (invoiceId) =>
  request(`/invoice/${invoiceId}/detail-tpl`, { method: 'post' });

// 更新信息
export const updateInvoiceDetail = (invoiceId, data) =>
  request(`/invoice/${invoiceId}/detail-tpl/item`, { data, method: 'post' });

/**
 * 删除报销明细
 * @param {*} data
 * @returns
 */
export const deleteInvoiceDetail = (invoiceId, itemId ) =>
  request(`/invoice/${invoiceId}/detail-tpl/item/${itemId}`, { method: 'delete' });
