feat:【ele】【erp】finance/account 的迁移

This commit is contained in:
YunaiV
2025-11-16 09:13:09 +08:00
parent bebe2ea547
commit b3b7d2c78b
10 changed files with 718 additions and 59 deletions

View File

@@ -3,7 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpAccountApi {
/** ERP 结算账户信息 */
/** 结算账户信息 */
export interface Account {
id?: number; // 结算账户编号
no: string; // 账户编码
@@ -13,17 +13,10 @@ export namespace ErpAccountApi {
defaultStatus: boolean; // 是否默认
name: string; // 账户名称
}
/** 结算账户分页查询参数 */
export interface AccountPageParam extends PageParam {
name?: string;
no?: string;
status?: number;
}
}
/** 查询结算账户分页 */
export function getAccountPage(params: ErpAccountApi.AccountPageParam) {
export function getAccountPage(params: PageParam) {
return requestClient.get<PageResult<ErpAccountApi.Account>>(
'/erp/account/page',
{ params },

View File

@@ -3,19 +3,6 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace ErpFinancePaymentApi {
/** 付款单项 */
export interface FinancePaymentItem {
id?: number;
row_id?: number; // 前端使用的临时ID
bizId: number; // 业务ID
bizType: number; // 业务类型
bizNo: string; // 业务编号
totalPrice: number; // 应付金额
paidPrice: number; // 已付金额
paymentPrice: number; // 本次付款
remark?: string; // 备注
}
/** 付款单信息 */
export interface FinancePayment {
id?: number; // 付款单编号
@@ -39,24 +26,22 @@ export namespace ErpFinancePaymentApi {
bizNo?: string; // 业务单号
}
/** 付款单分页查询参数 */
export interface FinancePaymentPageParams extends PageParam {
no?: string;
paymentTime?: [string, string];
supplierId?: number;
creator?: string;
financeUserId?: number;
accountId?: number;
status?: number;
remark?: string;
bizNo?: string;
/** 付款单 */
export interface FinancePaymentItem {
id?: number;
row_id?: number; // 前端使用的临时 ID
bizId: number; // 业务ID
bizType: number; // 业务类型
bizNo: string; // 业务编号
totalPrice: number; // 应付金额
paidPrice: number; // 已付金额
paymentPrice: number; // 本次付款
remark?: string; // 备注
}
}
/** 查询付款单分页 */
export function getFinancePaymentPage(
params: ErpFinancePaymentApi.FinancePaymentPageParams,
) {
export function getFinancePaymentPage(params: PageParam) {
return requestClient.get<PageResult<ErpFinancePaymentApi.FinancePayment>>(
'/erp/finance-payment/page',
{
@@ -103,9 +88,7 @@ export function deleteFinancePayment(ids: number[]) {
}
/** 导出付款单 Excel */
export function exportFinancePayment(
params: ErpFinancePaymentApi.FinancePaymentPageParams,
) {
export function exportFinancePayment(params: any) {
return requestClient.download('/erp/finance-payment/export-excel', {
params,
});

View File

@@ -6,7 +6,7 @@ export namespace ErpFinanceReceiptApi {
/** 收款单项 */
export interface FinanceReceiptItem {
id?: number;
row_id?: number; // 前端使用的临时ID
row_id?: number; // 前端使用的临时 ID
bizId: number; // 业务ID
bizType: number; // 业务类型
bizNo: string; // 业务编号
@@ -38,25 +38,10 @@ export namespace ErpFinanceReceiptApi {
items?: FinanceReceiptItem[]; // 收款明细
bizNo?: string; // 业务单号
}
/** 收款单分页查询参数 */
export interface FinanceReceiptPageParams extends PageParam {
no?: string;
receiptTime?: [string, string];
customerId?: number;
creator?: string;
financeUserId?: number;
accountId?: number;
status?: number;
remark?: string;
bizNo?: string;
}
}
/** 查询收款单分页 */
export function getFinanceReceiptPage(
params: ErpFinanceReceiptApi.FinanceReceiptPageParams,
) {
export function getFinanceReceiptPage(params: PageParam) {
return requestClient.get<PageResult<ErpFinanceReceiptApi.FinanceReceipt>>(
'/erp/finance-receipt/page',
{
@@ -103,9 +88,7 @@ export function deleteFinanceReceipt(ids: number[]) {
}
/** 导出收款单 Excel */
export function exportFinanceReceipt(
params: ErpFinanceReceiptApi.FinanceReceiptPageParams,
) {
export function exportFinanceReceipt(params: any) {
return requestClient.download('/erp/finance-receipt/export-excel', {
params,
});