import { requestClient } from '#/api/request';

const prefix = 'my-invoice/';

/** 本方开票待办/已办列表 */
export async function getMyInvoiceListApi(data: any) {
  return requestClient.get<any>(`${prefix}list`, { params: data });
}

/** 受理本方开票 */
export async function acceptMyInvoiceApi(data: {
  party_id?: number;
  invoice_id?: number;
}) {
  return requestClient.post<any>(`${prefix}accept`, data);
}

/** 完成本方开票 */
export async function completeMyInvoiceApi(data: {
  party_id: number;
  invoice_code: string;
  invoice_files: string[];
  invoice_id?: number;
}) {
  return requestClient.post<any>(`${prefix}complete`, data);
}
