57 lines
2.3 KiB
TypeScript
57 lines
2.3 KiB
TypeScript
/**
|
|
* Copyright (c) 2013-Now https://jeesite.com All rights reserved.
|
|
* No deletion without permission, or be held responsible to law.
|
|
* @author gaoxq
|
|
*/
|
|
import { defHttp } from '@jeesite/core/utils/http/axios';
|
|
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
|
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
|
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
|
import { UploadFileParams } from '@jeesite/types/axios';
|
|
import { AxiosProgressEvent } from 'axios';
|
|
|
|
const { ctxPath, adminPath } = useGlobSetting();
|
|
|
|
export interface ErpAccountTransfer extends BasicModel<ErpAccountTransfer> {
|
|
createTime?: string; // 记录时间
|
|
transferId?: string; // 转账主键
|
|
transferName: string; // 转账名称
|
|
outAccountId: string; // 转出账号
|
|
inAccountId: string; // 转入账号
|
|
categoryId: string; // 转账分类
|
|
transferAmount: number; // 转账金额
|
|
transferStatus: string; // 转账状态
|
|
remark?: string; // 转账备注
|
|
}
|
|
|
|
export const erpAccountTransferList = (params?: ErpAccountTransfer | any) =>
|
|
defHttp.get<ErpAccountTransfer>({ url: adminPath + '/erp/accountTransfer/list', params });
|
|
|
|
export const erpAccountTransferListData = (params?: ErpAccountTransfer | any) =>
|
|
defHttp.post<Page<ErpAccountTransfer>>({ url: adminPath + '/erp/accountTransfer/listData', params });
|
|
|
|
export const erpAccountTransferForm = (params?: ErpAccountTransfer | any) =>
|
|
defHttp.get<ErpAccountTransfer>({ url: adminPath + '/erp/accountTransfer/form', params });
|
|
|
|
export const erpAccountTransferSave = (params?: any, data?: ErpAccountTransfer | any) =>
|
|
defHttp.postJson<ErpAccountTransfer>({ url: adminPath + '/erp/accountTransfer/save', params, data });
|
|
|
|
export const erpAccountTransferImportData = (
|
|
params: UploadFileParams,
|
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
|
) =>
|
|
defHttp.uploadFile<UploadApiResult>(
|
|
{
|
|
url: ctxPath + adminPath + '/erp/accountTransfer/importData',
|
|
onUploadProgress,
|
|
},
|
|
params,
|
|
);
|
|
|
|
export const erpAccountTransferDelete = (params?: ErpAccountTransfer | any) =>
|
|
defHttp.get<ErpAccountTransfer>({ url: adminPath + '/erp/accountTransfer/delete', params });
|
|
|
|
export const erpAccountTransferRecorded = (params?: ErpAccountTransfer | any) =>
|
|
defHttp.get<ErpAccountTransfer>({ url: adminPath + '/erp/accountTransfer/recorded', params });
|
|
|