* feat: invoice (#2293)

* feat: default voice header

* add i18n

* refactor: 优化代码

* feat: 用户开票

* refactor: 代码优化&&样式联调 (#2384)

* Feat: invoice upload (#2424)

* refactor: 验收问题&&样式调整

* feat: 文件上传

* 小调整

* perf: invoice ui

---------

Co-authored-by: papapatrick <109422393+Patrickill@users.noreply.github.com>
This commit is contained in:
Archer
2024-08-19 17:44:48 +08:00
committed by GitHub
parent 884c2d9553
commit 5fab3734fa
37 changed files with 1093 additions and 31 deletions

View File

@@ -14,6 +14,7 @@ import {
TeamMemberSchema
} from '@fastgpt/global/support/user/team/type.d';
import { FeTeamPlanStatusType, TeamSubSchema } from '@fastgpt/global/support/wallet/sub/type';
import { TeamInvoiceHeaderType } from '@fastgpt/global/support/user/team/type';
/* --------------- team ---------------- */
export const getTeamList = (status: `${TeamMemberSchema['status']}`) =>
@@ -61,3 +62,9 @@ export const getTeamPlanStatus = () =>
GET<FeTeamPlanStatusType>(`/support/user/team/plan/getTeamPlanStatus`, { maxQuantity: 1 });
export const getTeamPlans = () =>
GET<TeamSubSchema[]>(`/proApi/support/user/team/plan/getTeamPlans`);
export const getTeamInvoiceHeader = () =>
GET<TeamInvoiceHeaderType>(`/proApi/support/user/team/invoiceAccount/getTeamInvoiceHeader`);
export const updateTeamInvoiceHeader = (data: TeamInvoiceHeaderType) =>
POST(`/proApi/support/user/team/invoiceAccount/update`, data);

View File

@@ -0,0 +1,20 @@
import { RequestPaging } from '@/types';
import { GET, POST } from '@/web/common/api/request';
import { BillTypeEnum } from '@fastgpt/global/support/wallet/bill/constants';
import { InvoiceType } from '@fastgpt/global/support/wallet/bill/type';
import { InvoiceSchemaType } from '../../../../../../../../packages/global/support/wallet/bill/type';
export type invoiceBillDataType = {
type: BillTypeEnum;
price: number;
createTime: Date;
_id: string;
};
export const getInvoiceBillsList = () =>
GET<invoiceBillDataType[]>(`/proApi/support/wallet/bill/invoice/unInvoiceList`);
export const submitInvoice = (data: InvoiceType) =>
POST(`/proApi/support/wallet/bill/invoice/submit`, data);
export const getInvoiceRecords = (data: RequestPaging) =>
POST<InvoiceSchemaType[]>(`/proApi/support/wallet/bill/invoice/records`, data);