Files
xin-procurement/web/api/recon/bill.ts
T
2026-09-13 23:42:35 +08:00

26 lines
851 B
TypeScript

import createAxios from '@/utils/request';
import { downloadBlob } from '@/api/common/download.ts';
import type { IBillDetail } from '@/domain/iBill.ts';
/** 账单详情(账单信息 + 合并商品明细 + 关联订单) */
export async function getBillDetail(id: number) {
return createAxios<IBillDetail>({
url: `/recon/bill/${id}`,
method: 'get',
});
}
/** 确认收款:线下收款后手动登记付款信息,支付状态置为已支付 */
export async function payBill(id: number, data: { paid_at: string; pay_remark?: string }) {
return createAxios({
url: `/recon/bill/${id}/pay`,
method: 'put',
data,
});
}
/** 单独导出账单:账单内明细按商品合并为一个 Excel */
export async function exportBill(id: number) {
return downloadBlob(`/recon/bill/${id}/export`, {}, '门店账单.xlsx');
}