57 lines
1.5 KiB
TypeScript
Raw Normal View History

2025-04-24 17:55:31 +08:00
import request from '@/config/axios'
// 发票管理 VO
export interface InvoiceVO {
id: number // id
userId: number // 用户编号
bizId: string // 业务编号
bizType: number // 业务类型1-订单2-提现
type: number // 发票类型
price: number // 金额
headerType: number // 发票抬头类型
status: number // 状态0-未开票1-已开票
name: string //发票名称
no: string //订单流水号
orderTime: Date// 订单时间
tradeOrderStatus: number // 订单状态
taxNumber: string // 税号
headerId: number // 发票抬头编号
headerName: string // 发票抬头名称
}
// 发票管理 API
export const InvoiceApi = {
// 查询发票管理分页
getInvoicePage: async (params: any) => {
return await request.get({ url: `/trade/invoice/page`, params })
},
// 查询发票管理详情
getInvoice: async (id: number) => {
return await request.get({ url: `/trade/invoice/get?id=` + id })
},
// 新增发票管理
createInvoice: async (data: InvoiceVO) => {
return await request.post({ url: `/trade/invoice/create`, data })
},
// 修改发票管理
updateInvoice: async (data: InvoiceVO) => {
return await request.put({ url: `/trade/invoice/update`, data })
},
// 删除发票管理
deleteInvoice: async (id: number) => {
return await request.delete({ url: `/trade/invoice/delete?id=` + id })
},
// 导出发票管理 Excel
exportInvoice: async (params) => {
return await request.download({ url: `/trade/invoice/export-excel`, params })
},
}