初始化项目
This commit is contained in:
55
web-vue/packages/erp/api/erp/account.ts
Normal file
55
web-vue/packages/erp/api/erp/account.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* 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 ErpAccount extends BasicModel<ErpAccount> {
|
||||
createTime?: string; // 记录时间
|
||||
accountId?: string; // 账户标识
|
||||
accountName: string; // 账户名称
|
||||
accountType: string; // 账户类型
|
||||
accountCode: string; // 账户卡号
|
||||
initialBalance: number; // 初始余额
|
||||
currentBalance: number; // 当前余额
|
||||
isActive: string; // 是否激活
|
||||
updateTime?: string; // 更新时间
|
||||
}
|
||||
|
||||
export const erpAccountList = (params?: ErpAccount | any) =>
|
||||
defHttp.get<ErpAccount>({ url: adminPath + '/erp/account/list', params });
|
||||
|
||||
export const erpAccountListAll = (params?: ErpAccount | any) =>
|
||||
defHttp.get<ErpAccount[]>({ url: adminPath + '/erp/account/listAll', params });
|
||||
|
||||
export const erpAccountListData = (params?: ErpAccount | any) =>
|
||||
defHttp.post<Page<ErpAccount>>({ url: adminPath + '/erp/account/listData', params });
|
||||
|
||||
export const erpAccountForm = (params?: ErpAccount | any) =>
|
||||
defHttp.get<ErpAccount>({ url: adminPath + '/erp/account/form', params });
|
||||
|
||||
export const erpAccountSave = (params?: any, data?: ErpAccount | any) =>
|
||||
defHttp.postJson<ErpAccount>({ url: adminPath + '/erp/account/save', params, data });
|
||||
|
||||
export const erpAccountImportData = (
|
||||
params: UploadFileParams,
|
||||
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
||||
) =>
|
||||
defHttp.uploadFile<UploadApiResult>(
|
||||
{
|
||||
url: ctxPath + adminPath + '/erp/account/importData',
|
||||
onUploadProgress,
|
||||
},
|
||||
params,
|
||||
);
|
||||
|
||||
export const erpAccountDelete = (params?: ErpAccount | any) =>
|
||||
defHttp.get<ErpAccount>({ url: adminPath + '/erp/account/delete', params });
|
||||
51
web-vue/packages/erp/api/erp/category.ts
Normal file
51
web-vue/packages/erp/api/erp/category.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* 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 ErpCategory extends BasicModel<ErpCategory> {
|
||||
createTime?: string; // 记录时间
|
||||
categoryId?: string; // 分类标识
|
||||
parentName: string; // 父级名称
|
||||
categoryName: string; // 分类名称
|
||||
categoryType: string; // 分类类型
|
||||
sortOrder: number; // 排序序号
|
||||
isActive: string; // 是否启用
|
||||
updateTime?: string; // 更新时间
|
||||
}
|
||||
|
||||
export const erpCategoryList = (params?: ErpCategory | any) =>
|
||||
defHttp.get<ErpCategory>({ url: adminPath + '/erp/category/list', params });
|
||||
|
||||
export const erpCategoryListData = (params?: ErpCategory | any) =>
|
||||
defHttp.post<Page<ErpCategory>>({ url: adminPath + '/erp/category/listData', params });
|
||||
|
||||
export const erpCategoryForm = (params?: ErpCategory | any) =>
|
||||
defHttp.get<ErpCategory>({ url: adminPath + '/erp/category/form', params });
|
||||
|
||||
export const erpCategorySave = (params?: any, data?: ErpCategory | any) =>
|
||||
defHttp.postJson<ErpCategory>({ url: adminPath + '/erp/category/save', params, data });
|
||||
|
||||
export const erpCategoryImportData = (
|
||||
params: UploadFileParams,
|
||||
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
||||
) =>
|
||||
defHttp.uploadFile<UploadApiResult>(
|
||||
{
|
||||
url: ctxPath + adminPath + '/erp/category/importData',
|
||||
onUploadProgress,
|
||||
},
|
||||
params,
|
||||
);
|
||||
|
||||
export const erpCategoryDelete = (params?: ErpCategory | any) =>
|
||||
defHttp.get<ErpCategory>({ url: adminPath + '/erp/category/delete', params });
|
||||
Reference in New Issue
Block a user